vendor.js 770 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804
  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. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 3);
  10. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));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 _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;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. function sortObject(obj) {
  107. var sortObj = {};
  108. if (isPlainObject(obj)) {
  109. Object.keys(obj).sort().forEach(function (key) {
  110. sortObj[key] = obj[key];
  111. });
  112. }
  113. return !Object.keys(sortObj) ? obj : sortObj;
  114. }
  115. var HOOKS = [
  116. 'invoke',
  117. 'success',
  118. 'fail',
  119. 'complete',
  120. 'returnValue'];
  121. var globalInterceptors = {};
  122. var scopedInterceptors = {};
  123. function mergeHook(parentVal, childVal) {
  124. var res = childVal ?
  125. parentVal ?
  126. parentVal.concat(childVal) :
  127. Array.isArray(childVal) ?
  128. childVal : [childVal] :
  129. parentVal;
  130. return res ?
  131. dedupeHooks(res) :
  132. res;
  133. }
  134. function dedupeHooks(hooks) {
  135. var res = [];
  136. for (var i = 0; i < hooks.length; i++) {
  137. if (res.indexOf(hooks[i]) === -1) {
  138. res.push(hooks[i]);
  139. }
  140. }
  141. return res;
  142. }
  143. function removeHook(hooks, hook) {
  144. var index = hooks.indexOf(hook);
  145. if (index !== -1) {
  146. hooks.splice(index, 1);
  147. }
  148. }
  149. function mergeInterceptorHook(interceptor, option) {
  150. Object.keys(option).forEach(function (hook) {
  151. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  152. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  153. }
  154. });
  155. }
  156. function removeInterceptorHook(interceptor, option) {
  157. if (!interceptor || !option) {
  158. return;
  159. }
  160. Object.keys(option).forEach(function (hook) {
  161. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  162. removeHook(interceptor[hook], option[hook]);
  163. }
  164. });
  165. }
  166. function addInterceptor(method, option) {
  167. if (typeof method === 'string' && isPlainObject(option)) {
  168. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  169. } else if (isPlainObject(method)) {
  170. mergeInterceptorHook(globalInterceptors, method);
  171. }
  172. }
  173. function removeInterceptor(method, option) {
  174. if (typeof method === 'string') {
  175. if (isPlainObject(option)) {
  176. removeInterceptorHook(scopedInterceptors[method], option);
  177. } else {
  178. delete scopedInterceptors[method];
  179. }
  180. } else if (isPlainObject(method)) {
  181. removeInterceptorHook(globalInterceptors, method);
  182. }
  183. }
  184. function wrapperHook(hook) {
  185. return function (data) {
  186. return hook(data) || data;
  187. };
  188. }
  189. function isPromise(obj) {
  190. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  191. }
  192. function queue(hooks, data) {
  193. var promise = false;
  194. for (var i = 0; i < hooks.length; i++) {
  195. var hook = hooks[i];
  196. if (promise) {
  197. promise = Promise.resolve(wrapperHook(hook));
  198. } else {
  199. var res = hook(data);
  200. if (isPromise(res)) {
  201. promise = Promise.resolve(res);
  202. }
  203. if (res === false) {
  204. return {
  205. then: function then() {} };
  206. }
  207. }
  208. }
  209. return promise || {
  210. then: function then(callback) {
  211. return callback(data);
  212. } };
  213. }
  214. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  215. ['success', 'fail', 'complete'].forEach(function (name) {
  216. if (Array.isArray(interceptor[name])) {
  217. var oldCallback = options[name];
  218. options[name] = function callbackInterceptor(res) {
  219. queue(interceptor[name], res).then(function (res) {
  220. /* eslint-disable no-mixed-operators */
  221. return isFn(oldCallback) && oldCallback(res) || res;
  222. });
  223. };
  224. }
  225. });
  226. return options;
  227. }
  228. function wrapperReturnValue(method, returnValue) {
  229. var returnValueHooks = [];
  230. if (Array.isArray(globalInterceptors.returnValue)) {
  231. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  232. }
  233. var interceptor = scopedInterceptors[method];
  234. if (interceptor && Array.isArray(interceptor.returnValue)) {
  235. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  236. }
  237. returnValueHooks.forEach(function (hook) {
  238. returnValue = hook(returnValue) || returnValue;
  239. });
  240. return returnValue;
  241. }
  242. function getApiInterceptorHooks(method) {
  243. var interceptor = Object.create(null);
  244. Object.keys(globalInterceptors).forEach(function (hook) {
  245. if (hook !== 'returnValue') {
  246. interceptor[hook] = globalInterceptors[hook].slice();
  247. }
  248. });
  249. var scopedInterceptor = scopedInterceptors[method];
  250. if (scopedInterceptor) {
  251. Object.keys(scopedInterceptor).forEach(function (hook) {
  252. if (hook !== 'returnValue') {
  253. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  254. }
  255. });
  256. }
  257. return interceptor;
  258. }
  259. 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];}
  260. var interceptor = getApiInterceptorHooks(method);
  261. if (interceptor && Object.keys(interceptor).length) {
  262. if (Array.isArray(interceptor.invoke)) {
  263. var res = queue(interceptor.invoke, options);
  264. return res.then(function (options) {
  265. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  266. });
  267. } else {
  268. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  269. }
  270. }
  271. return api.apply(void 0, [options].concat(params));
  272. }
  273. var promiseInterceptor = {
  274. returnValue: function returnValue(res) {
  275. if (!isPromise(res)) {
  276. return res;
  277. }
  278. return new Promise(function (resolve, reject) {
  279. res.then(function (res) {
  280. if (res[0]) {
  281. reject(res[0]);
  282. } else {
  283. resolve(res[1]);
  284. }
  285. });
  286. });
  287. } };
  288. var SYNC_API_RE =
  289. /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo/;
  290. var CONTEXT_API_RE = /^create|Manager$/;
  291. // Context例外情况
  292. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  293. // 同步例外情况
  294. var ASYNC_API = ['createBLEConnection'];
  295. var CALLBACK_API_RE = /^on|^off/;
  296. function isContextApi(name) {
  297. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  298. }
  299. function isSyncApi(name) {
  300. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  301. }
  302. function isCallbackApi(name) {
  303. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  304. }
  305. function handlePromise(promise) {
  306. return promise.then(function (data) {
  307. return [null, data];
  308. }).
  309. catch(function (err) {return [err];});
  310. }
  311. function shouldPromise(name) {
  312. if (
  313. isContextApi(name) ||
  314. isSyncApi(name) ||
  315. isCallbackApi(name))
  316. {
  317. return false;
  318. }
  319. return true;
  320. }
  321. /* eslint-disable no-extend-native */
  322. if (!Promise.prototype.finally) {
  323. Promise.prototype.finally = function (callback) {
  324. var promise = this.constructor;
  325. return this.then(
  326. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  327. function (reason) {return promise.resolve(callback()).then(function () {
  328. throw reason;
  329. });});
  330. };
  331. }
  332. function promisify(name, api) {
  333. if (!shouldPromise(name)) {
  334. return api;
  335. }
  336. 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];}
  337. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  338. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  339. }
  340. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  341. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  342. success: resolve,
  343. fail: reject })].concat(
  344. params));
  345. })));
  346. };
  347. }
  348. var EPS = 1e-4;
  349. var BASE_DEVICE_WIDTH = 750;
  350. var isIOS = false;
  351. var deviceWidth = 0;
  352. var deviceDPR = 0;
  353. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  354. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  355. deviceWidth = windowWidth;
  356. deviceDPR = pixelRatio;
  357. isIOS = platform === 'ios';
  358. }
  359. function upx2px(number, newDeviceWidth) {
  360. if (deviceWidth === 0) {
  361. checkDeviceWidth();
  362. }
  363. number = Number(number);
  364. if (number === 0) {
  365. return 0;
  366. }
  367. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  368. if (result < 0) {
  369. result = -result;
  370. }
  371. result = Math.floor(result + EPS);
  372. if (result === 0) {
  373. if (deviceDPR === 1 || !isIOS) {
  374. result = 1;
  375. } else {
  376. result = 0.5;
  377. }
  378. }
  379. return number < 0 ? -result : result;
  380. }
  381. var LOCALE_ZH_HANS = 'zh-Hans';
  382. var LOCALE_ZH_HANT = 'zh-Hant';
  383. var LOCALE_EN = 'en';
  384. var LOCALE_FR = 'fr';
  385. var LOCALE_ES = 'es';
  386. var messages = {};
  387. var locale;
  388. {
  389. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  390. }
  391. function initI18nMessages() {
  392. if (!isEnableLocale()) {
  393. return;
  394. }
  395. var localeKeys = Object.keys(__uniConfig.locales);
  396. if (localeKeys.length) {
  397. localeKeys.forEach(function (locale) {
  398. var curMessages = messages[locale];
  399. var userMessages = __uniConfig.locales[locale];
  400. if (curMessages) {
  401. Object.assign(curMessages, userMessages);
  402. } else {
  403. messages[locale] = userMessages;
  404. }
  405. });
  406. }
  407. }
  408. initI18nMessages();
  409. var i18n = (0, _uniI18n.initVueI18n)(
  410. locale,
  411. {});
  412. var t = i18n.t;
  413. var i18nMixin = i18n.mixin = {
  414. beforeCreate: function beforeCreate() {var _this = this;
  415. var unwatch = i18n.i18n.watchLocale(function () {
  416. _this.$forceUpdate();
  417. });
  418. this.$once('hook:beforeDestroy', function () {
  419. unwatch();
  420. });
  421. },
  422. methods: {
  423. $$t: function $$t(key, values) {
  424. return t(key, values);
  425. } } };
  426. var setLocale = i18n.setLocale;
  427. var getLocale = i18n.getLocale;
  428. function initAppLocale(Vue, appVm, locale) {
  429. var state = Vue.observable({
  430. locale: locale || i18n.getLocale() });
  431. var localeWatchers = [];
  432. appVm.$watchLocale = function (fn) {
  433. localeWatchers.push(fn);
  434. };
  435. Object.defineProperty(appVm, '$locale', {
  436. get: function get() {
  437. return state.locale;
  438. },
  439. set: function set(v) {
  440. state.locale = v;
  441. localeWatchers.forEach(function (watch) {return watch(v);});
  442. } });
  443. }
  444. function isEnableLocale() {
  445. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  446. }
  447. function include(str, parts) {
  448. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  449. }
  450. function startsWith(str, parts) {
  451. return parts.find(function (part) {return str.indexOf(part) === 0;});
  452. }
  453. function normalizeLocale(locale, messages) {
  454. if (!locale) {
  455. return;
  456. }
  457. locale = locale.trim().replace(/_/g, '-');
  458. if (messages && messages[locale]) {
  459. return locale;
  460. }
  461. locale = locale.toLowerCase();
  462. if (locale === 'chinese') {
  463. // 支付宝
  464. return LOCALE_ZH_HANS;
  465. }
  466. if (locale.indexOf('zh') === 0) {
  467. if (locale.indexOf('-hans') > -1) {
  468. return LOCALE_ZH_HANS;
  469. }
  470. if (locale.indexOf('-hant') > -1) {
  471. return LOCALE_ZH_HANT;
  472. }
  473. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  474. return LOCALE_ZH_HANT;
  475. }
  476. return LOCALE_ZH_HANS;
  477. }
  478. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  479. if (lang) {
  480. return lang;
  481. }
  482. }
  483. // export function initI18n() {
  484. // const localeKeys = Object.keys(__uniConfig.locales || {})
  485. // if (localeKeys.length) {
  486. // localeKeys.forEach((locale) =>
  487. // i18n.add(locale, __uniConfig.locales[locale])
  488. // )
  489. // }
  490. // }
  491. function getLocale$1() {
  492. // 优先使用 $locale
  493. var app = getApp({
  494. allowDefault: true });
  495. if (app && app.$vm) {
  496. return app.$vm.$locale;
  497. }
  498. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  499. }
  500. function setLocale$1(locale) {
  501. var app = getApp();
  502. if (!app) {
  503. return false;
  504. }
  505. var oldLocale = app.$vm.$locale;
  506. if (oldLocale !== locale) {
  507. app.$vm.$locale = locale;
  508. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  509. locale: locale });});
  510. return true;
  511. }
  512. return false;
  513. }
  514. var onLocaleChangeCallbacks = [];
  515. function onLocaleChange(fn) {
  516. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  517. onLocaleChangeCallbacks.push(fn);
  518. }
  519. }
  520. if (typeof global !== 'undefined') {
  521. global.getLocale = getLocale$1;
  522. }
  523. var interceptors = {
  524. promiseInterceptor: promiseInterceptor };
  525. var baseApi = /*#__PURE__*/Object.freeze({
  526. __proto__: null,
  527. upx2px: upx2px,
  528. getLocale: getLocale$1,
  529. setLocale: setLocale$1,
  530. onLocaleChange: onLocaleChange,
  531. addInterceptor: addInterceptor,
  532. removeInterceptor: removeInterceptor,
  533. interceptors: interceptors });
  534. function findExistsPageIndex(url) {
  535. var pages = getCurrentPages();
  536. var len = pages.length;
  537. while (len--) {
  538. var page = pages[len];
  539. if (page.$page && page.$page.fullPath === url) {
  540. return len;
  541. }
  542. }
  543. return -1;
  544. }
  545. var redirectTo = {
  546. name: function name(fromArgs) {
  547. if (fromArgs.exists === 'back' && fromArgs.delta) {
  548. return 'navigateBack';
  549. }
  550. return 'redirectTo';
  551. },
  552. args: function args(fromArgs) {
  553. if (fromArgs.exists === 'back' && fromArgs.url) {
  554. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  555. if (existsPageIndex !== -1) {
  556. var delta = getCurrentPages().length - 1 - existsPageIndex;
  557. if (delta > 0) {
  558. fromArgs.delta = delta;
  559. }
  560. }
  561. }
  562. } };
  563. var previewImage = {
  564. args: function args(fromArgs) {
  565. var currentIndex = parseInt(fromArgs.current);
  566. if (isNaN(currentIndex)) {
  567. return;
  568. }
  569. var urls = fromArgs.urls;
  570. if (!Array.isArray(urls)) {
  571. return;
  572. }
  573. var len = urls.length;
  574. if (!len) {
  575. return;
  576. }
  577. if (currentIndex < 0) {
  578. currentIndex = 0;
  579. } else if (currentIndex >= len) {
  580. currentIndex = len - 1;
  581. }
  582. if (currentIndex > 0) {
  583. fromArgs.current = urls[currentIndex];
  584. fromArgs.urls = urls.filter(
  585. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  586. } else {
  587. fromArgs.current = urls[0];
  588. }
  589. return {
  590. indicator: false,
  591. loop: false };
  592. } };
  593. var UUID_KEY = '__DC_STAT_UUID';
  594. var deviceId;
  595. function useDeviceId(result) {
  596. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  597. if (!deviceId) {
  598. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  599. wx.setStorage({
  600. key: UUID_KEY,
  601. data: deviceId });
  602. }
  603. result.deviceId = deviceId;
  604. }
  605. function addSafeAreaInsets(result) {
  606. if (result.safeArea) {
  607. var safeArea = result.safeArea;
  608. result.safeAreaInsets = {
  609. top: safeArea.top,
  610. left: safeArea.left,
  611. right: result.windowWidth - safeArea.right,
  612. bottom: result.screenHeight - safeArea.bottom };
  613. }
  614. }
  615. function populateParameters(result) {var _result$brand =
  616. result.brand,brand = _result$brand === void 0 ? '' : _result$brand,_result$model = result.model,model = _result$model === void 0 ? '' : _result$model,_result$system = result.system,system = _result$system === void 0 ? '' : _result$system,_result$language = result.language,language = _result$language === void 0 ? '' : _result$language,theme = result.theme,version = result.version,platform = result.platform,fontSizeSetting = result.fontSizeSetting,SDKVersion = result.SDKVersion,pixelRatio = result.pixelRatio,deviceOrientation = result.deviceOrientation;
  617. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  618. // osName osVersion
  619. var osName = '';
  620. var osVersion = '';
  621. {
  622. osName = system.split(' ')[0] || '';
  623. osVersion = system.split(' ')[1] || '';
  624. }
  625. var hostVersion = version;
  626. // deviceType
  627. var deviceType = getGetDeviceType(result, model);
  628. // deviceModel
  629. var deviceBrand = getDeviceBrand(brand);
  630. // hostName
  631. var _hostName = getHostName(result);
  632. // deviceOrientation
  633. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  634. // devicePixelRatio
  635. var _devicePixelRatio = pixelRatio;
  636. // SDKVersion
  637. var _SDKVersion = SDKVersion;
  638. // hostLanguage
  639. var hostLanguage = language.replace(/_/g, '-');
  640. // wx.getAccountInfoSync
  641. var parameters = {
  642. appId: "__UNI__C4C7912",
  643. appName: "智能仓储2",
  644. appVersion: "1.0.3",
  645. appVersionCode: "200",
  646. appLanguage: getAppLanguage(hostLanguage),
  647. uniCompileVersion: "3.4.15",
  648. uniRuntimeVersion: "3.4.15",
  649. uniPlatform: undefined || "mp-weixin",
  650. deviceBrand: deviceBrand,
  651. deviceModel: model,
  652. deviceType: deviceType,
  653. devicePixelRatio: _devicePixelRatio,
  654. deviceOrientation: _deviceOrientation,
  655. osName: osName.toLocaleLowerCase(),
  656. osVersion: osVersion,
  657. hostTheme: theme,
  658. hostVersion: hostVersion,
  659. hostLanguage: hostLanguage,
  660. hostName: _hostName,
  661. hostSDKVersion: _SDKVersion,
  662. hostFontSizeSetting: fontSizeSetting,
  663. windowTop: 0,
  664. windowBottom: 0,
  665. // TODO
  666. osLanguage: undefined,
  667. osTheme: undefined,
  668. ua: undefined,
  669. hostPackageName: undefined,
  670. browserName: undefined,
  671. browserVersion: undefined };
  672. Object.assign(result, parameters);
  673. }
  674. function getGetDeviceType(result, model) {
  675. var deviceType = result.deviceType || 'phone';
  676. {
  677. var deviceTypeMaps = {
  678. ipad: 'pad',
  679. windows: 'pc',
  680. mac: 'pc' };
  681. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  682. var _model = model.toLocaleLowerCase();
  683. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  684. var _m = deviceTypeMapsKeys[index];
  685. if (_model.indexOf(_m) !== -1) {
  686. deviceType = deviceTypeMaps[_m];
  687. break;
  688. }
  689. }
  690. }
  691. return deviceType;
  692. }
  693. function getDeviceBrand(brand) {
  694. var deviceBrand = brand;
  695. if (deviceBrand) {
  696. deviceBrand = brand.toLocaleLowerCase();
  697. }
  698. return deviceBrand;
  699. }
  700. function getAppLanguage(defaultLanguage) {
  701. return getLocale$1 ?
  702. getLocale$1() :
  703. defaultLanguage;
  704. }
  705. function getHostName(result) {
  706. var _platform = 'WeChat';
  707. var _hostName = result.hostName || _platform; // mp-jd
  708. {
  709. if (result.environment) {
  710. _hostName = result.environment;
  711. } else if (result.host && result.host.env) {
  712. _hostName = result.host.env;
  713. }
  714. }
  715. return _hostName;
  716. }
  717. var getSystemInfo = {
  718. returnValue: function returnValue(result) {
  719. useDeviceId(result);
  720. addSafeAreaInsets(result);
  721. populateParameters(result);
  722. } };
  723. var showActionSheet = {
  724. args: function args(fromArgs) {
  725. if (typeof fromArgs === 'object') {
  726. fromArgs.alertText = fromArgs.title;
  727. }
  728. } };
  729. var getAppBaseInfo = {
  730. returnValue: function returnValue(result) {var _result =
  731. result,version = _result.version,language = _result.language,SDKVersion = _result.SDKVersion,theme = _result.theme;
  732. var _hostName = getHostName(result);
  733. var hostLanguage = language.replace('_', '-');
  734. result = sortObject(Object.assign(result, {
  735. appId: "__UNI__C4C7912",
  736. appName: "智能仓储2",
  737. appVersion: "1.0.3",
  738. appVersionCode: "200",
  739. appLanguage: getAppLanguage(hostLanguage),
  740. hostVersion: version,
  741. hostLanguage: hostLanguage,
  742. hostName: _hostName,
  743. hostSDKVersion: SDKVersion,
  744. hostTheme: theme }));
  745. } };
  746. var getDeviceInfo = {
  747. returnValue: function returnValue(result) {var _result2 =
  748. result,brand = _result2.brand,model = _result2.model;
  749. var deviceType = getGetDeviceType(result, model);
  750. var deviceBrand = getDeviceBrand(brand);
  751. useDeviceId(result);
  752. result = sortObject(Object.assign(result, {
  753. deviceType: deviceType,
  754. deviceBrand: deviceBrand,
  755. deviceModel: model }));
  756. } };
  757. var getWindowInfo = {
  758. returnValue: function returnValue(result) {
  759. addSafeAreaInsets(result);
  760. result = sortObject(Object.assign(result, {
  761. windowTop: 0,
  762. windowBottom: 0 }));
  763. } };
  764. // import navigateTo from 'uni-helpers/navigate-to'
  765. var protocols = {
  766. redirectTo: redirectTo,
  767. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  768. previewImage: previewImage,
  769. getSystemInfo: getSystemInfo,
  770. getSystemInfoSync: getSystemInfo,
  771. showActionSheet: showActionSheet,
  772. getAppBaseInfo: getAppBaseInfo,
  773. getDeviceInfo: getDeviceInfo,
  774. getWindowInfo: getWindowInfo };
  775. var todos = [
  776. 'vibrate',
  777. 'preloadPage',
  778. 'unPreloadPage',
  779. 'loadSubPackage'];
  780. var canIUses = [];
  781. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  782. function processCallback(methodName, method, returnValue) {
  783. return function (res) {
  784. return method(processReturnValue(methodName, res, returnValue));
  785. };
  786. }
  787. 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;
  788. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  789. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  790. if (isFn(argsOption)) {
  791. argsOption = argsOption(fromArgs, toArgs) || {};
  792. }
  793. for (var key in fromArgs) {
  794. if (hasOwn(argsOption, key)) {
  795. var keyOption = argsOption[key];
  796. if (isFn(keyOption)) {
  797. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  798. }
  799. if (!keyOption) {// 不支持的参数
  800. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  801. } else if (isStr(keyOption)) {// 重写参数 key
  802. toArgs[keyOption] = fromArgs[key];
  803. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  804. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  805. }
  806. } else if (CALLBACKS.indexOf(key) !== -1) {
  807. if (isFn(fromArgs[key])) {
  808. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  809. }
  810. } else {
  811. if (!keepFromArgs) {
  812. toArgs[key] = fromArgs[key];
  813. }
  814. }
  815. }
  816. return toArgs;
  817. } else if (isFn(fromArgs)) {
  818. fromArgs = processCallback(methodName, fromArgs, returnValue);
  819. }
  820. return fromArgs;
  821. }
  822. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  823. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  824. res = protocols.returnValue(methodName, res);
  825. }
  826. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  827. }
  828. function wrapper(methodName, method) {
  829. if (hasOwn(protocols, methodName)) {
  830. var protocol = protocols[methodName];
  831. if (!protocol) {// 暂不支持的 api
  832. return function () {
  833. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  834. };
  835. }
  836. return function (arg1, arg2) {// 目前 api 最多两个参数
  837. var options = protocol;
  838. if (isFn(protocol)) {
  839. options = protocol(arg1);
  840. }
  841. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  842. var args = [arg1];
  843. if (typeof arg2 !== 'undefined') {
  844. args.push(arg2);
  845. }
  846. if (isFn(options.name)) {
  847. methodName = options.name(arg1);
  848. } else if (isStr(options.name)) {
  849. methodName = options.name;
  850. }
  851. var returnValue = wx[methodName].apply(wx, args);
  852. if (isSyncApi(methodName)) {// 同步 api
  853. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  854. }
  855. return returnValue;
  856. };
  857. }
  858. return method;
  859. }
  860. var todoApis = Object.create(null);
  861. var TODOS = [
  862. 'onTabBarMidButtonTap',
  863. 'subscribePush',
  864. 'unsubscribePush',
  865. 'onPush',
  866. 'offPush',
  867. 'share'];
  868. function createTodoApi(name) {
  869. return function todoApi(_ref)
  870. {var fail = _ref.fail,complete = _ref.complete;
  871. var res = {
  872. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  873. isFn(fail) && fail(res);
  874. isFn(complete) && complete(res);
  875. };
  876. }
  877. TODOS.forEach(function (name) {
  878. todoApis[name] = createTodoApi(name);
  879. });
  880. var providers = {
  881. oauth: ['weixin'],
  882. share: ['weixin'],
  883. payment: ['wxpay'],
  884. push: ['weixin'] };
  885. function getProvider(_ref2)
  886. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  887. var res = false;
  888. if (providers[service]) {
  889. res = {
  890. errMsg: 'getProvider:ok',
  891. service: service,
  892. provider: providers[service] };
  893. isFn(success) && success(res);
  894. } else {
  895. res = {
  896. errMsg: 'getProvider:fail service not found' };
  897. isFn(fail) && fail(res);
  898. }
  899. isFn(complete) && complete(res);
  900. }
  901. var extraApi = /*#__PURE__*/Object.freeze({
  902. __proto__: null,
  903. getProvider: getProvider });
  904. var getEmitter = function () {
  905. var Emitter;
  906. return function getUniEmitter() {
  907. if (!Emitter) {
  908. Emitter = new _vue.default();
  909. }
  910. return Emitter;
  911. };
  912. }();
  913. function apply(ctx, method, args) {
  914. return ctx[method].apply(ctx, args);
  915. }
  916. function $on() {
  917. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  918. }
  919. function $off() {
  920. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  921. }
  922. function $once() {
  923. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  924. }
  925. function $emit() {
  926. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  927. }
  928. var eventApi = /*#__PURE__*/Object.freeze({
  929. __proto__: null,
  930. $on: $on,
  931. $off: $off,
  932. $once: $once,
  933. $emit: $emit });
  934. /**
  935. * 框架内 try-catch
  936. */
  937. /**
  938. * 开发者 try-catch
  939. */
  940. function tryCatch(fn) {
  941. return function () {
  942. try {
  943. return fn.apply(fn, arguments);
  944. } catch (e) {
  945. // TODO
  946. console.error(e);
  947. }
  948. };
  949. }
  950. function getApiCallbacks(params) {
  951. var apiCallbacks = {};
  952. for (var name in params) {
  953. var param = params[name];
  954. if (isFn(param)) {
  955. apiCallbacks[name] = tryCatch(param);
  956. delete params[name];
  957. }
  958. }
  959. return apiCallbacks;
  960. }
  961. var cid;
  962. var cidErrMsg;
  963. function normalizePushMessage(message) {
  964. try {
  965. return JSON.parse(message);
  966. } catch (e) {}
  967. return message;
  968. }
  969. function invokePushCallback(
  970. args)
  971. {
  972. if (args.type === 'clientId') {
  973. cid = args.cid;
  974. cidErrMsg = args.errMsg;
  975. invokeGetPushCidCallbacks(cid, args.errMsg);
  976. } else if (args.type === 'pushMsg') {
  977. onPushMessageCallbacks.forEach(function (callback) {
  978. callback({
  979. type: 'receive',
  980. data: normalizePushMessage(args.message) });
  981. });
  982. } else if (args.type === 'click') {
  983. onPushMessageCallbacks.forEach(function (callback) {
  984. callback({
  985. type: 'click',
  986. data: normalizePushMessage(args.message) });
  987. });
  988. }
  989. }
  990. var getPushCidCallbacks = [];
  991. function invokeGetPushCidCallbacks(cid, errMsg) {
  992. getPushCidCallbacks.forEach(function (callback) {
  993. callback(cid, errMsg);
  994. });
  995. getPushCidCallbacks.length = 0;
  996. }
  997. function getPushClientid(args) {
  998. if (!isPlainObject(args)) {
  999. args = {};
  1000. }var _getApiCallbacks =
  1001. getApiCallbacks(args),success = _getApiCallbacks.success,fail = _getApiCallbacks.fail,complete = _getApiCallbacks.complete;
  1002. var hasSuccess = isFn(success);
  1003. var hasFail = isFn(fail);
  1004. var hasComplete = isFn(complete);
  1005. getPushCidCallbacks.push(function (cid, errMsg) {
  1006. var res;
  1007. if (cid) {
  1008. res = {
  1009. errMsg: 'getPushClientid:ok',
  1010. cid: cid };
  1011. hasSuccess && success(res);
  1012. } else {
  1013. res = {
  1014. errMsg: 'getPushClientid:fail' + (errMsg ? ' ' + errMsg : '') };
  1015. hasFail && fail(res);
  1016. }
  1017. hasComplete && complete(res);
  1018. });
  1019. if (typeof cid !== 'undefined') {
  1020. Promise.resolve().then(function () {return invokeGetPushCidCallbacks(cid, cidErrMsg);});
  1021. }
  1022. }
  1023. var onPushMessageCallbacks = [];
  1024. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1025. var onPushMessage = function onPushMessage(fn) {
  1026. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1027. onPushMessageCallbacks.push(fn);
  1028. }
  1029. };
  1030. var offPushMessage = function offPushMessage(fn) {
  1031. if (!fn) {
  1032. onPushMessageCallbacks.length = 0;
  1033. } else {
  1034. var index = onPushMessageCallbacks.indexOf(fn);
  1035. if (index > -1) {
  1036. onPushMessageCallbacks.splice(index, 1);
  1037. }
  1038. }
  1039. };
  1040. var api = /*#__PURE__*/Object.freeze({
  1041. __proto__: null,
  1042. getPushClientid: getPushClientid,
  1043. onPushMessage: onPushMessage,
  1044. offPushMessage: offPushMessage,
  1045. invokePushCallback: invokePushCallback });
  1046. var MPPage = Page;
  1047. var MPComponent = Component;
  1048. var customizeRE = /:/g;
  1049. var customize = cached(function (str) {
  1050. return camelize(str.replace(customizeRE, '-'));
  1051. });
  1052. function initTriggerEvent(mpInstance) {
  1053. var oldTriggerEvent = mpInstance.triggerEvent;
  1054. var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  1055. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  1056. };
  1057. try {
  1058. // 京东小程序 triggerEvent 为只读
  1059. mpInstance.triggerEvent = newTriggerEvent;
  1060. } catch (error) {
  1061. mpInstance._triggerEvent = newTriggerEvent;
  1062. }
  1063. }
  1064. function initHook(name, options, isComponent) {
  1065. var oldHook = options[name];
  1066. if (!oldHook) {
  1067. options[name] = function () {
  1068. initTriggerEvent(this);
  1069. };
  1070. } else {
  1071. options[name] = function () {
  1072. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  1073. return oldHook.apply(this, args);
  1074. };
  1075. }
  1076. }
  1077. if (!MPPage.__$wrappered) {
  1078. MPPage.__$wrappered = true;
  1079. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1080. initHook('onLoad', options);
  1081. return MPPage(options);
  1082. };
  1083. Page.after = MPPage.after;
  1084. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1085. initHook('created', options);
  1086. return MPComponent(options);
  1087. };
  1088. }
  1089. var PAGE_EVENT_HOOKS = [
  1090. 'onPullDownRefresh',
  1091. 'onReachBottom',
  1092. 'onAddToFavorites',
  1093. 'onShareTimeline',
  1094. 'onShareAppMessage',
  1095. 'onPageScroll',
  1096. 'onResize',
  1097. 'onTabItemTap'];
  1098. function initMocks(vm, mocks) {
  1099. var mpInstance = vm.$mp[vm.mpType];
  1100. mocks.forEach(function (mock) {
  1101. if (hasOwn(mpInstance, mock)) {
  1102. vm[mock] = mpInstance[mock];
  1103. }
  1104. });
  1105. }
  1106. function hasHook(hook, vueOptions) {
  1107. if (!vueOptions) {
  1108. return true;
  1109. }
  1110. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1111. return true;
  1112. }
  1113. vueOptions = vueOptions.default || vueOptions;
  1114. if (isFn(vueOptions)) {
  1115. if (isFn(vueOptions.extendOptions[hook])) {
  1116. return true;
  1117. }
  1118. if (vueOptions.super &&
  1119. vueOptions.super.options &&
  1120. Array.isArray(vueOptions.super.options[hook])) {
  1121. return true;
  1122. }
  1123. return false;
  1124. }
  1125. if (isFn(vueOptions[hook])) {
  1126. return true;
  1127. }
  1128. var mixins = vueOptions.mixins;
  1129. if (Array.isArray(mixins)) {
  1130. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  1131. }
  1132. }
  1133. function initHooks(mpOptions, hooks, vueOptions) {
  1134. hooks.forEach(function (hook) {
  1135. if (hasHook(hook, vueOptions)) {
  1136. mpOptions[hook] = function (args) {
  1137. return this.$vm && this.$vm.__call_hook(hook, args);
  1138. };
  1139. }
  1140. });
  1141. }
  1142. function initVueComponent(Vue, vueOptions) {
  1143. vueOptions = vueOptions.default || vueOptions;
  1144. var VueComponent;
  1145. if (isFn(vueOptions)) {
  1146. VueComponent = vueOptions;
  1147. } else {
  1148. VueComponent = Vue.extend(vueOptions);
  1149. }
  1150. vueOptions = VueComponent.options;
  1151. return [VueComponent, vueOptions];
  1152. }
  1153. function initSlots(vm, vueSlots) {
  1154. if (Array.isArray(vueSlots) && vueSlots.length) {
  1155. var $slots = Object.create(null);
  1156. vueSlots.forEach(function (slotName) {
  1157. $slots[slotName] = true;
  1158. });
  1159. vm.$scopedSlots = vm.$slots = $slots;
  1160. }
  1161. }
  1162. function initVueIds(vueIds, mpInstance) {
  1163. vueIds = (vueIds || '').split(',');
  1164. var len = vueIds.length;
  1165. if (len === 1) {
  1166. mpInstance._$vueId = vueIds[0];
  1167. } else if (len === 2) {
  1168. mpInstance._$vueId = vueIds[0];
  1169. mpInstance._$vuePid = vueIds[1];
  1170. }
  1171. }
  1172. function initData(vueOptions, context) {
  1173. var data = vueOptions.data || {};
  1174. var methods = vueOptions.methods || {};
  1175. if (typeof data === 'function') {
  1176. try {
  1177. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1178. } catch (e) {
  1179. if (Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1180. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1181. }
  1182. }
  1183. } else {
  1184. try {
  1185. // 对 data 格式化
  1186. data = JSON.parse(JSON.stringify(data));
  1187. } catch (e) {}
  1188. }
  1189. if (!isPlainObject(data)) {
  1190. data = {};
  1191. }
  1192. Object.keys(methods).forEach(function (methodName) {
  1193. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1194. data[methodName] = methods[methodName];
  1195. }
  1196. });
  1197. return data;
  1198. }
  1199. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1200. function createObserver(name) {
  1201. return function observer(newVal, oldVal) {
  1202. if (this.$vm) {
  1203. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1204. }
  1205. };
  1206. }
  1207. function initBehaviors(vueOptions, initBehavior) {
  1208. var vueBehaviors = vueOptions.behaviors;
  1209. var vueExtends = vueOptions.extends;
  1210. var vueMixins = vueOptions.mixins;
  1211. var vueProps = vueOptions.props;
  1212. if (!vueProps) {
  1213. vueOptions.props = vueProps = [];
  1214. }
  1215. var behaviors = [];
  1216. if (Array.isArray(vueBehaviors)) {
  1217. vueBehaviors.forEach(function (behavior) {
  1218. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1219. if (behavior === 'uni://form-field') {
  1220. if (Array.isArray(vueProps)) {
  1221. vueProps.push('name');
  1222. vueProps.push('value');
  1223. } else {
  1224. vueProps.name = {
  1225. type: String,
  1226. default: '' };
  1227. vueProps.value = {
  1228. type: [String, Number, Boolean, Array, Object, Date],
  1229. default: '' };
  1230. }
  1231. }
  1232. });
  1233. }
  1234. if (isPlainObject(vueExtends) && vueExtends.props) {
  1235. behaviors.push(
  1236. initBehavior({
  1237. properties: initProperties(vueExtends.props, true) }));
  1238. }
  1239. if (Array.isArray(vueMixins)) {
  1240. vueMixins.forEach(function (vueMixin) {
  1241. if (isPlainObject(vueMixin) && vueMixin.props) {
  1242. behaviors.push(
  1243. initBehavior({
  1244. properties: initProperties(vueMixin.props, true) }));
  1245. }
  1246. });
  1247. }
  1248. return behaviors;
  1249. }
  1250. function parsePropType(key, type, defaultValue, file) {
  1251. // [String]=>String
  1252. if (Array.isArray(type) && type.length === 1) {
  1253. return type[0];
  1254. }
  1255. return type;
  1256. }
  1257. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1258. var properties = {};
  1259. if (!isBehavior) {
  1260. properties.vueId = {
  1261. type: String,
  1262. value: '' };
  1263. // 用于字节跳动小程序模拟抽象节点
  1264. properties.generic = {
  1265. type: Object,
  1266. value: null };
  1267. // scopedSlotsCompiler auto
  1268. properties.scopedSlotsCompiler = {
  1269. type: String,
  1270. value: '' };
  1271. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1272. type: null,
  1273. value: [],
  1274. observer: function observer(newVal, oldVal) {
  1275. var $slots = Object.create(null);
  1276. newVal.forEach(function (slotName) {
  1277. $slots[slotName] = true;
  1278. });
  1279. this.setData({
  1280. $slots: $slots });
  1281. } };
  1282. }
  1283. if (Array.isArray(props)) {// ['title']
  1284. props.forEach(function (key) {
  1285. properties[key] = {
  1286. type: null,
  1287. observer: createObserver(key) };
  1288. });
  1289. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  1290. Object.keys(props).forEach(function (key) {
  1291. var opts = props[key];
  1292. if (isPlainObject(opts)) {// title:{type:String,default:''}
  1293. var value = opts.default;
  1294. if (isFn(value)) {
  1295. value = value();
  1296. }
  1297. opts.type = parsePropType(key, opts.type);
  1298. properties[key] = {
  1299. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1300. value: value,
  1301. observer: createObserver(key) };
  1302. } else {// content:String
  1303. var type = parsePropType(key, opts);
  1304. properties[key] = {
  1305. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1306. observer: createObserver(key) };
  1307. }
  1308. });
  1309. }
  1310. return properties;
  1311. }
  1312. function wrapper$1(event) {
  1313. // TODO 又得兼容 mpvue 的 mp 对象
  1314. try {
  1315. event.mp = JSON.parse(JSON.stringify(event));
  1316. } catch (e) {}
  1317. event.stopPropagation = noop;
  1318. event.preventDefault = noop;
  1319. event.target = event.target || {};
  1320. if (!hasOwn(event, 'detail')) {
  1321. event.detail = {};
  1322. }
  1323. if (hasOwn(event, 'markerId')) {
  1324. event.detail = typeof event.detail === 'object' ? event.detail : {};
  1325. event.detail.markerId = event.markerId;
  1326. }
  1327. if (isPlainObject(event.detail)) {
  1328. event.target = Object.assign({}, event.target, event.detail);
  1329. }
  1330. return event;
  1331. }
  1332. function getExtraValue(vm, dataPathsArray) {
  1333. var context = vm;
  1334. dataPathsArray.forEach(function (dataPathArray) {
  1335. var dataPath = dataPathArray[0];
  1336. var value = dataPathArray[2];
  1337. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  1338. var propPath = dataPathArray[1];
  1339. var valuePath = dataPathArray[3];
  1340. var vFor;
  1341. if (Number.isInteger(dataPath)) {
  1342. vFor = dataPath;
  1343. } else if (!dataPath) {
  1344. vFor = context;
  1345. } else if (typeof dataPath === 'string' && dataPath) {
  1346. if (dataPath.indexOf('#s#') === 0) {
  1347. vFor = dataPath.substr(3);
  1348. } else {
  1349. vFor = vm.__get_value(dataPath, context);
  1350. }
  1351. }
  1352. if (Number.isInteger(vFor)) {
  1353. context = value;
  1354. } else if (!propPath) {
  1355. context = vFor[value];
  1356. } else {
  1357. if (Array.isArray(vFor)) {
  1358. context = vFor.find(function (vForItem) {
  1359. return vm.__get_value(propPath, vForItem) === value;
  1360. });
  1361. } else if (isPlainObject(vFor)) {
  1362. context = Object.keys(vFor).find(function (vForKey) {
  1363. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1364. });
  1365. } else {
  1366. console.error('v-for 暂不支持循环数据:', vFor);
  1367. }
  1368. }
  1369. if (valuePath) {
  1370. context = vm.__get_value(valuePath, context);
  1371. }
  1372. }
  1373. });
  1374. return context;
  1375. }
  1376. function processEventExtra(vm, extra, event) {
  1377. var extraObj = {};
  1378. if (Array.isArray(extra) && extra.length) {
  1379. /**
  1380. *[
  1381. * ['data.items', 'data.id', item.data.id],
  1382. * ['metas', 'id', meta.id]
  1383. *],
  1384. *[
  1385. * ['data.items', 'data.id', item.data.id],
  1386. * ['metas', 'id', meta.id]
  1387. *],
  1388. *'test'
  1389. */
  1390. extra.forEach(function (dataPath, index) {
  1391. if (typeof dataPath === 'string') {
  1392. if (!dataPath) {// model,prop.sync
  1393. extraObj['$' + index] = vm;
  1394. } else {
  1395. if (dataPath === '$event') {// $event
  1396. extraObj['$' + index] = event;
  1397. } else if (dataPath === 'arguments') {
  1398. if (event.detail && event.detail.__args__) {
  1399. extraObj['$' + index] = event.detail.__args__;
  1400. } else {
  1401. extraObj['$' + index] = [event];
  1402. }
  1403. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1404. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1405. } else {
  1406. extraObj['$' + index] = vm.__get_value(dataPath);
  1407. }
  1408. }
  1409. } else {
  1410. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1411. }
  1412. });
  1413. }
  1414. return extraObj;
  1415. }
  1416. function getObjByArray(arr) {
  1417. var obj = {};
  1418. for (var i = 1; i < arr.length; i++) {
  1419. var element = arr[i];
  1420. obj[element[0]] = element[1];
  1421. }
  1422. return obj;
  1423. }
  1424. 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;
  1425. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1426. if (isCustom) {// 自定义事件
  1427. isCustomMPEvent = event.currentTarget &&
  1428. event.currentTarget.dataset &&
  1429. event.currentTarget.dataset.comType === 'wx';
  1430. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1431. if (isCustomMPEvent) {
  1432. return [event];
  1433. }
  1434. return event.detail.__args__ || event.detail;
  1435. }
  1436. }
  1437. var extraObj = processEventExtra(vm, extra, event);
  1438. var ret = [];
  1439. args.forEach(function (arg) {
  1440. if (arg === '$event') {
  1441. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1442. ret.push(event.target.value);
  1443. } else {
  1444. if (isCustom && !isCustomMPEvent) {
  1445. ret.push(event.detail.__args__[0]);
  1446. } else {// wxcomponent 组件或内置组件
  1447. ret.push(event);
  1448. }
  1449. }
  1450. } else {
  1451. if (Array.isArray(arg) && arg[0] === 'o') {
  1452. ret.push(getObjByArray(arg));
  1453. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1454. ret.push(extraObj[arg]);
  1455. } else {
  1456. ret.push(arg);
  1457. }
  1458. }
  1459. });
  1460. return ret;
  1461. }
  1462. var ONCE = '~';
  1463. var CUSTOM = '^';
  1464. function isMatchEventType(eventType, optType) {
  1465. return eventType === optType ||
  1466. optType === 'regionchange' && (
  1467. eventType === 'begin' ||
  1468. eventType === 'end');
  1469. }
  1470. function getContextVm(vm) {
  1471. var $parent = vm.$parent;
  1472. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1473. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1474. $parent = $parent.$parent;
  1475. }
  1476. return $parent && $parent.$parent;
  1477. }
  1478. function handleEvent(event) {var _this2 = this;
  1479. event = wrapper$1(event);
  1480. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1481. var dataset = (event.currentTarget || event.target).dataset;
  1482. if (!dataset) {
  1483. return console.warn('事件信息不存在');
  1484. }
  1485. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1486. if (!eventOpts) {
  1487. return console.warn('事件信息不存在');
  1488. }
  1489. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1490. var eventType = event.type;
  1491. var ret = [];
  1492. eventOpts.forEach(function (eventOpt) {
  1493. var type = eventOpt[0];
  1494. var eventsArray = eventOpt[1];
  1495. var isCustom = type.charAt(0) === CUSTOM;
  1496. type = isCustom ? type.slice(1) : type;
  1497. var isOnce = type.charAt(0) === ONCE;
  1498. type = isOnce ? type.slice(1) : type;
  1499. if (eventsArray && isMatchEventType(eventType, type)) {
  1500. eventsArray.forEach(function (eventArray) {
  1501. var methodName = eventArray[0];
  1502. if (methodName) {
  1503. var handlerCtx = _this2.$vm;
  1504. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1505. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1506. }
  1507. if (methodName === '$emit') {
  1508. handlerCtx.$emit.apply(handlerCtx,
  1509. processEventArgs(
  1510. _this2.$vm,
  1511. event,
  1512. eventArray[1],
  1513. eventArray[2],
  1514. isCustom,
  1515. methodName));
  1516. return;
  1517. }
  1518. var handler = handlerCtx[methodName];
  1519. if (!isFn(handler)) {
  1520. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1521. }
  1522. if (isOnce) {
  1523. if (handler.once) {
  1524. return;
  1525. }
  1526. handler.once = true;
  1527. }
  1528. var params = processEventArgs(
  1529. _this2.$vm,
  1530. event,
  1531. eventArray[1],
  1532. eventArray[2],
  1533. isCustom,
  1534. methodName);
  1535. params = Array.isArray(params) ? params : [];
  1536. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1537. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1538. // eslint-disable-next-line no-sparse-arrays
  1539. params = params.concat([,,,,,,,,,, event]);
  1540. }
  1541. ret.push(handler.apply(handlerCtx, params));
  1542. }
  1543. });
  1544. }
  1545. });
  1546. if (
  1547. eventType === 'input' &&
  1548. ret.length === 1 &&
  1549. typeof ret[0] !== 'undefined')
  1550. {
  1551. return ret[0];
  1552. }
  1553. }
  1554. var eventChannels = {};
  1555. var eventChannelStack = [];
  1556. function getEventChannel(id) {
  1557. if (id) {
  1558. var eventChannel = eventChannels[id];
  1559. delete eventChannels[id];
  1560. return eventChannel;
  1561. }
  1562. return eventChannelStack.shift();
  1563. }
  1564. var hooks = [
  1565. 'onShow',
  1566. 'onHide',
  1567. 'onError',
  1568. 'onPageNotFound',
  1569. 'onThemeChange',
  1570. 'onUnhandledRejection'];
  1571. function initEventChannel() {
  1572. _vue.default.prototype.getOpenerEventChannel = function () {
  1573. // 微信小程序使用自身getOpenerEventChannel
  1574. {
  1575. return this.$scope.getOpenerEventChannel();
  1576. }
  1577. };
  1578. var callHook = _vue.default.prototype.__call_hook;
  1579. _vue.default.prototype.__call_hook = function (hook, args) {
  1580. if (hook === 'onLoad' && args && args.__id__) {
  1581. this.__eventChannel__ = getEventChannel(args.__id__);
  1582. delete args.__id__;
  1583. }
  1584. return callHook.call(this, hook, args);
  1585. };
  1586. }
  1587. function initScopedSlotsParams() {
  1588. var center = {};
  1589. var parents = {};
  1590. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1591. var has = center[vueId];
  1592. if (!has) {
  1593. parents[vueId] = this;
  1594. this.$on('hook:destroyed', function () {
  1595. delete parents[vueId];
  1596. });
  1597. }
  1598. return has;
  1599. };
  1600. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1601. var data = center[vueId];
  1602. if (data) {
  1603. var object = data[name] || {};
  1604. return key ? object[key] : object;
  1605. } else {
  1606. parents[vueId] = this;
  1607. this.$on('hook:destroyed', function () {
  1608. delete parents[vueId];
  1609. });
  1610. }
  1611. };
  1612. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1613. var vueIds = this.$options.propsData.vueId;
  1614. if (vueIds) {
  1615. var vueId = vueIds.split(',')[0];
  1616. var object = center[vueId] = center[vueId] || {};
  1617. object[name] = value;
  1618. if (parents[vueId]) {
  1619. parents[vueId].$forceUpdate();
  1620. }
  1621. }
  1622. };
  1623. _vue.default.mixin({
  1624. destroyed: function destroyed() {
  1625. var propsData = this.$options.propsData;
  1626. var vueId = propsData && propsData.vueId;
  1627. if (vueId) {
  1628. delete center[vueId];
  1629. delete parents[vueId];
  1630. }
  1631. } });
  1632. }
  1633. function parseBaseApp(vm, _ref3)
  1634. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1635. initEventChannel();
  1636. {
  1637. initScopedSlotsParams();
  1638. }
  1639. if (vm.$options.store) {
  1640. _vue.default.prototype.$store = vm.$options.store;
  1641. }
  1642. uniIdMixin(_vue.default);
  1643. _vue.default.prototype.mpHost = "mp-weixin";
  1644. _vue.default.mixin({
  1645. beforeCreate: function beforeCreate() {
  1646. if (!this.$options.mpType) {
  1647. return;
  1648. }
  1649. this.mpType = this.$options.mpType;
  1650. this.$mp = _defineProperty({
  1651. data: {} },
  1652. this.mpType, this.$options.mpInstance);
  1653. this.$scope = this.$options.mpInstance;
  1654. delete this.$options.mpType;
  1655. delete this.$options.mpInstance;
  1656. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1657. var app = getApp();
  1658. if (app.$vm && app.$vm.$i18n) {
  1659. this._i18n = app.$vm.$i18n;
  1660. }
  1661. }
  1662. if (this.mpType !== 'app') {
  1663. initRefs(this);
  1664. initMocks(this, mocks);
  1665. }
  1666. } });
  1667. var appOptions = {
  1668. onLaunch: function onLaunch(args) {
  1669. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1670. return;
  1671. }
  1672. {
  1673. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1674. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1675. }
  1676. }
  1677. this.$vm = vm;
  1678. this.$vm.$mp = {
  1679. app: this };
  1680. this.$vm.$scope = this;
  1681. // vm 上也挂载 globalData
  1682. this.$vm.globalData = this.globalData;
  1683. this.$vm._isMounted = true;
  1684. this.$vm.__call_hook('mounted', args);
  1685. this.$vm.__call_hook('onLaunch', args);
  1686. } };
  1687. // 兼容旧版本 globalData
  1688. appOptions.globalData = vm.$options.globalData || {};
  1689. // 将 methods 中的方法挂在 getApp() 中
  1690. var methods = vm.$options.methods;
  1691. if (methods) {
  1692. Object.keys(methods).forEach(function (name) {
  1693. appOptions[name] = methods[name];
  1694. });
  1695. }
  1696. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  1697. initHooks(appOptions, hooks);
  1698. return appOptions;
  1699. }
  1700. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1701. function findVmByVueId(vm, vuePid) {
  1702. var $children = vm.$children;
  1703. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1704. for (var i = $children.length - 1; i >= 0; i--) {
  1705. var childVm = $children[i];
  1706. if (childVm.$scope._$vueId === vuePid) {
  1707. return childVm;
  1708. }
  1709. }
  1710. // 反向递归查找
  1711. var parentVm;
  1712. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1713. parentVm = findVmByVueId($children[_i], vuePid);
  1714. if (parentVm) {
  1715. return parentVm;
  1716. }
  1717. }
  1718. }
  1719. function initBehavior(options) {
  1720. return Behavior(options);
  1721. }
  1722. function isPage() {
  1723. return !!this.route;
  1724. }
  1725. function initRelation(detail) {
  1726. this.triggerEvent('__l', detail);
  1727. }
  1728. function selectAllComponents(mpInstance, selector, $refs) {
  1729. var components = mpInstance.selectAllComponents(selector);
  1730. components.forEach(function (component) {
  1731. var ref = component.dataset.ref;
  1732. $refs[ref] = component.$vm || component;
  1733. {
  1734. if (component.dataset.vueGeneric === 'scoped') {
  1735. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1736. selectAllComponents(scopedComponent, selector, $refs);
  1737. });
  1738. }
  1739. }
  1740. });
  1741. }
  1742. function initRefs(vm) {
  1743. var mpInstance = vm.$scope;
  1744. Object.defineProperty(vm, '$refs', {
  1745. get: function get() {
  1746. var $refs = {};
  1747. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1748. // TODO 暂不考虑 for 中的 scoped
  1749. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1750. forComponents.forEach(function (component) {
  1751. var ref = component.dataset.ref;
  1752. if (!$refs[ref]) {
  1753. $refs[ref] = [];
  1754. }
  1755. $refs[ref].push(component.$vm || component);
  1756. });
  1757. return $refs;
  1758. } });
  1759. }
  1760. function handleLink(event) {var _ref4 =
  1761. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1762. var parentVm;
  1763. if (vuePid) {
  1764. parentVm = findVmByVueId(this.$vm, vuePid);
  1765. }
  1766. if (!parentVm) {
  1767. parentVm = this.$vm;
  1768. }
  1769. vueOptions.parent = parentVm;
  1770. }
  1771. function parseApp(vm) {
  1772. return parseBaseApp(vm, {
  1773. mocks: mocks,
  1774. initRefs: initRefs });
  1775. }
  1776. function createApp(vm) {
  1777. App(parseApp(vm));
  1778. return vm;
  1779. }
  1780. var encodeReserveRE = /[!'()*]/g;
  1781. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1782. var commaRE = /%2C/g;
  1783. // fixed encodeURIComponent which is more conformant to RFC3986:
  1784. // - escapes [!'()*]
  1785. // - preserve commas
  1786. var encode = function encode(str) {return encodeURIComponent(str).
  1787. replace(encodeReserveRE, encodeReserveReplacer).
  1788. replace(commaRE, ',');};
  1789. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1790. var res = obj ? Object.keys(obj).map(function (key) {
  1791. var val = obj[key];
  1792. if (val === undefined) {
  1793. return '';
  1794. }
  1795. if (val === null) {
  1796. return encodeStr(key);
  1797. }
  1798. if (Array.isArray(val)) {
  1799. var result = [];
  1800. val.forEach(function (val2) {
  1801. if (val2 === undefined) {
  1802. return;
  1803. }
  1804. if (val2 === null) {
  1805. result.push(encodeStr(key));
  1806. } else {
  1807. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1808. }
  1809. });
  1810. return result.join('&');
  1811. }
  1812. return encodeStr(key) + '=' + encodeStr(val);
  1813. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1814. return res ? "?".concat(res) : '';
  1815. }
  1816. function parseBaseComponent(vueComponentOptions)
  1817. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1818. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1819. var options = _objectSpread({
  1820. multipleSlots: true,
  1821. addGlobalClass: true },
  1822. vueOptions.options || {});
  1823. {
  1824. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1825. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1826. Object.assign(options, vueOptions['mp-weixin'].options);
  1827. }
  1828. }
  1829. var componentOptions = {
  1830. options: options,
  1831. data: initData(vueOptions, _vue.default.prototype),
  1832. behaviors: initBehaviors(vueOptions, initBehavior),
  1833. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1834. lifetimes: {
  1835. attached: function attached() {
  1836. var properties = this.properties;
  1837. var options = {
  1838. mpType: isPage.call(this) ? 'page' : 'component',
  1839. mpInstance: this,
  1840. propsData: properties };
  1841. initVueIds(properties.vueId, this);
  1842. // 处理父子关系
  1843. initRelation.call(this, {
  1844. vuePid: this._$vuePid,
  1845. vueOptions: options });
  1846. // 初始化 vue 实例
  1847. this.$vm = new VueComponent(options);
  1848. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1849. initSlots(this.$vm, properties.vueSlots);
  1850. // 触发首次 setData
  1851. this.$vm.$mount();
  1852. },
  1853. ready: function ready() {
  1854. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1855. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1856. if (this.$vm) {
  1857. this.$vm._isMounted = true;
  1858. this.$vm.__call_hook('mounted');
  1859. this.$vm.__call_hook('onReady');
  1860. }
  1861. },
  1862. detached: function detached() {
  1863. this.$vm && this.$vm.$destroy();
  1864. } },
  1865. pageLifetimes: {
  1866. show: function show(args) {
  1867. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1868. },
  1869. hide: function hide() {
  1870. this.$vm && this.$vm.__call_hook('onPageHide');
  1871. },
  1872. resize: function resize(size) {
  1873. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1874. } },
  1875. methods: {
  1876. __l: handleLink,
  1877. __e: handleEvent } };
  1878. // externalClasses
  1879. if (vueOptions.externalClasses) {
  1880. componentOptions.externalClasses = vueOptions.externalClasses;
  1881. }
  1882. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1883. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1884. componentOptions.methods[callMethod] = function (args) {
  1885. return this.$vm[callMethod](args);
  1886. };
  1887. });
  1888. }
  1889. if (isPage) {
  1890. return componentOptions;
  1891. }
  1892. return [componentOptions, VueComponent];
  1893. }
  1894. function parseComponent(vueComponentOptions) {
  1895. return parseBaseComponent(vueComponentOptions, {
  1896. isPage: isPage,
  1897. initRelation: initRelation });
  1898. }
  1899. var hooks$1 = [
  1900. 'onShow',
  1901. 'onHide',
  1902. 'onUnload'];
  1903. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1904. function parseBasePage(vuePageOptions, _ref6)
  1905. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1906. var pageOptions = parseComponent(vuePageOptions);
  1907. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1908. pageOptions.methods.onLoad = function (query) {
  1909. this.options = query;
  1910. var copyQuery = Object.assign({}, query);
  1911. delete copyQuery.__id__;
  1912. this.$page = {
  1913. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1914. this.$vm.$mp.query = query; // 兼容 mpvue
  1915. this.$vm.__call_hook('onLoad', query);
  1916. };
  1917. return pageOptions;
  1918. }
  1919. function parsePage(vuePageOptions) {
  1920. return parseBasePage(vuePageOptions, {
  1921. isPage: isPage,
  1922. initRelation: initRelation });
  1923. }
  1924. function createPage(vuePageOptions) {
  1925. {
  1926. return Component(parsePage(vuePageOptions));
  1927. }
  1928. }
  1929. function createComponent(vueOptions) {
  1930. {
  1931. return Component(parseComponent(vueOptions));
  1932. }
  1933. }
  1934. function createSubpackageApp(vm) {
  1935. var appOptions = parseApp(vm);
  1936. var app = getApp({
  1937. allowDefault: true });
  1938. vm.$scope = app;
  1939. var globalData = app.globalData;
  1940. if (globalData) {
  1941. Object.keys(appOptions.globalData).forEach(function (name) {
  1942. if (!hasOwn(globalData, name)) {
  1943. globalData[name] = appOptions.globalData[name];
  1944. }
  1945. });
  1946. }
  1947. Object.keys(appOptions).forEach(function (name) {
  1948. if (!hasOwn(app, name)) {
  1949. app[name] = appOptions[name];
  1950. }
  1951. });
  1952. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1953. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1954. vm.__call_hook('onShow', args);
  1955. });
  1956. }
  1957. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1958. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1959. vm.__call_hook('onHide', args);
  1960. });
  1961. }
  1962. if (isFn(appOptions.onLaunch)) {
  1963. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1964. vm.__call_hook('onLaunch', args);
  1965. }
  1966. return vm;
  1967. }
  1968. function createPlugin(vm) {
  1969. var appOptions = parseApp(vm);
  1970. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1971. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1972. vm.__call_hook('onShow', args);
  1973. });
  1974. }
  1975. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1976. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1977. vm.__call_hook('onHide', args);
  1978. });
  1979. }
  1980. if (isFn(appOptions.onLaunch)) {
  1981. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1982. vm.__call_hook('onLaunch', args);
  1983. }
  1984. return vm;
  1985. }
  1986. todos.forEach(function (todoApi) {
  1987. protocols[todoApi] = false;
  1988. });
  1989. canIUses.forEach(function (canIUseApi) {
  1990. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1991. canIUseApi;
  1992. if (!wx.canIUse(apiName)) {
  1993. protocols[canIUseApi] = false;
  1994. }
  1995. });
  1996. var uni = {};
  1997. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1998. uni = new Proxy({}, {
  1999. get: function get(target, name) {
  2000. if (hasOwn(target, name)) {
  2001. return target[name];
  2002. }
  2003. if (baseApi[name]) {
  2004. return baseApi[name];
  2005. }
  2006. if (api[name]) {
  2007. return promisify(name, api[name]);
  2008. }
  2009. {
  2010. if (extraApi[name]) {
  2011. return promisify(name, extraApi[name]);
  2012. }
  2013. if (todoApis[name]) {
  2014. return promisify(name, todoApis[name]);
  2015. }
  2016. }
  2017. if (eventApi[name]) {
  2018. return eventApi[name];
  2019. }
  2020. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  2021. return;
  2022. }
  2023. return promisify(name, wrapper(name, wx[name]));
  2024. },
  2025. set: function set(target, name, value) {
  2026. target[name] = value;
  2027. return true;
  2028. } });
  2029. } else {
  2030. Object.keys(baseApi).forEach(function (name) {
  2031. uni[name] = baseApi[name];
  2032. });
  2033. {
  2034. Object.keys(todoApis).forEach(function (name) {
  2035. uni[name] = promisify(name, todoApis[name]);
  2036. });
  2037. Object.keys(extraApi).forEach(function (name) {
  2038. uni[name] = promisify(name, todoApis[name]);
  2039. });
  2040. }
  2041. Object.keys(eventApi).forEach(function (name) {
  2042. uni[name] = eventApi[name];
  2043. });
  2044. Object.keys(api).forEach(function (name) {
  2045. uni[name] = promisify(name, api[name]);
  2046. });
  2047. Object.keys(wx).forEach(function (name) {
  2048. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2049. uni[name] = promisify(name, wrapper(name, wx[name]));
  2050. }
  2051. });
  2052. }
  2053. wx.createApp = createApp;
  2054. wx.createPage = createPage;
  2055. wx.createComponent = createComponent;
  2056. wx.createSubpackageApp = createSubpackageApp;
  2057. wx.createPlugin = createPlugin;
  2058. var uni$1 = uni;var _default =
  2059. uni$1;exports.default = _default;
  2060. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  2061. /***/ }),
  2062. /***/ 11:
  2063. /*!**********************************************************************************************************!*\
  2064. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2065. \**********************************************************************************************************/
  2066. /*! exports provided: default */
  2067. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2068. "use strict";
  2069. __webpack_require__.r(__webpack_exports__);
  2070. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2071. /* globals __VUE_SSR_CONTEXT__ */
  2072. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2073. // This module is a runtime utility for cleaner component module output and will
  2074. // be included in the final webpack user bundle.
  2075. function normalizeComponent (
  2076. scriptExports,
  2077. render,
  2078. staticRenderFns,
  2079. functionalTemplate,
  2080. injectStyles,
  2081. scopeId,
  2082. moduleIdentifier, /* server only */
  2083. shadowMode, /* vue-cli only */
  2084. components, // fixed by xxxxxx auto components
  2085. renderjs // fixed by xxxxxx renderjs
  2086. ) {
  2087. // Vue.extend constructor export interop
  2088. var options = typeof scriptExports === 'function'
  2089. ? scriptExports.options
  2090. : scriptExports
  2091. // fixed by xxxxxx auto components
  2092. if (components) {
  2093. if (!options.components) {
  2094. options.components = {}
  2095. }
  2096. var hasOwn = Object.prototype.hasOwnProperty
  2097. for (var name in components) {
  2098. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2099. options.components[name] = components[name]
  2100. }
  2101. }
  2102. }
  2103. // fixed by xxxxxx renderjs
  2104. if (renderjs) {
  2105. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2106. this[renderjs.__module] = this
  2107. });
  2108. (options.mixins || (options.mixins = [])).push(renderjs)
  2109. }
  2110. // render functions
  2111. if (render) {
  2112. options.render = render
  2113. options.staticRenderFns = staticRenderFns
  2114. options._compiled = true
  2115. }
  2116. // functional template
  2117. if (functionalTemplate) {
  2118. options.functional = true
  2119. }
  2120. // scopedId
  2121. if (scopeId) {
  2122. options._scopeId = 'data-v-' + scopeId
  2123. }
  2124. var hook
  2125. if (moduleIdentifier) { // server build
  2126. hook = function (context) {
  2127. // 2.3 injection
  2128. context =
  2129. context || // cached call
  2130. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2131. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2132. // 2.2 with runInNewContext: true
  2133. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2134. context = __VUE_SSR_CONTEXT__
  2135. }
  2136. // inject component styles
  2137. if (injectStyles) {
  2138. injectStyles.call(this, context)
  2139. }
  2140. // register component module identifier for async chunk inferrence
  2141. if (context && context._registeredComponents) {
  2142. context._registeredComponents.add(moduleIdentifier)
  2143. }
  2144. }
  2145. // used by ssr in case component is cached and beforeCreate
  2146. // never gets called
  2147. options._ssrRegister = hook
  2148. } else if (injectStyles) {
  2149. hook = shadowMode
  2150. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2151. : injectStyles
  2152. }
  2153. if (hook) {
  2154. if (options.functional) {
  2155. // for template-only hot-reload because in that case the render fn doesn't
  2156. // go through the normalizer
  2157. options._injectStyles = hook
  2158. // register for functioal component in vue file
  2159. var originalRender = options.render
  2160. options.render = function renderWithStyleInjection (h, context) {
  2161. hook.call(context)
  2162. return originalRender(h, context)
  2163. }
  2164. } else {
  2165. // inject component registration as beforeCreate hook
  2166. var existing = options.beforeCreate
  2167. options.beforeCreate = existing
  2168. ? [].concat(existing, hook)
  2169. : [hook]
  2170. }
  2171. }
  2172. return {
  2173. exports: scriptExports,
  2174. options: options
  2175. }
  2176. }
  2177. /***/ }),
  2178. /***/ 12:
  2179. /*!****************************************************************************************************!*\
  2180. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/plugins/index.js ***!
  2181. \****************************************************************************************************/
  2182. /*! no static exports found */
  2183. /***/ (function(module, exports, __webpack_require__) {
  2184. "use strict";
  2185. __webpack_require__(/*! ./uView */ 13);
  2186. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  2187. var _util = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/util.js */ 43));
  2188. var _http = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/http.js */ 45));
  2189. var _message = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/message.js */ 44));
  2190. var _storage = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/storage.js */ 54));
  2191. var filters = _interopRequireWildcard(__webpack_require__(/*! ../libs/utils/filters.js */ 56));
  2192. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 48));
  2193. var _mixin = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/mixin.js */ 58));
  2194. var _pda = _interopRequireDefault(__webpack_require__(/*! ../libs/utils/pda.js */ 59));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;}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 全局工具类
  2195. // 全局http请求
  2196. // 全局消息提示
  2197. // 本地存储
  2198. // 全局过滤器
  2199. // vuex全局变量
  2200. // 全局混入
  2201. _vue.default.prototype.$msgTimer = null; // 全局消息提醒 app第一次启动使用
  2202. _vue.default.prototype.$msgLoopTimer = null; // 全局消息提醒 轮询当前消息列表
  2203. _vue.default.prototype.$store = _index.default;_vue.default.prototype.$utils = _util.default;_vue.default.prototype.$pda = _pda.default;_vue.default.prototype.$http = _http.default;_vue.default.prototype.$msg = _message.default;_vue.default.prototype.$storage = _storage.default;
  2204. _vue.default.config.productionTip = false;
  2205. _vue.default.mixin(_mixin.default);
  2206. // 全局过滤器挂载
  2207. Object.keys(filters).forEach(function (key) {
  2208. _vue.default.filter(key, filters[key]);
  2209. });
  2210. /***/ }),
  2211. /***/ 13:
  2212. /*!****************************************************************************************************!*\
  2213. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/plugins/uView.js ***!
  2214. \****************************************************************************************************/
  2215. /*! no static exports found */
  2216. /***/ (function(module, exports, __webpack_require__) {
  2217. "use strict";
  2218. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  2219. var _uviewUi = _interopRequireDefault(__webpack_require__(/*! uview-ui */ 14));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2220. _vue.default.use(_uviewUi.default);
  2221. /***/ }),
  2222. /***/ 139:
  2223. /*!***************************************************************************************************************!*\
  2224. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/pages/material-tree/data.js ***!
  2225. \***************************************************************************************************************/
  2226. /*! no static exports found */
  2227. /***/ (function(module, exports, __webpack_require__) {
  2228. "use strict";
  2229. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _ref;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;}var dataList = [(_ref = {
  2230. checked: false,
  2231. children: [{
  2232. children: [{
  2233. children: [{
  2234. children: [],
  2235. id: "128334455556667681",
  2236. name: "学生2104",
  2237. user: true },
  2238. {
  2239. children: [],
  2240. id: 9945523453454556625,
  2241. name: "小陆214112",
  2242. user: true },
  2243. {
  2244. children: [],
  2245. id: "1283345465523232681",
  2246. name: "学生224113",
  2247. user: true },
  2248. {
  2249. children: [],
  2250. id: 996453452367687256625,
  2251. name: "小陆22410312",
  2252. user: true },
  2253. {
  2254. children: [],
  2255. id: "17574556678881",
  2256. name: "学生234222",
  2257. user: true },
  2258. {
  2259. children: [],
  2260. id: 954512456455667625,
  2261. name: "小陆241212",
  2262. user: true },
  2263. {
  2264. children: [],
  2265. id: "125522465657755681",
  2266. name: "学生4511",
  2267. user: true },
  2268. {
  2269. children: [],
  2270. id: 9960145622788454655656625,
  2271. name: "小陆4552",
  2272. user: true },
  2273. {
  2274. children: [],
  2275. id: "128334533554655681",
  2276. name: "学生2",
  2277. user: true },
  2278. {
  2279. children: [],
  2280. id: 9455234556456625,
  2281. name: "小陆212",
  2282. user: true },
  2283. {
  2284. children: [],
  2285. id: "128345546534545681",
  2286. name: "学生223",
  2287. user: true },
  2288. {
  2289. children: [],
  2290. id: 99120045452121256625,
  2291. name: "小陆22312",
  2292. user: true },
  2293. {
  2294. children: [],
  2295. id: "1754110466565681",
  2296. name: "学生232",
  2297. user: true },
  2298. {
  2299. children: [],
  2300. id: 954545232332356625,
  2301. name: "小陆2212",
  2302. user: true },
  2303. {
  2304. children: [],
  2305. id: "12324655555681",
  2306. name: "学生45",
  2307. user: true },
  2308. {
  2309. children: [],
  2310. id: 9960556423234556625,
  2311. name: "小陆4552",
  2312. user: true },
  2313. {
  2314. children: [],
  2315. id: "1283789465676755681",
  2316. name: "学生2",
  2317. user: true },
  2318. {
  2319. children: [],
  2320. id: 8785566344545525,
  2321. name: "小陆212",
  2322. user: true },
  2323. {
  2324. children: [],
  2325. id: "128878623355681",
  2326. name: "学生223344",
  2327. user: true },
  2328. {
  2329. children: [],
  2330. id: 995778899000625,
  2331. name: "小768712",
  2332. user: true },
  2333. {
  2334. children: [],
  2335. id: "14552501223681",
  2336. name: "学生232",
  2337. user: true },
  2338. {
  2339. children: [{
  2340. children: [{
  2341. children: [],
  2342. id: "12833445556818888",
  2343. name: "学生21048888",
  2344. checked: false,
  2345. pid: "",
  2346. user: true },
  2347. {
  2348. children: [],
  2349. id: '994552345566454545258888',
  2350. name: "小陆2141128888",
  2351. checked: false,
  2352. pid: "",
  2353. user: true },
  2354. {
  2355. children: [],
  2356. id: "1283345456556556818888",
  2357. name: "学生8888sa",
  2358. checked: false,
  2359. pid: "",
  2360. user: true },
  2361. {
  2362. children: [],
  2363. id: '99645345232566258888',
  2364. name: "小陆224103128888",
  2365. checked: false,
  2366. pid: "",
  2367. user: true },
  2368. {
  2369. children: [],
  2370. id: "17574556818888",
  2371. name: "学生2342228888",
  2372. checked: false,
  2373. pid: "",
  2374. user: true },
  2375. {
  2376. children: [],
  2377. id: '95451245566566258888',
  2378. name: "小陆2412128888",
  2379. checked: false,
  2380. pid: "",
  2381. user: true },
  2382. {
  2383. children: [],
  2384. id: "12552246556818888",
  2385. name: "学生45118888",
  2386. checked: false,
  2387. pid: "",
  2388. user: true },
  2389. {
  2390. children: [],
  2391. id: '996014562278845566258888',
  2392. name: "小陆45528888",
  2393. checked: false,
  2394. pid: "",
  2395. user: true },
  2396. {
  2397. children: [],
  2398. id: "128334787878546556818888",
  2399. name: "学生28888",
  2400. checked: false,
  2401. pid: "",
  2402. user: true },
  2403. {
  2404. children: [],
  2405. id: '9455234545212124556625',
  2406. name: "小陆212",
  2407. checked: false,
  2408. pid: "",
  2409. user: true },
  2410. {
  2411. children: [],
  2412. id: "128345546556818888",
  2413. name: "学生2238888",
  2414. checked: false,
  2415. pid: "",
  2416. user: true },
  2417. {
  2418. children: [],
  2419. id: '99120012564454556258888',
  2420. name: "小陆223128888",
  2421. checked: false,
  2422. pid: "",
  2423. user: true },
  2424. {
  2425. children: [],
  2426. id: "175411056818888",
  2427. name: "学生232",
  2428. checked: false,
  2429. pid: "",
  2430. user: true },
  2431. {
  2432. children: [],
  2433. id: '95454556236258888',
  2434. name: "小陆22128888",
  2435. checked: false,
  2436. pid: "",
  2437. user: true },
  2438. {
  2439. children: [],
  2440. id: "123246556818888",
  2441. name: "学生458888",
  2442. checked: false,
  2443. pid: "",
  2444. user: true },
  2445. {
  2446. children: [],
  2447. id: '996055645566258888',
  2448. name: "小陆45528888",
  2449. checked: false,
  2450. pid: "",
  2451. user: true },
  2452. {
  2453. children: [],
  2454. id: "1283789556818888",
  2455. name: "学生88882",
  2456. checked: false,
  2457. pid: "",
  2458. user: true },
  2459. {
  2460. children: [],
  2461. id: '8785566258888',
  2462. name: "小陆2888812",
  2463. checked: false,
  2464. pid: "",
  2465. user: true },
  2466. {
  2467. children: [],
  2468. id: "1283347886556818888",
  2469. name: "学生8888",
  2470. checked: false,
  2471. pid: "",
  2472. user: true },
  2473. {
  2474. children: [],
  2475. id: 99577232566258888,
  2476. name: "小陆8888",
  2477. checked: false,
  2478. pid: "",
  2479. user: true },
  2480. {
  2481. children: [],
  2482. id: "17523256818888",
  2483. name: "学生8888",
  2484. checked: false,
  2485. pid: "",
  2486. user: true },
  2487. {
  2488. children: [],
  2489. id: "10qewretrtryty",
  2490. name: "学生b挥",
  2491. pid: "",
  2492. checked: false,
  2493. user: true },
  2494. {
  2495. children: [],
  2496. id: "12817783759074555555555655681",
  2497. name: "学生",
  2498. checked: false,
  2499. pid: "",
  2500. user: true },
  2501. {
  2502. children: [],
  2503. id: 35465768923232323122222,
  2504. name: "小陆",
  2505. checked: false,
  2506. pid: "",
  2507. user: true },
  2508. {
  2509. children: [{
  2510. children: [],
  2511. id: 26232324324353341,
  2512. checked: false,
  2513. name: "学生a",
  2514. pid: "",
  2515. user: true }],
  2516. id: 1532434656634,
  2517. checked: false,
  2518. name: "助班",
  2519. pid: "14",
  2520. user: false }],
  2521. id: 74465768,
  2522. checked: false,
  2523. name: "班长",
  2524. pid: "4",
  2525. user: false }],
  2526. id: 4232435446576,
  2527. checked: false,
  2528. name: "教职工",
  2529. pid: "3",
  2530. user: false }],
  2531. id: 324255465768799999,
  2532. name: "教师团队",
  2533. checked: false,
  2534. pid: "2",
  2535. user: false }],
  2536. id: 25666666652222000000,
  2537. name: "系主任",
  2538. checked: false,
  2539. pid: "1",
  2540. user: false },
  2541. {
  2542. children: [{
  2543. children: [{
  2544. children: [],
  2545. id: 1545454566,
  2546. checked: false,
  2547. name: "学生",
  2548. pid: "14",
  2549. user: true }],
  2550. id: 14511112225,
  2551. checked: false,
  2552. name: "班长",
  2553. pid: "13",
  2554. user: false }],
  2555. id: 1353335555,
  2556. checked: false,
  2557. level: 2,
  2558. name: "系副主任",
  2559. pid: "1",
  2560. user: false }],
  2561. id: 1154545454554544,
  2562. memberCount: 66,
  2563. name: "副校长" }, _defineProperty(_ref, "checked",
  2564. false), _defineProperty(_ref, "pid",
  2565. "-1"), _defineProperty(_ref, "user",
  2566. false), _ref),
  2567. {
  2568. id: 66669224242242298,
  2569. name: "校长",
  2570. pid: "-1",
  2571. checked: false,
  2572. user: false,
  2573. children: [{
  2574. children: [],
  2575. id: "12833442455568133333",
  2576. name: "小明2104",
  2577. checked: false,
  2578. pid: "",
  2579. user: true },
  2580. {
  2581. children: [],
  2582. id: 99455234554546242566255443333,
  2583. name: "小明214112",
  2584. checked: false,
  2585. pid: "",
  2586. user: true },
  2587. {
  2588. children: [],
  2589. id: "12833454677755681333",
  2590. name: "小明224113",
  2591. checked: false,
  2592. pid: "",
  2593. user: true },
  2594. {
  2595. children: [],
  2596. id: 996453452368656455552566253333,
  2597. name: "小明22410312",
  2598. checked: false,
  2599. pid: "",
  2600. user: true },
  2601. {
  2602. children: [],
  2603. id: "175745568135344545",
  2604. name: "小明234222",
  2605. checked: false,
  2606. pid: "",
  2607. user: true },
  2608. {
  2609. children: [],
  2610. id: 954512454245545420022145625,
  2611. name: "小陆241212",
  2612. checked: false,
  2613. pid: "",
  2614. user: true },
  2615. {
  2616. children: [],
  2617. id: "125522455554655681333",
  2618. name: "小明4511",
  2619. checked: false,
  2620. pid: "",
  2621. user: true },
  2622. {
  2623. children: [],
  2624. id: 9960145655522788455662533333,
  2625. name: "小明4552",
  2626. checked: false,
  2627. pid: "",
  2628. user: true },
  2629. {
  2630. children: [],
  2631. id: "1283345234445534655681333",
  2632. name: "小明2",
  2633. checked: false,
  2634. pid: "",
  2635. user: true },
  2636. {
  2637. children: [],
  2638. id: 9455234556886864555866253333,
  2639. name: "小明212",
  2640. checked: false,
  2641. pid: "",
  2642. user: true },
  2643. {
  2644. children: [],
  2645. id: "12834554655555681333",
  2646. name: "小明223",
  2647. checked: false,
  2648. pid: "",
  2649. user: true },
  2650. {
  2651. children: [],
  2652. id: 991200125465454786866625,
  2653. name: "小陆22312",
  2654. checked: false,
  2655. pid: "",
  2656. user: true },
  2657. {
  2658. children: [],
  2659. id: "1754110568455513333",
  2660. name: "小明232",
  2661. checked: false,
  2662. pid: "",
  2663. user: true },
  2664. {
  2665. children: [],
  2666. id: 95455554556542323625333,
  2667. name: "小明2212",
  2668. checked: false,
  2669. pid: "",
  2670. user: true },
  2671. {
  2672. children: [],
  2673. id: "1255553246556813333",
  2674. name: "小明45",
  2675. checked: false,
  2676. pid: "",
  2677. user: true },
  2678. {
  2679. children: [],
  2680. id: 996045555564556625333,
  2681. name: "小明4552",
  2682. checked: false,
  2683. pid: "",
  2684. user: true },
  2685. {
  2686. children: [],
  2687. id: "1283789556813646464663333",
  2688. name: "小明2",
  2689. checked: false,
  2690. pid: "",
  2691. user: true },
  2692. {
  2693. children: [],
  2694. id: 87855646455555556253333,
  2695. name: "小明212",
  2696. checked: false,
  2697. pid: "",
  2698. user: true },
  2699. {
  2700. children: [],
  2701. id: "1283347886788556813333",
  2702. name: "小明223",
  2703. checked: false,
  2704. pid: "",
  2705. user: true },
  2706. {
  2707. children: [],
  2708. id: 99577232566745625333,
  2709. name: "小明22",
  2710. checked: false,
  2711. pid: "",
  2712. user: true },
  2713. {
  2714. children: [],
  2715. id: "17523256233381",
  2716. name: "小明232",
  2717. checked: false,
  2718. pid: "",
  2719. user: true },
  2720. {
  2721. children: [{
  2722. children: [],
  2723. id: "1052332333666",
  2724. name: "学生b挥",
  2725. pid: "",
  2726. checked: false,
  2727. user: true },
  2728. {
  2729. children: [],
  2730. id: "128177866566666375907655681",
  2731. name: "学生",
  2732. checked: false,
  2733. pid: "",
  2734. user: true },
  2735. {
  2736. children: [],
  2737. id: 99601456565664225,
  2738. name: "小陆",
  2739. checked: false,
  2740. pid: "",
  2741. user: true },
  2742. {
  2743. children: [{
  2744. children: [],
  2745. id: 264233333355,
  2746. checked: false,
  2747. name: "学生a",
  2748. pid: "",
  2749. user: true }],
  2750. id: 12434546789095,
  2751. checked: false,
  2752. name: "助班",
  2753. pid: "14",
  2754. user: false }],
  2755. id: 7577777888888222666,
  2756. checked: false,
  2757. name: "班长",
  2758. pid: "4",
  2759. user: false }] },
  2760. {
  2761. id: 6663233355698,
  2762. name: "校",
  2763. pid: "-1",
  2764. checked: false,
  2765. user: false,
  2766. children: [{
  2767. children: [],
  2768. id: "1283349022127655681",
  2769. name: "学生256",
  2770. checked: false,
  2771. pid: "",
  2772. user: true },
  2773. {
  2774. children: [],
  2775. id: 9111556625,
  2776. name: "小陆21241",
  2777. checked: false,
  2778. pid: "",
  2779. user: true },
  2780. {
  2781. children: [],
  2782. id: "12877444655681",
  2783. name: "学生254523",
  2784. checked: false,
  2785. pid: "",
  2786. user: true },
  2787. {
  2788. children: [],
  2789. id: 99604553256625,
  2790. name: "小陆2411312",
  2791. checked: false,
  2792. pid: "",
  2793. user: true },
  2794. {
  2795. children: [],
  2796. id: "1757455681",
  2797. name: "学生54112",
  2798. checked: false,
  2799. pid: "",
  2800. user: true },
  2801. {
  2802. children: [],
  2803. id: 9455556625,
  2804. name: "小陆21102",
  2805. checked: false,
  2806. pid: "",
  2807. user: true },
  2808. {
  2809. children: [],
  2810. id: "1283454655681",
  2811. name: "学生1145",
  2812. checked: false,
  2813. pid: "",
  2814. user: true },
  2815. {
  2816. children: [],
  2817. id: 996014478784556625,
  2818. name: "小陆451152",
  2819. checked: false,
  2820. pid: "",
  2821. user: true },
  2822. {
  2823. children: [],
  2824. id: "1283344555681",
  2825. name: "学生2104",
  2826. checked: false,
  2827. pid: "",
  2828. user: true },
  2829. {
  2830. children: [],
  2831. id: 994552386565664556625,
  2832. name: "小陆214112",
  2833. checked: false,
  2834. pid: "",
  2835. user: true },
  2836. {
  2837. children: [],
  2838. id: "12833454655556665681",
  2839. name: "学生224113",
  2840. checked: false,
  2841. pid: "",
  2842. user: true },
  2843. {
  2844. children: [],
  2845. id: 9964534523256625,
  2846. name: "小陆22410312",
  2847. checked: false,
  2848. pid: "",
  2849. user: true },
  2850. {
  2851. children: [],
  2852. id: "1757455681",
  2853. name: "学生234222",
  2854. checked: false,
  2855. pid: "",
  2856. user: true },
  2857. {
  2858. children: [],
  2859. id: 9545121254787245625,
  2860. name: "小陆241212",
  2861. checked: false,
  2862. pid: "",
  2863. user: true },
  2864. {
  2865. children: [],
  2866. id: "1255224655681",
  2867. name: "学生4511",
  2868. checked: false,
  2869. pid: "",
  2870. user: true },
  2871. {
  2872. children: [],
  2873. id: 99601456227884556625,
  2874. name: "小陆4552",
  2875. checked: false,
  2876. pid: "",
  2877. user: true },
  2878. {
  2879. children: [],
  2880. id: "128334546898955681",
  2881. name: "学生2",
  2882. checked: false,
  2883. pid: "",
  2884. user: true },
  2885. {
  2886. children: [],
  2887. id: 9455234554354657676625,
  2888. name: "小陆212",
  2889. checked: false,
  2890. pid: "",
  2891. user: true },
  2892. {
  2893. children: [],
  2894. id: "12834554655681",
  2895. name: "学生223",
  2896. checked: false,
  2897. pid: "",
  2898. user: true },
  2899. {
  2900. children: [],
  2901. id: 9912001244444566252464,
  2902. name: "小陆22312",
  2903. checked: false,
  2904. pid: "",
  2905. user: true },
  2906. {
  2907. children: [],
  2908. id: "17541105681",
  2909. name: "学生232",
  2910. checked: false,
  2911. pid: "",
  2912. user: true },
  2913. {
  2914. children: [],
  2915. id: 954543234456556625,
  2916. name: "小陆2212",
  2917. checked: false,
  2918. pid: "",
  2919. user: true },
  2920. {
  2921. children: [],
  2922. id: "12324655681",
  2923. name: "学生45",
  2924. checked: false,
  2925. pid: "",
  2926. user: true },
  2927. {
  2928. children: [],
  2929. id: 99605564556625,
  2930. name: "小陆4552",
  2931. checked: false,
  2932. pid: "",
  2933. user: true },
  2934. {
  2935. children: [],
  2936. id: "128378955681",
  2937. name: "学生2",
  2938. checked: false,
  2939. pid: "",
  2940. user: true },
  2941. {
  2942. children: [],
  2943. id: 878556625,
  2944. name: "小陆212",
  2945. checked: false,
  2946. pid: "",
  2947. user: true },
  2948. {
  2949. children: [],
  2950. id: "128334788655681",
  2951. name: "学生223",
  2952. checked: false,
  2953. pid: "",
  2954. user: true },
  2955. {
  2956. children: [],
  2957. id: 9957723256625,
  2958. name: "小陆22312",
  2959. checked: false,
  2960. pid: "",
  2961. user: true },
  2962. {
  2963. children: [],
  2964. id: "1752325681",
  2965. name: "学生232",
  2966. checked: false,
  2967. pid: "",
  2968. user: true },
  2969. {
  2970. children: [],
  2971. id: 9547989556625,
  2972. name: "小陆2212",
  2973. checked: false,
  2974. pid: "",
  2975. user: true },
  2976. {
  2977. children: [],
  2978. id: "128466755681",
  2979. name: "学生45",
  2980. checked: false,
  2981. pid: "",
  2982. user: true },
  2983. {
  2984. children: [],
  2985. id: 9960134534556625,
  2986. name: "小陆4552",
  2987. checked: false,
  2988. pid: "",
  2989. user: true },
  2990. {
  2991. children: [{
  2992. children: [],
  2993. id: "989910",
  2994. name: "学生b4挥",
  2995. pid: "",
  2996. checked: false,
  2997. user: true },
  2998. {
  2999. children: [],
  3000. id: "12818798999778375907655681",
  3001. name: "学343生",
  3002. checked: false,
  3003. pid: "",
  3004. user: true },
  3005. {
  3006. children: [],
  3007. id: 978888965,
  3008. name: "小34陆",
  3009. checked: false,
  3010. pid: "",
  3011. user: true },
  3012. {
  3013. children: [{
  3014. children: [],
  3015. id: 24567786,
  3016. checked: false,
  3017. name: "学344生a",
  3018. pid: "",
  3019. user: true }],
  3020. id: 1546567820000,
  3021. checked: false,
  3022. name: "助34班",
  3023. pid: "14",
  3024. user: false }],
  3025. id: 342222225767566566347,
  3026. checked: false,
  3027. name: "班434长",
  3028. pid: "4",
  3029. user: false },
  3030. {
  3031. children: [{
  3032. children: [],
  3033. id: 2456867457786,
  3034. checked: false,
  3035. name: "学生a",
  3036. pid: "",
  3037. user: true }],
  3038. id: 158990,
  3039. checked: false,
  3040. name: "助班34",
  3041. pid: "14",
  3042. user: false },
  3043. {
  3044. children: [{
  3045. children: [],
  3046. id: 2456775656686,
  3047. checked: false,
  3048. name: "学34生a",
  3049. pid: "",
  3050. user: true }],
  3051. id: 157677,
  3052. checked: false,
  3053. name: "助44班",
  3054. pid: "14",
  3055. user: false },
  3056. {
  3057. children: [{
  3058. children: [],
  3059. id: 244523567786,
  3060. checked: false,
  3061. name: "学生344a",
  3062. pid: "",
  3063. user: true }],
  3064. id: 1523235465,
  3065. checked: false,
  3066. name: "助班34",
  3067. pid: "14",
  3068. user: false },
  3069. {
  3070. children: [{
  3071. children: [],
  3072. id: 2445556567786,
  3073. checked: false,
  3074. name: "学生a233",
  3075. pid: "",
  3076. user: true },
  3077. {
  3078. children: [],
  3079. id: "128334907655681",
  3080. name: "学生2",
  3081. checked: false,
  3082. pid: "",
  3083. user: true },
  3084. {
  3085. children: [],
  3086. id: 996014234556625,
  3087. name: "小陆212",
  3088. checked: false,
  3089. pid: "",
  3090. user: true },
  3091. {
  3092. children: [],
  3093. id: "1283349073444655681",
  3094. name: "学生223",
  3095. checked: false,
  3096. pid: "",
  3097. user: true },
  3098. {
  3099. children: [],
  3100. id: 996014234523256625,
  3101. name: "小陆22312",
  3102. checked: false,
  3103. pid: "",
  3104. user: true },
  3105. {
  3106. children: [],
  3107. id: "17578235681",
  3108. name: "学生232",
  3109. checked: false,
  3110. pid: "",
  3111. user: true },
  3112. {
  3113. children: [],
  3114. id: 95451234556625,
  3115. name: "小陆2212",
  3116. checked: false,
  3117. pid: "",
  3118. user: true },
  3119. {
  3120. children: [],
  3121. id: "128332224655681",
  3122. name: "学生45",
  3123. checked: false,
  3124. pid: "",
  3125. user: true },
  3126. {
  3127. children: [],
  3128. id: 9960142455534556625,
  3129. name: "小陆4552",
  3130. checked: false,
  3131. pid: "",
  3132. user: true }],
  3133. id: 154555,
  3134. checked: false,
  3135. name: "助班344",
  3136. pid: "14",
  3137. user: false }] },
  3138. {
  3139. id: 66422666998,
  3140. name: "校长3",
  3141. pid: "-1",
  3142. checked: false,
  3143. user: false,
  3144. children: [{
  3145. id: 88834365768789009444,
  3146. name: "小陆",
  3147. checked: false,
  3148. pid: "-1",
  3149. user: true }] },
  3150. {
  3151. id: 664226434366666666998,
  3152. name: "校长43",
  3153. pid: "-1",
  3154. checked: false,
  3155. user: false,
  3156. children: [{
  3157. id: 888232787878334,
  3158. name: "小陆",
  3159. checked: false,
  3160. pid: "-1",
  3161. user: true }] },
  3162. {
  3163. id: 664226434378766998,
  3164. name: "校长43",
  3165. pid: "-1",
  3166. checked: false,
  3167. user: false,
  3168. children: [{
  3169. id: 88887879845555980,
  3170. name: "小陆",
  3171. checked: false,
  3172. pid: "-1",
  3173. user: true }] },
  3174. {
  3175. id: 664214366998,
  3176. name: "校长443",
  3177. pid: "-1",
  3178. checked: false,
  3179. user: false,
  3180. children: [{
  3181. id: 885655454545454545678,
  3182. name: "小陆",
  3183. checked: false,
  3184. pid: "-1",
  3185. user: true }] },
  3186. {
  3187. id: 66421777884366998,
  3188. name: "校长44443",
  3189. pid: "-1",
  3190. checked: false,
  3191. user: false,
  3192. children: [{
  3193. id: 88565444444346556678,
  3194. name: "小陆",
  3195. checked: false,
  3196. pid: "-1",
  3197. user: true }] }];var _default =
  3198. dataList;exports.default = _default;
  3199. /***/ }),
  3200. /***/ 14:
  3201. /*!*****************************************************************************************************!*\
  3202. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/index.js ***!
  3203. \*****************************************************************************************************/
  3204. /*! no static exports found */
  3205. /***/ (function(module, exports, __webpack_require__) {
  3206. "use strict";
  3207. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  3208. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 15));
  3209. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 16));
  3210. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 20));
  3211. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 21));
  3212. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 25));
  3213. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 26));
  3214. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 27));
  3215. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 28));
  3216. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 29));
  3217. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 30));
  3218. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 31));
  3219. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 18));
  3220. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 17));
  3221. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 32));
  3222. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 19));
  3223. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 33));
  3224. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 34));
  3225. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 35));
  3226. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 36));
  3227. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 37));
  3228. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 38);
  3229. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 39));
  3230. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 40));
  3231. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 41));
  3232. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 42));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 引入全局mixin
  3233. // 引入关于是否mixin集成小程序分享的配置
  3234. // import wxshare from './libs/mixin/mpShare.js'
  3235. // 全局挂载引入http相关请求拦截插件
  3236. function wranning(str) {// 开发环境进行信息输出,主要是一些报错信息
  3237. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  3238. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  3239. if (true) {console.warn(str);}} // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  3240. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  3241. // let vuexStore = {};
  3242. // try {
  3243. // vuexStore = require("@/store/$u.mixin.js");
  3244. // } catch (e) {
  3245. // //TODO handle the exception
  3246. // }
  3247. // post类型对象参数转为get类型url参数
  3248. var $u = { queryParams: _queryParams.default, route: _route.default, timeFormat: _timeFormat.default, date: _timeFormat.default, // 另名date
  3249. timeFrom: _timeFrom.default, colorGradient: _colorGradient.default.colorGradient, colorToRgba: _colorGradient.default.colorToRgba, guid: _guid.default, color: _color.default, sys: _sys.sys, os: _sys.os, type2icon: _type2icon.default, randomArray: _randomArray.default, wranning: wranning, get: _request.default.get,
  3250. post: _request.default.post,
  3251. put: _request.default.put,
  3252. 'delete': _request.default.delete,
  3253. hexToRgb: _colorGradient.default.hexToRgb,
  3254. rgbToHex: _colorGradient.default.rgbToHex,
  3255. test: _test.default,
  3256. random: _random.default,
  3257. deepClone: _deepClone.default,
  3258. deepMerge: _deepMerge.default,
  3259. getParent: _getParent.default,
  3260. $parent: _$parent.default,
  3261. addUnit: _addUnit.default,
  3262. trim: _trim.default,
  3263. type: ['primary', 'success', 'error', 'warning', 'info'],
  3264. http: _request.default,
  3265. toast: _toast.default,
  3266. config: _config.default, // uView配置信息相关,比如版本号
  3267. zIndex: _zIndex.default,
  3268. debounce: _debounce.default,
  3269. throttle: _throttle.default };
  3270. // $u挂载到uni对象上
  3271. uni.$u = $u;
  3272. var install = function install(Vue) {
  3273. Vue.mixin(_mixin.default);
  3274. if (Vue.prototype.openShare) {
  3275. Vue.mixin(mpShare);
  3276. }
  3277. // Vue.mixin(vuexStore);
  3278. // 时间格式化,同时两个名称,date和timeFormat
  3279. Vue.filter('timeFormat', function (timestamp, format) {
  3280. return (0, _timeFormat.default)(timestamp, format);
  3281. });
  3282. Vue.filter('date', function (timestamp, format) {
  3283. return (0, _timeFormat.default)(timestamp, format);
  3284. });
  3285. // 将多久以前的方法,注入到全局过滤器
  3286. Vue.filter('timeFrom', function (timestamp, format) {
  3287. return (0, _timeFrom.default)(timestamp, format);
  3288. });
  3289. Vue.prototype.$u = $u;
  3290. };var _default =
  3291. {
  3292. install: install };exports.default = _default;
  3293. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3294. /***/ }),
  3295. /***/ 15:
  3296. /*!****************************************************************************************************************!*\
  3297. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/mixin/mixin.js ***!
  3298. \****************************************************************************************************************/
  3299. /*! no static exports found */
  3300. /***/ (function(module, exports, __webpack_require__) {
  3301. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  3302. data: function data() {
  3303. return {};
  3304. },
  3305. onLoad: function onLoad() {
  3306. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  3307. this.$u.getRect = this.$uGetRect;
  3308. },
  3309. methods: {
  3310. // 查询节点信息
  3311. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  3312. // 解决办法为在组件根部再套一个没有任何作用的view元素
  3313. $uGetRect: function $uGetRect(selector, all) {var _this = this;
  3314. return new Promise(function (resolve) {
  3315. uni.createSelectorQuery().
  3316. in(_this)[all ? 'selectAll' : 'select'](selector).
  3317. boundingClientRect(function (rect) {
  3318. if (all && Array.isArray(rect) && rect.length) {
  3319. resolve(rect);
  3320. }
  3321. if (!all && rect) {
  3322. resolve(rect);
  3323. }
  3324. }).
  3325. exec();
  3326. });
  3327. },
  3328. getParentData: function getParentData() {var _this2 = this;var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  3329. // 避免在created中去定义parent变量
  3330. if (!this.parent) this.parent = false;
  3331. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  3332. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  3333. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  3334. this.parent = this.$u.$parent.call(this, parentName);
  3335. if (this.parent) {
  3336. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  3337. Object.keys(this.parentData).map(function (key) {
  3338. _this2.parentData[key] = _this2.parent[key];
  3339. });
  3340. }
  3341. },
  3342. // 阻止事件冒泡
  3343. preventEvent: function preventEvent(e) {
  3344. e && e.stopPropagation && e.stopPropagation();
  3345. } },
  3346. onReachBottom: function onReachBottom() {
  3347. uni.$emit('uOnReachBottom');
  3348. } };
  3349. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3350. /***/ }),
  3351. /***/ 16:
  3352. /*!******************************************************************************************************************!*\
  3353. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/request/index.js ***!
  3354. \******************************************************************************************************************/
  3355. /*! no static exports found */
  3356. /***/ (function(module, exports, __webpack_require__) {
  3357. "use strict";
  3358. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 17));
  3359. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: 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
  3360. Request = /*#__PURE__*/function () {_createClass(Request, [{ key: "setConfig",
  3361. // 设置全局默认配置
  3362. value: function setConfig(customConfig) {
  3363. // 深度合并对象,否则会造成对象深层属性丢失
  3364. this.config = (0, _deepMerge.default)(this.config, customConfig);
  3365. }
  3366. // 主要请求部分
  3367. }, { key: "request", value: function request() {var _this = this;var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3368. // 检查请求拦截
  3369. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  3370. var tmpConfig = {};
  3371. var interceptorRequest = this.interceptor.request(options);
  3372. if (interceptorRequest === false) {
  3373. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  3374. return new Promise(function () {});
  3375. }
  3376. this.options = interceptorRequest;
  3377. }
  3378. options.dataType = options.dataType || this.config.dataType;
  3379. options.responseType = options.responseType || this.config.responseType;
  3380. options.url = options.url || '';
  3381. options.params = options.params || {};
  3382. options.header = Object.assign(this.config.header, options.header);
  3383. options.method = options.method || this.config.method;
  3384. return new Promise(function (resolve, reject) {
  3385. options.complete = function (response) {
  3386. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  3387. uni.hideLoading();
  3388. // 清除定时器,如果请求回来了,就无需loading
  3389. clearTimeout(_this.config.timer);
  3390. _this.config.timer = null;
  3391. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  3392. if (_this.config.originalData) {
  3393. // 判断是否存在拦截器
  3394. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  3395. var resInterceptors = _this.interceptor.response(response);
  3396. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  3397. if (resInterceptors !== false) {
  3398. resolve(resInterceptors);
  3399. } else {
  3400. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  3401. reject(response);
  3402. }
  3403. } else {
  3404. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  3405. resolve(response);
  3406. }
  3407. } else {
  3408. if (response.statusCode == 200) {
  3409. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  3410. var _resInterceptors = _this.interceptor.response(response.data);
  3411. if (_resInterceptors !== false) {
  3412. resolve(_resInterceptors);
  3413. } else {
  3414. reject(response.data);
  3415. }
  3416. } else {
  3417. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  3418. resolve(response.data);
  3419. }
  3420. } else {
  3421. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  3422. // if(response.errMsg) {
  3423. // uni.showModal({
  3424. // title: response.errMsg
  3425. // });
  3426. // }
  3427. reject(response);
  3428. }
  3429. }
  3430. };
  3431. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  3432. options.url = _test.default.url(options.url) ? options.url : _this.config.baseUrl + (options.url.indexOf('/') == 0 ?
  3433. options.url : '/' + options.url);
  3434. // 是否显示loading
  3435. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  3436. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  3437. if (_this.config.showLoading && !_this.config.timer) {
  3438. _this.config.timer = setTimeout(function () {
  3439. uni.showLoading({
  3440. title: _this.config.loadingText,
  3441. mask: _this.config.loadingMask });
  3442. _this.config.timer = null;
  3443. }, _this.config.loadingTime);
  3444. }
  3445. uni.request(options);
  3446. });
  3447. // .catch(res => {
  3448. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  3449. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  3450. // return new Promise(()=>{});
  3451. // })
  3452. } }]);
  3453. function Request() {var _this2 = this;_classCallCheck(this, Request);
  3454. this.config = {
  3455. baseUrl: '', // 请求的根域名
  3456. // 默认的请求头
  3457. header: {},
  3458. method: 'POST',
  3459. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  3460. dataType: 'json',
  3461. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  3462. responseType: 'text',
  3463. showLoading: true, // 是否显示请求中的loading
  3464. loadingText: '请求中...',
  3465. loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  3466. timer: null, // 定时器
  3467. originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
  3468. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  3469. };
  3470. // 拦截器
  3471. this.interceptor = {
  3472. // 请求前的拦截
  3473. request: null,
  3474. // 请求后的拦截
  3475. response: null };
  3476. // get请求
  3477. this.get = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3478. return _this2.request({
  3479. method: 'GET',
  3480. url: url,
  3481. header: header,
  3482. data: data });
  3483. };
  3484. // post请求
  3485. this.post = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3486. return _this2.request({
  3487. url: url,
  3488. method: 'POST',
  3489. header: header,
  3490. data: data });
  3491. };
  3492. // put请求,不支持支付宝小程序(HX2.6.15)
  3493. this.put = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3494. return _this2.request({
  3495. url: url,
  3496. method: 'PUT',
  3497. header: header,
  3498. data: data });
  3499. };
  3500. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  3501. this.delete = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3502. return _this2.request({
  3503. url: url,
  3504. method: 'DELETE',
  3505. header: header,
  3506. data: data });
  3507. };
  3508. }return Request;}();var _default =
  3509. new Request();exports.default = _default;
  3510. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3511. /***/ }),
  3512. /***/ 17:
  3513. /*!***********************************************************************************************************************!*\
  3514. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/deepMerge.js ***!
  3515. \***********************************************************************************************************************/
  3516. /*! no static exports found */
  3517. /***/ (function(module, exports, __webpack_require__) {
  3518. "use strict";
  3519. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3520. // JS对象深度合并
  3521. function deepMerge() {var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3522. target = (0, _deepClone.default)(target);
  3523. if (typeof target !== 'object' || typeof source !== 'object') return false;
  3524. for (var prop in source) {
  3525. if (!source.hasOwnProperty(prop)) continue;
  3526. if (prop in target) {
  3527. if (typeof target[prop] !== 'object') {
  3528. target[prop] = source[prop];
  3529. } else {
  3530. if (typeof source[prop] !== 'object') {
  3531. target[prop] = source[prop];
  3532. } else {
  3533. if (target[prop].concat && source[prop].concat) {
  3534. target[prop] = target[prop].concat(source[prop]);
  3535. } else {
  3536. target[prop] = deepMerge(target[prop], source[prop]);
  3537. }
  3538. }
  3539. }
  3540. } else {
  3541. target[prop] = source[prop];
  3542. }
  3543. }
  3544. return target;
  3545. }var _default =
  3546. deepMerge;exports.default = _default;
  3547. /***/ }),
  3548. /***/ 18:
  3549. /*!***********************************************************************************************************************!*\
  3550. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/deepClone.js ***!
  3551. \***********************************************************************************************************************/
  3552. /*! no static exports found */
  3553. /***/ (function(module, exports, __webpack_require__) {
  3554. "use strict";
  3555. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 判断arr是否为一个数组,返回一个bool值
  3556. function isArray(arr) {
  3557. return Object.prototype.toString.call(arr) === '[object Array]';
  3558. }
  3559. // 深度克隆
  3560. function deepClone(obj) {
  3561. // 对常见的“非”值,直接返回原来值
  3562. if ([null, undefined, NaN, false].includes(obj)) return obj;
  3563. if (typeof obj !== "object" && typeof obj !== 'function') {
  3564. //原始类型直接返回
  3565. return obj;
  3566. }
  3567. var o = isArray(obj) ? [] : {};
  3568. for (var i in obj) {
  3569. if (obj.hasOwnProperty(i)) {
  3570. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  3571. }
  3572. }
  3573. return o;
  3574. }var _default =
  3575. deepClone;exports.default = _default;
  3576. /***/ }),
  3577. /***/ 19:
  3578. /*!******************************************************************************************************************!*\
  3579. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/test.js ***!
  3580. \******************************************************************************************************************/
  3581. /*! no static exports found */
  3582. /***/ (function(module, exports, __webpack_require__) {
  3583. "use strict";
  3584. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3585. * 验证电子邮箱格式
  3586. */
  3587. function email(value) {
  3588. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  3589. }
  3590. /**
  3591. * 验证手机格式
  3592. */
  3593. function mobile(value) {
  3594. return /^1[23456789]\d{9}$/.test(value);
  3595. }
  3596. /**
  3597. * 验证URL格式
  3598. */
  3599. function url(value) {
  3600. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  3601. }
  3602. /**
  3603. * 验证日期格式
  3604. */
  3605. function date(value) {
  3606. return !/Invalid|NaN/.test(new Date(value).toString());
  3607. }
  3608. /**
  3609. * 验证ISO类型的日期格式
  3610. */
  3611. function dateISO(value) {
  3612. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  3613. }
  3614. /**
  3615. * 验证十进制数字
  3616. */
  3617. function number(value) {
  3618. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  3619. }
  3620. /**
  3621. * 验证整数
  3622. */
  3623. function digits(value) {
  3624. return /^\d+$/.test(value);
  3625. }
  3626. /**
  3627. * 验证身份证号码
  3628. */
  3629. function idCard(value) {
  3630. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  3631. value);
  3632. }
  3633. /**
  3634. * 是否车牌号
  3635. */
  3636. function carNo(value) {
  3637. // 新能源车牌
  3638. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  3639. // 旧车牌
  3640. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  3641. if (value.length === 7) {
  3642. return creg.test(value);
  3643. } else if (value.length === 8) {
  3644. return xreg.test(value);
  3645. } else {
  3646. return false;
  3647. }
  3648. }
  3649. /**
  3650. * 金额,只允许2位小数
  3651. */
  3652. function amount(value) {
  3653. //金额,只允许保留两位小数
  3654. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  3655. }
  3656. /**
  3657. * 中文
  3658. */
  3659. function chinese(value) {
  3660. var reg = /^[\u4e00-\u9fa5]+$/gi;
  3661. return reg.test(value);
  3662. }
  3663. /**
  3664. * 只能输入字母
  3665. */
  3666. function letter(value) {
  3667. return /^[a-zA-Z]*$/.test(value);
  3668. }
  3669. /**
  3670. * 只能是字母或者数字
  3671. */
  3672. function enOrNum(value) {
  3673. //英文或者数字
  3674. var reg = /^[0-9a-zA-Z]*$/g;
  3675. return reg.test(value);
  3676. }
  3677. /**
  3678. * 验证是否包含某个值
  3679. */
  3680. function contains(value, param) {
  3681. return value.indexOf(param) >= 0;
  3682. }
  3683. /**
  3684. * 验证一个值范围[min, max]
  3685. */
  3686. function range(value, param) {
  3687. return value >= param[0] && value <= param[1];
  3688. }
  3689. /**
  3690. * 验证一个长度范围[min, max]
  3691. */
  3692. function rangeLength(value, param) {
  3693. return value.length >= param[0] && value.length <= param[1];
  3694. }
  3695. /**
  3696. * 是否固定电话
  3697. */
  3698. function landline(value) {
  3699. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  3700. return reg.test(value);
  3701. }
  3702. /**
  3703. * 判断是否为空
  3704. */
  3705. function empty(value) {
  3706. switch (typeof value) {
  3707. case 'undefined':
  3708. return true;
  3709. case 'string':
  3710. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  3711. break;
  3712. case 'boolean':
  3713. if (!value) return true;
  3714. break;
  3715. case 'number':
  3716. if (0 === value || isNaN(value)) return true;
  3717. break;
  3718. case 'object':
  3719. if (null === value || value.length === 0) return true;
  3720. for (var i in value) {
  3721. return false;
  3722. }
  3723. return true;}
  3724. return false;
  3725. }
  3726. /**
  3727. * 是否json字符串
  3728. */
  3729. function jsonString(value) {
  3730. if (typeof value == 'string') {
  3731. try {
  3732. var obj = JSON.parse(value);
  3733. if (typeof obj == 'object' && obj) {
  3734. return true;
  3735. } else {
  3736. return false;
  3737. }
  3738. } catch (e) {
  3739. return false;
  3740. }
  3741. }
  3742. return false;
  3743. }
  3744. /**
  3745. * 是否数组
  3746. */
  3747. function array(value) {
  3748. if (typeof Array.isArray === "function") {
  3749. return Array.isArray(value);
  3750. } else {
  3751. return Object.prototype.toString.call(value) === "[object Array]";
  3752. }
  3753. }
  3754. /**
  3755. * 是否对象
  3756. */
  3757. function object(value) {
  3758. return Object.prototype.toString.call(value) === '[object Object]';
  3759. }
  3760. /**
  3761. * 是否短信验证码
  3762. */
  3763. function code(value) {var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  3764. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  3765. }var _default =
  3766. {
  3767. email: email,
  3768. mobile: mobile,
  3769. url: url,
  3770. date: date,
  3771. dateISO: dateISO,
  3772. number: number,
  3773. digits: digits,
  3774. idCard: idCard,
  3775. carNo: carNo,
  3776. amount: amount,
  3777. chinese: chinese,
  3778. letter: letter,
  3779. enOrNum: enOrNum,
  3780. contains: contains,
  3781. range: range,
  3782. rangeLength: rangeLength,
  3783. empty: empty,
  3784. isEmpty: empty,
  3785. jsonString: jsonString,
  3786. landline: landline,
  3787. object: object,
  3788. array: array,
  3789. code: code };exports.default = _default;
  3790. /***/ }),
  3791. /***/ 2:
  3792. /*!***********************************!*\
  3793. !*** (webpack)/buildin/global.js ***!
  3794. \***********************************/
  3795. /*! no static exports found */
  3796. /***/ (function(module, exports) {
  3797. var g;
  3798. // This works in non-strict mode
  3799. g = (function() {
  3800. return this;
  3801. })();
  3802. try {
  3803. // This works if eval is allowed (see CSP)
  3804. g = g || new Function("return this")();
  3805. } catch (e) {
  3806. // This works if the window reference is available
  3807. if (typeof window === "object") g = window;
  3808. }
  3809. // g can still be undefined, but nothing to do about it...
  3810. // We return undefined, instead of nothing here, so it's
  3811. // easier to handle this case. if(!global) { ...}
  3812. module.exports = g;
  3813. /***/ }),
  3814. /***/ 20:
  3815. /*!*************************************************************************************************************************!*\
  3816. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/queryParams.js ***!
  3817. \*************************************************************************************************************************/
  3818. /*! no static exports found */
  3819. /***/ (function(module, exports, __webpack_require__) {
  3820. "use strict";
  3821. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3822. * 对象转url参数
  3823. * @param {*} data,对象
  3824. * @param {*} isPrefix,是否自动加上"?"
  3825. */
  3826. function queryParams() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  3827. var prefix = isPrefix ? '?' : '';
  3828. var _result = [];
  3829. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';var _loop = function _loop(
  3830. key) {
  3831. var value = data[key];
  3832. // 去掉为空的参数
  3833. if (['', undefined, null].indexOf(value) >= 0) {
  3834. return "continue";
  3835. }
  3836. // 如果值为数组,另行处理
  3837. if (value.constructor === Array) {
  3838. // e.g. {ids: [1, 2, 3]}
  3839. switch (arrayFormat) {
  3840. case 'indices':
  3841. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  3842. for (var i = 0; i < value.length; i++) {
  3843. _result.push(key + '[' + i + ']=' + value[i]);
  3844. }
  3845. break;
  3846. case 'brackets':
  3847. // 结果: ids[]=1&ids[]=2&ids[]=3
  3848. value.forEach(function (_value) {
  3849. _result.push(key + '[]=' + _value);
  3850. });
  3851. break;
  3852. case 'repeat':
  3853. // 结果: ids=1&ids=2&ids=3
  3854. value.forEach(function (_value) {
  3855. _result.push(key + '=' + _value);
  3856. });
  3857. break;
  3858. case 'comma':
  3859. // 结果: ids=1,2,3
  3860. var commaStr = "";
  3861. value.forEach(function (_value) {
  3862. commaStr += (commaStr ? "," : "") + _value;
  3863. });
  3864. _result.push(key + '=' + commaStr);
  3865. break;
  3866. default:
  3867. value.forEach(function (_value) {
  3868. _result.push(key + '[]=' + _value);
  3869. });}
  3870. } else {
  3871. _result.push(key + '=' + value);
  3872. }};for (var key in data) {var _ret = _loop(key);if (_ret === "continue") continue;
  3873. }
  3874. return _result.length ? prefix + _result.join('&') : '';
  3875. }var _default =
  3876. queryParams;exports.default = _default;
  3877. /***/ }),
  3878. /***/ 21:
  3879. /*!*******************************************************************************************************************!*\
  3880. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/route.js ***!
  3881. \*******************************************************************************************************************/
  3882. /*! no static exports found */
  3883. /***/ (function(module, exports, __webpack_require__) {
  3884. "use strict";
  3885. /* 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 */ 22));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);});};}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;} /**
  3886. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  3887. * 并且带有路由拦截功能
  3888. */var
  3889. Router = /*#__PURE__*/function () {
  3890. function Router() {_classCallCheck(this, Router);
  3891. // 原始属性定义
  3892. this.config = {
  3893. type: 'navigateTo',
  3894. url: '',
  3895. delta: 1, // navigateBack页面后退时,回退的层数
  3896. params: {}, // 传递的参数
  3897. animationType: 'pop-in', // 窗口动画,只在APP有效
  3898. animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
  3899. intercept: false // 是否需要拦截
  3900. };
  3901. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  3902. // 这里在构造函数中进行this绑定
  3903. this.route = this.route.bind(this);
  3904. }
  3905. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  3906. _createClass(Router, [{ key: "addRootPath", value: function addRootPath(url) {
  3907. return url[0] === '/' ? url : "/".concat(url);
  3908. }
  3909. // 整合路由参数
  3910. }, { key: "mixinParam", value: function mixinParam(url, params) {
  3911. url = url && this.addRootPath(url);
  3912. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  3913. // 如果有url中有get参数,转换后无需带上"?"
  3914. var query = '';
  3915. if (/.*\/.*\?.*=.*/.test(url)) {
  3916. // object对象转为get类型的参数
  3917. query = uni.$u.queryParams(params, false);
  3918. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  3919. return url += "&" + query;
  3920. } else {
  3921. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  3922. query = uni.$u.queryParams(params);
  3923. return url += query;
  3924. }
  3925. }
  3926. // 对外的方法名称
  3927. }, { key: "route", value: function () {var _route = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var options,params,mergeConfig,isNext,_args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  3928. // 合并用户的配置和内部的默认配置
  3929. mergeConfig = {};
  3930. if (typeof options === 'string') {
  3931. // 如果options为字符串,则为route(url, params)的形式
  3932. mergeConfig.url = this.mixinParam(options, params);
  3933. mergeConfig.type = 'navigateTo';
  3934. } else {
  3935. mergeConfig = uni.$u.deepClone(options, this.config);
  3936. // 否则正常使用mergeConfig中的url和params进行拼接
  3937. mergeConfig.url = this.mixinParam(options.url, options.params);
  3938. }
  3939. if (params.intercept) {
  3940. this.config.intercept = params.intercept;
  3941. }
  3942. // params参数也带给拦截器
  3943. mergeConfig.params = params;
  3944. // 合并内外部参数
  3945. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  3946. // 判断用户是否定义了拦截器
  3947. if (!(typeof uni.$u.routeIntercept === 'function')) {_context.next = 14;break;}_context.next = 10;return (
  3948. new Promise(function (resolve, reject) {
  3949. uni.$u.routeIntercept(mergeConfig, resolve);
  3950. }));case 10:isNext = _context.sent;
  3951. // 如果isNext为true,则执行路由跳转
  3952. isNext && this.openPage(mergeConfig);_context.next = 15;break;case 14:
  3953. this.openPage(mergeConfig);case 15:case "end":return _context.stop();}}}, _callee, this);}));function route() {return _route.apply(this, arguments);}return route;}()
  3954. // 执行路由跳转
  3955. }, { key: "openPage", value: function openPage(config) {
  3956. // 解构参数
  3957. var
  3958. url =
  3959. config.url,type = config.type,delta = config.delta,animationType = config.animationType,animationDuration = config.animationDuration;
  3960. if (config.type == 'navigateTo' || config.type == 'to') {
  3961. uni.navigateTo({
  3962. url: url,
  3963. animationType: animationType,
  3964. animationDuration: animationDuration });
  3965. }
  3966. if (config.type == 'redirectTo' || config.type == 'redirect') {
  3967. uni.redirectTo({
  3968. url: url });
  3969. }
  3970. if (config.type == 'switchTab' || config.type == 'tab') {
  3971. uni.switchTab({
  3972. url: url });
  3973. }
  3974. if (config.type == 'reLaunch' || config.type == 'launch') {
  3975. uni.reLaunch({
  3976. url: url });
  3977. }
  3978. if (config.type == 'navigateBack' || config.type == 'back') {
  3979. uni.navigateBack({
  3980. delta: delta });
  3981. }
  3982. } }]);return Router;}();var _default =
  3983. new Router().route;exports.default = _default;
  3984. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3985. /***/ }),
  3986. /***/ 22:
  3987. /*!**********************************************************!*\
  3988. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  3989. \**********************************************************/
  3990. /*! no static exports found */
  3991. /***/ (function(module, exports, __webpack_require__) {
  3992. module.exports = __webpack_require__(/*! regenerator-runtime */ 23);
  3993. /***/ }),
  3994. /***/ 220:
  3995. /*!***********************************************************************************************************!*\
  3996. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/static/images/error.png ***!
  3997. \***********************************************************************************************************/
  3998. /*! no static exports found */
  3999. /***/ (function(module, exports) {
  4000. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAADICAYAAACH6F8xAAAAAXNSR0IArs4c6QAAGBdJREFUeF7tnQu0XfOdx7+/fYNJ0iE1ZVSpMnRUxWCslnu93xTxaIi3KKJIsve5uWef69GbW+SefW7u2SeJqqYeqaKkLUW1RFBExmAyxmRUsTJGo8PQ8ZgmRHL3b9Y+uYmEe+/Ze5+9//v122tZy1r39/z89jfnnP34/wlyJJoA65W9QbwvQPsBvDNAYwAeA2AMCADjfQDvg+h9MJYDvBBMT1OtuCTRjeW8OHd0ciSIABvVLcGrj4GGY+DgIBC2C1je6wAtAuFhrOaFNMdcHjCOuEVAQIQXAdQgIdnoHQdyxoNxDIAtg8QYxmcVgIfBuJ9q5tyQY0u4AAREeAGghenCunU2CBMBHBJm3CFjMf4FwFwRoBLaQyYR4cXEnws9p4C1EoB9YinBFaDm9FC185ex5M95UhGe4hOAJ1vboYWvBNEkxakHT8f8I/TTNfIbUO00RHgKeXOhMh7slAHaSWFaD6l4GQhdVC3d5sFYTEIgIMILAaKXEGtFx/O92MZnw2WyS53x5c9PZhGeglkPXEC5VUGqMFLcTbZ5ShiBJMbQBER4EZ8dbFQuB/jaiNOEHf5Bsk33toYcEREQ4UUE1g3LunURCD+KMEV0oYk6qFqcGV2CfEcW4UU0fy5YJ4Bxb0ThVYU9n2zzFlXJ8pRHhBfBtFnv2QnQFoDwdxGEVxxSO5HsjrT/A6KYWeN0IrzGjHxbsG7dCcJpvh2T6fActhhzEE2ftDKZ5aWzKhFeyHPjQrkApr6Qw8YbjtBDVfPyeIvIVnYRXojz5Pby/nBoIYDNQgybjFCEQ6lqPpaMYtJfhQgvxBmyUX4IoCNDDJmgULyA7NJRCSoo1aWI8EIaX6pvHXhlwJgkbzV4hTW8nQgvBI7cPvMLcPqfAvDVEMIlOcTL0FraqG/aO0kuMg21ifBCmBIb5R6A3Fd8cnDI85xhDFmE1yRFNqx9QHgKjE2bDJUOd8LHYLSRbT6XjoKTWaUIr8m5sGH9DMCEJsOkzf1Oss3T01Z0kuoV4TUxDdatb4Pw8yZCpNeVMZ5q5i/S20C8lYvwAvLnri4NH4xyL6jsGzBE2t2exuYr26i720l7I3HUL8ILSJ0LlWlg7g3ong03eYMh8BxFeAHQ1R+C1jT3gso2Adyz40J4E47TRrXOZdlpSk0nIrwAnNmwfgDgkgCuWXS5nmzz0iw2FmVPIjyfdFnvORSkPeLTLdvm7BxGtc5Hs91kuN2J8HzyZMN6AMCxPt2ybv4bss1vZb3JMPsT4fmgyYXK+WC+yYdLfkyJvkPV4s35abi5TkV4Hvmx3jUGNPopgHfz6JIzM3oRvKKNat3v5azxQO2K8DxiY6N8NUBXejTPqRlfQ3bpqpw276ttEZ4HXKxX9gSxe7N8lAfzPJusBFMb1YrP5xmCl95FeB4osVH+KUBneTAVE/BtZJfOFhDDExDhNThDuN06EQ7ukRPJBwENJ1Gf+SsfHrkzFeE1Ep5uPQnC/rk7M5ppmLGIauYBzYTIuq8Ib5gJc8HSwbCzfhJE0h/BoKpZiyR2BoKK8IYYIk8pfxkt5F5QCboHeQZOj6ZaWI5+bqPZpdebipJRZxHeUMIzrFkApmR07qramk22OVVVsjTlEeENMi1uLx8Ihx5P0yATW6vGB1Ff6YnE1hdTYSK8wYSnW/eCcEJMM8lWWsZ9VDPHZaup5rsR4X2KIRcq54D5J82jlQjrCRCdS9ViWjbmVDI4Ed4GmPmSrs9hs/pyDnsooZ+fJC9g1co2ur77L/lpefhORXgbCk+3ukCYLidHBAQY06lmdkcQOZUhRXgDY+MpvbujxX0ekzdP5SQTXzR9gH5qo9kdSxNfqoICRXjrhKeXbwHReQqY5zcF8zyqlSbmF8AnnYvw3L3KC5XjwHy/nBAKCBAdT9XirxVkSnQKEZ4rPKPyGMAHJ3pSmSmOfkd28ZDMtBOwkdwLjw3rMgBzAvITt2AEJpNtXhfMNRteuRYeX2Zti03g3j74SjbGmZouXsNqtNF15p9SU3HIheZbeLrVB0IhZKYSzgsBRpVqZrsX0yza5FZ4XCi3gutvH8gRFwHiNqqWFseVPs68+RWeYf0SwMlxwg+YewmIXgA7r4DxbwBtCeJdQbQbGCcGjBmX291km6fElTzOvLkUHhu9ZwDO7XGCD5SbuR0rl82huXNXD+bPeuUCEM8GMDJQ/FictDPJ7rgjltQxJs2d8Pi8rr/C5+vPY+4dI3f/qZ0129CsK97y4shGZTHA+3mxTYDNEry7so3mdX+UgFqUlZA/4enWFSBco4xwGInYmUi1znleQ/FF00dh9MgVXu1jt2NcSTXz2tjrUFhAroTH7TN2hdPi/pj/vELGzaUi3EhV80K/QdgoTwDI3SY6Dce70Ppbqe/yl9JQbBg15kt4BevHYFwQBjhlMZj2CrpALBvl5QB9SVmtzSQK+A9MMynj9M2N8NioHA3wb+OEHSD3aqwYM5rmThr0YkqjeOl7FI6OIbv4YKO+svD3PAnvYYAPT9XQGEupZo4NWjMb1g8BXBzUX70fLSS7eIT6vOoz5kJ4bFjuyeeehCk7mnugmPWe6SCtK2VNf5ds84aU1ey73MwLj6f1bo1+x719sLNvOrE75FJ4r6JFa6OZHf8TO/4IC8i+8AplC0zFCBlGGDqXwgOIK1QtmRGCjT10poXHhvUNAO7tg5bYSQcqIKfCA/oBtJJtPhMIWwqcsi68uwCcmoI5DFFiboXn8phPtnlaemc3fOWZFR4b5VMBcoWX4iPXwnPXBjiN7NL8FA9wyNIzKTzu6hqBD+rPY7pfNVN85F14eAabr2yj7u41KR7ioKVnU3gFywSjnP5h5V54AKFEVdNK/yw37iBzwmOjZ2cwLQbRVukflggPzG+DuJXszlfTP89POsig8NL2tMZwp5MIb4DODWSb3xXhJZQA672Hg5yHE1pegLJEeOuhsXYE1ToWBoCYSJdMfeKxYbkPQR+dSNKBihLhbYDtQbLNYwJhTKBTZoTH7ZUL4PCPE8i4iZJEeBvB0+hC6ive2ATQxLhmQnhsVLcE1rgbjuyaGLKhFCLC+9S1wJeAEW1kF/43FLwxBsmI8MrXAnR5jBwjSi3C+yxYnkF26YqIgCsLm3rhsV7ZG8Tu85ibKaOmLJEIbxDUq8DUSrXiEmVjiCBR+oVnVG4H+IwI2CQgpAhv8CHQHWQXz0zAgAKXkGrhcbt1Mhy4C9Nm9BDhDTlYDadQn3l3WgefbuEZlvs8Zmta4TeuW4Q3DKPFZJttjRkm0yK1wmPDcje8mJlMrGFVJcJrQHIa2WZfWLRVxkml8Fjv+QqIFgP0RZWw1OcS4Q3PnP8bzK1U63xN/Wyay5hO4RmWu5Gku6Fkxg8RnocBX0e2OdmDXaJMUic81nsPBjmPJYpiZMWI8DyhZe0QqnX8zpNtQozSJzzDuh/AcQnhF3EZIjyPgH9Ntnm8R9tEmKVKeGxYEwHcnAhySooQ4fnAfD7Z5i0+7GM1TY3weHLX5thk9FNg3j1WYkqTi/A84yZaitUr2mhO9weefWI0TI/wjHI3QN+LkVUMqUV4/qDz98kupWLl7FQIj6f27gHNcZ/HHO1vEGm3FuH5nOAKOForzep4waefcvN0CE+v/ATE5yinE3tCEZ7vETDdSrXiub79FDskXnhcsE4A417FXBKSToQXaBCEcVQ17wvkq8gpDcJ7HIwDFfFIWBoRXqCBEJ6gqnlQIF9FTokWHhvlqQDVFLFIYBoRXvChsE52aVZw/2g9Eys8nmxthxH1DUe2jxZBkqOL8JqYzh+xBq00x1zeRIzIXJMrPN2yQdAj6zwVgUV4TY2JUaOaaTQVIyLnRAqP28v7w6EnI+o5RWFFeE0PS+MDqK+0qOk4IQdIpvAK1j1gnBhyrykMJ8JremiEX1HVPKnpOCEHSJzwWLfOBuHWkPtMaTgRXiiDY5xDNfOnocQKKUiihMcXTR+F0SPd5Rz2DKm/lIcR4YU0wOex4sM2mjt9ZUjxmg6TLOHp1lUgfL/prjITQIQX2igZ36OaeXVo8ZoMlBjhcfvM3eD0u7cPtmiypwy5i/BCHOb70FpaqW/aiyHGDBwqOcIrlG8C0/mBO8mkowgv1LES30zV0ndCjRkwWCKEx4XKsWB+IGAPGXYT4YU+XKJvUbX4m9Dj+gyYDOEZlUcAPtRn7TkwF+GFP2R6lOziYeHH9RcxduGxXr4URNf5Kzsv1iK8SCbNfBnVSj+IJLbHoLEKjzsq22BNfcORHT3WmzMzEV5EA/9PjKBW6i2+GVH8hmHjFV6h0gvmaQ2rzK2BCC+y0RPNpGqxI7L4DQLHJjwuWPvCwWIQYqshLuje84rwvLPyaclgaGilqvm0T89QzGM76dmwfg7g26F0kdkgIryIR/sLss3xEecYNHwswmO9cjqI74ij4XTlFOFFPi+mM6hW/FnkeT6VQLnwuKtrU3wwyn0ecx/VzaYvnwhPwcyew+Yr26i7+2MFudanUC+8gtUJxgyVTaY3lwhPyewIl1PV7FGSayCJUuFxYcZX4bS4F1T+RmWT6c0lwlMyO8afofW3UvXyl5XkA9ReUWTD+hGAi1Q1l/48IjyFM5xLtjlJVT5ln3hsVI4E+CFVjWUjjwhP7RzpKLKLC1TkVCm8hwA+UkVT2ckhwlM7S1pAdvEoFTmVCI+nlidBoxtUNJStHCI85fN0+GKaVXJ/EkV6RC48bp/5BfT3uxdUdom0k0wGF+EpHyvjFbTUX5h9J8rc0QvPKPcAVIqyiezGFuHFM1suk13qjDJ3pMJjw3JvkrtvH2wSZROZjc1YSjVzbND+2LB+CODioP459lsNoJVs87moGEQtPPdRnAlRFZ+DuKuxYsxomjvJPRF8H2xUHgP4YN+O4uASuJNs8/SoUEQmPJ7aMx6aNj+qwnMTl2kvqhWfD9IvG+XlAH0piK/4AHCcU2lWp/swf+hHJMLjri5t4HnMfUOvOG8BCTdS1bzQb9tslCcApPzhX791Jtz+6YHnOJ2w64xGeIblvmBYCbvY3MZjZyLVOud57X9gYeAVXu3FblgCRbLN3rAZhS481nt2AtFigP427GJzHc9Zsw3NuuItLwzYqCwGeD8vtmLTiAC/BeZWqnUua2Tp5+/hC8+w3EVkLvFThNh6JMDcjpXL5tDcuYNebGG9cgGIZwMY6TGimHkjcD3Z5qXeTL1ZhSo81nsPBTmPeEstVgEJLAGwqP6tYtP+BfhwxPYgPgAaHwDGaQFjilsjAqwdRrWORxuZef17uMIzLHdR2mO9Jhc7IZAiAr8h2/xWWPWGJjw2LHdp7BvDKkziCIEEEriAbPOmMOoKRXis22NAH7tPqHwtjKIkhhBIKIHfgzdtpZrxXrP1hSM8o3w1QFc2W4z4C4HkE+BryC5d1WydTQuP9cqeoPpq0HIlrdlpiH8aCHwIptagTxOta7B54RmVnwJ8VhqISY1CIBwCdBvZxbObidWU8NjoOQnQ7m6mAPEVAukk4JxMduc9QWtvTngF60kw9g+aXPyEQGoJEBZR1TwgaP2BhcdGxQC4GjSx+AmB9BOgAtlFO0gfgYTHU8pfRov7gqu8chIEuvhkhQC/gX600uzS6347CiY8w5oFYIrfZGIvBDJIYDbZ5lS/ffkWHrfPPBBO/+N+E4m9EMgsAa3lIOqb9oSf/vwLr2DdC8YJfpKIrRDINAHCfVQ1x/np0Zfw2LDOBeD5hUw/hYitLwJ/AOMP0OglAFvDcb4Oot0AjPYVRYzDJHAe2eZPvAb0LDy+pOtz2GyU+4RK4FWvvBYldp8mwAvA9CzIeYLsziGXGOepvXvIK0KxnT3/jlUrW+n67r94qcC78HSrC4TpXoKKTWgEnoLjzKFZnXf5jch6pQ0aJoNZ3tHzCy+oPWM61cxuL+6ehMfTendHv+N+2v21l6BiEwqBUNb6YN36Ngg3y+xCmUmjIP+HFq2VZnYsbWToTXiFyi1gPq9RMPl7SASIjqdq8dchRQN3VHbBGn4YwA5hxZQ4QxAgmkfV4sRGfBoKj43y8QDd1yiQ/D0kAszHUa3kvskf+sGG5f5L/PXQA0vATxHgE8gu3T8cFg/Ck9WIFZ5XoS+qs2HtXOjbHrzG91MWCvvPSKrGe14MKzzWy5NB5K5aJUf0BCJdMnxd+WxYlwGYE307Oc/APIVqpSE5Dyk8LlrbYnV9wxH5XRD9OfQhnDX70qwrXog+FcCGtQhAm4pcOc7xX9gErVQx/zQYg6GFV7D6wCjkGJy61okrVC2ZqhLy1J7ToGl3qsqX2zyEKlXNds/C40K5FUxP5RaY2sbfATbZk+zCGyrTsmH9FsDRKnPmMhdxG1VL7jfHjY5BP/HYsH4J4ORcglLdNPHNVC25SyMqPdiw3H+JZypNms9kd5NtntJQeKxbZ4JwWz4ZxdA1YRxVTeW3a+QKp8JZM86imnn7hhk/84nHhvUsAHcnVzkUECDbbHhLJ6oyZOPKqMh+Ju4SLN/xG/TzU/vX/WWjobNunQ3CrcrKkURvk21uHRcG1svzQTQ+rvz5yss62SX3BfL6sbHwDMvdlOGQfAGJtdv/INvcPa4KWHZ2Uon+FXzkfJN+2PnuRsJjo3cc4PxKZSWSq/ETDlEyYr1nOkjrijKHxN7ol91VZBev2Vh4unUnSLZ5UnyixP2J5z5Z4T7JIocSAvwq2aVd1gtv7S6u2osANlOSX5KsIxDvbzzDcvdInyDjUEiAcDhVzUfqv/G4UC6AqU9hekm17kd2nFc1C9YCMI6QYagkQDbZxcJa4enWkyBZEVol/vW5YrqPV5+7UfkzwFvG0nd+k75Mtvn3xO0zd4DT/1p+OcTceVxPrshjgfENfgR9kdioHA2w+9yeHPEQiOdZTfl5Ec+061npGJJn9mLkvy616rcTjOpIYM3TAO+RgO5zWAJ3EuvWHSCcnsPuk9Sy2vfx9EoRxFaSAOSsljvdT7x/ArBvzhpPYrtq3kCf1rsj+vuflA1nYj0FnnaF596/+1qsZUjydQQiXXNl4Aq2PCgR+/lGL7lfNd8AYdvYa5EC1hKIcpUx3eoDyaoCCTjV3nQ/8dwlp2XN/QRMY30JIa+rWdezUfkFwJ95ITNJbeeolo9c4a0GMCJHTael1XBWkm6fsSucFncl6f3S0njm6yTUhfc2gC9kvtl0Nhh87wT3lgGvmQxypsiFlMQN/y1XeK8A2DlxpUlBGxDwtltQ/Svl2kVrxwF0odynS+xJ9LIrPFnqIbHzGbKwT/bHc/o/XG+laa3y0HMKhkn0rCs8d43341JQrpQoBLJC4AH3Wc2rAb4yKx1JH0Ig+QSoTGyUJwDkvhAphxAQAkoI8JnEhZ69wNoSJfkkiRAQAu4lsD2IL5o+CqNHuu/jbSVMhIAQiJrA2nVX1r6BLsu8RU1b4guBtQSI51C1NGVg6Yeeg0HaY8JGCAiBiAkwH0u10m/XL2gry3lHDFzCCwF8anm/+tfNQu8ksHOD0BECQiAqAnwN2aWr6t8416XgybM3w4gP/1XezYsKusTNNwH6ADxiL6oVlm0kvIGLLB0AKvkGJN0LgUgIzCbbnLou8sablkyesRVGtLj39LaLJLUEFQJ5JcC0F9WKzw8qvPqnnl4ugGRV6byeH9J3FAQ++W03pPAGvnLK/thR8JeYOSTA/4w1ow6iOVNWbdj84Hug6zPagJbHQWjJISlpWQiER2CIZTyG3AZY9k4Lj71EyiuBz37FHPar5ro/yla9eT1hpO/mCdAssov6UHEabnzPhrUUwNebL0QiCIHcEFhCtvmPw3XbUHgDF1s4N8ikUSHQDAF3BbGqObJRCE/Cq4uvYC0E47BGAeXvQiDHBOp733np37Pw6uKTlYi9MBWbXBKghWQXPe+u60t4a8XXMx2kdeWSrTQtBAYjMPCOnR84voVXF1+7dQQcchdJ+qafZGIrBLJFgF8FaVdStXiX374CCa8uvmm9o9HffzWYpsiNdr/YxT7lBFaBeR60Ta6lavsfg/QSWHjrkrFRHgui88CYCODzQYoQHyGQEgLudgfzwLiFaubvm6m5aeGtF2D7zB3Qv3oiSDsRwD80U5T4CoFEEWAsgsb3YDXNpznm8jBqC014GxbDhcqxYHYFeJJsiBLGmCSGcgJES+HwArTwPdRXWhR2/kiEt/5T0P0d6DhjAR4LaGPBcP9/CwAb/idbhIU9VYnnlcBHAN4D6D2A3wPxi3DoUTj0DM0uupv5RHb8P0uYqwkUmK2NAAAAAElFTkSuQmCC"
  4001. /***/ }),
  4002. /***/ 23:
  4003. /*!************************************************************!*\
  4004. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  4005. \************************************************************/
  4006. /*! no static exports found */
  4007. /***/ (function(module, exports, __webpack_require__) {
  4008. /**
  4009. * Copyright (c) 2014-present, Facebook, Inc.
  4010. *
  4011. * This source code is licensed under the MIT license found in the
  4012. * LICENSE file in the root directory of this source tree.
  4013. */
  4014. // This method of obtaining a reference to the global object needs to be
  4015. // kept identical to the way it is obtained in runtime.js
  4016. var g = (function() {
  4017. return this || (typeof self === "object" && self);
  4018. })() || Function("return this")();
  4019. // Use `getOwnPropertyNames` because not all browsers support calling
  4020. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  4021. var hadRuntime = g.regeneratorRuntime &&
  4022. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  4023. // Save the old regeneratorRuntime in case it needs to be restored later.
  4024. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  4025. // Force reevalutation of runtime.js.
  4026. g.regeneratorRuntime = undefined;
  4027. module.exports = __webpack_require__(/*! ./runtime */ 24);
  4028. if (hadRuntime) {
  4029. // Restore the original runtime.
  4030. g.regeneratorRuntime = oldRuntime;
  4031. } else {
  4032. // Remove the global property added by runtime.js.
  4033. try {
  4034. delete g.regeneratorRuntime;
  4035. } catch(e) {
  4036. g.regeneratorRuntime = undefined;
  4037. }
  4038. }
  4039. /***/ }),
  4040. /***/ 24:
  4041. /*!*****************************************************!*\
  4042. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  4043. \*****************************************************/
  4044. /*! no static exports found */
  4045. /***/ (function(module, exports) {
  4046. /**
  4047. * Copyright (c) 2014-present, Facebook, Inc.
  4048. *
  4049. * This source code is licensed under the MIT license found in the
  4050. * LICENSE file in the root directory of this source tree.
  4051. */
  4052. !(function(global) {
  4053. "use strict";
  4054. var Op = Object.prototype;
  4055. var hasOwn = Op.hasOwnProperty;
  4056. var undefined; // More compressible than void 0.
  4057. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  4058. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  4059. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  4060. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  4061. var inModule = typeof module === "object";
  4062. var runtime = global.regeneratorRuntime;
  4063. if (runtime) {
  4064. if (inModule) {
  4065. // If regeneratorRuntime is defined globally and we're in a module,
  4066. // make the exports object identical to regeneratorRuntime.
  4067. module.exports = runtime;
  4068. }
  4069. // Don't bother evaluating the rest of this file if the runtime was
  4070. // already defined globally.
  4071. return;
  4072. }
  4073. // Define the runtime globally (as expected by generated code) as either
  4074. // module.exports (if we're in a module) or a new, empty object.
  4075. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  4076. function wrap(innerFn, outerFn, self, tryLocsList) {
  4077. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  4078. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  4079. var generator = Object.create(protoGenerator.prototype);
  4080. var context = new Context(tryLocsList || []);
  4081. // The ._invoke method unifies the implementations of the .next,
  4082. // .throw, and .return methods.
  4083. generator._invoke = makeInvokeMethod(innerFn, self, context);
  4084. return generator;
  4085. }
  4086. runtime.wrap = wrap;
  4087. // Try/catch helper to minimize deoptimizations. Returns a completion
  4088. // record like context.tryEntries[i].completion. This interface could
  4089. // have been (and was previously) designed to take a closure to be
  4090. // invoked without arguments, but in all the cases we care about we
  4091. // already have an existing method we want to call, so there's no need
  4092. // to create a new function object. We can even get away with assuming
  4093. // the method takes exactly one argument, since that happens to be true
  4094. // in every case, so we don't have to touch the arguments object. The
  4095. // only additional allocation required is the completion record, which
  4096. // has a stable shape and so hopefully should be cheap to allocate.
  4097. function tryCatch(fn, obj, arg) {
  4098. try {
  4099. return { type: "normal", arg: fn.call(obj, arg) };
  4100. } catch (err) {
  4101. return { type: "throw", arg: err };
  4102. }
  4103. }
  4104. var GenStateSuspendedStart = "suspendedStart";
  4105. var GenStateSuspendedYield = "suspendedYield";
  4106. var GenStateExecuting = "executing";
  4107. var GenStateCompleted = "completed";
  4108. // Returning this object from the innerFn has the same effect as
  4109. // breaking out of the dispatch switch statement.
  4110. var ContinueSentinel = {};
  4111. // Dummy constructor functions that we use as the .constructor and
  4112. // .constructor.prototype properties for functions that return Generator
  4113. // objects. For full spec compliance, you may wish to configure your
  4114. // minifier not to mangle the names of these two functions.
  4115. function Generator() {}
  4116. function GeneratorFunction() {}
  4117. function GeneratorFunctionPrototype() {}
  4118. // This is a polyfill for %IteratorPrototype% for environments that
  4119. // don't natively support it.
  4120. var IteratorPrototype = {};
  4121. IteratorPrototype[iteratorSymbol] = function () {
  4122. return this;
  4123. };
  4124. var getProto = Object.getPrototypeOf;
  4125. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  4126. if (NativeIteratorPrototype &&
  4127. NativeIteratorPrototype !== Op &&
  4128. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  4129. // This environment has a native %IteratorPrototype%; use it instead
  4130. // of the polyfill.
  4131. IteratorPrototype = NativeIteratorPrototype;
  4132. }
  4133. var Gp = GeneratorFunctionPrototype.prototype =
  4134. Generator.prototype = Object.create(IteratorPrototype);
  4135. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  4136. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  4137. GeneratorFunctionPrototype[toStringTagSymbol] =
  4138. GeneratorFunction.displayName = "GeneratorFunction";
  4139. // Helper for defining the .next, .throw, and .return methods of the
  4140. // Iterator interface in terms of a single ._invoke method.
  4141. function defineIteratorMethods(prototype) {
  4142. ["next", "throw", "return"].forEach(function(method) {
  4143. prototype[method] = function(arg) {
  4144. return this._invoke(method, arg);
  4145. };
  4146. });
  4147. }
  4148. runtime.isGeneratorFunction = function(genFun) {
  4149. var ctor = typeof genFun === "function" && genFun.constructor;
  4150. return ctor
  4151. ? ctor === GeneratorFunction ||
  4152. // For the native GeneratorFunction constructor, the best we can
  4153. // do is to check its .name property.
  4154. (ctor.displayName || ctor.name) === "GeneratorFunction"
  4155. : false;
  4156. };
  4157. runtime.mark = function(genFun) {
  4158. if (Object.setPrototypeOf) {
  4159. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  4160. } else {
  4161. genFun.__proto__ = GeneratorFunctionPrototype;
  4162. if (!(toStringTagSymbol in genFun)) {
  4163. genFun[toStringTagSymbol] = "GeneratorFunction";
  4164. }
  4165. }
  4166. genFun.prototype = Object.create(Gp);
  4167. return genFun;
  4168. };
  4169. // Within the body of any async function, `await x` is transformed to
  4170. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  4171. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  4172. // meant to be awaited.
  4173. runtime.awrap = function(arg) {
  4174. return { __await: arg };
  4175. };
  4176. function AsyncIterator(generator) {
  4177. function invoke(method, arg, resolve, reject) {
  4178. var record = tryCatch(generator[method], generator, arg);
  4179. if (record.type === "throw") {
  4180. reject(record.arg);
  4181. } else {
  4182. var result = record.arg;
  4183. var value = result.value;
  4184. if (value &&
  4185. typeof value === "object" &&
  4186. hasOwn.call(value, "__await")) {
  4187. return Promise.resolve(value.__await).then(function(value) {
  4188. invoke("next", value, resolve, reject);
  4189. }, function(err) {
  4190. invoke("throw", err, resolve, reject);
  4191. });
  4192. }
  4193. return Promise.resolve(value).then(function(unwrapped) {
  4194. // When a yielded Promise is resolved, its final value becomes
  4195. // the .value of the Promise<{value,done}> result for the
  4196. // current iteration.
  4197. result.value = unwrapped;
  4198. resolve(result);
  4199. }, function(error) {
  4200. // If a rejected Promise was yielded, throw the rejection back
  4201. // into the async generator function so it can be handled there.
  4202. return invoke("throw", error, resolve, reject);
  4203. });
  4204. }
  4205. }
  4206. var previousPromise;
  4207. function enqueue(method, arg) {
  4208. function callInvokeWithMethodAndArg() {
  4209. return new Promise(function(resolve, reject) {
  4210. invoke(method, arg, resolve, reject);
  4211. });
  4212. }
  4213. return previousPromise =
  4214. // If enqueue has been called before, then we want to wait until
  4215. // all previous Promises have been resolved before calling invoke,
  4216. // so that results are always delivered in the correct order. If
  4217. // enqueue has not been called before, then it is important to
  4218. // call invoke immediately, without waiting on a callback to fire,
  4219. // so that the async generator function has the opportunity to do
  4220. // any necessary setup in a predictable way. This predictability
  4221. // is why the Promise constructor synchronously invokes its
  4222. // executor callback, and why async functions synchronously
  4223. // execute code before the first await. Since we implement simple
  4224. // async functions in terms of async generators, it is especially
  4225. // important to get this right, even though it requires care.
  4226. previousPromise ? previousPromise.then(
  4227. callInvokeWithMethodAndArg,
  4228. // Avoid propagating failures to Promises returned by later
  4229. // invocations of the iterator.
  4230. callInvokeWithMethodAndArg
  4231. ) : callInvokeWithMethodAndArg();
  4232. }
  4233. // Define the unified helper method that is used to implement .next,
  4234. // .throw, and .return (see defineIteratorMethods).
  4235. this._invoke = enqueue;
  4236. }
  4237. defineIteratorMethods(AsyncIterator.prototype);
  4238. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  4239. return this;
  4240. };
  4241. runtime.AsyncIterator = AsyncIterator;
  4242. // Note that simple async functions are implemented on top of
  4243. // AsyncIterator objects; they just return a Promise for the value of
  4244. // the final result produced by the iterator.
  4245. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  4246. var iter = new AsyncIterator(
  4247. wrap(innerFn, outerFn, self, tryLocsList)
  4248. );
  4249. return runtime.isGeneratorFunction(outerFn)
  4250. ? iter // If outerFn is a generator, return the full iterator.
  4251. : iter.next().then(function(result) {
  4252. return result.done ? result.value : iter.next();
  4253. });
  4254. };
  4255. function makeInvokeMethod(innerFn, self, context) {
  4256. var state = GenStateSuspendedStart;
  4257. return function invoke(method, arg) {
  4258. if (state === GenStateExecuting) {
  4259. throw new Error("Generator is already running");
  4260. }
  4261. if (state === GenStateCompleted) {
  4262. if (method === "throw") {
  4263. throw arg;
  4264. }
  4265. // Be forgiving, per 25.3.3.3.3 of the spec:
  4266. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  4267. return doneResult();
  4268. }
  4269. context.method = method;
  4270. context.arg = arg;
  4271. while (true) {
  4272. var delegate = context.delegate;
  4273. if (delegate) {
  4274. var delegateResult = maybeInvokeDelegate(delegate, context);
  4275. if (delegateResult) {
  4276. if (delegateResult === ContinueSentinel) continue;
  4277. return delegateResult;
  4278. }
  4279. }
  4280. if (context.method === "next") {
  4281. // Setting context._sent for legacy support of Babel's
  4282. // function.sent implementation.
  4283. context.sent = context._sent = context.arg;
  4284. } else if (context.method === "throw") {
  4285. if (state === GenStateSuspendedStart) {
  4286. state = GenStateCompleted;
  4287. throw context.arg;
  4288. }
  4289. context.dispatchException(context.arg);
  4290. } else if (context.method === "return") {
  4291. context.abrupt("return", context.arg);
  4292. }
  4293. state = GenStateExecuting;
  4294. var record = tryCatch(innerFn, self, context);
  4295. if (record.type === "normal") {
  4296. // If an exception is thrown from innerFn, we leave state ===
  4297. // GenStateExecuting and loop back for another invocation.
  4298. state = context.done
  4299. ? GenStateCompleted
  4300. : GenStateSuspendedYield;
  4301. if (record.arg === ContinueSentinel) {
  4302. continue;
  4303. }
  4304. return {
  4305. value: record.arg,
  4306. done: context.done
  4307. };
  4308. } else if (record.type === "throw") {
  4309. state = GenStateCompleted;
  4310. // Dispatch the exception by looping back around to the
  4311. // context.dispatchException(context.arg) call above.
  4312. context.method = "throw";
  4313. context.arg = record.arg;
  4314. }
  4315. }
  4316. };
  4317. }
  4318. // Call delegate.iterator[context.method](context.arg) and handle the
  4319. // result, either by returning a { value, done } result from the
  4320. // delegate iterator, or by modifying context.method and context.arg,
  4321. // setting context.delegate to null, and returning the ContinueSentinel.
  4322. function maybeInvokeDelegate(delegate, context) {
  4323. var method = delegate.iterator[context.method];
  4324. if (method === undefined) {
  4325. // A .throw or .return when the delegate iterator has no .throw
  4326. // method always terminates the yield* loop.
  4327. context.delegate = null;
  4328. if (context.method === "throw") {
  4329. if (delegate.iterator.return) {
  4330. // If the delegate iterator has a return method, give it a
  4331. // chance to clean up.
  4332. context.method = "return";
  4333. context.arg = undefined;
  4334. maybeInvokeDelegate(delegate, context);
  4335. if (context.method === "throw") {
  4336. // If maybeInvokeDelegate(context) changed context.method from
  4337. // "return" to "throw", let that override the TypeError below.
  4338. return ContinueSentinel;
  4339. }
  4340. }
  4341. context.method = "throw";
  4342. context.arg = new TypeError(
  4343. "The iterator does not provide a 'throw' method");
  4344. }
  4345. return ContinueSentinel;
  4346. }
  4347. var record = tryCatch(method, delegate.iterator, context.arg);
  4348. if (record.type === "throw") {
  4349. context.method = "throw";
  4350. context.arg = record.arg;
  4351. context.delegate = null;
  4352. return ContinueSentinel;
  4353. }
  4354. var info = record.arg;
  4355. if (! info) {
  4356. context.method = "throw";
  4357. context.arg = new TypeError("iterator result is not an object");
  4358. context.delegate = null;
  4359. return ContinueSentinel;
  4360. }
  4361. if (info.done) {
  4362. // Assign the result of the finished delegate to the temporary
  4363. // variable specified by delegate.resultName (see delegateYield).
  4364. context[delegate.resultName] = info.value;
  4365. // Resume execution at the desired location (see delegateYield).
  4366. context.next = delegate.nextLoc;
  4367. // If context.method was "throw" but the delegate handled the
  4368. // exception, let the outer generator proceed normally. If
  4369. // context.method was "next", forget context.arg since it has been
  4370. // "consumed" by the delegate iterator. If context.method was
  4371. // "return", allow the original .return call to continue in the
  4372. // outer generator.
  4373. if (context.method !== "return") {
  4374. context.method = "next";
  4375. context.arg = undefined;
  4376. }
  4377. } else {
  4378. // Re-yield the result returned by the delegate method.
  4379. return info;
  4380. }
  4381. // The delegate iterator is finished, so forget it and continue with
  4382. // the outer generator.
  4383. context.delegate = null;
  4384. return ContinueSentinel;
  4385. }
  4386. // Define Generator.prototype.{next,throw,return} in terms of the
  4387. // unified ._invoke helper method.
  4388. defineIteratorMethods(Gp);
  4389. Gp[toStringTagSymbol] = "Generator";
  4390. // A Generator should always return itself as the iterator object when the
  4391. // @@iterator function is called on it. Some browsers' implementations of the
  4392. // iterator prototype chain incorrectly implement this, causing the Generator
  4393. // object to not be returned from this call. This ensures that doesn't happen.
  4394. // See https://github.com/facebook/regenerator/issues/274 for more details.
  4395. Gp[iteratorSymbol] = function() {
  4396. return this;
  4397. };
  4398. Gp.toString = function() {
  4399. return "[object Generator]";
  4400. };
  4401. function pushTryEntry(locs) {
  4402. var entry = { tryLoc: locs[0] };
  4403. if (1 in locs) {
  4404. entry.catchLoc = locs[1];
  4405. }
  4406. if (2 in locs) {
  4407. entry.finallyLoc = locs[2];
  4408. entry.afterLoc = locs[3];
  4409. }
  4410. this.tryEntries.push(entry);
  4411. }
  4412. function resetTryEntry(entry) {
  4413. var record = entry.completion || {};
  4414. record.type = "normal";
  4415. delete record.arg;
  4416. entry.completion = record;
  4417. }
  4418. function Context(tryLocsList) {
  4419. // The root entry object (effectively a try statement without a catch
  4420. // or a finally block) gives us a place to store values thrown from
  4421. // locations where there is no enclosing try statement.
  4422. this.tryEntries = [{ tryLoc: "root" }];
  4423. tryLocsList.forEach(pushTryEntry, this);
  4424. this.reset(true);
  4425. }
  4426. runtime.keys = function(object) {
  4427. var keys = [];
  4428. for (var key in object) {
  4429. keys.push(key);
  4430. }
  4431. keys.reverse();
  4432. // Rather than returning an object with a next method, we keep
  4433. // things simple and return the next function itself.
  4434. return function next() {
  4435. while (keys.length) {
  4436. var key = keys.pop();
  4437. if (key in object) {
  4438. next.value = key;
  4439. next.done = false;
  4440. return next;
  4441. }
  4442. }
  4443. // To avoid creating an additional object, we just hang the .value
  4444. // and .done properties off the next function object itself. This
  4445. // also ensures that the minifier will not anonymize the function.
  4446. next.done = true;
  4447. return next;
  4448. };
  4449. };
  4450. function values(iterable) {
  4451. if (iterable) {
  4452. var iteratorMethod = iterable[iteratorSymbol];
  4453. if (iteratorMethod) {
  4454. return iteratorMethod.call(iterable);
  4455. }
  4456. if (typeof iterable.next === "function") {
  4457. return iterable;
  4458. }
  4459. if (!isNaN(iterable.length)) {
  4460. var i = -1, next = function next() {
  4461. while (++i < iterable.length) {
  4462. if (hasOwn.call(iterable, i)) {
  4463. next.value = iterable[i];
  4464. next.done = false;
  4465. return next;
  4466. }
  4467. }
  4468. next.value = undefined;
  4469. next.done = true;
  4470. return next;
  4471. };
  4472. return next.next = next;
  4473. }
  4474. }
  4475. // Return an iterator with no values.
  4476. return { next: doneResult };
  4477. }
  4478. runtime.values = values;
  4479. function doneResult() {
  4480. return { value: undefined, done: true };
  4481. }
  4482. Context.prototype = {
  4483. constructor: Context,
  4484. reset: function(skipTempReset) {
  4485. this.prev = 0;
  4486. this.next = 0;
  4487. // Resetting context._sent for legacy support of Babel's
  4488. // function.sent implementation.
  4489. this.sent = this._sent = undefined;
  4490. this.done = false;
  4491. this.delegate = null;
  4492. this.method = "next";
  4493. this.arg = undefined;
  4494. this.tryEntries.forEach(resetTryEntry);
  4495. if (!skipTempReset) {
  4496. for (var name in this) {
  4497. // Not sure about the optimal order of these conditions:
  4498. if (name.charAt(0) === "t" &&
  4499. hasOwn.call(this, name) &&
  4500. !isNaN(+name.slice(1))) {
  4501. this[name] = undefined;
  4502. }
  4503. }
  4504. }
  4505. },
  4506. stop: function() {
  4507. this.done = true;
  4508. var rootEntry = this.tryEntries[0];
  4509. var rootRecord = rootEntry.completion;
  4510. if (rootRecord.type === "throw") {
  4511. throw rootRecord.arg;
  4512. }
  4513. return this.rval;
  4514. },
  4515. dispatchException: function(exception) {
  4516. if (this.done) {
  4517. throw exception;
  4518. }
  4519. var context = this;
  4520. function handle(loc, caught) {
  4521. record.type = "throw";
  4522. record.arg = exception;
  4523. context.next = loc;
  4524. if (caught) {
  4525. // If the dispatched exception was caught by a catch block,
  4526. // then let that catch block handle the exception normally.
  4527. context.method = "next";
  4528. context.arg = undefined;
  4529. }
  4530. return !! caught;
  4531. }
  4532. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4533. var entry = this.tryEntries[i];
  4534. var record = entry.completion;
  4535. if (entry.tryLoc === "root") {
  4536. // Exception thrown outside of any try block that could handle
  4537. // it, so set the completion value of the entire function to
  4538. // throw the exception.
  4539. return handle("end");
  4540. }
  4541. if (entry.tryLoc <= this.prev) {
  4542. var hasCatch = hasOwn.call(entry, "catchLoc");
  4543. var hasFinally = hasOwn.call(entry, "finallyLoc");
  4544. if (hasCatch && hasFinally) {
  4545. if (this.prev < entry.catchLoc) {
  4546. return handle(entry.catchLoc, true);
  4547. } else if (this.prev < entry.finallyLoc) {
  4548. return handle(entry.finallyLoc);
  4549. }
  4550. } else if (hasCatch) {
  4551. if (this.prev < entry.catchLoc) {
  4552. return handle(entry.catchLoc, true);
  4553. }
  4554. } else if (hasFinally) {
  4555. if (this.prev < entry.finallyLoc) {
  4556. return handle(entry.finallyLoc);
  4557. }
  4558. } else {
  4559. throw new Error("try statement without catch or finally");
  4560. }
  4561. }
  4562. }
  4563. },
  4564. abrupt: function(type, arg) {
  4565. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4566. var entry = this.tryEntries[i];
  4567. if (entry.tryLoc <= this.prev &&
  4568. hasOwn.call(entry, "finallyLoc") &&
  4569. this.prev < entry.finallyLoc) {
  4570. var finallyEntry = entry;
  4571. break;
  4572. }
  4573. }
  4574. if (finallyEntry &&
  4575. (type === "break" ||
  4576. type === "continue") &&
  4577. finallyEntry.tryLoc <= arg &&
  4578. arg <= finallyEntry.finallyLoc) {
  4579. // Ignore the finally entry if control is not jumping to a
  4580. // location outside the try/catch block.
  4581. finallyEntry = null;
  4582. }
  4583. var record = finallyEntry ? finallyEntry.completion : {};
  4584. record.type = type;
  4585. record.arg = arg;
  4586. if (finallyEntry) {
  4587. this.method = "next";
  4588. this.next = finallyEntry.finallyLoc;
  4589. return ContinueSentinel;
  4590. }
  4591. return this.complete(record);
  4592. },
  4593. complete: function(record, afterLoc) {
  4594. if (record.type === "throw") {
  4595. throw record.arg;
  4596. }
  4597. if (record.type === "break" ||
  4598. record.type === "continue") {
  4599. this.next = record.arg;
  4600. } else if (record.type === "return") {
  4601. this.rval = this.arg = record.arg;
  4602. this.method = "return";
  4603. this.next = "end";
  4604. } else if (record.type === "normal" && afterLoc) {
  4605. this.next = afterLoc;
  4606. }
  4607. return ContinueSentinel;
  4608. },
  4609. finish: function(finallyLoc) {
  4610. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4611. var entry = this.tryEntries[i];
  4612. if (entry.finallyLoc === finallyLoc) {
  4613. this.complete(entry.completion, entry.afterLoc);
  4614. resetTryEntry(entry);
  4615. return ContinueSentinel;
  4616. }
  4617. }
  4618. },
  4619. "catch": function(tryLoc) {
  4620. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4621. var entry = this.tryEntries[i];
  4622. if (entry.tryLoc === tryLoc) {
  4623. var record = entry.completion;
  4624. if (record.type === "throw") {
  4625. var thrown = record.arg;
  4626. resetTryEntry(entry);
  4627. }
  4628. return thrown;
  4629. }
  4630. }
  4631. // The context.catch method must only be called with a location
  4632. // argument that corresponds to a known catch block.
  4633. throw new Error("illegal catch attempt");
  4634. },
  4635. delegateYield: function(iterable, resultName, nextLoc) {
  4636. this.delegate = {
  4637. iterator: values(iterable),
  4638. resultName: resultName,
  4639. nextLoc: nextLoc
  4640. };
  4641. if (this.method === "next") {
  4642. // Deliberately forget the last sent value so that we don't
  4643. // accidentally pass it on to the delegate.
  4644. this.arg = undefined;
  4645. }
  4646. return ContinueSentinel;
  4647. }
  4648. };
  4649. })(
  4650. // In sloppy mode, unbound `this` refers to the global object, fallback to
  4651. // Function constructor if we're in global strict mode. That is sadly a form
  4652. // of indirect eval which violates Content Security Policy.
  4653. (function() {
  4654. return this || (typeof self === "object" && self);
  4655. })() || Function("return this")()
  4656. );
  4657. /***/ }),
  4658. /***/ 25:
  4659. /*!************************************************************************************************************************!*\
  4660. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/timeFormat.js ***!
  4661. \************************************************************************************************************************/
  4662. /*! no static exports found */
  4663. /***/ (function(module, exports, __webpack_require__) {
  4664. "use strict";
  4665. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  4666. // 所以这里做一个兼容polyfill的兼容处理
  4667. if (!String.prototype.padStart) {
  4668. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  4669. String.prototype.padStart = function (maxLength) {var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  4670. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError(
  4671. 'fillString must be String');
  4672. var str = this;
  4673. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  4674. if (str.length >= maxLength) return String(str);
  4675. var fillLength = maxLength - str.length,
  4676. times = Math.ceil(fillLength / fillString.length);
  4677. while (times >>= 1) {
  4678. fillString += fillString;
  4679. if (times === 1) {
  4680. fillString += fillString;
  4681. }
  4682. }
  4683. return fillString.slice(0, fillLength) + str;
  4684. };
  4685. }
  4686. // 其他更多是格式化有如下:
  4687. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  4688. function timeFormat() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  4689. // 如果为null,则格式化当前时间
  4690. if (!dateTime) dateTime = Number(new Date());
  4691. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  4692. if (dateTime.toString().length == 10) dateTime *= 1000;
  4693. var date = new Date(Number(dateTime));
  4694. var ret;
  4695. var opt = {
  4696. "y+": date.getFullYear().toString(), // 年
  4697. "m+": (date.getMonth() + 1).toString(), // 月
  4698. "d+": date.getDate().toString(), // 日
  4699. "h+": date.getHours().toString(), // 时
  4700. "M+": date.getMinutes().toString(), // 分
  4701. "s+": date.getSeconds().toString() // 秒
  4702. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  4703. };
  4704. for (var k in opt) {
  4705. ret = new RegExp("(" + k + ")").exec(fmt);
  4706. if (ret) {
  4707. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  4708. };
  4709. };
  4710. return fmt;
  4711. }var _default =
  4712. timeFormat;exports.default = _default;
  4713. /***/ }),
  4714. /***/ 26:
  4715. /*!**********************************************************************************************************************!*\
  4716. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/timeFrom.js ***!
  4717. \**********************************************************************************************************************/
  4718. /*! no static exports found */
  4719. /***/ (function(module, exports, __webpack_require__) {
  4720. "use strict";
  4721. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  4722. /**
  4723. * 时间戳转为多久之前
  4724. * @param String timestamp 时间戳
  4725. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  4726. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  4727. */
  4728. function timeFrom() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  4729. // 如果为null,则格式化当前时间
  4730. if (!dateTime) dateTime = Number(new Date());
  4731. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  4732. if (dateTime.toString().length == 10) dateTime *= 1000;
  4733. var timestamp = +new Date(Number(dateTime));
  4734. var timer = (Number(new Date()) - timestamp) / 1000;
  4735. // 如果小于5分钟,则返回"刚刚",其他以此类推
  4736. var tips = '';
  4737. switch (true) {
  4738. case timer < 300:
  4739. tips = '刚刚';
  4740. break;
  4741. case timer >= 300 && timer < 3600:
  4742. tips = parseInt(timer / 60) + '分钟前';
  4743. break;
  4744. case timer >= 3600 && timer < 86400:
  4745. tips = parseInt(timer / 3600) + '小时前';
  4746. break;
  4747. case timer >= 86400 && timer < 2592000:
  4748. tips = parseInt(timer / 86400) + '天前';
  4749. break;
  4750. default:
  4751. // 如果format为false,则无论什么时间戳,都显示xx之前
  4752. if (format === false) {
  4753. if (timer >= 2592000 && timer < 365 * 86400) {
  4754. tips = parseInt(timer / (86400 * 30)) + '个月前';
  4755. } else {
  4756. tips = parseInt(timer / (86400 * 365)) + '年前';
  4757. }
  4758. } else {
  4759. tips = (0, _timeFormat.default)(timestamp, format);
  4760. }}
  4761. return tips;
  4762. }var _default =
  4763. timeFrom;exports.default = _default;
  4764. /***/ }),
  4765. /***/ 27:
  4766. /*!***************************************************************************************************************************!*\
  4767. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/colorGradient.js ***!
  4768. \***************************************************************************************************************************/
  4769. /*! no static exports found */
  4770. /***/ (function(module, exports, __webpack_require__) {
  4771. "use strict";
  4772. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  4773. * 求两个颜色之间的渐变值
  4774. * @param {string} startColor 开始的颜色
  4775. * @param {string} endColor 结束的颜色
  4776. * @param {number} step 颜色等分的份额
  4777. * */
  4778. function colorGradient() {var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  4779. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  4780. var startR = startRGB[0];
  4781. var startG = startRGB[1];
  4782. var startB = startRGB[2];
  4783. var endRGB = hexToRgb(endColor, false);
  4784. var endR = endRGB[0];
  4785. var endG = endRGB[1];
  4786. var endB = endRGB[2];
  4787. var sR = (endR - startR) / step; //总差值
  4788. var sG = (endG - startG) / step;
  4789. var sB = (endB - startB) / step;
  4790. var colorArr = [];
  4791. for (var i = 0; i < step; i++) {
  4792. //计算每一步的hex值
  4793. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB *
  4794. i + startB) + ')');
  4795. colorArr.push(hex);
  4796. }
  4797. return colorArr;
  4798. }
  4799. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  4800. function hexToRgb(sColor) {var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  4801. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  4802. sColor = sColor.toLowerCase();
  4803. if (sColor && reg.test(sColor)) {
  4804. if (sColor.length === 4) {
  4805. var sColorNew = "#";
  4806. for (var i = 1; i < 4; i += 1) {
  4807. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  4808. }
  4809. sColor = sColorNew;
  4810. }
  4811. //处理六位的颜色值
  4812. var sColorChange = [];
  4813. for (var _i = 1; _i < 7; _i += 2) {
  4814. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  4815. }
  4816. if (!str) {
  4817. return sColorChange;
  4818. } else {
  4819. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  4820. }
  4821. } else if (/^(rgb|RGB)/.test(sColor)) {
  4822. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  4823. return arr.map(function (val) {return Number(val);});
  4824. } else {
  4825. return sColor;
  4826. }
  4827. };
  4828. // 将rgb表示方式转换为hex表示方式
  4829. function rgbToHex(rgb) {
  4830. var _this = rgb;
  4831. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  4832. if (/^(rgb|RGB)/.test(_this)) {
  4833. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  4834. var strHex = "#";
  4835. for (var i = 0; i < aColor.length; i++) {
  4836. var hex = Number(aColor[i]).toString(16);
  4837. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  4838. if (hex === "0") {
  4839. hex += hex;
  4840. }
  4841. strHex += hex;
  4842. }
  4843. if (strHex.length !== 7) {
  4844. strHex = _this;
  4845. }
  4846. return strHex;
  4847. } else if (reg.test(_this)) {
  4848. var aNum = _this.replace(/#/, "").split("");
  4849. if (aNum.length === 6) {
  4850. return _this;
  4851. } else if (aNum.length === 3) {
  4852. var numHex = "#";
  4853. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  4854. numHex += aNum[_i2] + aNum[_i2];
  4855. }
  4856. return numHex;
  4857. }
  4858. } else {
  4859. return _this;
  4860. }
  4861. }
  4862. /**
  4863. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  4864. * sHex为传入的十六进制的色值
  4865. * alpha为rgba的透明度
  4866. */
  4867. function colorToRgba(color) {var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  4868. color = rgbToHex(color);
  4869. // 十六进制颜色值的正则表达式
  4870. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  4871. /* 16进制颜色转为RGB格式 */
  4872. var sColor = color.toLowerCase();
  4873. if (sColor && reg.test(sColor)) {
  4874. if (sColor.length === 4) {
  4875. var sColorNew = '#';
  4876. for (var i = 1; i < 4; i += 1) {
  4877. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  4878. }
  4879. sColor = sColorNew;
  4880. }
  4881. // 处理六位的颜色值
  4882. var sColorChange = [];
  4883. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  4884. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  4885. }
  4886. // return sColorChange.join(',')
  4887. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  4888. } else
  4889. {
  4890. return sColor;
  4891. }
  4892. }var _default =
  4893. {
  4894. colorGradient: colorGradient,
  4895. hexToRgb: hexToRgb,
  4896. rgbToHex: rgbToHex,
  4897. colorToRgba: colorToRgba };exports.default = _default;
  4898. /***/ }),
  4899. /***/ 28:
  4900. /*!******************************************************************************************************************!*\
  4901. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/guid.js ***!
  4902. \******************************************************************************************************************/
  4903. /*! no static exports found */
  4904. /***/ (function(module, exports, __webpack_require__) {
  4905. "use strict";
  4906. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  4907. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  4908. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  4909. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  4910. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  4911. * v-for的时候,推荐使用后端返回的id而不是循环的index
  4912. * @param {Number} len uuid的长度
  4913. * @param {Boolean} firstU 将返回的首字母置为"u"
  4914. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  4915. */
  4916. function guid() {var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  4917. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  4918. var uuid = [];
  4919. radix = radix || chars.length;
  4920. if (len) {
  4921. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  4922. for (var i = 0; i < len; i++) {uuid[i] = chars[0 | Math.random() * radix];}
  4923. } else {
  4924. var r;
  4925. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  4926. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  4927. uuid[14] = '4';
  4928. for (var _i = 0; _i < 36; _i++) {
  4929. if (!uuid[_i]) {
  4930. r = 0 | Math.random() * 16;
  4931. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  4932. }
  4933. }
  4934. }
  4935. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  4936. if (firstU) {
  4937. uuid.shift();
  4938. return 'u' + uuid.join('');
  4939. } else {
  4940. return uuid.join('');
  4941. }
  4942. }var _default =
  4943. guid;exports.default = _default;
  4944. /***/ }),
  4945. /***/ 29:
  4946. /*!*******************************************************************************************************************!*\
  4947. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/color.js ***!
  4948. \*******************************************************************************************************************/
  4949. /*! no static exports found */
  4950. /***/ (function(module, exports, __webpack_require__) {
  4951. "use strict";
  4952. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  4953. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  4954. var color = {
  4955. primary: "#2979ff",
  4956. primaryDark: "#2b85e4",
  4957. primaryDisabled: "#a0cfff",
  4958. primaryLight: "#ecf5ff",
  4959. bgColor: "#f3f4f6",
  4960. info: "#909399",
  4961. infoDark: "#82848a",
  4962. infoDisabled: "#c8c9cc",
  4963. infoLight: "#f4f4f5",
  4964. warning: "#ff9900",
  4965. warningDark: "#f29100",
  4966. warningDisabled: "#fcbd71",
  4967. warningLight: "#fdf6ec",
  4968. error: "#fa3534",
  4969. errorDark: "#dd6161",
  4970. errorDisabled: "#fab6b6",
  4971. errorLight: "#fef0f0",
  4972. success: "#19be6b",
  4973. successDark: "#18b566",
  4974. successDisabled: "#71d5a1",
  4975. successLight: "#dbf1e1",
  4976. mainColor: "#303133",
  4977. contentColor: "#606266",
  4978. tipsColor: "#909399",
  4979. lightColor: "#c0c4cc",
  4980. borderColor: "#e4e7ed" };var _default =
  4981. color;exports.default = _default;
  4982. /***/ }),
  4983. /***/ 3:
  4984. /*!*************************************************************!*\
  4985. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  4986. \*************************************************************/
  4987. /*! no static exports found */
  4988. /***/ (function(module, exports, __webpack_require__) {
  4989. "use strict";
  4990. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;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 _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 _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;}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 _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 isArray = Array.isArray;
  4991. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  4992. var defaultDelimiters = ['{', '}'];var
  4993. BaseFormatter = /*#__PURE__*/function () {
  4994. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  4995. this._caches = Object.create(null);
  4996. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  4997. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4998. if (!values) {
  4999. return [message];
  5000. }
  5001. var tokens = this._caches[message];
  5002. if (!tokens) {
  5003. tokens = parse(message, delimiters);
  5004. this._caches[message] = tokens;
  5005. }
  5006. return compile(tokens, values);
  5007. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  5008. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  5009. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  5010. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  5011. var tokens = [];
  5012. var position = 0;
  5013. var text = '';
  5014. while (position < format.length) {
  5015. var char = format[position++];
  5016. if (char === startDelimiter) {
  5017. if (text) {
  5018. tokens.push({ type: 'text', value: text });
  5019. }
  5020. text = '';
  5021. var sub = '';
  5022. char = format[position++];
  5023. while (char !== undefined && char !== endDelimiter) {
  5024. sub += char;
  5025. char = format[position++];
  5026. }
  5027. var isClosed = char === endDelimiter;
  5028. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  5029. 'list' :
  5030. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  5031. 'named' :
  5032. 'unknown';
  5033. tokens.push({ value: sub, type: type });
  5034. }
  5035. // else if (char === '%') {
  5036. // // when found rails i18n syntax, skip text capture
  5037. // if (format[position] !== '{') {
  5038. // text += char
  5039. // }
  5040. // }
  5041. else {
  5042. text += char;
  5043. }
  5044. }
  5045. text && tokens.push({ type: 'text', value: text });
  5046. return tokens;
  5047. }
  5048. function compile(tokens, values) {
  5049. var compiled = [];
  5050. var index = 0;
  5051. var mode = isArray(values) ?
  5052. 'list' :
  5053. isObject(values) ?
  5054. 'named' :
  5055. 'unknown';
  5056. if (mode === 'unknown') {
  5057. return compiled;
  5058. }
  5059. while (index < tokens.length) {
  5060. var token = tokens[index];
  5061. switch (token.type) {
  5062. case 'text':
  5063. compiled.push(token.value);
  5064. break;
  5065. case 'list':
  5066. compiled.push(values[parseInt(token.value, 10)]);
  5067. break;
  5068. case 'named':
  5069. if (mode === 'named') {
  5070. compiled.push(values[token.value]);
  5071. } else
  5072. {
  5073. if (true) {
  5074. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  5075. }
  5076. }
  5077. break;
  5078. case 'unknown':
  5079. if (true) {
  5080. console.warn("Detect 'unknown' type of token!");
  5081. }
  5082. break;}
  5083. index++;
  5084. }
  5085. return compiled;
  5086. }
  5087. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  5088. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  5089. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  5090. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  5091. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  5092. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5093. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  5094. var defaultFormatter = new BaseFormatter();
  5095. function include(str, parts) {
  5096. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  5097. }
  5098. function startsWith(str, parts) {
  5099. return parts.find(function (part) {return str.indexOf(part) === 0;});
  5100. }
  5101. function normalizeLocale(locale, messages) {
  5102. if (!locale) {
  5103. return;
  5104. }
  5105. locale = locale.trim().replace(/_/g, '-');
  5106. if (messages && messages[locale]) {
  5107. return locale;
  5108. }
  5109. locale = locale.toLowerCase();
  5110. if (locale.indexOf('zh') === 0) {
  5111. if (locale.indexOf('-hans') > -1) {
  5112. return LOCALE_ZH_HANS;
  5113. }
  5114. if (locale.indexOf('-hant') > -1) {
  5115. return LOCALE_ZH_HANT;
  5116. }
  5117. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  5118. return LOCALE_ZH_HANT;
  5119. }
  5120. return LOCALE_ZH_HANS;
  5121. }
  5122. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  5123. if (lang) {
  5124. return lang;
  5125. }
  5126. }var
  5127. I18n = /*#__PURE__*/function () {
  5128. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  5129. this.locale = LOCALE_EN;
  5130. this.fallbackLocale = LOCALE_EN;
  5131. this.message = {};
  5132. this.messages = {};
  5133. this.watchers = [];
  5134. if (fallbackLocale) {
  5135. this.fallbackLocale = fallbackLocale;
  5136. }
  5137. this.formater = formater || defaultFormatter;
  5138. this.messages = messages || {};
  5139. this.setLocale(locale || LOCALE_EN);
  5140. if (watcher) {
  5141. this.watchLocale(watcher);
  5142. }
  5143. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  5144. locale) {var _this = this;
  5145. var oldLocale = this.locale;
  5146. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  5147. if (!this.messages[this.locale]) {
  5148. // 可能初始化时不存在
  5149. this.messages[this.locale] = {};
  5150. }
  5151. this.message = this.messages[this.locale];
  5152. // 仅发生变化时,通知
  5153. if (oldLocale !== this.locale) {
  5154. this.watchers.forEach(function (watcher) {
  5155. watcher(_this.locale, oldLocale);
  5156. });
  5157. }
  5158. } }, { key: "getLocale", value: function getLocale()
  5159. {
  5160. return this.locale;
  5161. } }, { key: "watchLocale", value: function watchLocale(
  5162. fn) {var _this2 = this;
  5163. var index = this.watchers.push(fn) - 1;
  5164. return function () {
  5165. _this2.watchers.splice(index, 1);
  5166. };
  5167. } }, { key: "add", value: function add(
  5168. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5169. var curMessages = this.messages[locale];
  5170. if (curMessages) {
  5171. if (override) {
  5172. Object.assign(curMessages, message);
  5173. } else
  5174. {
  5175. Object.keys(message).forEach(function (key) {
  5176. if (!hasOwn(curMessages, key)) {
  5177. curMessages[key] = message[key];
  5178. }
  5179. });
  5180. }
  5181. } else
  5182. {
  5183. this.messages[locale] = message;
  5184. }
  5185. } }, { key: "f", value: function f(
  5186. message, values, delimiters) {
  5187. return this.formater.interpolate(message, values, delimiters).join('');
  5188. } }, { key: "t", value: function t(
  5189. key, locale, values) {
  5190. var message = this.message;
  5191. if (typeof locale === 'string') {
  5192. locale = normalizeLocale(locale, this.messages);
  5193. locale && (message = this.messages[locale]);
  5194. } else
  5195. {
  5196. values = locale;
  5197. }
  5198. if (!hasOwn(message, key)) {
  5199. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  5200. return key;
  5201. }
  5202. return this.formater.interpolate(message[key], values).join('');
  5203. } }]);return I18n;}();exports.I18n = I18n;
  5204. function watchAppLocale(appVm, i18n) {
  5205. // 需要保证 watch 的触发在组件渲染之前
  5206. if (appVm.$watchLocale) {
  5207. // vue2
  5208. appVm.$watchLocale(function (newLocale) {
  5209. i18n.setLocale(newLocale);
  5210. });
  5211. } else
  5212. {
  5213. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  5214. i18n.setLocale(newLocale);
  5215. });
  5216. }
  5217. }
  5218. function getDefaultLocale() {
  5219. if (typeof uni !== 'undefined' && uni.getLocale) {
  5220. return uni.getLocale();
  5221. }
  5222. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  5223. if (typeof global !== 'undefined' && global.getLocale) {
  5224. return global.getLocale();
  5225. }
  5226. return LOCALE_EN;
  5227. }
  5228. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  5229. // 兼容旧版本入参
  5230. if (typeof locale !== 'string') {var _ref4 =
  5231. [
  5232. messages,
  5233. locale];locale = _ref4[0];messages = _ref4[1];
  5234. }
  5235. if (typeof locale !== 'string') {
  5236. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  5237. locale = getDefaultLocale();
  5238. }
  5239. if (typeof fallbackLocale !== 'string') {
  5240. fallbackLocale =
  5241. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  5242. LOCALE_EN;
  5243. }
  5244. var i18n = new I18n({
  5245. locale: locale,
  5246. fallbackLocale: fallbackLocale,
  5247. messages: messages,
  5248. watcher: watcher });
  5249. var _t = function t(key, values) {
  5250. if (typeof getApp !== 'function') {
  5251. // app view
  5252. /* eslint-disable no-func-assign */
  5253. _t = function t(key, values) {
  5254. return i18n.t(key, values);
  5255. };
  5256. } else
  5257. {
  5258. var isWatchedAppLocale = false;
  5259. _t = function t(key, values) {
  5260. var appVm = getApp().$vm;
  5261. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  5262. // options: {
  5263. // type: Array,
  5264. // default () {
  5265. // return [{
  5266. // icon: 'shop',
  5267. // text: t("uni-goods-nav.options.shop"),
  5268. // }, {
  5269. // icon: 'cart',
  5270. // text: t("uni-goods-nav.options.cart")
  5271. // }]
  5272. // }
  5273. // },
  5274. if (appVm) {
  5275. // 触发响应式
  5276. appVm.$locale;
  5277. if (!isWatchedAppLocale) {
  5278. isWatchedAppLocale = true;
  5279. watchAppLocale(appVm, i18n);
  5280. }
  5281. }
  5282. return i18n.t(key, values);
  5283. };
  5284. }
  5285. return _t(key, values);
  5286. };
  5287. return {
  5288. i18n: i18n,
  5289. f: function f(message, values, delimiters) {
  5290. return i18n.f(message, values, delimiters);
  5291. },
  5292. t: function t(key, values) {
  5293. return _t(key, values);
  5294. },
  5295. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5296. return i18n.add(locale, message, override);
  5297. },
  5298. watch: function watch(fn) {
  5299. return i18n.watchLocale(fn);
  5300. },
  5301. getLocale: function getLocale() {
  5302. return i18n.getLocale();
  5303. },
  5304. setLocale: function setLocale(newLocale) {
  5305. return i18n.setLocale(newLocale);
  5306. } };
  5307. }
  5308. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  5309. var formater;
  5310. function hasI18nJson(jsonObj, delimiters) {
  5311. if (!formater) {
  5312. formater = new BaseFormatter();
  5313. }
  5314. return walkJsonObj(jsonObj, function (jsonObj, key) {
  5315. var value = jsonObj[key];
  5316. if (isString(value)) {
  5317. if (isI18nStr(value, delimiters)) {
  5318. return true;
  5319. }
  5320. } else
  5321. {
  5322. return hasI18nJson(value, delimiters);
  5323. }
  5324. });
  5325. }
  5326. function parseI18nJson(jsonObj, values, delimiters) {
  5327. if (!formater) {
  5328. formater = new BaseFormatter();
  5329. }
  5330. walkJsonObj(jsonObj, function (jsonObj, key) {
  5331. var value = jsonObj[key];
  5332. if (isString(value)) {
  5333. if (isI18nStr(value, delimiters)) {
  5334. jsonObj[key] = compileStr(value, values, delimiters);
  5335. }
  5336. } else
  5337. {
  5338. parseI18nJson(value, values, delimiters);
  5339. }
  5340. });
  5341. return jsonObj;
  5342. }
  5343. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  5344. if (!isI18nStr(jsonStr, delimiters)) {
  5345. return jsonStr;
  5346. }
  5347. if (!formater) {
  5348. formater = new BaseFormatter();
  5349. }
  5350. var localeValues = [];
  5351. Object.keys(locales).forEach(function (name) {
  5352. if (name !== locale) {
  5353. localeValues.push({
  5354. locale: name,
  5355. values: locales[name] });
  5356. }
  5357. });
  5358. localeValues.unshift({ locale: locale, values: locales[locale] });
  5359. try {
  5360. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  5361. }
  5362. catch (e) {}
  5363. return jsonStr;
  5364. }
  5365. function isI18nStr(value, delimiters) {
  5366. return value.indexOf(delimiters[0]) > -1;
  5367. }
  5368. function compileStr(value, values, delimiters) {
  5369. return formater.interpolate(value, values, delimiters).join('');
  5370. }
  5371. function compileValue(jsonObj, key, localeValues, delimiters) {
  5372. var value = jsonObj[key];
  5373. if (isString(value)) {
  5374. // 存在国际化
  5375. if (isI18nStr(value, delimiters)) {
  5376. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  5377. if (localeValues.length > 1) {
  5378. // 格式化国际化语言
  5379. var valueLocales = jsonObj[key + 'Locales'] = {};
  5380. localeValues.forEach(function (localValue) {
  5381. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  5382. });
  5383. }
  5384. }
  5385. } else
  5386. {
  5387. compileJsonObj(value, localeValues, delimiters);
  5388. }
  5389. }
  5390. function compileJsonObj(jsonObj, localeValues, delimiters) {
  5391. walkJsonObj(jsonObj, function (jsonObj, key) {
  5392. compileValue(jsonObj, key, localeValues, delimiters);
  5393. });
  5394. return jsonObj;
  5395. }
  5396. function walkJsonObj(jsonObj, walk) {
  5397. if (isArray(jsonObj)) {
  5398. for (var i = 0; i < jsonObj.length; i++) {
  5399. if (walk(jsonObj, i)) {
  5400. return true;
  5401. }
  5402. }
  5403. } else
  5404. if (isObject(jsonObj)) {
  5405. for (var key in jsonObj) {
  5406. if (walk(jsonObj, key)) {
  5407. return true;
  5408. }
  5409. }
  5410. }
  5411. return false;
  5412. }
  5413. function resolveLocale(locales) {
  5414. return function (locale) {
  5415. if (!locale) {
  5416. return locale;
  5417. }
  5418. locale = normalizeLocale(locale) || locale;
  5419. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  5420. };
  5421. }
  5422. function resolveLocaleChain(locale) {
  5423. var chain = [];
  5424. var tokens = locale.split('-');
  5425. while (tokens.length) {
  5426. chain.push(tokens.join('-'));
  5427. tokens.pop();
  5428. }
  5429. return chain;
  5430. }
  5431. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  5432. /***/ }),
  5433. /***/ 30:
  5434. /*!***********************************************************************************************************************!*\
  5435. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/type2icon.js ***!
  5436. \***********************************************************************************************************************/
  5437. /*! no static exports found */
  5438. /***/ (function(module, exports, __webpack_require__) {
  5439. "use strict";
  5440. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  5441. * 根据主题type值,获取对应的图标
  5442. * @param String type 主题名称,primary|info|error|warning|success
  5443. * @param String fill 是否使用fill填充实体的图标
  5444. */
  5445. function type2icon() {var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  5446. // 如果非预置值,默认为success
  5447. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  5448. var iconName = '';
  5449. // 目前(2019-12-12),info和primary使用同一个图标
  5450. switch (type) {
  5451. case 'primary':
  5452. iconName = 'info-circle';
  5453. break;
  5454. case 'info':
  5455. iconName = 'info-circle';
  5456. break;
  5457. case 'error':
  5458. iconName = 'close-circle';
  5459. break;
  5460. case 'warning':
  5461. iconName = 'error-circle';
  5462. break;
  5463. case 'success':
  5464. iconName = 'checkmark-circle';
  5465. break;
  5466. default:
  5467. iconName = 'checkmark-circle';}
  5468. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  5469. if (fill) iconName += '-fill';
  5470. return iconName;
  5471. }var _default =
  5472. type2icon;exports.default = _default;
  5473. /***/ }),
  5474. /***/ 31:
  5475. /*!*************************************************************************************************************************!*\
  5476. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/randomArray.js ***!
  5477. \*************************************************************************************************************************/
  5478. /*! no static exports found */
  5479. /***/ (function(module, exports, __webpack_require__) {
  5480. "use strict";
  5481. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 打乱数组
  5482. function randomArray() {var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  5483. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  5484. return array.sort(function () {return Math.random() - 0.5;});
  5485. }var _default =
  5486. randomArray;exports.default = _default;
  5487. /***/ }),
  5488. /***/ 32:
  5489. /*!*********************************************************************************************************************!*\
  5490. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/addUnit.js ***!
  5491. \*********************************************************************************************************************/
  5492. /*! no static exports found */
  5493. /***/ (function(module, exports, __webpack_require__) {
  5494. "use strict";
  5495. Object.defineProperty(exports, "__esModule", { value: true });exports.default = addUnit;var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  5496. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  5497. function addUnit() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  5498. value = String(value);
  5499. // 用uView内置验证规则中的number判断是否为数值
  5500. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  5501. }
  5502. /***/ }),
  5503. /***/ 33:
  5504. /*!********************************************************************************************************************!*\
  5505. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/random.js ***!
  5506. \********************************************************************************************************************/
  5507. /*! no static exports found */
  5508. /***/ (function(module, exports, __webpack_require__) {
  5509. "use strict";
  5510. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function random(min, max) {
  5511. if (min >= 0 && max > 0 && max >= min) {
  5512. var gab = max - min + 1;
  5513. return Math.floor(Math.random() * gab + min);
  5514. } else {
  5515. return 0;
  5516. }
  5517. }var _default =
  5518. random;exports.default = _default;
  5519. /***/ }),
  5520. /***/ 34:
  5521. /*!******************************************************************************************************************!*\
  5522. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/trim.js ***!
  5523. \******************************************************************************************************************/
  5524. /*! no static exports found */
  5525. /***/ (function(module, exports, __webpack_require__) {
  5526. "use strict";
  5527. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function trim(str) {var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  5528. if (pos == 'both') {
  5529. return str.replace(/^\s+|\s+$/g, "");
  5530. } else if (pos == "left") {
  5531. return str.replace(/^\s*/, '');
  5532. } else if (pos == 'right') {
  5533. return str.replace(/(\s*$)/g, "");
  5534. } else if (pos == 'all') {
  5535. return str.replace(/\s+/g, "");
  5536. } else {
  5537. return str;
  5538. }
  5539. }var _default =
  5540. trim;exports.default = _default;
  5541. /***/ }),
  5542. /***/ 35:
  5543. /*!*******************************************************************************************************************!*\
  5544. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/toast.js ***!
  5545. \*******************************************************************************************************************/
  5546. /*! no static exports found */
  5547. /***/ (function(module, exports, __webpack_require__) {
  5548. "use strict";
  5549. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function toast(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  5550. uni.showToast({
  5551. title: title,
  5552. icon: 'none',
  5553. duration: duration });
  5554. }var _default =
  5555. toast;exports.default = _default;
  5556. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  5557. /***/ }),
  5558. /***/ 36:
  5559. /*!***********************************************************************************************************************!*\
  5560. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/getParent.js ***!
  5561. \***********************************************************************************************************************/
  5562. /*! no static exports found */
  5563. /***/ (function(module, exports, __webpack_require__) {
  5564. "use strict";
  5565. Object.defineProperty(exports, "__esModule", { value: true });exports.default = getParent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  5566. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  5567. function getParent(name, keys) {
  5568. var parent = this.$parent;
  5569. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  5570. while (parent) {
  5571. // 父组件
  5572. if (parent.$options.name !== name) {
  5573. // 如果组件的name不相等,继续上一级寻找
  5574. parent = parent.$parent;
  5575. } else {var _ret = function () {
  5576. var data = {};
  5577. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  5578. if (Array.isArray(keys)) {
  5579. keys.map(function (val) {
  5580. data[val] = parent[val] ? parent[val] : '';
  5581. });
  5582. } else {
  5583. // 历遍传过来的对象参数
  5584. for (var i in keys) {
  5585. // 如果子组件有此值则用,无此值则用父组件的值
  5586. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  5587. if (Array.isArray(keys[i])) {
  5588. if (keys[i].length) {
  5589. data[i] = keys[i];
  5590. } else {
  5591. data[i] = parent[i];
  5592. }
  5593. } else if (keys[i].constructor === Object) {
  5594. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  5595. if (Object.keys(keys[i]).length) {
  5596. data[i] = keys[i];
  5597. } else {
  5598. data[i] = parent[i];
  5599. }
  5600. } else {
  5601. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  5602. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  5603. }
  5604. }
  5605. }
  5606. return { v: data };}();if (typeof _ret === "object") return _ret.v;
  5607. }
  5608. }
  5609. return {};
  5610. }
  5611. /***/ }),
  5612. /***/ 37:
  5613. /*!*********************************************************************************************************************!*\
  5614. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/$parent.js ***!
  5615. \*********************************************************************************************************************/
  5616. /*! no static exports found */
  5617. /***/ (function(module, exports, __webpack_require__) {
  5618. "use strict";
  5619. Object.defineProperty(exports, "__esModule", { value: true });exports.default = $parent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  5620. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  5621. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  5622. // 值(默认为undefined),就是查找最顶层的$parent
  5623. function $parent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  5624. var parent = this.$parent;
  5625. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  5626. while (parent) {
  5627. // 父组件
  5628. if (parent.$options && parent.$options.name !== name) {
  5629. // 如果组件的name不相等,继续上一级寻找
  5630. parent = parent.$parent;
  5631. } else {
  5632. return parent;
  5633. }
  5634. }
  5635. return false;
  5636. }
  5637. /***/ }),
  5638. /***/ 38:
  5639. /*!*****************************************************************************************************************!*\
  5640. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/sys.js ***!
  5641. \*****************************************************************************************************************/
  5642. /*! no static exports found */
  5643. /***/ (function(module, exports, __webpack_require__) {
  5644. "use strict";
  5645. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.os = os;exports.sys = sys;function os() {
  5646. return uni.getSystemInfoSync().platform;
  5647. };
  5648. function sys() {
  5649. return uni.getSystemInfoSync();
  5650. }
  5651. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  5652. /***/ }),
  5653. /***/ 39:
  5654. /*!**********************************************************************************************************************!*\
  5655. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/debounce.js ***!
  5656. \**********************************************************************************************************************/
  5657. /*! no static exports found */
  5658. /***/ (function(module, exports, __webpack_require__) {
  5659. "use strict";
  5660. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timeout = null;
  5661. /**
  5662. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  5663. *
  5664. * @param {Function} func 要执行的回调函数
  5665. * @param {Number} wait 延时的时间
  5666. * @param {Boolean} immediate 是否立即执行
  5667. * @return null
  5668. */
  5669. function debounce(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  5670. // 清除定时器
  5671. if (timeout !== null) clearTimeout(timeout);
  5672. // 立即执行,此类情况一般用不到
  5673. if (immediate) {
  5674. var callNow = !timeout;
  5675. timeout = setTimeout(function () {
  5676. timeout = null;
  5677. }, wait);
  5678. if (callNow) typeof func === 'function' && func();
  5679. } else {
  5680. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  5681. timeout = setTimeout(function () {
  5682. typeof func === 'function' && func();
  5683. }, wait);
  5684. }
  5685. }var _default =
  5686. debounce;exports.default = _default;
  5687. /***/ }),
  5688. /***/ 4:
  5689. /*!******************************************************************************************!*\
  5690. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  5691. \******************************************************************************************/
  5692. /*! exports provided: default */
  5693. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5694. "use strict";
  5695. __webpack_require__.r(__webpack_exports__);
  5696. /* WEBPACK VAR INJECTION */(function(global) {/*!
  5697. * Vue.js v2.6.11
  5698. * (c) 2014-2022 Evan You
  5699. * Released under the MIT License.
  5700. */
  5701. /* */
  5702. var emptyObject = Object.freeze({});
  5703. // These helpers produce better VM code in JS engines due to their
  5704. // explicitness and function inlining.
  5705. function isUndef (v) {
  5706. return v === undefined || v === null
  5707. }
  5708. function isDef (v) {
  5709. return v !== undefined && v !== null
  5710. }
  5711. function isTrue (v) {
  5712. return v === true
  5713. }
  5714. function isFalse (v) {
  5715. return v === false
  5716. }
  5717. /**
  5718. * Check if value is primitive.
  5719. */
  5720. function isPrimitive (value) {
  5721. return (
  5722. typeof value === 'string' ||
  5723. typeof value === 'number' ||
  5724. // $flow-disable-line
  5725. typeof value === 'symbol' ||
  5726. typeof value === 'boolean'
  5727. )
  5728. }
  5729. /**
  5730. * Quick object check - this is primarily used to tell
  5731. * Objects from primitive values when we know the value
  5732. * is a JSON-compliant type.
  5733. */
  5734. function isObject (obj) {
  5735. return obj !== null && typeof obj === 'object'
  5736. }
  5737. /**
  5738. * Get the raw type string of a value, e.g., [object Object].
  5739. */
  5740. var _toString = Object.prototype.toString;
  5741. function toRawType (value) {
  5742. return _toString.call(value).slice(8, -1)
  5743. }
  5744. /**
  5745. * Strict object type check. Only returns true
  5746. * for plain JavaScript objects.
  5747. */
  5748. function isPlainObject (obj) {
  5749. return _toString.call(obj) === '[object Object]'
  5750. }
  5751. function isRegExp (v) {
  5752. return _toString.call(v) === '[object RegExp]'
  5753. }
  5754. /**
  5755. * Check if val is a valid array index.
  5756. */
  5757. function isValidArrayIndex (val) {
  5758. var n = parseFloat(String(val));
  5759. return n >= 0 && Math.floor(n) === n && isFinite(val)
  5760. }
  5761. function isPromise (val) {
  5762. return (
  5763. isDef(val) &&
  5764. typeof val.then === 'function' &&
  5765. typeof val.catch === 'function'
  5766. )
  5767. }
  5768. /**
  5769. * Convert a value to a string that is actually rendered.
  5770. */
  5771. function toString (val) {
  5772. return val == null
  5773. ? ''
  5774. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  5775. ? JSON.stringify(val, null, 2)
  5776. : String(val)
  5777. }
  5778. /**
  5779. * Convert an input value to a number for persistence.
  5780. * If the conversion fails, return original string.
  5781. */
  5782. function toNumber (val) {
  5783. var n = parseFloat(val);
  5784. return isNaN(n) ? val : n
  5785. }
  5786. /**
  5787. * Make a map and return a function for checking if a key
  5788. * is in that map.
  5789. */
  5790. function makeMap (
  5791. str,
  5792. expectsLowerCase
  5793. ) {
  5794. var map = Object.create(null);
  5795. var list = str.split(',');
  5796. for (var i = 0; i < list.length; i++) {
  5797. map[list[i]] = true;
  5798. }
  5799. return expectsLowerCase
  5800. ? function (val) { return map[val.toLowerCase()]; }
  5801. : function (val) { return map[val]; }
  5802. }
  5803. /**
  5804. * Check if a tag is a built-in tag.
  5805. */
  5806. var isBuiltInTag = makeMap('slot,component', true);
  5807. /**
  5808. * Check if an attribute is a reserved attribute.
  5809. */
  5810. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  5811. /**
  5812. * Remove an item from an array.
  5813. */
  5814. function remove (arr, item) {
  5815. if (arr.length) {
  5816. var index = arr.indexOf(item);
  5817. if (index > -1) {
  5818. return arr.splice(index, 1)
  5819. }
  5820. }
  5821. }
  5822. /**
  5823. * Check whether an object has the property.
  5824. */
  5825. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5826. function hasOwn (obj, key) {
  5827. return hasOwnProperty.call(obj, key)
  5828. }
  5829. /**
  5830. * Create a cached version of a pure function.
  5831. */
  5832. function cached (fn) {
  5833. var cache = Object.create(null);
  5834. return (function cachedFn (str) {
  5835. var hit = cache[str];
  5836. return hit || (cache[str] = fn(str))
  5837. })
  5838. }
  5839. /**
  5840. * Camelize a hyphen-delimited string.
  5841. */
  5842. var camelizeRE = /-(\w)/g;
  5843. var camelize = cached(function (str) {
  5844. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  5845. });
  5846. /**
  5847. * Capitalize a string.
  5848. */
  5849. var capitalize = cached(function (str) {
  5850. return str.charAt(0).toUpperCase() + str.slice(1)
  5851. });
  5852. /**
  5853. * Hyphenate a camelCase string.
  5854. */
  5855. var hyphenateRE = /\B([A-Z])/g;
  5856. var hyphenate = cached(function (str) {
  5857. return str.replace(hyphenateRE, '-$1').toLowerCase()
  5858. });
  5859. /**
  5860. * Simple bind polyfill for environments that do not support it,
  5861. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  5862. * since native bind is now performant enough in most browsers.
  5863. * But removing it would mean breaking code that was able to run in
  5864. * PhantomJS 1.x, so this must be kept for backward compatibility.
  5865. */
  5866. /* istanbul ignore next */
  5867. function polyfillBind (fn, ctx) {
  5868. function boundFn (a) {
  5869. var l = arguments.length;
  5870. return l
  5871. ? l > 1
  5872. ? fn.apply(ctx, arguments)
  5873. : fn.call(ctx, a)
  5874. : fn.call(ctx)
  5875. }
  5876. boundFn._length = fn.length;
  5877. return boundFn
  5878. }
  5879. function nativeBind (fn, ctx) {
  5880. return fn.bind(ctx)
  5881. }
  5882. var bind = Function.prototype.bind
  5883. ? nativeBind
  5884. : polyfillBind;
  5885. /**
  5886. * Convert an Array-like object to a real Array.
  5887. */
  5888. function toArray (list, start) {
  5889. start = start || 0;
  5890. var i = list.length - start;
  5891. var ret = new Array(i);
  5892. while (i--) {
  5893. ret[i] = list[i + start];
  5894. }
  5895. return ret
  5896. }
  5897. /**
  5898. * Mix properties into target object.
  5899. */
  5900. function extend (to, _from) {
  5901. for (var key in _from) {
  5902. to[key] = _from[key];
  5903. }
  5904. return to
  5905. }
  5906. /**
  5907. * Merge an Array of Objects into a single Object.
  5908. */
  5909. function toObject (arr) {
  5910. var res = {};
  5911. for (var i = 0; i < arr.length; i++) {
  5912. if (arr[i]) {
  5913. extend(res, arr[i]);
  5914. }
  5915. }
  5916. return res
  5917. }
  5918. /* eslint-disable no-unused-vars */
  5919. /**
  5920. * Perform no operation.
  5921. * Stubbing args to make Flow happy without leaving useless transpiled code
  5922. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  5923. */
  5924. function noop (a, b, c) {}
  5925. /**
  5926. * Always return false.
  5927. */
  5928. var no = function (a, b, c) { return false; };
  5929. /* eslint-enable no-unused-vars */
  5930. /**
  5931. * Return the same value.
  5932. */
  5933. var identity = function (_) { return _; };
  5934. /**
  5935. * Check if two values are loosely equal - that is,
  5936. * if they are plain objects, do they have the same shape?
  5937. */
  5938. function looseEqual (a, b) {
  5939. if (a === b) { return true }
  5940. var isObjectA = isObject(a);
  5941. var isObjectB = isObject(b);
  5942. if (isObjectA && isObjectB) {
  5943. try {
  5944. var isArrayA = Array.isArray(a);
  5945. var isArrayB = Array.isArray(b);
  5946. if (isArrayA && isArrayB) {
  5947. return a.length === b.length && a.every(function (e, i) {
  5948. return looseEqual(e, b[i])
  5949. })
  5950. } else if (a instanceof Date && b instanceof Date) {
  5951. return a.getTime() === b.getTime()
  5952. } else if (!isArrayA && !isArrayB) {
  5953. var keysA = Object.keys(a);
  5954. var keysB = Object.keys(b);
  5955. return keysA.length === keysB.length && keysA.every(function (key) {
  5956. return looseEqual(a[key], b[key])
  5957. })
  5958. } else {
  5959. /* istanbul ignore next */
  5960. return false
  5961. }
  5962. } catch (e) {
  5963. /* istanbul ignore next */
  5964. return false
  5965. }
  5966. } else if (!isObjectA && !isObjectB) {
  5967. return String(a) === String(b)
  5968. } else {
  5969. return false
  5970. }
  5971. }
  5972. /**
  5973. * Return the first index at which a loosely equal value can be
  5974. * found in the array (if value is a plain object, the array must
  5975. * contain an object of the same shape), or -1 if it is not present.
  5976. */
  5977. function looseIndexOf (arr, val) {
  5978. for (var i = 0; i < arr.length; i++) {
  5979. if (looseEqual(arr[i], val)) { return i }
  5980. }
  5981. return -1
  5982. }
  5983. /**
  5984. * Ensure a function is called only once.
  5985. */
  5986. function once (fn) {
  5987. var called = false;
  5988. return function () {
  5989. if (!called) {
  5990. called = true;
  5991. fn.apply(this, arguments);
  5992. }
  5993. }
  5994. }
  5995. var ASSET_TYPES = [
  5996. 'component',
  5997. 'directive',
  5998. 'filter'
  5999. ];
  6000. var LIFECYCLE_HOOKS = [
  6001. 'beforeCreate',
  6002. 'created',
  6003. 'beforeMount',
  6004. 'mounted',
  6005. 'beforeUpdate',
  6006. 'updated',
  6007. 'beforeDestroy',
  6008. 'destroyed',
  6009. 'activated',
  6010. 'deactivated',
  6011. 'errorCaptured',
  6012. 'serverPrefetch'
  6013. ];
  6014. /* */
  6015. var config = ({
  6016. /**
  6017. * Option merge strategies (used in core/util/options)
  6018. */
  6019. // $flow-disable-line
  6020. optionMergeStrategies: Object.create(null),
  6021. /**
  6022. * Whether to suppress warnings.
  6023. */
  6024. silent: false,
  6025. /**
  6026. * Show production mode tip message on boot?
  6027. */
  6028. productionTip: "development" !== 'production',
  6029. /**
  6030. * Whether to enable devtools
  6031. */
  6032. devtools: "development" !== 'production',
  6033. /**
  6034. * Whether to record perf
  6035. */
  6036. performance: false,
  6037. /**
  6038. * Error handler for watcher errors
  6039. */
  6040. errorHandler: null,
  6041. /**
  6042. * Warn handler for watcher warns
  6043. */
  6044. warnHandler: null,
  6045. /**
  6046. * Ignore certain custom elements
  6047. */
  6048. ignoredElements: [],
  6049. /**
  6050. * Custom user key aliases for v-on
  6051. */
  6052. // $flow-disable-line
  6053. keyCodes: Object.create(null),
  6054. /**
  6055. * Check if a tag is reserved so that it cannot be registered as a
  6056. * component. This is platform-dependent and may be overwritten.
  6057. */
  6058. isReservedTag: no,
  6059. /**
  6060. * Check if an attribute is reserved so that it cannot be used as a component
  6061. * prop. This is platform-dependent and may be overwritten.
  6062. */
  6063. isReservedAttr: no,
  6064. /**
  6065. * Check if a tag is an unknown element.
  6066. * Platform-dependent.
  6067. */
  6068. isUnknownElement: no,
  6069. /**
  6070. * Get the namespace of an element
  6071. */
  6072. getTagNamespace: noop,
  6073. /**
  6074. * Parse the real tag name for the specific platform.
  6075. */
  6076. parsePlatformTagName: identity,
  6077. /**
  6078. * Check if an attribute must be bound using property, e.g. value
  6079. * Platform-dependent.
  6080. */
  6081. mustUseProp: no,
  6082. /**
  6083. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  6084. * This will significantly reduce performance if set to false.
  6085. */
  6086. async: true,
  6087. /**
  6088. * Exposed for legacy reasons
  6089. */
  6090. _lifecycleHooks: LIFECYCLE_HOOKS
  6091. });
  6092. /* */
  6093. /**
  6094. * unicode letters used for parsing html tags, component names and property paths.
  6095. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  6096. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  6097. */
  6098. 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/;
  6099. /**
  6100. * Check if a string starts with $ or _
  6101. */
  6102. function isReserved (str) {
  6103. var c = (str + '').charCodeAt(0);
  6104. return c === 0x24 || c === 0x5F
  6105. }
  6106. /**
  6107. * Define a property.
  6108. */
  6109. function def (obj, key, val, enumerable) {
  6110. Object.defineProperty(obj, key, {
  6111. value: val,
  6112. enumerable: !!enumerable,
  6113. writable: true,
  6114. configurable: true
  6115. });
  6116. }
  6117. /**
  6118. * Parse simple path.
  6119. */
  6120. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  6121. function parsePath (path) {
  6122. if (bailRE.test(path)) {
  6123. return
  6124. }
  6125. var segments = path.split('.');
  6126. return function (obj) {
  6127. for (var i = 0; i < segments.length; i++) {
  6128. if (!obj) { return }
  6129. obj = obj[segments[i]];
  6130. }
  6131. return obj
  6132. }
  6133. }
  6134. /* */
  6135. // can we use __proto__?
  6136. var hasProto = '__proto__' in {};
  6137. // Browser environment sniffing
  6138. var inBrowser = typeof window !== 'undefined';
  6139. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  6140. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  6141. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  6142. var isIE = UA && /msie|trident/.test(UA);
  6143. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  6144. var isEdge = UA && UA.indexOf('edge/') > 0;
  6145. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  6146. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  6147. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  6148. var isPhantomJS = UA && /phantomjs/.test(UA);
  6149. var isFF = UA && UA.match(/firefox\/(\d+)/);
  6150. // Firefox has a "watch" function on Object.prototype...
  6151. var nativeWatch = ({}).watch;
  6152. if (inBrowser) {
  6153. try {
  6154. var opts = {};
  6155. Object.defineProperty(opts, 'passive', ({
  6156. get: function get () {
  6157. }
  6158. })); // https://github.com/facebook/flow/issues/285
  6159. window.addEventListener('test-passive', null, opts);
  6160. } catch (e) {}
  6161. }
  6162. // this needs to be lazy-evaled because vue may be required before
  6163. // vue-server-renderer can set VUE_ENV
  6164. var _isServer;
  6165. var isServerRendering = function () {
  6166. if (_isServer === undefined) {
  6167. /* istanbul ignore if */
  6168. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  6169. // detect presence of vue-server-renderer and avoid
  6170. // Webpack shimming the process
  6171. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  6172. } else {
  6173. _isServer = false;
  6174. }
  6175. }
  6176. return _isServer
  6177. };
  6178. // detect devtools
  6179. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  6180. /* istanbul ignore next */
  6181. function isNative (Ctor) {
  6182. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  6183. }
  6184. var hasSymbol =
  6185. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  6186. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  6187. var _Set;
  6188. /* istanbul ignore if */ // $flow-disable-line
  6189. if (typeof Set !== 'undefined' && isNative(Set)) {
  6190. // use native Set when available.
  6191. _Set = Set;
  6192. } else {
  6193. // a non-standard Set polyfill that only works with primitive keys.
  6194. _Set = /*@__PURE__*/(function () {
  6195. function Set () {
  6196. this.set = Object.create(null);
  6197. }
  6198. Set.prototype.has = function has (key) {
  6199. return this.set[key] === true
  6200. };
  6201. Set.prototype.add = function add (key) {
  6202. this.set[key] = true;
  6203. };
  6204. Set.prototype.clear = function clear () {
  6205. this.set = Object.create(null);
  6206. };
  6207. return Set;
  6208. }());
  6209. }
  6210. /* */
  6211. var warn = noop;
  6212. var tip = noop;
  6213. var generateComponentTrace = (noop); // work around flow check
  6214. var formatComponentName = (noop);
  6215. if (true) {
  6216. var hasConsole = typeof console !== 'undefined';
  6217. var classifyRE = /(?:^|[-_])(\w)/g;
  6218. var classify = function (str) { return str
  6219. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  6220. .replace(/[-_]/g, ''); };
  6221. warn = function (msg, vm) {
  6222. var trace = vm ? generateComponentTrace(vm) : '';
  6223. if (config.warnHandler) {
  6224. config.warnHandler.call(null, msg, vm, trace);
  6225. } else if (hasConsole && (!config.silent)) {
  6226. console.error(("[Vue warn]: " + msg + trace));
  6227. }
  6228. };
  6229. tip = function (msg, vm) {
  6230. if (hasConsole && (!config.silent)) {
  6231. console.warn("[Vue tip]: " + msg + (
  6232. vm ? generateComponentTrace(vm) : ''
  6233. ));
  6234. }
  6235. };
  6236. formatComponentName = function (vm, includeFile) {
  6237. if (vm.$root === vm) {
  6238. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  6239. return ('') + vm.$options.__file
  6240. }
  6241. return '<Root>'
  6242. }
  6243. var options = typeof vm === 'function' && vm.cid != null
  6244. ? vm.options
  6245. : vm._isVue
  6246. ? vm.$options || vm.constructor.options
  6247. : vm;
  6248. var name = options.name || options._componentTag;
  6249. var file = options.__file;
  6250. if (!name && file) {
  6251. var match = file.match(/([^/\\]+)\.vue$/);
  6252. name = match && match[1];
  6253. }
  6254. return (
  6255. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  6256. (file && includeFile !== false ? (" at " + file) : '')
  6257. )
  6258. };
  6259. var repeat = function (str, n) {
  6260. var res = '';
  6261. while (n) {
  6262. if (n % 2 === 1) { res += str; }
  6263. if (n > 1) { str += str; }
  6264. n >>= 1;
  6265. }
  6266. return res
  6267. };
  6268. generateComponentTrace = function (vm) {
  6269. if (vm._isVue && vm.$parent) {
  6270. var tree = [];
  6271. var currentRecursiveSequence = 0;
  6272. while (vm && vm.$options.name !== 'PageBody') {
  6273. if (tree.length > 0) {
  6274. var last = tree[tree.length - 1];
  6275. if (last.constructor === vm.constructor) {
  6276. currentRecursiveSequence++;
  6277. vm = vm.$parent;
  6278. continue
  6279. } else if (currentRecursiveSequence > 0) {
  6280. tree[tree.length - 1] = [last, currentRecursiveSequence];
  6281. currentRecursiveSequence = 0;
  6282. }
  6283. }
  6284. !vm.$options.isReserved && tree.push(vm);
  6285. vm = vm.$parent;
  6286. }
  6287. return '\n\nfound in\n\n' + tree
  6288. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  6289. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  6290. : formatComponentName(vm))); })
  6291. .join('\n')
  6292. } else {
  6293. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  6294. }
  6295. };
  6296. }
  6297. /* */
  6298. var uid = 0;
  6299. /**
  6300. * A dep is an observable that can have multiple
  6301. * directives subscribing to it.
  6302. */
  6303. var Dep = function Dep () {
  6304. this.id = uid++;
  6305. this.subs = [];
  6306. };
  6307. Dep.prototype.addSub = function addSub (sub) {
  6308. this.subs.push(sub);
  6309. };
  6310. Dep.prototype.removeSub = function removeSub (sub) {
  6311. remove(this.subs, sub);
  6312. };
  6313. Dep.prototype.depend = function depend () {
  6314. if (Dep.SharedObject.target) {
  6315. Dep.SharedObject.target.addDep(this);
  6316. }
  6317. };
  6318. Dep.prototype.notify = function notify () {
  6319. // stabilize the subscriber list first
  6320. var subs = this.subs.slice();
  6321. if ( true && !config.async) {
  6322. // subs aren't sorted in scheduler if not running async
  6323. // we need to sort them now to make sure they fire in correct
  6324. // order
  6325. subs.sort(function (a, b) { return a.id - b.id; });
  6326. }
  6327. for (var i = 0, l = subs.length; i < l; i++) {
  6328. subs[i].update();
  6329. }
  6330. };
  6331. // The current target watcher being evaluated.
  6332. // This is globally unique because only one watcher
  6333. // can be evaluated at a time.
  6334. // fixed by xxxxxx (nvue shared vuex)
  6335. /* eslint-disable no-undef */
  6336. Dep.SharedObject = {};
  6337. Dep.SharedObject.target = null;
  6338. Dep.SharedObject.targetStack = [];
  6339. function pushTarget (target) {
  6340. Dep.SharedObject.targetStack.push(target);
  6341. Dep.SharedObject.target = target;
  6342. Dep.target = target;
  6343. }
  6344. function popTarget () {
  6345. Dep.SharedObject.targetStack.pop();
  6346. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  6347. Dep.target = Dep.SharedObject.target;
  6348. }
  6349. /* */
  6350. var VNode = function VNode (
  6351. tag,
  6352. data,
  6353. children,
  6354. text,
  6355. elm,
  6356. context,
  6357. componentOptions,
  6358. asyncFactory
  6359. ) {
  6360. this.tag = tag;
  6361. this.data = data;
  6362. this.children = children;
  6363. this.text = text;
  6364. this.elm = elm;
  6365. this.ns = undefined;
  6366. this.context = context;
  6367. this.fnContext = undefined;
  6368. this.fnOptions = undefined;
  6369. this.fnScopeId = undefined;
  6370. this.key = data && data.key;
  6371. this.componentOptions = componentOptions;
  6372. this.componentInstance = undefined;
  6373. this.parent = undefined;
  6374. this.raw = false;
  6375. this.isStatic = false;
  6376. this.isRootInsert = true;
  6377. this.isComment = false;
  6378. this.isCloned = false;
  6379. this.isOnce = false;
  6380. this.asyncFactory = asyncFactory;
  6381. this.asyncMeta = undefined;
  6382. this.isAsyncPlaceholder = false;
  6383. };
  6384. var prototypeAccessors = { child: { configurable: true } };
  6385. // DEPRECATED: alias for componentInstance for backwards compat.
  6386. /* istanbul ignore next */
  6387. prototypeAccessors.child.get = function () {
  6388. return this.componentInstance
  6389. };
  6390. Object.defineProperties( VNode.prototype, prototypeAccessors );
  6391. var createEmptyVNode = function (text) {
  6392. if ( text === void 0 ) text = '';
  6393. var node = new VNode();
  6394. node.text = text;
  6395. node.isComment = true;
  6396. return node
  6397. };
  6398. function createTextVNode (val) {
  6399. return new VNode(undefined, undefined, undefined, String(val))
  6400. }
  6401. // optimized shallow clone
  6402. // used for static nodes and slot nodes because they may be reused across
  6403. // multiple renders, cloning them avoids errors when DOM manipulations rely
  6404. // on their elm reference.
  6405. function cloneVNode (vnode) {
  6406. var cloned = new VNode(
  6407. vnode.tag,
  6408. vnode.data,
  6409. // #7975
  6410. // clone children array to avoid mutating original in case of cloning
  6411. // a child.
  6412. vnode.children && vnode.children.slice(),
  6413. vnode.text,
  6414. vnode.elm,
  6415. vnode.context,
  6416. vnode.componentOptions,
  6417. vnode.asyncFactory
  6418. );
  6419. cloned.ns = vnode.ns;
  6420. cloned.isStatic = vnode.isStatic;
  6421. cloned.key = vnode.key;
  6422. cloned.isComment = vnode.isComment;
  6423. cloned.fnContext = vnode.fnContext;
  6424. cloned.fnOptions = vnode.fnOptions;
  6425. cloned.fnScopeId = vnode.fnScopeId;
  6426. cloned.asyncMeta = vnode.asyncMeta;
  6427. cloned.isCloned = true;
  6428. return cloned
  6429. }
  6430. /*
  6431. * not type checking this file because flow doesn't play well with
  6432. * dynamically accessing methods on Array prototype
  6433. */
  6434. var arrayProto = Array.prototype;
  6435. var arrayMethods = Object.create(arrayProto);
  6436. var methodsToPatch = [
  6437. 'push',
  6438. 'pop',
  6439. 'shift',
  6440. 'unshift',
  6441. 'splice',
  6442. 'sort',
  6443. 'reverse'
  6444. ];
  6445. /**
  6446. * Intercept mutating methods and emit events
  6447. */
  6448. methodsToPatch.forEach(function (method) {
  6449. // cache original method
  6450. var original = arrayProto[method];
  6451. def(arrayMethods, method, function mutator () {
  6452. var args = [], len = arguments.length;
  6453. while ( len-- ) args[ len ] = arguments[ len ];
  6454. var result = original.apply(this, args);
  6455. var ob = this.__ob__;
  6456. var inserted;
  6457. switch (method) {
  6458. case 'push':
  6459. case 'unshift':
  6460. inserted = args;
  6461. break
  6462. case 'splice':
  6463. inserted = args.slice(2);
  6464. break
  6465. }
  6466. if (inserted) { ob.observeArray(inserted); }
  6467. // notify change
  6468. ob.dep.notify();
  6469. return result
  6470. });
  6471. });
  6472. /* */
  6473. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  6474. /**
  6475. * In some cases we may want to disable observation inside a component's
  6476. * update computation.
  6477. */
  6478. var shouldObserve = true;
  6479. function toggleObserving (value) {
  6480. shouldObserve = value;
  6481. }
  6482. /**
  6483. * Observer class that is attached to each observed
  6484. * object. Once attached, the observer converts the target
  6485. * object's property keys into getter/setters that
  6486. * collect dependencies and dispatch updates.
  6487. */
  6488. var Observer = function Observer (value) {
  6489. this.value = value;
  6490. this.dep = new Dep();
  6491. this.vmCount = 0;
  6492. def(value, '__ob__', this);
  6493. if (Array.isArray(value)) {
  6494. if (hasProto) {
  6495. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  6496. if(value.push !== value.__proto__.push){
  6497. copyAugment(value, arrayMethods, arrayKeys);
  6498. } else {
  6499. protoAugment(value, arrayMethods);
  6500. }
  6501. }
  6502. } else {
  6503. copyAugment(value, arrayMethods, arrayKeys);
  6504. }
  6505. this.observeArray(value);
  6506. } else {
  6507. this.walk(value);
  6508. }
  6509. };
  6510. /**
  6511. * Walk through all properties and convert them into
  6512. * getter/setters. This method should only be called when
  6513. * value type is Object.
  6514. */
  6515. Observer.prototype.walk = function walk (obj) {
  6516. var keys = Object.keys(obj);
  6517. for (var i = 0; i < keys.length; i++) {
  6518. defineReactive$$1(obj, keys[i]);
  6519. }
  6520. };
  6521. /**
  6522. * Observe a list of Array items.
  6523. */
  6524. Observer.prototype.observeArray = function observeArray (items) {
  6525. for (var i = 0, l = items.length; i < l; i++) {
  6526. observe(items[i]);
  6527. }
  6528. };
  6529. // helpers
  6530. /**
  6531. * Augment a target Object or Array by intercepting
  6532. * the prototype chain using __proto__
  6533. */
  6534. function protoAugment (target, src) {
  6535. /* eslint-disable no-proto */
  6536. target.__proto__ = src;
  6537. /* eslint-enable no-proto */
  6538. }
  6539. /**
  6540. * Augment a target Object or Array by defining
  6541. * hidden properties.
  6542. */
  6543. /* istanbul ignore next */
  6544. function copyAugment (target, src, keys) {
  6545. for (var i = 0, l = keys.length; i < l; i++) {
  6546. var key = keys[i];
  6547. def(target, key, src[key]);
  6548. }
  6549. }
  6550. /**
  6551. * Attempt to create an observer instance for a value,
  6552. * returns the new observer if successfully observed,
  6553. * or the existing observer if the value already has one.
  6554. */
  6555. function observe (value, asRootData) {
  6556. if (!isObject(value) || value instanceof VNode) {
  6557. return
  6558. }
  6559. var ob;
  6560. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  6561. ob = value.__ob__;
  6562. } else if (
  6563. shouldObserve &&
  6564. !isServerRendering() &&
  6565. (Array.isArray(value) || isPlainObject(value)) &&
  6566. Object.isExtensible(value) &&
  6567. !value._isVue
  6568. ) {
  6569. ob = new Observer(value);
  6570. }
  6571. if (asRootData && ob) {
  6572. ob.vmCount++;
  6573. }
  6574. return ob
  6575. }
  6576. /**
  6577. * Define a reactive property on an Object.
  6578. */
  6579. function defineReactive$$1 (
  6580. obj,
  6581. key,
  6582. val,
  6583. customSetter,
  6584. shallow
  6585. ) {
  6586. var dep = new Dep();
  6587. var property = Object.getOwnPropertyDescriptor(obj, key);
  6588. if (property && property.configurable === false) {
  6589. return
  6590. }
  6591. // cater for pre-defined getter/setters
  6592. var getter = property && property.get;
  6593. var setter = property && property.set;
  6594. if ((!getter || setter) && arguments.length === 2) {
  6595. val = obj[key];
  6596. }
  6597. var childOb = !shallow && observe(val);
  6598. Object.defineProperty(obj, key, {
  6599. enumerable: true,
  6600. configurable: true,
  6601. get: function reactiveGetter () {
  6602. var value = getter ? getter.call(obj) : val;
  6603. if (Dep.SharedObject.target) { // fixed by xxxxxx
  6604. dep.depend();
  6605. if (childOb) {
  6606. childOb.dep.depend();
  6607. if (Array.isArray(value)) {
  6608. dependArray(value);
  6609. }
  6610. }
  6611. }
  6612. return value
  6613. },
  6614. set: function reactiveSetter (newVal) {
  6615. var value = getter ? getter.call(obj) : val;
  6616. /* eslint-disable no-self-compare */
  6617. if (newVal === value || (newVal !== newVal && value !== value)) {
  6618. return
  6619. }
  6620. /* eslint-enable no-self-compare */
  6621. if ( true && customSetter) {
  6622. customSetter();
  6623. }
  6624. // #7981: for accessor properties without setter
  6625. if (getter && !setter) { return }
  6626. if (setter) {
  6627. setter.call(obj, newVal);
  6628. } else {
  6629. val = newVal;
  6630. }
  6631. childOb = !shallow && observe(newVal);
  6632. dep.notify();
  6633. }
  6634. });
  6635. }
  6636. /**
  6637. * Set a property on an object. Adds the new property and
  6638. * triggers change notification if the property doesn't
  6639. * already exist.
  6640. */
  6641. function set (target, key, val) {
  6642. if ( true &&
  6643. (isUndef(target) || isPrimitive(target))
  6644. ) {
  6645. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  6646. }
  6647. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6648. target.length = Math.max(target.length, key);
  6649. target.splice(key, 1, val);
  6650. return val
  6651. }
  6652. if (key in target && !(key in Object.prototype)) {
  6653. target[key] = val;
  6654. return val
  6655. }
  6656. var ob = (target).__ob__;
  6657. if (target._isVue || (ob && ob.vmCount)) {
  6658. true && warn(
  6659. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  6660. 'at runtime - declare it upfront in the data option.'
  6661. );
  6662. return val
  6663. }
  6664. if (!ob) {
  6665. target[key] = val;
  6666. return val
  6667. }
  6668. defineReactive$$1(ob.value, key, val);
  6669. ob.dep.notify();
  6670. return val
  6671. }
  6672. /**
  6673. * Delete a property and trigger change if necessary.
  6674. */
  6675. function del (target, key) {
  6676. if ( true &&
  6677. (isUndef(target) || isPrimitive(target))
  6678. ) {
  6679. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  6680. }
  6681. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6682. target.splice(key, 1);
  6683. return
  6684. }
  6685. var ob = (target).__ob__;
  6686. if (target._isVue || (ob && ob.vmCount)) {
  6687. true && warn(
  6688. 'Avoid deleting properties on a Vue instance or its root $data ' +
  6689. '- just set it to null.'
  6690. );
  6691. return
  6692. }
  6693. if (!hasOwn(target, key)) {
  6694. return
  6695. }
  6696. delete target[key];
  6697. if (!ob) {
  6698. return
  6699. }
  6700. ob.dep.notify();
  6701. }
  6702. /**
  6703. * Collect dependencies on array elements when the array is touched, since
  6704. * we cannot intercept array element access like property getters.
  6705. */
  6706. function dependArray (value) {
  6707. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  6708. e = value[i];
  6709. e && e.__ob__ && e.__ob__.dep.depend();
  6710. if (Array.isArray(e)) {
  6711. dependArray(e);
  6712. }
  6713. }
  6714. }
  6715. /* */
  6716. /**
  6717. * Option overwriting strategies are functions that handle
  6718. * how to merge a parent option value and a child option
  6719. * value into the final value.
  6720. */
  6721. var strats = config.optionMergeStrategies;
  6722. /**
  6723. * Options with restrictions
  6724. */
  6725. if (true) {
  6726. strats.el = strats.propsData = function (parent, child, vm, key) {
  6727. if (!vm) {
  6728. warn(
  6729. "option \"" + key + "\" can only be used during instance " +
  6730. 'creation with the `new` keyword.'
  6731. );
  6732. }
  6733. return defaultStrat(parent, child)
  6734. };
  6735. }
  6736. /**
  6737. * Helper that recursively merges two data objects together.
  6738. */
  6739. function mergeData (to, from) {
  6740. if (!from) { return to }
  6741. var key, toVal, fromVal;
  6742. var keys = hasSymbol
  6743. ? Reflect.ownKeys(from)
  6744. : Object.keys(from);
  6745. for (var i = 0; i < keys.length; i++) {
  6746. key = keys[i];
  6747. // in case the object is already observed...
  6748. if (key === '__ob__') { continue }
  6749. toVal = to[key];
  6750. fromVal = from[key];
  6751. if (!hasOwn(to, key)) {
  6752. set(to, key, fromVal);
  6753. } else if (
  6754. toVal !== fromVal &&
  6755. isPlainObject(toVal) &&
  6756. isPlainObject(fromVal)
  6757. ) {
  6758. mergeData(toVal, fromVal);
  6759. }
  6760. }
  6761. return to
  6762. }
  6763. /**
  6764. * Data
  6765. */
  6766. function mergeDataOrFn (
  6767. parentVal,
  6768. childVal,
  6769. vm
  6770. ) {
  6771. if (!vm) {
  6772. // in a Vue.extend merge, both should be functions
  6773. if (!childVal) {
  6774. return parentVal
  6775. }
  6776. if (!parentVal) {
  6777. return childVal
  6778. }
  6779. // when parentVal & childVal are both present,
  6780. // we need to return a function that returns the
  6781. // merged result of both functions... no need to
  6782. // check if parentVal is a function here because
  6783. // it has to be a function to pass previous merges.
  6784. return function mergedDataFn () {
  6785. return mergeData(
  6786. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  6787. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  6788. )
  6789. }
  6790. } else {
  6791. return function mergedInstanceDataFn () {
  6792. // instance merge
  6793. var instanceData = typeof childVal === 'function'
  6794. ? childVal.call(vm, vm)
  6795. : childVal;
  6796. var defaultData = typeof parentVal === 'function'
  6797. ? parentVal.call(vm, vm)
  6798. : parentVal;
  6799. if (instanceData) {
  6800. return mergeData(instanceData, defaultData)
  6801. } else {
  6802. return defaultData
  6803. }
  6804. }
  6805. }
  6806. }
  6807. strats.data = function (
  6808. parentVal,
  6809. childVal,
  6810. vm
  6811. ) {
  6812. if (!vm) {
  6813. if (childVal && typeof childVal !== 'function') {
  6814. true && warn(
  6815. 'The "data" option should be a function ' +
  6816. 'that returns a per-instance value in component ' +
  6817. 'definitions.',
  6818. vm
  6819. );
  6820. return parentVal
  6821. }
  6822. return mergeDataOrFn(parentVal, childVal)
  6823. }
  6824. return mergeDataOrFn(parentVal, childVal, vm)
  6825. };
  6826. /**
  6827. * Hooks and props are merged as arrays.
  6828. */
  6829. function mergeHook (
  6830. parentVal,
  6831. childVal
  6832. ) {
  6833. var res = childVal
  6834. ? parentVal
  6835. ? parentVal.concat(childVal)
  6836. : Array.isArray(childVal)
  6837. ? childVal
  6838. : [childVal]
  6839. : parentVal;
  6840. return res
  6841. ? dedupeHooks(res)
  6842. : res
  6843. }
  6844. function dedupeHooks (hooks) {
  6845. var res = [];
  6846. for (var i = 0; i < hooks.length; i++) {
  6847. if (res.indexOf(hooks[i]) === -1) {
  6848. res.push(hooks[i]);
  6849. }
  6850. }
  6851. return res
  6852. }
  6853. LIFECYCLE_HOOKS.forEach(function (hook) {
  6854. strats[hook] = mergeHook;
  6855. });
  6856. /**
  6857. * Assets
  6858. *
  6859. * When a vm is present (instance creation), we need to do
  6860. * a three-way merge between constructor options, instance
  6861. * options and parent options.
  6862. */
  6863. function mergeAssets (
  6864. parentVal,
  6865. childVal,
  6866. vm,
  6867. key
  6868. ) {
  6869. var res = Object.create(parentVal || null);
  6870. if (childVal) {
  6871. true && assertObjectType(key, childVal, vm);
  6872. return extend(res, childVal)
  6873. } else {
  6874. return res
  6875. }
  6876. }
  6877. ASSET_TYPES.forEach(function (type) {
  6878. strats[type + 's'] = mergeAssets;
  6879. });
  6880. /**
  6881. * Watchers.
  6882. *
  6883. * Watchers hashes should not overwrite one
  6884. * another, so we merge them as arrays.
  6885. */
  6886. strats.watch = function (
  6887. parentVal,
  6888. childVal,
  6889. vm,
  6890. key
  6891. ) {
  6892. // work around Firefox's Object.prototype.watch...
  6893. if (parentVal === nativeWatch) { parentVal = undefined; }
  6894. if (childVal === nativeWatch) { childVal = undefined; }
  6895. /* istanbul ignore if */
  6896. if (!childVal) { return Object.create(parentVal || null) }
  6897. if (true) {
  6898. assertObjectType(key, childVal, vm);
  6899. }
  6900. if (!parentVal) { return childVal }
  6901. var ret = {};
  6902. extend(ret, parentVal);
  6903. for (var key$1 in childVal) {
  6904. var parent = ret[key$1];
  6905. var child = childVal[key$1];
  6906. if (parent && !Array.isArray(parent)) {
  6907. parent = [parent];
  6908. }
  6909. ret[key$1] = parent
  6910. ? parent.concat(child)
  6911. : Array.isArray(child) ? child : [child];
  6912. }
  6913. return ret
  6914. };
  6915. /**
  6916. * Other object hashes.
  6917. */
  6918. strats.props =
  6919. strats.methods =
  6920. strats.inject =
  6921. strats.computed = function (
  6922. parentVal,
  6923. childVal,
  6924. vm,
  6925. key
  6926. ) {
  6927. if (childVal && "development" !== 'production') {
  6928. assertObjectType(key, childVal, vm);
  6929. }
  6930. if (!parentVal) { return childVal }
  6931. var ret = Object.create(null);
  6932. extend(ret, parentVal);
  6933. if (childVal) { extend(ret, childVal); }
  6934. return ret
  6935. };
  6936. strats.provide = mergeDataOrFn;
  6937. /**
  6938. * Default strategy.
  6939. */
  6940. var defaultStrat = function (parentVal, childVal) {
  6941. return childVal === undefined
  6942. ? parentVal
  6943. : childVal
  6944. };
  6945. /**
  6946. * Validate component names
  6947. */
  6948. function checkComponents (options) {
  6949. for (var key in options.components) {
  6950. validateComponentName(key);
  6951. }
  6952. }
  6953. function validateComponentName (name) {
  6954. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  6955. warn(
  6956. 'Invalid component name: "' + name + '". Component names ' +
  6957. 'should conform to valid custom element name in html5 specification.'
  6958. );
  6959. }
  6960. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  6961. warn(
  6962. 'Do not use built-in or reserved HTML elements as component ' +
  6963. 'id: ' + name
  6964. );
  6965. }
  6966. }
  6967. /**
  6968. * Ensure all props option syntax are normalized into the
  6969. * Object-based format.
  6970. */
  6971. function normalizeProps (options, vm) {
  6972. var props = options.props;
  6973. if (!props) { return }
  6974. var res = {};
  6975. var i, val, name;
  6976. if (Array.isArray(props)) {
  6977. i = props.length;
  6978. while (i--) {
  6979. val = props[i];
  6980. if (typeof val === 'string') {
  6981. name = camelize(val);
  6982. res[name] = { type: null };
  6983. } else if (true) {
  6984. warn('props must be strings when using array syntax.');
  6985. }
  6986. }
  6987. } else if (isPlainObject(props)) {
  6988. for (var key in props) {
  6989. val = props[key];
  6990. name = camelize(key);
  6991. res[name] = isPlainObject(val)
  6992. ? val
  6993. : { type: val };
  6994. }
  6995. } else if (true) {
  6996. warn(
  6997. "Invalid value for option \"props\": expected an Array or an Object, " +
  6998. "but got " + (toRawType(props)) + ".",
  6999. vm
  7000. );
  7001. }
  7002. options.props = res;
  7003. }
  7004. /**
  7005. * Normalize all injections into Object-based format
  7006. */
  7007. function normalizeInject (options, vm) {
  7008. var inject = options.inject;
  7009. if (!inject) { return }
  7010. var normalized = options.inject = {};
  7011. if (Array.isArray(inject)) {
  7012. for (var i = 0; i < inject.length; i++) {
  7013. normalized[inject[i]] = { from: inject[i] };
  7014. }
  7015. } else if (isPlainObject(inject)) {
  7016. for (var key in inject) {
  7017. var val = inject[key];
  7018. normalized[key] = isPlainObject(val)
  7019. ? extend({ from: key }, val)
  7020. : { from: val };
  7021. }
  7022. } else if (true) {
  7023. warn(
  7024. "Invalid value for option \"inject\": expected an Array or an Object, " +
  7025. "but got " + (toRawType(inject)) + ".",
  7026. vm
  7027. );
  7028. }
  7029. }
  7030. /**
  7031. * Normalize raw function directives into object format.
  7032. */
  7033. function normalizeDirectives (options) {
  7034. var dirs = options.directives;
  7035. if (dirs) {
  7036. for (var key in dirs) {
  7037. var def$$1 = dirs[key];
  7038. if (typeof def$$1 === 'function') {
  7039. dirs[key] = { bind: def$$1, update: def$$1 };
  7040. }
  7041. }
  7042. }
  7043. }
  7044. function assertObjectType (name, value, vm) {
  7045. if (!isPlainObject(value)) {
  7046. warn(
  7047. "Invalid value for option \"" + name + "\": expected an Object, " +
  7048. "but got " + (toRawType(value)) + ".",
  7049. vm
  7050. );
  7051. }
  7052. }
  7053. /**
  7054. * Merge two option objects into a new one.
  7055. * Core utility used in both instantiation and inheritance.
  7056. */
  7057. function mergeOptions (
  7058. parent,
  7059. child,
  7060. vm
  7061. ) {
  7062. if (true) {
  7063. checkComponents(child);
  7064. }
  7065. if (typeof child === 'function') {
  7066. child = child.options;
  7067. }
  7068. normalizeProps(child, vm);
  7069. normalizeInject(child, vm);
  7070. normalizeDirectives(child);
  7071. // Apply extends and mixins on the child options,
  7072. // but only if it is a raw options object that isn't
  7073. // the result of another mergeOptions call.
  7074. // Only merged options has the _base property.
  7075. if (!child._base) {
  7076. if (child.extends) {
  7077. parent = mergeOptions(parent, child.extends, vm);
  7078. }
  7079. if (child.mixins) {
  7080. for (var i = 0, l = child.mixins.length; i < l; i++) {
  7081. parent = mergeOptions(parent, child.mixins[i], vm);
  7082. }
  7083. }
  7084. }
  7085. var options = {};
  7086. var key;
  7087. for (key in parent) {
  7088. mergeField(key);
  7089. }
  7090. for (key in child) {
  7091. if (!hasOwn(parent, key)) {
  7092. mergeField(key);
  7093. }
  7094. }
  7095. function mergeField (key) {
  7096. var strat = strats[key] || defaultStrat;
  7097. options[key] = strat(parent[key], child[key], vm, key);
  7098. }
  7099. return options
  7100. }
  7101. /**
  7102. * Resolve an asset.
  7103. * This function is used because child instances need access
  7104. * to assets defined in its ancestor chain.
  7105. */
  7106. function resolveAsset (
  7107. options,
  7108. type,
  7109. id,
  7110. warnMissing
  7111. ) {
  7112. /* istanbul ignore if */
  7113. if (typeof id !== 'string') {
  7114. return
  7115. }
  7116. var assets = options[type];
  7117. // check local registration variations first
  7118. if (hasOwn(assets, id)) { return assets[id] }
  7119. var camelizedId = camelize(id);
  7120. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  7121. var PascalCaseId = capitalize(camelizedId);
  7122. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  7123. // fallback to prototype chain
  7124. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  7125. if ( true && warnMissing && !res) {
  7126. warn(
  7127. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  7128. options
  7129. );
  7130. }
  7131. return res
  7132. }
  7133. /* */
  7134. function validateProp (
  7135. key,
  7136. propOptions,
  7137. propsData,
  7138. vm
  7139. ) {
  7140. var prop = propOptions[key];
  7141. var absent = !hasOwn(propsData, key);
  7142. var value = propsData[key];
  7143. // boolean casting
  7144. var booleanIndex = getTypeIndex(Boolean, prop.type);
  7145. if (booleanIndex > -1) {
  7146. if (absent && !hasOwn(prop, 'default')) {
  7147. value = false;
  7148. } else if (value === '' || value === hyphenate(key)) {
  7149. // only cast empty string / same name to boolean if
  7150. // boolean has higher priority
  7151. var stringIndex = getTypeIndex(String, prop.type);
  7152. if (stringIndex < 0 || booleanIndex < stringIndex) {
  7153. value = true;
  7154. }
  7155. }
  7156. }
  7157. // check default value
  7158. if (value === undefined) {
  7159. value = getPropDefaultValue(vm, prop, key);
  7160. // since the default value is a fresh copy,
  7161. // make sure to observe it.
  7162. var prevShouldObserve = shouldObserve;
  7163. toggleObserving(true);
  7164. observe(value);
  7165. toggleObserving(prevShouldObserve);
  7166. }
  7167. if (
  7168. true
  7169. ) {
  7170. assertProp(prop, key, value, vm, absent);
  7171. }
  7172. return value
  7173. }
  7174. /**
  7175. * Get the default value of a prop.
  7176. */
  7177. function getPropDefaultValue (vm, prop, key) {
  7178. // no default, return undefined
  7179. if (!hasOwn(prop, 'default')) {
  7180. return undefined
  7181. }
  7182. var def = prop.default;
  7183. // warn against non-factory defaults for Object & Array
  7184. if ( true && isObject(def)) {
  7185. warn(
  7186. 'Invalid default value for prop "' + key + '": ' +
  7187. 'Props with type Object/Array must use a factory function ' +
  7188. 'to return the default value.',
  7189. vm
  7190. );
  7191. }
  7192. // the raw prop value was also undefined from previous render,
  7193. // return previous default value to avoid unnecessary watcher trigger
  7194. if (vm && vm.$options.propsData &&
  7195. vm.$options.propsData[key] === undefined &&
  7196. vm._props[key] !== undefined
  7197. ) {
  7198. return vm._props[key]
  7199. }
  7200. // call factory function for non-Function types
  7201. // a value is Function if its prototype is function even across different execution context
  7202. return typeof def === 'function' && getType(prop.type) !== 'Function'
  7203. ? def.call(vm)
  7204. : def
  7205. }
  7206. /**
  7207. * Assert whether a prop is valid.
  7208. */
  7209. function assertProp (
  7210. prop,
  7211. name,
  7212. value,
  7213. vm,
  7214. absent
  7215. ) {
  7216. if (prop.required && absent) {
  7217. warn(
  7218. 'Missing required prop: "' + name + '"',
  7219. vm
  7220. );
  7221. return
  7222. }
  7223. if (value == null && !prop.required) {
  7224. return
  7225. }
  7226. var type = prop.type;
  7227. var valid = !type || type === true;
  7228. var expectedTypes = [];
  7229. if (type) {
  7230. if (!Array.isArray(type)) {
  7231. type = [type];
  7232. }
  7233. for (var i = 0; i < type.length && !valid; i++) {
  7234. var assertedType = assertType(value, type[i]);
  7235. expectedTypes.push(assertedType.expectedType || '');
  7236. valid = assertedType.valid;
  7237. }
  7238. }
  7239. if (!valid) {
  7240. warn(
  7241. getInvalidTypeMessage(name, value, expectedTypes),
  7242. vm
  7243. );
  7244. return
  7245. }
  7246. var validator = prop.validator;
  7247. if (validator) {
  7248. if (!validator(value)) {
  7249. warn(
  7250. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  7251. vm
  7252. );
  7253. }
  7254. }
  7255. }
  7256. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  7257. function assertType (value, type) {
  7258. var valid;
  7259. var expectedType = getType(type);
  7260. if (simpleCheckRE.test(expectedType)) {
  7261. var t = typeof value;
  7262. valid = t === expectedType.toLowerCase();
  7263. // for primitive wrapper objects
  7264. if (!valid && t === 'object') {
  7265. valid = value instanceof type;
  7266. }
  7267. } else if (expectedType === 'Object') {
  7268. valid = isPlainObject(value);
  7269. } else if (expectedType === 'Array') {
  7270. valid = Array.isArray(value);
  7271. } else {
  7272. valid = value instanceof type;
  7273. }
  7274. return {
  7275. valid: valid,
  7276. expectedType: expectedType
  7277. }
  7278. }
  7279. /**
  7280. * Use function string name to check built-in types,
  7281. * because a simple equality check will fail when running
  7282. * across different vms / iframes.
  7283. */
  7284. function getType (fn) {
  7285. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  7286. return match ? match[1] : ''
  7287. }
  7288. function isSameType (a, b) {
  7289. return getType(a) === getType(b)
  7290. }
  7291. function getTypeIndex (type, expectedTypes) {
  7292. if (!Array.isArray(expectedTypes)) {
  7293. return isSameType(expectedTypes, type) ? 0 : -1
  7294. }
  7295. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  7296. if (isSameType(expectedTypes[i], type)) {
  7297. return i
  7298. }
  7299. }
  7300. return -1
  7301. }
  7302. function getInvalidTypeMessage (name, value, expectedTypes) {
  7303. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  7304. " Expected " + (expectedTypes.map(capitalize).join(', '));
  7305. var expectedType = expectedTypes[0];
  7306. var receivedType = toRawType(value);
  7307. var expectedValue = styleValue(value, expectedType);
  7308. var receivedValue = styleValue(value, receivedType);
  7309. // check if we need to specify expected value
  7310. if (expectedTypes.length === 1 &&
  7311. isExplicable(expectedType) &&
  7312. !isBoolean(expectedType, receivedType)) {
  7313. message += " with value " + expectedValue;
  7314. }
  7315. message += ", got " + receivedType + " ";
  7316. // check if we need to specify received value
  7317. if (isExplicable(receivedType)) {
  7318. message += "with value " + receivedValue + ".";
  7319. }
  7320. return message
  7321. }
  7322. function styleValue (value, type) {
  7323. if (type === 'String') {
  7324. return ("\"" + value + "\"")
  7325. } else if (type === 'Number') {
  7326. return ("" + (Number(value)))
  7327. } else {
  7328. return ("" + value)
  7329. }
  7330. }
  7331. function isExplicable (value) {
  7332. var explicitTypes = ['string', 'number', 'boolean'];
  7333. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  7334. }
  7335. function isBoolean () {
  7336. var args = [], len = arguments.length;
  7337. while ( len-- ) args[ len ] = arguments[ len ];
  7338. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  7339. }
  7340. /* */
  7341. function handleError (err, vm, info) {
  7342. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  7343. // See: https://github.com/vuejs/vuex/issues/1505
  7344. pushTarget();
  7345. try {
  7346. if (vm) {
  7347. var cur = vm;
  7348. while ((cur = cur.$parent)) {
  7349. var hooks = cur.$options.errorCaptured;
  7350. if (hooks) {
  7351. for (var i = 0; i < hooks.length; i++) {
  7352. try {
  7353. var capture = hooks[i].call(cur, err, vm, info) === false;
  7354. if (capture) { return }
  7355. } catch (e) {
  7356. globalHandleError(e, cur, 'errorCaptured hook');
  7357. }
  7358. }
  7359. }
  7360. }
  7361. }
  7362. globalHandleError(err, vm, info);
  7363. } finally {
  7364. popTarget();
  7365. }
  7366. }
  7367. function invokeWithErrorHandling (
  7368. handler,
  7369. context,
  7370. args,
  7371. vm,
  7372. info
  7373. ) {
  7374. var res;
  7375. try {
  7376. res = args ? handler.apply(context, args) : handler.call(context);
  7377. if (res && !res._isVue && isPromise(res) && !res._handled) {
  7378. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  7379. // issue #9511
  7380. // avoid catch triggering multiple times when nested calls
  7381. res._handled = true;
  7382. }
  7383. } catch (e) {
  7384. handleError(e, vm, info);
  7385. }
  7386. return res
  7387. }
  7388. function globalHandleError (err, vm, info) {
  7389. if (config.errorHandler) {
  7390. try {
  7391. return config.errorHandler.call(null, err, vm, info)
  7392. } catch (e) {
  7393. // if the user intentionally throws the original error in the handler,
  7394. // do not log it twice
  7395. if (e !== err) {
  7396. logError(e, null, 'config.errorHandler');
  7397. }
  7398. }
  7399. }
  7400. logError(err, vm, info);
  7401. }
  7402. function logError (err, vm, info) {
  7403. if (true) {
  7404. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7405. }
  7406. /* istanbul ignore else */
  7407. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  7408. console.error(err);
  7409. } else {
  7410. throw err
  7411. }
  7412. }
  7413. /* */
  7414. var callbacks = [];
  7415. var pending = false;
  7416. function flushCallbacks () {
  7417. pending = false;
  7418. var copies = callbacks.slice(0);
  7419. callbacks.length = 0;
  7420. for (var i = 0; i < copies.length; i++) {
  7421. copies[i]();
  7422. }
  7423. }
  7424. // Here we have async deferring wrappers using microtasks.
  7425. // In 2.5 we used (macro) tasks (in combination with microtasks).
  7426. // However, it has subtle problems when state is changed right before repaint
  7427. // (e.g. #6813, out-in transitions).
  7428. // Also, using (macro) tasks in event handler would cause some weird behaviors
  7429. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  7430. // So we now use microtasks everywhere, again.
  7431. // A major drawback of this tradeoff is that there are some scenarios
  7432. // where microtasks have too high a priority and fire in between supposedly
  7433. // sequential events (e.g. #4521, #6690, which have workarounds)
  7434. // or even between bubbling of the same event (#6566).
  7435. var timerFunc;
  7436. // The nextTick behavior leverages the microtask queue, which can be accessed
  7437. // via either native Promise.then or MutationObserver.
  7438. // MutationObserver has wider support, however it is seriously bugged in
  7439. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  7440. // completely stops working after triggering a few times... so, if native
  7441. // Promise is available, we will use it:
  7442. /* istanbul ignore next, $flow-disable-line */
  7443. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  7444. var p = Promise.resolve();
  7445. timerFunc = function () {
  7446. p.then(flushCallbacks);
  7447. // In problematic UIWebViews, Promise.then doesn't completely break, but
  7448. // it can get stuck in a weird state where callbacks are pushed into the
  7449. // microtask queue but the queue isn't being flushed, until the browser
  7450. // needs to do some other work, e.g. handle a timer. Therefore we can
  7451. // "force" the microtask queue to be flushed by adding an empty timer.
  7452. if (isIOS) { setTimeout(noop); }
  7453. };
  7454. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  7455. isNative(MutationObserver) ||
  7456. // PhantomJS and iOS 7.x
  7457. MutationObserver.toString() === '[object MutationObserverConstructor]'
  7458. )) {
  7459. // Use MutationObserver where native Promise is not available,
  7460. // e.g. PhantomJS, iOS7, Android 4.4
  7461. // (#6466 MutationObserver is unreliable in IE11)
  7462. var counter = 1;
  7463. var observer = new MutationObserver(flushCallbacks);
  7464. var textNode = document.createTextNode(String(counter));
  7465. observer.observe(textNode, {
  7466. characterData: true
  7467. });
  7468. timerFunc = function () {
  7469. counter = (counter + 1) % 2;
  7470. textNode.data = String(counter);
  7471. };
  7472. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  7473. // Fallback to setImmediate.
  7474. // Technically it leverages the (macro) task queue,
  7475. // but it is still a better choice than setTimeout.
  7476. timerFunc = function () {
  7477. setImmediate(flushCallbacks);
  7478. };
  7479. } else {
  7480. // Fallback to setTimeout.
  7481. timerFunc = function () {
  7482. setTimeout(flushCallbacks, 0);
  7483. };
  7484. }
  7485. function nextTick (cb, ctx) {
  7486. var _resolve;
  7487. callbacks.push(function () {
  7488. if (cb) {
  7489. try {
  7490. cb.call(ctx);
  7491. } catch (e) {
  7492. handleError(e, ctx, 'nextTick');
  7493. }
  7494. } else if (_resolve) {
  7495. _resolve(ctx);
  7496. }
  7497. });
  7498. if (!pending) {
  7499. pending = true;
  7500. timerFunc();
  7501. }
  7502. // $flow-disable-line
  7503. if (!cb && typeof Promise !== 'undefined') {
  7504. return new Promise(function (resolve) {
  7505. _resolve = resolve;
  7506. })
  7507. }
  7508. }
  7509. /* */
  7510. /* not type checking this file because flow doesn't play well with Proxy */
  7511. var initProxy;
  7512. if (true) {
  7513. var allowedGlobals = makeMap(
  7514. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  7515. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  7516. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  7517. 'require' // for Webpack/Browserify
  7518. );
  7519. var warnNonPresent = function (target, key) {
  7520. warn(
  7521. "Property or method \"" + key + "\" is not defined on the instance but " +
  7522. 'referenced during render. Make sure that this property is reactive, ' +
  7523. 'either in the data option, or for class-based components, by ' +
  7524. 'initializing the property. ' +
  7525. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  7526. target
  7527. );
  7528. };
  7529. var warnReservedPrefix = function (target, key) {
  7530. warn(
  7531. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  7532. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  7533. 'prevent conflicts with Vue internals. ' +
  7534. 'See: https://vuejs.org/v2/api/#data',
  7535. target
  7536. );
  7537. };
  7538. var hasProxy =
  7539. typeof Proxy !== 'undefined' && isNative(Proxy);
  7540. if (hasProxy) {
  7541. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  7542. config.keyCodes = new Proxy(config.keyCodes, {
  7543. set: function set (target, key, value) {
  7544. if (isBuiltInModifier(key)) {
  7545. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  7546. return false
  7547. } else {
  7548. target[key] = value;
  7549. return true
  7550. }
  7551. }
  7552. });
  7553. }
  7554. var hasHandler = {
  7555. has: function has (target, key) {
  7556. var has = key in target;
  7557. var isAllowed = allowedGlobals(key) ||
  7558. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  7559. if (!has && !isAllowed) {
  7560. if (key in target.$data) { warnReservedPrefix(target, key); }
  7561. else { warnNonPresent(target, key); }
  7562. }
  7563. return has || !isAllowed
  7564. }
  7565. };
  7566. var getHandler = {
  7567. get: function get (target, key) {
  7568. if (typeof key === 'string' && !(key in target)) {
  7569. if (key in target.$data) { warnReservedPrefix(target, key); }
  7570. else { warnNonPresent(target, key); }
  7571. }
  7572. return target[key]
  7573. }
  7574. };
  7575. initProxy = function initProxy (vm) {
  7576. if (hasProxy) {
  7577. // determine which proxy handler to use
  7578. var options = vm.$options;
  7579. var handlers = options.render && options.render._withStripped
  7580. ? getHandler
  7581. : hasHandler;
  7582. vm._renderProxy = new Proxy(vm, handlers);
  7583. } else {
  7584. vm._renderProxy = vm;
  7585. }
  7586. };
  7587. }
  7588. /* */
  7589. var seenObjects = new _Set();
  7590. /**
  7591. * Recursively traverse an object to evoke all converted
  7592. * getters, so that every nested property inside the object
  7593. * is collected as a "deep" dependency.
  7594. */
  7595. function traverse (val) {
  7596. _traverse(val, seenObjects);
  7597. seenObjects.clear();
  7598. }
  7599. function _traverse (val, seen) {
  7600. var i, keys;
  7601. var isA = Array.isArray(val);
  7602. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  7603. return
  7604. }
  7605. if (val.__ob__) {
  7606. var depId = val.__ob__.dep.id;
  7607. if (seen.has(depId)) {
  7608. return
  7609. }
  7610. seen.add(depId);
  7611. }
  7612. if (isA) {
  7613. i = val.length;
  7614. while (i--) { _traverse(val[i], seen); }
  7615. } else {
  7616. keys = Object.keys(val);
  7617. i = keys.length;
  7618. while (i--) { _traverse(val[keys[i]], seen); }
  7619. }
  7620. }
  7621. var mark;
  7622. var measure;
  7623. if (true) {
  7624. var perf = inBrowser && window.performance;
  7625. /* istanbul ignore if */
  7626. if (
  7627. perf &&
  7628. perf.mark &&
  7629. perf.measure &&
  7630. perf.clearMarks &&
  7631. perf.clearMeasures
  7632. ) {
  7633. mark = function (tag) { return perf.mark(tag); };
  7634. measure = function (name, startTag, endTag) {
  7635. perf.measure(name, startTag, endTag);
  7636. perf.clearMarks(startTag);
  7637. perf.clearMarks(endTag);
  7638. // perf.clearMeasures(name)
  7639. };
  7640. }
  7641. }
  7642. /* */
  7643. var normalizeEvent = cached(function (name) {
  7644. var passive = name.charAt(0) === '&';
  7645. name = passive ? name.slice(1) : name;
  7646. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  7647. name = once$$1 ? name.slice(1) : name;
  7648. var capture = name.charAt(0) === '!';
  7649. name = capture ? name.slice(1) : name;
  7650. return {
  7651. name: name,
  7652. once: once$$1,
  7653. capture: capture,
  7654. passive: passive
  7655. }
  7656. });
  7657. function createFnInvoker (fns, vm) {
  7658. function invoker () {
  7659. var arguments$1 = arguments;
  7660. var fns = invoker.fns;
  7661. if (Array.isArray(fns)) {
  7662. var cloned = fns.slice();
  7663. for (var i = 0; i < cloned.length; i++) {
  7664. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  7665. }
  7666. } else {
  7667. // return handler return value for single handlers
  7668. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  7669. }
  7670. }
  7671. invoker.fns = fns;
  7672. return invoker
  7673. }
  7674. function updateListeners (
  7675. on,
  7676. oldOn,
  7677. add,
  7678. remove$$1,
  7679. createOnceHandler,
  7680. vm
  7681. ) {
  7682. var name, def$$1, cur, old, event;
  7683. for (name in on) {
  7684. def$$1 = cur = on[name];
  7685. old = oldOn[name];
  7686. event = normalizeEvent(name);
  7687. if (isUndef(cur)) {
  7688. true && warn(
  7689. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  7690. vm
  7691. );
  7692. } else if (isUndef(old)) {
  7693. if (isUndef(cur.fns)) {
  7694. cur = on[name] = createFnInvoker(cur, vm);
  7695. }
  7696. if (isTrue(event.once)) {
  7697. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  7698. }
  7699. add(event.name, cur, event.capture, event.passive, event.params);
  7700. } else if (cur !== old) {
  7701. old.fns = cur;
  7702. on[name] = old;
  7703. }
  7704. }
  7705. for (name in oldOn) {
  7706. if (isUndef(on[name])) {
  7707. event = normalizeEvent(name);
  7708. remove$$1(event.name, oldOn[name], event.capture);
  7709. }
  7710. }
  7711. }
  7712. /* */
  7713. /* */
  7714. // fixed by xxxxxx (mp properties)
  7715. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  7716. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  7717. if (isUndef(propOptions)) {
  7718. return res
  7719. }
  7720. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  7721. var attrs = data.attrs;
  7722. var props = data.props;
  7723. if (isDef(attrs) || isDef(props)) {
  7724. for (var key in propOptions) {
  7725. var altKey = hyphenate(key);
  7726. var result = checkProp(res, props, key, altKey, true) ||
  7727. checkProp(res, attrs, key, altKey, false);
  7728. // externalClass
  7729. if (
  7730. result &&
  7731. res[key] &&
  7732. externalClasses.indexOf(altKey) !== -1 &&
  7733. context[camelize(res[key])]
  7734. ) {
  7735. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  7736. res[key] = context[camelize(res[key])];
  7737. }
  7738. }
  7739. }
  7740. return res
  7741. }
  7742. function extractPropsFromVNodeData (
  7743. data,
  7744. Ctor,
  7745. tag,
  7746. context// fixed by xxxxxx
  7747. ) {
  7748. // we are only extracting raw values here.
  7749. // validation and default values are handled in the child
  7750. // component itself.
  7751. var propOptions = Ctor.options.props;
  7752. if (isUndef(propOptions)) {
  7753. // fixed by xxxxxx
  7754. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  7755. }
  7756. var res = {};
  7757. var attrs = data.attrs;
  7758. var props = data.props;
  7759. if (isDef(attrs) || isDef(props)) {
  7760. for (var key in propOptions) {
  7761. var altKey = hyphenate(key);
  7762. if (true) {
  7763. var keyInLowerCase = key.toLowerCase();
  7764. if (
  7765. key !== keyInLowerCase &&
  7766. attrs && hasOwn(attrs, keyInLowerCase)
  7767. ) {
  7768. tip(
  7769. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  7770. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  7771. " \"" + key + "\". " +
  7772. "Note that HTML attributes are case-insensitive and camelCased " +
  7773. "props need to use their kebab-case equivalents when using in-DOM " +
  7774. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  7775. );
  7776. }
  7777. }
  7778. checkProp(res, props, key, altKey, true) ||
  7779. checkProp(res, attrs, key, altKey, false);
  7780. }
  7781. }
  7782. // fixed by xxxxxx
  7783. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  7784. }
  7785. function checkProp (
  7786. res,
  7787. hash,
  7788. key,
  7789. altKey,
  7790. preserve
  7791. ) {
  7792. if (isDef(hash)) {
  7793. if (hasOwn(hash, key)) {
  7794. res[key] = hash[key];
  7795. if (!preserve) {
  7796. delete hash[key];
  7797. }
  7798. return true
  7799. } else if (hasOwn(hash, altKey)) {
  7800. res[key] = hash[altKey];
  7801. if (!preserve) {
  7802. delete hash[altKey];
  7803. }
  7804. return true
  7805. }
  7806. }
  7807. return false
  7808. }
  7809. /* */
  7810. // The template compiler attempts to minimize the need for normalization by
  7811. // statically analyzing the template at compile time.
  7812. //
  7813. // For plain HTML markup, normalization can be completely skipped because the
  7814. // generated render function is guaranteed to return Array<VNode>. There are
  7815. // two cases where extra normalization is needed:
  7816. // 1. When the children contains components - because a functional component
  7817. // may return an Array instead of a single root. In this case, just a simple
  7818. // normalization is needed - if any child is an Array, we flatten the whole
  7819. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  7820. // because functional components already normalize their own children.
  7821. function simpleNormalizeChildren (children) {
  7822. for (var i = 0; i < children.length; i++) {
  7823. if (Array.isArray(children[i])) {
  7824. return Array.prototype.concat.apply([], children)
  7825. }
  7826. }
  7827. return children
  7828. }
  7829. // 2. When the children contains constructs that always generated nested Arrays,
  7830. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  7831. // with hand-written render functions / JSX. In such cases a full normalization
  7832. // is needed to cater to all possible types of children values.
  7833. function normalizeChildren (children) {
  7834. return isPrimitive(children)
  7835. ? [createTextVNode(children)]
  7836. : Array.isArray(children)
  7837. ? normalizeArrayChildren(children)
  7838. : undefined
  7839. }
  7840. function isTextNode (node) {
  7841. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  7842. }
  7843. function normalizeArrayChildren (children, nestedIndex) {
  7844. var res = [];
  7845. var i, c, lastIndex, last;
  7846. for (i = 0; i < children.length; i++) {
  7847. c = children[i];
  7848. if (isUndef(c) || typeof c === 'boolean') { continue }
  7849. lastIndex = res.length - 1;
  7850. last = res[lastIndex];
  7851. // nested
  7852. if (Array.isArray(c)) {
  7853. if (c.length > 0) {
  7854. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  7855. // merge adjacent text nodes
  7856. if (isTextNode(c[0]) && isTextNode(last)) {
  7857. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  7858. c.shift();
  7859. }
  7860. res.push.apply(res, c);
  7861. }
  7862. } else if (isPrimitive(c)) {
  7863. if (isTextNode(last)) {
  7864. // merge adjacent text nodes
  7865. // this is necessary for SSR hydration because text nodes are
  7866. // essentially merged when rendered to HTML strings
  7867. res[lastIndex] = createTextVNode(last.text + c);
  7868. } else if (c !== '') {
  7869. // convert primitive to vnode
  7870. res.push(createTextVNode(c));
  7871. }
  7872. } else {
  7873. if (isTextNode(c) && isTextNode(last)) {
  7874. // merge adjacent text nodes
  7875. res[lastIndex] = createTextVNode(last.text + c.text);
  7876. } else {
  7877. // default key for nested array children (likely generated by v-for)
  7878. if (isTrue(children._isVList) &&
  7879. isDef(c.tag) &&
  7880. isUndef(c.key) &&
  7881. isDef(nestedIndex)) {
  7882. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  7883. }
  7884. res.push(c);
  7885. }
  7886. }
  7887. }
  7888. return res
  7889. }
  7890. /* */
  7891. function initProvide (vm) {
  7892. var provide = vm.$options.provide;
  7893. if (provide) {
  7894. vm._provided = typeof provide === 'function'
  7895. ? provide.call(vm)
  7896. : provide;
  7897. }
  7898. }
  7899. function initInjections (vm) {
  7900. var result = resolveInject(vm.$options.inject, vm);
  7901. if (result) {
  7902. toggleObserving(false);
  7903. Object.keys(result).forEach(function (key) {
  7904. /* istanbul ignore else */
  7905. if (true) {
  7906. defineReactive$$1(vm, key, result[key], function () {
  7907. warn(
  7908. "Avoid mutating an injected value directly since the changes will be " +
  7909. "overwritten whenever the provided component re-renders. " +
  7910. "injection being mutated: \"" + key + "\"",
  7911. vm
  7912. );
  7913. });
  7914. } else {}
  7915. });
  7916. toggleObserving(true);
  7917. }
  7918. }
  7919. function resolveInject (inject, vm) {
  7920. if (inject) {
  7921. // inject is :any because flow is not smart enough to figure out cached
  7922. var result = Object.create(null);
  7923. var keys = hasSymbol
  7924. ? Reflect.ownKeys(inject)
  7925. : Object.keys(inject);
  7926. for (var i = 0; i < keys.length; i++) {
  7927. var key = keys[i];
  7928. // #6574 in case the inject object is observed...
  7929. if (key === '__ob__') { continue }
  7930. var provideKey = inject[key].from;
  7931. var source = vm;
  7932. while (source) {
  7933. if (source._provided && hasOwn(source._provided, provideKey)) {
  7934. result[key] = source._provided[provideKey];
  7935. break
  7936. }
  7937. source = source.$parent;
  7938. }
  7939. if (!source) {
  7940. if ('default' in inject[key]) {
  7941. var provideDefault = inject[key].default;
  7942. result[key] = typeof provideDefault === 'function'
  7943. ? provideDefault.call(vm)
  7944. : provideDefault;
  7945. } else if (true) {
  7946. warn(("Injection \"" + key + "\" not found"), vm);
  7947. }
  7948. }
  7949. }
  7950. return result
  7951. }
  7952. }
  7953. /* */
  7954. /**
  7955. * Runtime helper for resolving raw children VNodes into a slot object.
  7956. */
  7957. function resolveSlots (
  7958. children,
  7959. context
  7960. ) {
  7961. if (!children || !children.length) {
  7962. return {}
  7963. }
  7964. var slots = {};
  7965. for (var i = 0, l = children.length; i < l; i++) {
  7966. var child = children[i];
  7967. var data = child.data;
  7968. // remove slot attribute if the node is resolved as a Vue slot node
  7969. if (data && data.attrs && data.attrs.slot) {
  7970. delete data.attrs.slot;
  7971. }
  7972. // named slots should only be respected if the vnode was rendered in the
  7973. // same context.
  7974. if ((child.context === context || child.fnContext === context) &&
  7975. data && data.slot != null
  7976. ) {
  7977. var name = data.slot;
  7978. var slot = (slots[name] || (slots[name] = []));
  7979. if (child.tag === 'template') {
  7980. slot.push.apply(slot, child.children || []);
  7981. } else {
  7982. slot.push(child);
  7983. }
  7984. } else {
  7985. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7986. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7987. (slots['page'] || (slots['page'] = [])).push(child);
  7988. }else{
  7989. (slots.default || (slots.default = [])).push(child);
  7990. }
  7991. }
  7992. }
  7993. // ignore slots that contains only whitespace
  7994. for (var name$1 in slots) {
  7995. if (slots[name$1].every(isWhitespace)) {
  7996. delete slots[name$1];
  7997. }
  7998. }
  7999. return slots
  8000. }
  8001. function isWhitespace (node) {
  8002. return (node.isComment && !node.asyncFactory) || node.text === ' '
  8003. }
  8004. /* */
  8005. function normalizeScopedSlots (
  8006. slots,
  8007. normalSlots,
  8008. prevSlots
  8009. ) {
  8010. var res;
  8011. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  8012. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  8013. var key = slots && slots.$key;
  8014. if (!slots) {
  8015. res = {};
  8016. } else if (slots._normalized) {
  8017. // fast path 1: child component re-render only, parent did not change
  8018. return slots._normalized
  8019. } else if (
  8020. isStable &&
  8021. prevSlots &&
  8022. prevSlots !== emptyObject &&
  8023. key === prevSlots.$key &&
  8024. !hasNormalSlots &&
  8025. !prevSlots.$hasNormal
  8026. ) {
  8027. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  8028. // only need to normalize once
  8029. return prevSlots
  8030. } else {
  8031. res = {};
  8032. for (var key$1 in slots) {
  8033. if (slots[key$1] && key$1[0] !== '$') {
  8034. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  8035. }
  8036. }
  8037. }
  8038. // expose normal slots on scopedSlots
  8039. for (var key$2 in normalSlots) {
  8040. if (!(key$2 in res)) {
  8041. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  8042. }
  8043. }
  8044. // avoriaz seems to mock a non-extensible $scopedSlots object
  8045. // and when that is passed down this would cause an error
  8046. if (slots && Object.isExtensible(slots)) {
  8047. (slots)._normalized = res;
  8048. }
  8049. def(res, '$stable', isStable);
  8050. def(res, '$key', key);
  8051. def(res, '$hasNormal', hasNormalSlots);
  8052. return res
  8053. }
  8054. function normalizeScopedSlot(normalSlots, key, fn) {
  8055. var normalized = function () {
  8056. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  8057. res = res && typeof res === 'object' && !Array.isArray(res)
  8058. ? [res] // single vnode
  8059. : normalizeChildren(res);
  8060. return res && (
  8061. res.length === 0 ||
  8062. (res.length === 1 && res[0].isComment) // #9658
  8063. ) ? undefined
  8064. : res
  8065. };
  8066. // this is a slot using the new v-slot syntax without scope. although it is
  8067. // compiled as a scoped slot, render fn users would expect it to be present
  8068. // on this.$slots because the usage is semantically a normal slot.
  8069. if (fn.proxy) {
  8070. Object.defineProperty(normalSlots, key, {
  8071. get: normalized,
  8072. enumerable: true,
  8073. configurable: true
  8074. });
  8075. }
  8076. return normalized
  8077. }
  8078. function proxyNormalSlot(slots, key) {
  8079. return function () { return slots[key]; }
  8080. }
  8081. /* */
  8082. /**
  8083. * Runtime helper for rendering v-for lists.
  8084. */
  8085. function renderList (
  8086. val,
  8087. render
  8088. ) {
  8089. var ret, i, l, keys, key;
  8090. if (Array.isArray(val) || typeof val === 'string') {
  8091. ret = new Array(val.length);
  8092. for (i = 0, l = val.length; i < l; i++) {
  8093. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  8094. }
  8095. } else if (typeof val === 'number') {
  8096. ret = new Array(val);
  8097. for (i = 0; i < val; i++) {
  8098. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  8099. }
  8100. } else if (isObject(val)) {
  8101. if (hasSymbol && val[Symbol.iterator]) {
  8102. ret = [];
  8103. var iterator = val[Symbol.iterator]();
  8104. var result = iterator.next();
  8105. while (!result.done) {
  8106. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  8107. result = iterator.next();
  8108. }
  8109. } else {
  8110. keys = Object.keys(val);
  8111. ret = new Array(keys.length);
  8112. for (i = 0, l = keys.length; i < l; i++) {
  8113. key = keys[i];
  8114. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  8115. }
  8116. }
  8117. }
  8118. if (!isDef(ret)) {
  8119. ret = [];
  8120. }
  8121. (ret)._isVList = true;
  8122. return ret
  8123. }
  8124. /* */
  8125. /**
  8126. * Runtime helper for rendering <slot>
  8127. */
  8128. function renderSlot (
  8129. name,
  8130. fallback,
  8131. props,
  8132. bindObject
  8133. ) {
  8134. var scopedSlotFn = this.$scopedSlots[name];
  8135. var nodes;
  8136. if (scopedSlotFn) { // scoped slot
  8137. props = props || {};
  8138. if (bindObject) {
  8139. if ( true && !isObject(bindObject)) {
  8140. warn(
  8141. 'slot v-bind without argument expects an Object',
  8142. this
  8143. );
  8144. }
  8145. props = extend(extend({}, bindObject), props);
  8146. }
  8147. // fixed by xxxxxx app-plus scopedSlot
  8148. nodes = scopedSlotFn(props, this, props._i) || fallback;
  8149. } else {
  8150. nodes = this.$slots[name] || fallback;
  8151. }
  8152. var target = props && props.slot;
  8153. if (target) {
  8154. return this.$createElement('template', { slot: target }, nodes)
  8155. } else {
  8156. return nodes
  8157. }
  8158. }
  8159. /* */
  8160. /**
  8161. * Runtime helper for resolving filters
  8162. */
  8163. function resolveFilter (id) {
  8164. return resolveAsset(this.$options, 'filters', id, true) || identity
  8165. }
  8166. /* */
  8167. function isKeyNotMatch (expect, actual) {
  8168. if (Array.isArray(expect)) {
  8169. return expect.indexOf(actual) === -1
  8170. } else {
  8171. return expect !== actual
  8172. }
  8173. }
  8174. /**
  8175. * Runtime helper for checking keyCodes from config.
  8176. * exposed as Vue.prototype._k
  8177. * passing in eventKeyName as last argument separately for backwards compat
  8178. */
  8179. function checkKeyCodes (
  8180. eventKeyCode,
  8181. key,
  8182. builtInKeyCode,
  8183. eventKeyName,
  8184. builtInKeyName
  8185. ) {
  8186. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  8187. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  8188. return isKeyNotMatch(builtInKeyName, eventKeyName)
  8189. } else if (mappedKeyCode) {
  8190. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  8191. } else if (eventKeyName) {
  8192. return hyphenate(eventKeyName) !== key
  8193. }
  8194. }
  8195. /* */
  8196. /**
  8197. * Runtime helper for merging v-bind="object" into a VNode's data.
  8198. */
  8199. function bindObjectProps (
  8200. data,
  8201. tag,
  8202. value,
  8203. asProp,
  8204. isSync
  8205. ) {
  8206. if (value) {
  8207. if (!isObject(value)) {
  8208. true && warn(
  8209. 'v-bind without argument expects an Object or Array value',
  8210. this
  8211. );
  8212. } else {
  8213. if (Array.isArray(value)) {
  8214. value = toObject(value);
  8215. }
  8216. var hash;
  8217. var loop = function ( key ) {
  8218. if (
  8219. key === 'class' ||
  8220. key === 'style' ||
  8221. isReservedAttribute(key)
  8222. ) {
  8223. hash = data;
  8224. } else {
  8225. var type = data.attrs && data.attrs.type;
  8226. hash = asProp || config.mustUseProp(tag, type, key)
  8227. ? data.domProps || (data.domProps = {})
  8228. : data.attrs || (data.attrs = {});
  8229. }
  8230. var camelizedKey = camelize(key);
  8231. var hyphenatedKey = hyphenate(key);
  8232. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  8233. hash[key] = value[key];
  8234. if (isSync) {
  8235. var on = data.on || (data.on = {});
  8236. on[("update:" + key)] = function ($event) {
  8237. value[key] = $event;
  8238. };
  8239. }
  8240. }
  8241. };
  8242. for (var key in value) loop( key );
  8243. }
  8244. }
  8245. return data
  8246. }
  8247. /* */
  8248. /**
  8249. * Runtime helper for rendering static trees.
  8250. */
  8251. function renderStatic (
  8252. index,
  8253. isInFor
  8254. ) {
  8255. var cached = this._staticTrees || (this._staticTrees = []);
  8256. var tree = cached[index];
  8257. // if has already-rendered static tree and not inside v-for,
  8258. // we can reuse the same tree.
  8259. if (tree && !isInFor) {
  8260. return tree
  8261. }
  8262. // otherwise, render a fresh tree.
  8263. tree = cached[index] = this.$options.staticRenderFns[index].call(
  8264. this._renderProxy,
  8265. null,
  8266. this // for render fns generated for functional component templates
  8267. );
  8268. markStatic(tree, ("__static__" + index), false);
  8269. return tree
  8270. }
  8271. /**
  8272. * Runtime helper for v-once.
  8273. * Effectively it means marking the node as static with a unique key.
  8274. */
  8275. function markOnce (
  8276. tree,
  8277. index,
  8278. key
  8279. ) {
  8280. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  8281. return tree
  8282. }
  8283. function markStatic (
  8284. tree,
  8285. key,
  8286. isOnce
  8287. ) {
  8288. if (Array.isArray(tree)) {
  8289. for (var i = 0; i < tree.length; i++) {
  8290. if (tree[i] && typeof tree[i] !== 'string') {
  8291. markStaticNode(tree[i], (key + "_" + i), isOnce);
  8292. }
  8293. }
  8294. } else {
  8295. markStaticNode(tree, key, isOnce);
  8296. }
  8297. }
  8298. function markStaticNode (node, key, isOnce) {
  8299. node.isStatic = true;
  8300. node.key = key;
  8301. node.isOnce = isOnce;
  8302. }
  8303. /* */
  8304. function bindObjectListeners (data, value) {
  8305. if (value) {
  8306. if (!isPlainObject(value)) {
  8307. true && warn(
  8308. 'v-on without argument expects an Object value',
  8309. this
  8310. );
  8311. } else {
  8312. var on = data.on = data.on ? extend({}, data.on) : {};
  8313. for (var key in value) {
  8314. var existing = on[key];
  8315. var ours = value[key];
  8316. on[key] = existing ? [].concat(existing, ours) : ours;
  8317. }
  8318. }
  8319. }
  8320. return data
  8321. }
  8322. /* */
  8323. function resolveScopedSlots (
  8324. fns, // see flow/vnode
  8325. res,
  8326. // the following are added in 2.6
  8327. hasDynamicKeys,
  8328. contentHashKey
  8329. ) {
  8330. res = res || { $stable: !hasDynamicKeys };
  8331. for (var i = 0; i < fns.length; i++) {
  8332. var slot = fns[i];
  8333. if (Array.isArray(slot)) {
  8334. resolveScopedSlots(slot, res, hasDynamicKeys);
  8335. } else if (slot) {
  8336. // marker for reverse proxying v-slot without scope on this.$slots
  8337. if (slot.proxy) {
  8338. slot.fn.proxy = true;
  8339. }
  8340. res[slot.key] = slot.fn;
  8341. }
  8342. }
  8343. if (contentHashKey) {
  8344. (res).$key = contentHashKey;
  8345. }
  8346. return res
  8347. }
  8348. /* */
  8349. function bindDynamicKeys (baseObj, values) {
  8350. for (var i = 0; i < values.length; i += 2) {
  8351. var key = values[i];
  8352. if (typeof key === 'string' && key) {
  8353. baseObj[values[i]] = values[i + 1];
  8354. } else if ( true && key !== '' && key !== null) {
  8355. // null is a special value for explicitly removing a binding
  8356. warn(
  8357. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  8358. this
  8359. );
  8360. }
  8361. }
  8362. return baseObj
  8363. }
  8364. // helper to dynamically append modifier runtime markers to event names.
  8365. // ensure only append when value is already string, otherwise it will be cast
  8366. // to string and cause the type check to miss.
  8367. function prependModifier (value, symbol) {
  8368. return typeof value === 'string' ? symbol + value : value
  8369. }
  8370. /* */
  8371. function installRenderHelpers (target) {
  8372. target._o = markOnce;
  8373. target._n = toNumber;
  8374. target._s = toString;
  8375. target._l = renderList;
  8376. target._t = renderSlot;
  8377. target._q = looseEqual;
  8378. target._i = looseIndexOf;
  8379. target._m = renderStatic;
  8380. target._f = resolveFilter;
  8381. target._k = checkKeyCodes;
  8382. target._b = bindObjectProps;
  8383. target._v = createTextVNode;
  8384. target._e = createEmptyVNode;
  8385. target._u = resolveScopedSlots;
  8386. target._g = bindObjectListeners;
  8387. target._d = bindDynamicKeys;
  8388. target._p = prependModifier;
  8389. }
  8390. /* */
  8391. function FunctionalRenderContext (
  8392. data,
  8393. props,
  8394. children,
  8395. parent,
  8396. Ctor
  8397. ) {
  8398. var this$1 = this;
  8399. var options = Ctor.options;
  8400. // ensure the createElement function in functional components
  8401. // gets a unique context - this is necessary for correct named slot check
  8402. var contextVm;
  8403. if (hasOwn(parent, '_uid')) {
  8404. contextVm = Object.create(parent);
  8405. // $flow-disable-line
  8406. contextVm._original = parent;
  8407. } else {
  8408. // the context vm passed in is a functional context as well.
  8409. // in this case we want to make sure we are able to get a hold to the
  8410. // real context instance.
  8411. contextVm = parent;
  8412. // $flow-disable-line
  8413. parent = parent._original;
  8414. }
  8415. var isCompiled = isTrue(options._compiled);
  8416. var needNormalization = !isCompiled;
  8417. this.data = data;
  8418. this.props = props;
  8419. this.children = children;
  8420. this.parent = parent;
  8421. this.listeners = data.on || emptyObject;
  8422. this.injections = resolveInject(options.inject, parent);
  8423. this.slots = function () {
  8424. if (!this$1.$slots) {
  8425. normalizeScopedSlots(
  8426. data.scopedSlots,
  8427. this$1.$slots = resolveSlots(children, parent)
  8428. );
  8429. }
  8430. return this$1.$slots
  8431. };
  8432. Object.defineProperty(this, 'scopedSlots', ({
  8433. enumerable: true,
  8434. get: function get () {
  8435. return normalizeScopedSlots(data.scopedSlots, this.slots())
  8436. }
  8437. }));
  8438. // support for compiled functional template
  8439. if (isCompiled) {
  8440. // exposing $options for renderStatic()
  8441. this.$options = options;
  8442. // pre-resolve slots for renderSlot()
  8443. this.$slots = this.slots();
  8444. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  8445. }
  8446. if (options._scopeId) {
  8447. this._c = function (a, b, c, d) {
  8448. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  8449. if (vnode && !Array.isArray(vnode)) {
  8450. vnode.fnScopeId = options._scopeId;
  8451. vnode.fnContext = parent;
  8452. }
  8453. return vnode
  8454. };
  8455. } else {
  8456. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  8457. }
  8458. }
  8459. installRenderHelpers(FunctionalRenderContext.prototype);
  8460. function createFunctionalComponent (
  8461. Ctor,
  8462. propsData,
  8463. data,
  8464. contextVm,
  8465. children
  8466. ) {
  8467. var options = Ctor.options;
  8468. var props = {};
  8469. var propOptions = options.props;
  8470. if (isDef(propOptions)) {
  8471. for (var key in propOptions) {
  8472. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  8473. }
  8474. } else {
  8475. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  8476. if (isDef(data.props)) { mergeProps(props, data.props); }
  8477. }
  8478. var renderContext = new FunctionalRenderContext(
  8479. data,
  8480. props,
  8481. children,
  8482. contextVm,
  8483. Ctor
  8484. );
  8485. var vnode = options.render.call(null, renderContext._c, renderContext);
  8486. if (vnode instanceof VNode) {
  8487. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  8488. } else if (Array.isArray(vnode)) {
  8489. var vnodes = normalizeChildren(vnode) || [];
  8490. var res = new Array(vnodes.length);
  8491. for (var i = 0; i < vnodes.length; i++) {
  8492. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  8493. }
  8494. return res
  8495. }
  8496. }
  8497. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  8498. // #7817 clone node before setting fnContext, otherwise if the node is reused
  8499. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  8500. // that should not be matched to match.
  8501. var clone = cloneVNode(vnode);
  8502. clone.fnContext = contextVm;
  8503. clone.fnOptions = options;
  8504. if (true) {
  8505. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  8506. }
  8507. if (data.slot) {
  8508. (clone.data || (clone.data = {})).slot = data.slot;
  8509. }
  8510. return clone
  8511. }
  8512. function mergeProps (to, from) {
  8513. for (var key in from) {
  8514. to[camelize(key)] = from[key];
  8515. }
  8516. }
  8517. /* */
  8518. /* */
  8519. /* */
  8520. /* */
  8521. // inline hooks to be invoked on component VNodes during patch
  8522. var componentVNodeHooks = {
  8523. init: function init (vnode, hydrating) {
  8524. if (
  8525. vnode.componentInstance &&
  8526. !vnode.componentInstance._isDestroyed &&
  8527. vnode.data.keepAlive
  8528. ) {
  8529. // kept-alive components, treat as a patch
  8530. var mountedNode = vnode; // work around flow
  8531. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  8532. } else {
  8533. var child = vnode.componentInstance = createComponentInstanceForVnode(
  8534. vnode,
  8535. activeInstance
  8536. );
  8537. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  8538. }
  8539. },
  8540. prepatch: function prepatch (oldVnode, vnode) {
  8541. var options = vnode.componentOptions;
  8542. var child = vnode.componentInstance = oldVnode.componentInstance;
  8543. updateChildComponent(
  8544. child,
  8545. options.propsData, // updated props
  8546. options.listeners, // updated listeners
  8547. vnode, // new parent vnode
  8548. options.children // new children
  8549. );
  8550. },
  8551. insert: function insert (vnode) {
  8552. var context = vnode.context;
  8553. var componentInstance = vnode.componentInstance;
  8554. if (!componentInstance._isMounted) {
  8555. callHook(componentInstance, 'onServiceCreated');
  8556. callHook(componentInstance, 'onServiceAttached');
  8557. componentInstance._isMounted = true;
  8558. callHook(componentInstance, 'mounted');
  8559. }
  8560. if (vnode.data.keepAlive) {
  8561. if (context._isMounted) {
  8562. // vue-router#1212
  8563. // During updates, a kept-alive component's child components may
  8564. // change, so directly walking the tree here may call activated hooks
  8565. // on incorrect children. Instead we push them into a queue which will
  8566. // be processed after the whole patch process ended.
  8567. queueActivatedComponent(componentInstance);
  8568. } else {
  8569. activateChildComponent(componentInstance, true /* direct */);
  8570. }
  8571. }
  8572. },
  8573. destroy: function destroy (vnode) {
  8574. var componentInstance = vnode.componentInstance;
  8575. if (!componentInstance._isDestroyed) {
  8576. if (!vnode.data.keepAlive) {
  8577. componentInstance.$destroy();
  8578. } else {
  8579. deactivateChildComponent(componentInstance, true /* direct */);
  8580. }
  8581. }
  8582. }
  8583. };
  8584. var hooksToMerge = Object.keys(componentVNodeHooks);
  8585. function createComponent (
  8586. Ctor,
  8587. data,
  8588. context,
  8589. children,
  8590. tag
  8591. ) {
  8592. if (isUndef(Ctor)) {
  8593. return
  8594. }
  8595. var baseCtor = context.$options._base;
  8596. // plain options object: turn it into a constructor
  8597. if (isObject(Ctor)) {
  8598. Ctor = baseCtor.extend(Ctor);
  8599. }
  8600. // if at this stage it's not a constructor or an async component factory,
  8601. // reject.
  8602. if (typeof Ctor !== 'function') {
  8603. if (true) {
  8604. warn(("Invalid Component definition: " + (String(Ctor))), context);
  8605. }
  8606. return
  8607. }
  8608. // async component
  8609. var asyncFactory;
  8610. if (isUndef(Ctor.cid)) {
  8611. asyncFactory = Ctor;
  8612. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  8613. if (Ctor === undefined) {
  8614. // return a placeholder node for async component, which is rendered
  8615. // as a comment node but preserves all the raw information for the node.
  8616. // the information will be used for async server-rendering and hydration.
  8617. return createAsyncPlaceholder(
  8618. asyncFactory,
  8619. data,
  8620. context,
  8621. children,
  8622. tag
  8623. )
  8624. }
  8625. }
  8626. data = data || {};
  8627. // resolve constructor options in case global mixins are applied after
  8628. // component constructor creation
  8629. resolveConstructorOptions(Ctor);
  8630. // transform component v-model data into props & events
  8631. if (isDef(data.model)) {
  8632. transformModel(Ctor.options, data);
  8633. }
  8634. // extract props
  8635. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  8636. // functional component
  8637. if (isTrue(Ctor.options.functional)) {
  8638. return createFunctionalComponent(Ctor, propsData, data, context, children)
  8639. }
  8640. // extract listeners, since these needs to be treated as
  8641. // child component listeners instead of DOM listeners
  8642. var listeners = data.on;
  8643. // replace with listeners with .native modifier
  8644. // so it gets processed during parent component patch.
  8645. data.on = data.nativeOn;
  8646. if (isTrue(Ctor.options.abstract)) {
  8647. // abstract components do not keep anything
  8648. // other than props & listeners & slot
  8649. // work around flow
  8650. var slot = data.slot;
  8651. data = {};
  8652. if (slot) {
  8653. data.slot = slot;
  8654. }
  8655. }
  8656. // install component management hooks onto the placeholder node
  8657. installComponentHooks(data);
  8658. // return a placeholder vnode
  8659. var name = Ctor.options.name || tag;
  8660. var vnode = new VNode(
  8661. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  8662. data, undefined, undefined, undefined, context,
  8663. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  8664. asyncFactory
  8665. );
  8666. return vnode
  8667. }
  8668. function createComponentInstanceForVnode (
  8669. vnode, // we know it's MountedComponentVNode but flow doesn't
  8670. parent // activeInstance in lifecycle state
  8671. ) {
  8672. var options = {
  8673. _isComponent: true,
  8674. _parentVnode: vnode,
  8675. parent: parent
  8676. };
  8677. // check inline-template render functions
  8678. var inlineTemplate = vnode.data.inlineTemplate;
  8679. if (isDef(inlineTemplate)) {
  8680. options.render = inlineTemplate.render;
  8681. options.staticRenderFns = inlineTemplate.staticRenderFns;
  8682. }
  8683. return new vnode.componentOptions.Ctor(options)
  8684. }
  8685. function installComponentHooks (data) {
  8686. var hooks = data.hook || (data.hook = {});
  8687. for (var i = 0; i < hooksToMerge.length; i++) {
  8688. var key = hooksToMerge[i];
  8689. var existing = hooks[key];
  8690. var toMerge = componentVNodeHooks[key];
  8691. if (existing !== toMerge && !(existing && existing._merged)) {
  8692. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  8693. }
  8694. }
  8695. }
  8696. function mergeHook$1 (f1, f2) {
  8697. var merged = function (a, b) {
  8698. // flow complains about extra args which is why we use any
  8699. f1(a, b);
  8700. f2(a, b);
  8701. };
  8702. merged._merged = true;
  8703. return merged
  8704. }
  8705. // transform component v-model info (value and callback) into
  8706. // prop and event handler respectively.
  8707. function transformModel (options, data) {
  8708. var prop = (options.model && options.model.prop) || 'value';
  8709. var event = (options.model && options.model.event) || 'input'
  8710. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  8711. var on = data.on || (data.on = {});
  8712. var existing = on[event];
  8713. var callback = data.model.callback;
  8714. if (isDef(existing)) {
  8715. if (
  8716. Array.isArray(existing)
  8717. ? existing.indexOf(callback) === -1
  8718. : existing !== callback
  8719. ) {
  8720. on[event] = [callback].concat(existing);
  8721. }
  8722. } else {
  8723. on[event] = callback;
  8724. }
  8725. }
  8726. /* */
  8727. var SIMPLE_NORMALIZE = 1;
  8728. var ALWAYS_NORMALIZE = 2;
  8729. // wrapper function for providing a more flexible interface
  8730. // without getting yelled at by flow
  8731. function createElement (
  8732. context,
  8733. tag,
  8734. data,
  8735. children,
  8736. normalizationType,
  8737. alwaysNormalize
  8738. ) {
  8739. if (Array.isArray(data) || isPrimitive(data)) {
  8740. normalizationType = children;
  8741. children = data;
  8742. data = undefined;
  8743. }
  8744. if (isTrue(alwaysNormalize)) {
  8745. normalizationType = ALWAYS_NORMALIZE;
  8746. }
  8747. return _createElement(context, tag, data, children, normalizationType)
  8748. }
  8749. function _createElement (
  8750. context,
  8751. tag,
  8752. data,
  8753. children,
  8754. normalizationType
  8755. ) {
  8756. if (isDef(data) && isDef((data).__ob__)) {
  8757. true && warn(
  8758. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  8759. 'Always create fresh vnode data objects in each render!',
  8760. context
  8761. );
  8762. return createEmptyVNode()
  8763. }
  8764. // object syntax in v-bind
  8765. if (isDef(data) && isDef(data.is)) {
  8766. tag = data.is;
  8767. }
  8768. if (!tag) {
  8769. // in case of component :is set to falsy value
  8770. return createEmptyVNode()
  8771. }
  8772. // warn against non-primitive key
  8773. if ( true &&
  8774. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  8775. ) {
  8776. {
  8777. warn(
  8778. 'Avoid using non-primitive value as key, ' +
  8779. 'use string/number value instead.',
  8780. context
  8781. );
  8782. }
  8783. }
  8784. // support single function children as default scoped slot
  8785. if (Array.isArray(children) &&
  8786. typeof children[0] === 'function'
  8787. ) {
  8788. data = data || {};
  8789. data.scopedSlots = { default: children[0] };
  8790. children.length = 0;
  8791. }
  8792. if (normalizationType === ALWAYS_NORMALIZE) {
  8793. children = normalizeChildren(children);
  8794. } else if (normalizationType === SIMPLE_NORMALIZE) {
  8795. children = simpleNormalizeChildren(children);
  8796. }
  8797. var vnode, ns;
  8798. if (typeof tag === 'string') {
  8799. var Ctor;
  8800. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  8801. if (config.isReservedTag(tag)) {
  8802. // platform built-in elements
  8803. if ( true && isDef(data) && isDef(data.nativeOn)) {
  8804. warn(
  8805. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  8806. context
  8807. );
  8808. }
  8809. vnode = new VNode(
  8810. config.parsePlatformTagName(tag), data, children,
  8811. undefined, undefined, context
  8812. );
  8813. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  8814. // component
  8815. vnode = createComponent(Ctor, data, context, children, tag);
  8816. } else {
  8817. // unknown or unlisted namespaced elements
  8818. // check at runtime because it may get assigned a namespace when its
  8819. // parent normalizes children
  8820. vnode = new VNode(
  8821. tag, data, children,
  8822. undefined, undefined, context
  8823. );
  8824. }
  8825. } else {
  8826. // direct component options / constructor
  8827. vnode = createComponent(tag, data, context, children);
  8828. }
  8829. if (Array.isArray(vnode)) {
  8830. return vnode
  8831. } else if (isDef(vnode)) {
  8832. if (isDef(ns)) { applyNS(vnode, ns); }
  8833. if (isDef(data)) { registerDeepBindings(data); }
  8834. return vnode
  8835. } else {
  8836. return createEmptyVNode()
  8837. }
  8838. }
  8839. function applyNS (vnode, ns, force) {
  8840. vnode.ns = ns;
  8841. if (vnode.tag === 'foreignObject') {
  8842. // use default namespace inside foreignObject
  8843. ns = undefined;
  8844. force = true;
  8845. }
  8846. if (isDef(vnode.children)) {
  8847. for (var i = 0, l = vnode.children.length; i < l; i++) {
  8848. var child = vnode.children[i];
  8849. if (isDef(child.tag) && (
  8850. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  8851. applyNS(child, ns, force);
  8852. }
  8853. }
  8854. }
  8855. }
  8856. // ref #5318
  8857. // necessary to ensure parent re-render when deep bindings like :style and
  8858. // :class are used on slot nodes
  8859. function registerDeepBindings (data) {
  8860. if (isObject(data.style)) {
  8861. traverse(data.style);
  8862. }
  8863. if (isObject(data.class)) {
  8864. traverse(data.class);
  8865. }
  8866. }
  8867. /* */
  8868. function initRender (vm) {
  8869. vm._vnode = null; // the root of the child tree
  8870. vm._staticTrees = null; // v-once cached trees
  8871. var options = vm.$options;
  8872. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  8873. var renderContext = parentVnode && parentVnode.context;
  8874. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  8875. vm.$scopedSlots = emptyObject;
  8876. // bind the createElement fn to this instance
  8877. // so that we get proper render context inside it.
  8878. // args order: tag, data, children, normalizationType, alwaysNormalize
  8879. // internal version is used by render functions compiled from templates
  8880. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  8881. // normalization is always applied for the public version, used in
  8882. // user-written render functions.
  8883. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  8884. // $attrs & $listeners are exposed for easier HOC creation.
  8885. // they need to be reactive so that HOCs using them are always updated
  8886. var parentData = parentVnode && parentVnode.data;
  8887. /* istanbul ignore else */
  8888. if (true) {
  8889. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  8890. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  8891. }, true);
  8892. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  8893. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  8894. }, true);
  8895. } else {}
  8896. }
  8897. var currentRenderingInstance = null;
  8898. function renderMixin (Vue) {
  8899. // install runtime convenience helpers
  8900. installRenderHelpers(Vue.prototype);
  8901. Vue.prototype.$nextTick = function (fn) {
  8902. return nextTick(fn, this)
  8903. };
  8904. Vue.prototype._render = function () {
  8905. var vm = this;
  8906. var ref = vm.$options;
  8907. var render = ref.render;
  8908. var _parentVnode = ref._parentVnode;
  8909. if (_parentVnode) {
  8910. vm.$scopedSlots = normalizeScopedSlots(
  8911. _parentVnode.data.scopedSlots,
  8912. vm.$slots,
  8913. vm.$scopedSlots
  8914. );
  8915. }
  8916. // set parent vnode. this allows render functions to have access
  8917. // to the data on the placeholder node.
  8918. vm.$vnode = _parentVnode;
  8919. // render self
  8920. var vnode;
  8921. try {
  8922. // There's no need to maintain a stack because all render fns are called
  8923. // separately from one another. Nested component's render fns are called
  8924. // when parent component is patched.
  8925. currentRenderingInstance = vm;
  8926. vnode = render.call(vm._renderProxy, vm.$createElement);
  8927. } catch (e) {
  8928. handleError(e, vm, "render");
  8929. // return error render result,
  8930. // or previous vnode to prevent render error causing blank component
  8931. /* istanbul ignore else */
  8932. if ( true && vm.$options.renderError) {
  8933. try {
  8934. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  8935. } catch (e) {
  8936. handleError(e, vm, "renderError");
  8937. vnode = vm._vnode;
  8938. }
  8939. } else {
  8940. vnode = vm._vnode;
  8941. }
  8942. } finally {
  8943. currentRenderingInstance = null;
  8944. }
  8945. // if the returned array contains only a single node, allow it
  8946. if (Array.isArray(vnode) && vnode.length === 1) {
  8947. vnode = vnode[0];
  8948. }
  8949. // return empty vnode in case the render function errored out
  8950. if (!(vnode instanceof VNode)) {
  8951. if ( true && Array.isArray(vnode)) {
  8952. warn(
  8953. 'Multiple root nodes returned from render function. Render function ' +
  8954. 'should return a single root node.',
  8955. vm
  8956. );
  8957. }
  8958. vnode = createEmptyVNode();
  8959. }
  8960. // set parent
  8961. vnode.parent = _parentVnode;
  8962. return vnode
  8963. };
  8964. }
  8965. /* */
  8966. function ensureCtor (comp, base) {
  8967. if (
  8968. comp.__esModule ||
  8969. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8970. ) {
  8971. comp = comp.default;
  8972. }
  8973. return isObject(comp)
  8974. ? base.extend(comp)
  8975. : comp
  8976. }
  8977. function createAsyncPlaceholder (
  8978. factory,
  8979. data,
  8980. context,
  8981. children,
  8982. tag
  8983. ) {
  8984. var node = createEmptyVNode();
  8985. node.asyncFactory = factory;
  8986. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8987. return node
  8988. }
  8989. function resolveAsyncComponent (
  8990. factory,
  8991. baseCtor
  8992. ) {
  8993. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8994. return factory.errorComp
  8995. }
  8996. if (isDef(factory.resolved)) {
  8997. return factory.resolved
  8998. }
  8999. var owner = currentRenderingInstance;
  9000. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  9001. // already pending
  9002. factory.owners.push(owner);
  9003. }
  9004. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  9005. return factory.loadingComp
  9006. }
  9007. if (owner && !isDef(factory.owners)) {
  9008. var owners = factory.owners = [owner];
  9009. var sync = true;
  9010. var timerLoading = null;
  9011. var timerTimeout = null
  9012. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  9013. var forceRender = function (renderCompleted) {
  9014. for (var i = 0, l = owners.length; i < l; i++) {
  9015. (owners[i]).$forceUpdate();
  9016. }
  9017. if (renderCompleted) {
  9018. owners.length = 0;
  9019. if (timerLoading !== null) {
  9020. clearTimeout(timerLoading);
  9021. timerLoading = null;
  9022. }
  9023. if (timerTimeout !== null) {
  9024. clearTimeout(timerTimeout);
  9025. timerTimeout = null;
  9026. }
  9027. }
  9028. };
  9029. var resolve = once(function (res) {
  9030. // cache resolved
  9031. factory.resolved = ensureCtor(res, baseCtor);
  9032. // invoke callbacks only if this is not a synchronous resolve
  9033. // (async resolves are shimmed as synchronous during SSR)
  9034. if (!sync) {
  9035. forceRender(true);
  9036. } else {
  9037. owners.length = 0;
  9038. }
  9039. });
  9040. var reject = once(function (reason) {
  9041. true && warn(
  9042. "Failed to resolve async component: " + (String(factory)) +
  9043. (reason ? ("\nReason: " + reason) : '')
  9044. );
  9045. if (isDef(factory.errorComp)) {
  9046. factory.error = true;
  9047. forceRender(true);
  9048. }
  9049. });
  9050. var res = factory(resolve, reject);
  9051. if (isObject(res)) {
  9052. if (isPromise(res)) {
  9053. // () => Promise
  9054. if (isUndef(factory.resolved)) {
  9055. res.then(resolve, reject);
  9056. }
  9057. } else if (isPromise(res.component)) {
  9058. res.component.then(resolve, reject);
  9059. if (isDef(res.error)) {
  9060. factory.errorComp = ensureCtor(res.error, baseCtor);
  9061. }
  9062. if (isDef(res.loading)) {
  9063. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  9064. if (res.delay === 0) {
  9065. factory.loading = true;
  9066. } else {
  9067. timerLoading = setTimeout(function () {
  9068. timerLoading = null;
  9069. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  9070. factory.loading = true;
  9071. forceRender(false);
  9072. }
  9073. }, res.delay || 200);
  9074. }
  9075. }
  9076. if (isDef(res.timeout)) {
  9077. timerTimeout = setTimeout(function () {
  9078. timerTimeout = null;
  9079. if (isUndef(factory.resolved)) {
  9080. reject(
  9081. true
  9082. ? ("timeout (" + (res.timeout) + "ms)")
  9083. : undefined
  9084. );
  9085. }
  9086. }, res.timeout);
  9087. }
  9088. }
  9089. }
  9090. sync = false;
  9091. // return in case resolved synchronously
  9092. return factory.loading
  9093. ? factory.loadingComp
  9094. : factory.resolved
  9095. }
  9096. }
  9097. /* */
  9098. function isAsyncPlaceholder (node) {
  9099. return node.isComment && node.asyncFactory
  9100. }
  9101. /* */
  9102. function getFirstComponentChild (children) {
  9103. if (Array.isArray(children)) {
  9104. for (var i = 0; i < children.length; i++) {
  9105. var c = children[i];
  9106. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  9107. return c
  9108. }
  9109. }
  9110. }
  9111. }
  9112. /* */
  9113. /* */
  9114. function initEvents (vm) {
  9115. vm._events = Object.create(null);
  9116. vm._hasHookEvent = false;
  9117. // init parent attached events
  9118. var listeners = vm.$options._parentListeners;
  9119. if (listeners) {
  9120. updateComponentListeners(vm, listeners);
  9121. }
  9122. }
  9123. var target;
  9124. function add (event, fn) {
  9125. target.$on(event, fn);
  9126. }
  9127. function remove$1 (event, fn) {
  9128. target.$off(event, fn);
  9129. }
  9130. function createOnceHandler (event, fn) {
  9131. var _target = target;
  9132. return function onceHandler () {
  9133. var res = fn.apply(null, arguments);
  9134. if (res !== null) {
  9135. _target.$off(event, onceHandler);
  9136. }
  9137. }
  9138. }
  9139. function updateComponentListeners (
  9140. vm,
  9141. listeners,
  9142. oldListeners
  9143. ) {
  9144. target = vm;
  9145. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  9146. target = undefined;
  9147. }
  9148. function eventsMixin (Vue) {
  9149. var hookRE = /^hook:/;
  9150. Vue.prototype.$on = function (event, fn) {
  9151. var vm = this;
  9152. if (Array.isArray(event)) {
  9153. for (var i = 0, l = event.length; i < l; i++) {
  9154. vm.$on(event[i], fn);
  9155. }
  9156. } else {
  9157. (vm._events[event] || (vm._events[event] = [])).push(fn);
  9158. // optimize hook:event cost by using a boolean flag marked at registration
  9159. // instead of a hash lookup
  9160. if (hookRE.test(event)) {
  9161. vm._hasHookEvent = true;
  9162. }
  9163. }
  9164. return vm
  9165. };
  9166. Vue.prototype.$once = function (event, fn) {
  9167. var vm = this;
  9168. function on () {
  9169. vm.$off(event, on);
  9170. fn.apply(vm, arguments);
  9171. }
  9172. on.fn = fn;
  9173. vm.$on(event, on);
  9174. return vm
  9175. };
  9176. Vue.prototype.$off = function (event, fn) {
  9177. var vm = this;
  9178. // all
  9179. if (!arguments.length) {
  9180. vm._events = Object.create(null);
  9181. return vm
  9182. }
  9183. // array of events
  9184. if (Array.isArray(event)) {
  9185. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  9186. vm.$off(event[i$1], fn);
  9187. }
  9188. return vm
  9189. }
  9190. // specific event
  9191. var cbs = vm._events[event];
  9192. if (!cbs) {
  9193. return vm
  9194. }
  9195. if (!fn) {
  9196. vm._events[event] = null;
  9197. return vm
  9198. }
  9199. // specific handler
  9200. var cb;
  9201. var i = cbs.length;
  9202. while (i--) {
  9203. cb = cbs[i];
  9204. if (cb === fn || cb.fn === fn) {
  9205. cbs.splice(i, 1);
  9206. break
  9207. }
  9208. }
  9209. return vm
  9210. };
  9211. Vue.prototype.$emit = function (event) {
  9212. var vm = this;
  9213. if (true) {
  9214. var lowerCaseEvent = event.toLowerCase();
  9215. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  9216. tip(
  9217. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  9218. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  9219. "Note that HTML attributes are case-insensitive and you cannot use " +
  9220. "v-on to listen to camelCase events when using in-DOM templates. " +
  9221. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  9222. );
  9223. }
  9224. }
  9225. var cbs = vm._events[event];
  9226. if (cbs) {
  9227. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  9228. var args = toArray(arguments, 1);
  9229. var info = "event handler for \"" + event + "\"";
  9230. for (var i = 0, l = cbs.length; i < l; i++) {
  9231. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  9232. }
  9233. }
  9234. return vm
  9235. };
  9236. }
  9237. /* */
  9238. var activeInstance = null;
  9239. var isUpdatingChildComponent = false;
  9240. function setActiveInstance(vm) {
  9241. var prevActiveInstance = activeInstance;
  9242. activeInstance = vm;
  9243. return function () {
  9244. activeInstance = prevActiveInstance;
  9245. }
  9246. }
  9247. function initLifecycle (vm) {
  9248. var options = vm.$options;
  9249. // locate first non-abstract parent
  9250. var parent = options.parent;
  9251. if (parent && !options.abstract) {
  9252. while (parent.$options.abstract && parent.$parent) {
  9253. parent = parent.$parent;
  9254. }
  9255. parent.$children.push(vm);
  9256. }
  9257. vm.$parent = parent;
  9258. vm.$root = parent ? parent.$root : vm;
  9259. vm.$children = [];
  9260. vm.$refs = {};
  9261. vm._watcher = null;
  9262. vm._inactive = null;
  9263. vm._directInactive = false;
  9264. vm._isMounted = false;
  9265. vm._isDestroyed = false;
  9266. vm._isBeingDestroyed = false;
  9267. }
  9268. function lifecycleMixin (Vue) {
  9269. Vue.prototype._update = function (vnode, hydrating) {
  9270. var vm = this;
  9271. var prevEl = vm.$el;
  9272. var prevVnode = vm._vnode;
  9273. var restoreActiveInstance = setActiveInstance(vm);
  9274. vm._vnode = vnode;
  9275. // Vue.prototype.__patch__ is injected in entry points
  9276. // based on the rendering backend used.
  9277. if (!prevVnode) {
  9278. // initial render
  9279. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  9280. } else {
  9281. // updates
  9282. vm.$el = vm.__patch__(prevVnode, vnode);
  9283. }
  9284. restoreActiveInstance();
  9285. // update __vue__ reference
  9286. if (prevEl) {
  9287. prevEl.__vue__ = null;
  9288. }
  9289. if (vm.$el) {
  9290. vm.$el.__vue__ = vm;
  9291. }
  9292. // if parent is an HOC, update its $el as well
  9293. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  9294. vm.$parent.$el = vm.$el;
  9295. }
  9296. // updated hook is called by the scheduler to ensure that children are
  9297. // updated in a parent's updated hook.
  9298. };
  9299. Vue.prototype.$forceUpdate = function () {
  9300. var vm = this;
  9301. if (vm._watcher) {
  9302. vm._watcher.update();
  9303. }
  9304. };
  9305. Vue.prototype.$destroy = function () {
  9306. var vm = this;
  9307. if (vm._isBeingDestroyed) {
  9308. return
  9309. }
  9310. callHook(vm, 'beforeDestroy');
  9311. vm._isBeingDestroyed = true;
  9312. // remove self from parent
  9313. var parent = vm.$parent;
  9314. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  9315. remove(parent.$children, vm);
  9316. }
  9317. // teardown watchers
  9318. if (vm._watcher) {
  9319. vm._watcher.teardown();
  9320. }
  9321. var i = vm._watchers.length;
  9322. while (i--) {
  9323. vm._watchers[i].teardown();
  9324. }
  9325. // remove reference from data ob
  9326. // frozen object may not have observer.
  9327. if (vm._data.__ob__) {
  9328. vm._data.__ob__.vmCount--;
  9329. }
  9330. // call the last hook...
  9331. vm._isDestroyed = true;
  9332. // invoke destroy hooks on current rendered tree
  9333. vm.__patch__(vm._vnode, null);
  9334. // fire destroyed hook
  9335. callHook(vm, 'destroyed');
  9336. // turn off all instance listeners.
  9337. vm.$off();
  9338. // remove __vue__ reference
  9339. if (vm.$el) {
  9340. vm.$el.__vue__ = null;
  9341. }
  9342. // release circular reference (#6759)
  9343. if (vm.$vnode) {
  9344. vm.$vnode.parent = null;
  9345. }
  9346. };
  9347. }
  9348. function updateChildComponent (
  9349. vm,
  9350. propsData,
  9351. listeners,
  9352. parentVnode,
  9353. renderChildren
  9354. ) {
  9355. if (true) {
  9356. isUpdatingChildComponent = true;
  9357. }
  9358. // determine whether component has slot children
  9359. // we need to do this before overwriting $options._renderChildren.
  9360. // check if there are dynamic scopedSlots (hand-written or compiled but with
  9361. // dynamic slot names). Static scoped slots compiled from template has the
  9362. // "$stable" marker.
  9363. var newScopedSlots = parentVnode.data.scopedSlots;
  9364. var oldScopedSlots = vm.$scopedSlots;
  9365. var hasDynamicScopedSlot = !!(
  9366. (newScopedSlots && !newScopedSlots.$stable) ||
  9367. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  9368. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  9369. );
  9370. // Any static slot children from the parent may have changed during parent's
  9371. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  9372. // update is necessary to ensure correctness.
  9373. var needsForceUpdate = !!(
  9374. renderChildren || // has new static slots
  9375. vm.$options._renderChildren || // has old static slots
  9376. hasDynamicScopedSlot
  9377. );
  9378. vm.$options._parentVnode = parentVnode;
  9379. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  9380. if (vm._vnode) { // update child tree's parent
  9381. vm._vnode.parent = parentVnode;
  9382. }
  9383. vm.$options._renderChildren = renderChildren;
  9384. // update $attrs and $listeners hash
  9385. // these are also reactive so they may trigger child update if the child
  9386. // used them during render
  9387. vm.$attrs = parentVnode.data.attrs || emptyObject;
  9388. vm.$listeners = listeners || emptyObject;
  9389. // update props
  9390. if (propsData && vm.$options.props) {
  9391. toggleObserving(false);
  9392. var props = vm._props;
  9393. var propKeys = vm.$options._propKeys || [];
  9394. for (var i = 0; i < propKeys.length; i++) {
  9395. var key = propKeys[i];
  9396. var propOptions = vm.$options.props; // wtf flow?
  9397. props[key] = validateProp(key, propOptions, propsData, vm);
  9398. }
  9399. toggleObserving(true);
  9400. // keep a copy of raw propsData
  9401. vm.$options.propsData = propsData;
  9402. }
  9403. // fixed by xxxxxx update properties(mp runtime)
  9404. vm._$updateProperties && vm._$updateProperties(vm);
  9405. // update listeners
  9406. listeners = listeners || emptyObject;
  9407. var oldListeners = vm.$options._parentListeners;
  9408. vm.$options._parentListeners = listeners;
  9409. updateComponentListeners(vm, listeners, oldListeners);
  9410. // resolve slots + force update if has children
  9411. if (needsForceUpdate) {
  9412. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  9413. vm.$forceUpdate();
  9414. }
  9415. if (true) {
  9416. isUpdatingChildComponent = false;
  9417. }
  9418. }
  9419. function isInInactiveTree (vm) {
  9420. while (vm && (vm = vm.$parent)) {
  9421. if (vm._inactive) { return true }
  9422. }
  9423. return false
  9424. }
  9425. function activateChildComponent (vm, direct) {
  9426. if (direct) {
  9427. vm._directInactive = false;
  9428. if (isInInactiveTree(vm)) {
  9429. return
  9430. }
  9431. } else if (vm._directInactive) {
  9432. return
  9433. }
  9434. if (vm._inactive || vm._inactive === null) {
  9435. vm._inactive = false;
  9436. for (var i = 0; i < vm.$children.length; i++) {
  9437. activateChildComponent(vm.$children[i]);
  9438. }
  9439. callHook(vm, 'activated');
  9440. }
  9441. }
  9442. function deactivateChildComponent (vm, direct) {
  9443. if (direct) {
  9444. vm._directInactive = true;
  9445. if (isInInactiveTree(vm)) {
  9446. return
  9447. }
  9448. }
  9449. if (!vm._inactive) {
  9450. vm._inactive = true;
  9451. for (var i = 0; i < vm.$children.length; i++) {
  9452. deactivateChildComponent(vm.$children[i]);
  9453. }
  9454. callHook(vm, 'deactivated');
  9455. }
  9456. }
  9457. function callHook (vm, hook) {
  9458. // #7573 disable dep collection when invoking lifecycle hooks
  9459. pushTarget();
  9460. var handlers = vm.$options[hook];
  9461. var info = hook + " hook";
  9462. if (handlers) {
  9463. for (var i = 0, j = handlers.length; i < j; i++) {
  9464. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  9465. }
  9466. }
  9467. if (vm._hasHookEvent) {
  9468. vm.$emit('hook:' + hook);
  9469. }
  9470. popTarget();
  9471. }
  9472. /* */
  9473. var MAX_UPDATE_COUNT = 100;
  9474. var queue = [];
  9475. var activatedChildren = [];
  9476. var has = {};
  9477. var circular = {};
  9478. var waiting = false;
  9479. var flushing = false;
  9480. var index = 0;
  9481. /**
  9482. * Reset the scheduler's state.
  9483. */
  9484. function resetSchedulerState () {
  9485. index = queue.length = activatedChildren.length = 0;
  9486. has = {};
  9487. if (true) {
  9488. circular = {};
  9489. }
  9490. waiting = flushing = false;
  9491. }
  9492. // Async edge case #6566 requires saving the timestamp when event listeners are
  9493. // attached. However, calling performance.now() has a perf overhead especially
  9494. // if the page has thousands of event listeners. Instead, we take a timestamp
  9495. // every time the scheduler flushes and use that for all event listeners
  9496. // attached during that flush.
  9497. var currentFlushTimestamp = 0;
  9498. // Async edge case fix requires storing an event listener's attach timestamp.
  9499. var getNow = Date.now;
  9500. // Determine what event timestamp the browser is using. Annoyingly, the
  9501. // timestamp can either be hi-res (relative to page load) or low-res
  9502. // (relative to UNIX epoch), so in order to compare time we have to use the
  9503. // same timestamp type when saving the flush timestamp.
  9504. // All IE versions use low-res event timestamps, and have problematic clock
  9505. // implementations (#9632)
  9506. if (inBrowser && !isIE) {
  9507. var performance = window.performance;
  9508. if (
  9509. performance &&
  9510. typeof performance.now === 'function' &&
  9511. getNow() > document.createEvent('Event').timeStamp
  9512. ) {
  9513. // if the event timestamp, although evaluated AFTER the Date.now(), is
  9514. // smaller than it, it means the event is using a hi-res timestamp,
  9515. // and we need to use the hi-res version for event listener timestamps as
  9516. // well.
  9517. getNow = function () { return performance.now(); };
  9518. }
  9519. }
  9520. /**
  9521. * Flush both queues and run the watchers.
  9522. */
  9523. function flushSchedulerQueue () {
  9524. currentFlushTimestamp = getNow();
  9525. flushing = true;
  9526. var watcher, id;
  9527. // Sort queue before flush.
  9528. // This ensures that:
  9529. // 1. Components are updated from parent to child. (because parent is always
  9530. // created before the child)
  9531. // 2. A component's user watchers are run before its render watcher (because
  9532. // user watchers are created before the render watcher)
  9533. // 3. If a component is destroyed during a parent component's watcher run,
  9534. // its watchers can be skipped.
  9535. queue.sort(function (a, b) { return a.id - b.id; });
  9536. // do not cache length because more watchers might be pushed
  9537. // as we run existing watchers
  9538. for (index = 0; index < queue.length; index++) {
  9539. watcher = queue[index];
  9540. if (watcher.before) {
  9541. watcher.before();
  9542. }
  9543. id = watcher.id;
  9544. has[id] = null;
  9545. watcher.run();
  9546. // in dev build, check and stop circular updates.
  9547. if ( true && has[id] != null) {
  9548. circular[id] = (circular[id] || 0) + 1;
  9549. if (circular[id] > MAX_UPDATE_COUNT) {
  9550. warn(
  9551. 'You may have an infinite update loop ' + (
  9552. watcher.user
  9553. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  9554. : "in a component render function."
  9555. ),
  9556. watcher.vm
  9557. );
  9558. break
  9559. }
  9560. }
  9561. }
  9562. // keep copies of post queues before resetting state
  9563. var activatedQueue = activatedChildren.slice();
  9564. var updatedQueue = queue.slice();
  9565. resetSchedulerState();
  9566. // call component updated and activated hooks
  9567. callActivatedHooks(activatedQueue);
  9568. callUpdatedHooks(updatedQueue);
  9569. // devtool hook
  9570. /* istanbul ignore if */
  9571. if (devtools && config.devtools) {
  9572. devtools.emit('flush');
  9573. }
  9574. }
  9575. function callUpdatedHooks (queue) {
  9576. var i = queue.length;
  9577. while (i--) {
  9578. var watcher = queue[i];
  9579. var vm = watcher.vm;
  9580. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  9581. callHook(vm, 'updated');
  9582. }
  9583. }
  9584. }
  9585. /**
  9586. * Queue a kept-alive component that was activated during patch.
  9587. * The queue will be processed after the entire tree has been patched.
  9588. */
  9589. function queueActivatedComponent (vm) {
  9590. // setting _inactive to false here so that a render function can
  9591. // rely on checking whether it's in an inactive tree (e.g. router-view)
  9592. vm._inactive = false;
  9593. activatedChildren.push(vm);
  9594. }
  9595. function callActivatedHooks (queue) {
  9596. for (var i = 0; i < queue.length; i++) {
  9597. queue[i]._inactive = true;
  9598. activateChildComponent(queue[i], true /* true */);
  9599. }
  9600. }
  9601. /**
  9602. * Push a watcher into the watcher queue.
  9603. * Jobs with duplicate IDs will be skipped unless it's
  9604. * pushed when the queue is being flushed.
  9605. */
  9606. function queueWatcher (watcher) {
  9607. var id = watcher.id;
  9608. if (has[id] == null) {
  9609. has[id] = true;
  9610. if (!flushing) {
  9611. queue.push(watcher);
  9612. } else {
  9613. // if already flushing, splice the watcher based on its id
  9614. // if already past its id, it will be run next immediately.
  9615. var i = queue.length - 1;
  9616. while (i > index && queue[i].id > watcher.id) {
  9617. i--;
  9618. }
  9619. queue.splice(i + 1, 0, watcher);
  9620. }
  9621. // queue the flush
  9622. if (!waiting) {
  9623. waiting = true;
  9624. if ( true && !config.async) {
  9625. flushSchedulerQueue();
  9626. return
  9627. }
  9628. nextTick(flushSchedulerQueue);
  9629. }
  9630. }
  9631. }
  9632. /* */
  9633. var uid$2 = 0;
  9634. /**
  9635. * A watcher parses an expression, collects dependencies,
  9636. * and fires callback when the expression value changes.
  9637. * This is used for both the $watch() api and directives.
  9638. */
  9639. var Watcher = function Watcher (
  9640. vm,
  9641. expOrFn,
  9642. cb,
  9643. options,
  9644. isRenderWatcher
  9645. ) {
  9646. this.vm = vm;
  9647. if (isRenderWatcher) {
  9648. vm._watcher = this;
  9649. }
  9650. vm._watchers.push(this);
  9651. // options
  9652. if (options) {
  9653. this.deep = !!options.deep;
  9654. this.user = !!options.user;
  9655. this.lazy = !!options.lazy;
  9656. this.sync = !!options.sync;
  9657. this.before = options.before;
  9658. } else {
  9659. this.deep = this.user = this.lazy = this.sync = false;
  9660. }
  9661. this.cb = cb;
  9662. this.id = ++uid$2; // uid for batching
  9663. this.active = true;
  9664. this.dirty = this.lazy; // for lazy watchers
  9665. this.deps = [];
  9666. this.newDeps = [];
  9667. this.depIds = new _Set();
  9668. this.newDepIds = new _Set();
  9669. this.expression = true
  9670. ? expOrFn.toString()
  9671. : undefined;
  9672. // parse expression for getter
  9673. if (typeof expOrFn === 'function') {
  9674. this.getter = expOrFn;
  9675. } else {
  9676. this.getter = parsePath(expOrFn);
  9677. if (!this.getter) {
  9678. this.getter = noop;
  9679. true && warn(
  9680. "Failed watching path: \"" + expOrFn + "\" " +
  9681. 'Watcher only accepts simple dot-delimited paths. ' +
  9682. 'For full control, use a function instead.',
  9683. vm
  9684. );
  9685. }
  9686. }
  9687. this.value = this.lazy
  9688. ? undefined
  9689. : this.get();
  9690. };
  9691. /**
  9692. * Evaluate the getter, and re-collect dependencies.
  9693. */
  9694. Watcher.prototype.get = function get () {
  9695. pushTarget(this);
  9696. var value;
  9697. var vm = this.vm;
  9698. try {
  9699. value = this.getter.call(vm, vm);
  9700. } catch (e) {
  9701. if (this.user) {
  9702. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  9703. } else {
  9704. throw e
  9705. }
  9706. } finally {
  9707. // "touch" every property so they are all tracked as
  9708. // dependencies for deep watching
  9709. if (this.deep) {
  9710. traverse(value);
  9711. }
  9712. popTarget();
  9713. this.cleanupDeps();
  9714. }
  9715. return value
  9716. };
  9717. /**
  9718. * Add a dependency to this directive.
  9719. */
  9720. Watcher.prototype.addDep = function addDep (dep) {
  9721. var id = dep.id;
  9722. if (!this.newDepIds.has(id)) {
  9723. this.newDepIds.add(id);
  9724. this.newDeps.push(dep);
  9725. if (!this.depIds.has(id)) {
  9726. dep.addSub(this);
  9727. }
  9728. }
  9729. };
  9730. /**
  9731. * Clean up for dependency collection.
  9732. */
  9733. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  9734. var i = this.deps.length;
  9735. while (i--) {
  9736. var dep = this.deps[i];
  9737. if (!this.newDepIds.has(dep.id)) {
  9738. dep.removeSub(this);
  9739. }
  9740. }
  9741. var tmp = this.depIds;
  9742. this.depIds = this.newDepIds;
  9743. this.newDepIds = tmp;
  9744. this.newDepIds.clear();
  9745. tmp = this.deps;
  9746. this.deps = this.newDeps;
  9747. this.newDeps = tmp;
  9748. this.newDeps.length = 0;
  9749. };
  9750. /**
  9751. * Subscriber interface.
  9752. * Will be called when a dependency changes.
  9753. */
  9754. Watcher.prototype.update = function update () {
  9755. /* istanbul ignore else */
  9756. if (this.lazy) {
  9757. this.dirty = true;
  9758. } else if (this.sync) {
  9759. this.run();
  9760. } else {
  9761. queueWatcher(this);
  9762. }
  9763. };
  9764. /**
  9765. * Scheduler job interface.
  9766. * Will be called by the scheduler.
  9767. */
  9768. Watcher.prototype.run = function run () {
  9769. if (this.active) {
  9770. var value = this.get();
  9771. if (
  9772. value !== this.value ||
  9773. // Deep watchers and watchers on Object/Arrays should fire even
  9774. // when the value is the same, because the value may
  9775. // have mutated.
  9776. isObject(value) ||
  9777. this.deep
  9778. ) {
  9779. // set new value
  9780. var oldValue = this.value;
  9781. this.value = value;
  9782. if (this.user) {
  9783. try {
  9784. this.cb.call(this.vm, value, oldValue);
  9785. } catch (e) {
  9786. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  9787. }
  9788. } else {
  9789. this.cb.call(this.vm, value, oldValue);
  9790. }
  9791. }
  9792. }
  9793. };
  9794. /**
  9795. * Evaluate the value of the watcher.
  9796. * This only gets called for lazy watchers.
  9797. */
  9798. Watcher.prototype.evaluate = function evaluate () {
  9799. this.value = this.get();
  9800. this.dirty = false;
  9801. };
  9802. /**
  9803. * Depend on all deps collected by this watcher.
  9804. */
  9805. Watcher.prototype.depend = function depend () {
  9806. var i = this.deps.length;
  9807. while (i--) {
  9808. this.deps[i].depend();
  9809. }
  9810. };
  9811. /**
  9812. * Remove self from all dependencies' subscriber list.
  9813. */
  9814. Watcher.prototype.teardown = function teardown () {
  9815. if (this.active) {
  9816. // remove self from vm's watcher list
  9817. // this is a somewhat expensive operation so we skip it
  9818. // if the vm is being destroyed.
  9819. if (!this.vm._isBeingDestroyed) {
  9820. remove(this.vm._watchers, this);
  9821. }
  9822. var i = this.deps.length;
  9823. while (i--) {
  9824. this.deps[i].removeSub(this);
  9825. }
  9826. this.active = false;
  9827. }
  9828. };
  9829. /* */
  9830. var sharedPropertyDefinition = {
  9831. enumerable: true,
  9832. configurable: true,
  9833. get: noop,
  9834. set: noop
  9835. };
  9836. function proxy (target, sourceKey, key) {
  9837. sharedPropertyDefinition.get = function proxyGetter () {
  9838. return this[sourceKey][key]
  9839. };
  9840. sharedPropertyDefinition.set = function proxySetter (val) {
  9841. this[sourceKey][key] = val;
  9842. };
  9843. Object.defineProperty(target, key, sharedPropertyDefinition);
  9844. }
  9845. function initState (vm) {
  9846. vm._watchers = [];
  9847. var opts = vm.$options;
  9848. if (opts.props) { initProps(vm, opts.props); }
  9849. if (opts.methods) { initMethods(vm, opts.methods); }
  9850. if (opts.data) {
  9851. initData(vm);
  9852. } else {
  9853. observe(vm._data = {}, true /* asRootData */);
  9854. }
  9855. if (opts.computed) { initComputed(vm, opts.computed); }
  9856. if (opts.watch && opts.watch !== nativeWatch) {
  9857. initWatch(vm, opts.watch);
  9858. }
  9859. }
  9860. function initProps (vm, propsOptions) {
  9861. var propsData = vm.$options.propsData || {};
  9862. var props = vm._props = {};
  9863. // cache prop keys so that future props updates can iterate using Array
  9864. // instead of dynamic object key enumeration.
  9865. var keys = vm.$options._propKeys = [];
  9866. var isRoot = !vm.$parent;
  9867. // root instance props should be converted
  9868. if (!isRoot) {
  9869. toggleObserving(false);
  9870. }
  9871. var loop = function ( key ) {
  9872. keys.push(key);
  9873. var value = validateProp(key, propsOptions, propsData, vm);
  9874. /* istanbul ignore else */
  9875. if (true) {
  9876. var hyphenatedKey = hyphenate(key);
  9877. if (isReservedAttribute(hyphenatedKey) ||
  9878. config.isReservedAttr(hyphenatedKey)) {
  9879. warn(
  9880. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  9881. vm
  9882. );
  9883. }
  9884. defineReactive$$1(props, key, value, function () {
  9885. if (!isRoot && !isUpdatingChildComponent) {
  9886. {
  9887. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  9888. return
  9889. }
  9890. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  9891. if(
  9892. key === 'value' &&
  9893. Array.isArray(vm.$options.behaviors) &&
  9894. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9895. ){
  9896. return
  9897. }
  9898. if(vm._getFormData){
  9899. return
  9900. }
  9901. var $parent = vm.$parent;
  9902. while($parent){
  9903. if($parent.__next_tick_pending){
  9904. return
  9905. }
  9906. $parent = $parent.$parent;
  9907. }
  9908. }
  9909. warn(
  9910. "Avoid mutating a prop directly since the value will be " +
  9911. "overwritten whenever the parent component re-renders. " +
  9912. "Instead, use a data or computed property based on the prop's " +
  9913. "value. Prop being mutated: \"" + key + "\"",
  9914. vm
  9915. );
  9916. }
  9917. });
  9918. } else {}
  9919. // static props are already proxied on the component's prototype
  9920. // during Vue.extend(). We only need to proxy props defined at
  9921. // instantiation here.
  9922. if (!(key in vm)) {
  9923. proxy(vm, "_props", key);
  9924. }
  9925. };
  9926. for (var key in propsOptions) loop( key );
  9927. toggleObserving(true);
  9928. }
  9929. function initData (vm) {
  9930. var data = vm.$options.data;
  9931. data = vm._data = typeof data === 'function'
  9932. ? getData(data, vm)
  9933. : data || {};
  9934. if (!isPlainObject(data)) {
  9935. data = {};
  9936. true && warn(
  9937. 'data functions should return an object:\n' +
  9938. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  9939. vm
  9940. );
  9941. }
  9942. // proxy data on instance
  9943. var keys = Object.keys(data);
  9944. var props = vm.$options.props;
  9945. var methods = vm.$options.methods;
  9946. var i = keys.length;
  9947. while (i--) {
  9948. var key = keys[i];
  9949. if (true) {
  9950. if (methods && hasOwn(methods, key)) {
  9951. warn(
  9952. ("Method \"" + key + "\" has already been defined as a data property."),
  9953. vm
  9954. );
  9955. }
  9956. }
  9957. if (props && hasOwn(props, key)) {
  9958. true && warn(
  9959. "The data property \"" + key + "\" is already declared as a prop. " +
  9960. "Use prop default value instead.",
  9961. vm
  9962. );
  9963. } else if (!isReserved(key)) {
  9964. proxy(vm, "_data", key);
  9965. }
  9966. }
  9967. // observe data
  9968. observe(data, true /* asRootData */);
  9969. }
  9970. function getData (data, vm) {
  9971. // #7573 disable dep collection when invoking data getters
  9972. pushTarget();
  9973. try {
  9974. return data.call(vm, vm)
  9975. } catch (e) {
  9976. handleError(e, vm, "data()");
  9977. return {}
  9978. } finally {
  9979. popTarget();
  9980. }
  9981. }
  9982. var computedWatcherOptions = { lazy: true };
  9983. function initComputed (vm, computed) {
  9984. // $flow-disable-line
  9985. var watchers = vm._computedWatchers = Object.create(null);
  9986. // computed properties are just getters during SSR
  9987. var isSSR = isServerRendering();
  9988. for (var key in computed) {
  9989. var userDef = computed[key];
  9990. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9991. if ( true && getter == null) {
  9992. warn(
  9993. ("Getter is missing for computed property \"" + key + "\"."),
  9994. vm
  9995. );
  9996. }
  9997. if (!isSSR) {
  9998. // create internal watcher for the computed property.
  9999. watchers[key] = new Watcher(
  10000. vm,
  10001. getter || noop,
  10002. noop,
  10003. computedWatcherOptions
  10004. );
  10005. }
  10006. // component-defined computed properties are already defined on the
  10007. // component prototype. We only need to define computed properties defined
  10008. // at instantiation here.
  10009. if (!(key in vm)) {
  10010. defineComputed(vm, key, userDef);
  10011. } else if (true) {
  10012. if (key in vm.$data) {
  10013. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  10014. } else if (vm.$options.props && key in vm.$options.props) {
  10015. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  10016. }
  10017. }
  10018. }
  10019. }
  10020. function defineComputed (
  10021. target,
  10022. key,
  10023. userDef
  10024. ) {
  10025. var shouldCache = !isServerRendering();
  10026. if (typeof userDef === 'function') {
  10027. sharedPropertyDefinition.get = shouldCache
  10028. ? createComputedGetter(key)
  10029. : createGetterInvoker(userDef);
  10030. sharedPropertyDefinition.set = noop;
  10031. } else {
  10032. sharedPropertyDefinition.get = userDef.get
  10033. ? shouldCache && userDef.cache !== false
  10034. ? createComputedGetter(key)
  10035. : createGetterInvoker(userDef.get)
  10036. : noop;
  10037. sharedPropertyDefinition.set = userDef.set || noop;
  10038. }
  10039. if ( true &&
  10040. sharedPropertyDefinition.set === noop) {
  10041. sharedPropertyDefinition.set = function () {
  10042. warn(
  10043. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  10044. this
  10045. );
  10046. };
  10047. }
  10048. Object.defineProperty(target, key, sharedPropertyDefinition);
  10049. }
  10050. function createComputedGetter (key) {
  10051. return function computedGetter () {
  10052. var watcher = this._computedWatchers && this._computedWatchers[key];
  10053. if (watcher) {
  10054. if (watcher.dirty) {
  10055. watcher.evaluate();
  10056. }
  10057. if (Dep.SharedObject.target) {// fixed by xxxxxx
  10058. watcher.depend();
  10059. }
  10060. return watcher.value
  10061. }
  10062. }
  10063. }
  10064. function createGetterInvoker(fn) {
  10065. return function computedGetter () {
  10066. return fn.call(this, this)
  10067. }
  10068. }
  10069. function initMethods (vm, methods) {
  10070. var props = vm.$options.props;
  10071. for (var key in methods) {
  10072. if (true) {
  10073. if (typeof methods[key] !== 'function') {
  10074. warn(
  10075. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  10076. "Did you reference the function correctly?",
  10077. vm
  10078. );
  10079. }
  10080. if (props && hasOwn(props, key)) {
  10081. warn(
  10082. ("Method \"" + key + "\" has already been defined as a prop."),
  10083. vm
  10084. );
  10085. }
  10086. if ((key in vm) && isReserved(key)) {
  10087. warn(
  10088. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  10089. "Avoid defining component methods that start with _ or $."
  10090. );
  10091. }
  10092. }
  10093. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  10094. }
  10095. }
  10096. function initWatch (vm, watch) {
  10097. for (var key in watch) {
  10098. var handler = watch[key];
  10099. if (Array.isArray(handler)) {
  10100. for (var i = 0; i < handler.length; i++) {
  10101. createWatcher(vm, key, handler[i]);
  10102. }
  10103. } else {
  10104. createWatcher(vm, key, handler);
  10105. }
  10106. }
  10107. }
  10108. function createWatcher (
  10109. vm,
  10110. expOrFn,
  10111. handler,
  10112. options
  10113. ) {
  10114. if (isPlainObject(handler)) {
  10115. options = handler;
  10116. handler = handler.handler;
  10117. }
  10118. if (typeof handler === 'string') {
  10119. handler = vm[handler];
  10120. }
  10121. return vm.$watch(expOrFn, handler, options)
  10122. }
  10123. function stateMixin (Vue) {
  10124. // flow somehow has problems with directly declared definition object
  10125. // when using Object.defineProperty, so we have to procedurally build up
  10126. // the object here.
  10127. var dataDef = {};
  10128. dataDef.get = function () { return this._data };
  10129. var propsDef = {};
  10130. propsDef.get = function () { return this._props };
  10131. if (true) {
  10132. dataDef.set = function () {
  10133. warn(
  10134. 'Avoid replacing instance root $data. ' +
  10135. 'Use nested data properties instead.',
  10136. this
  10137. );
  10138. };
  10139. propsDef.set = function () {
  10140. warn("$props is readonly.", this);
  10141. };
  10142. }
  10143. Object.defineProperty(Vue.prototype, '$data', dataDef);
  10144. Object.defineProperty(Vue.prototype, '$props', propsDef);
  10145. Vue.prototype.$set = set;
  10146. Vue.prototype.$delete = del;
  10147. Vue.prototype.$watch = function (
  10148. expOrFn,
  10149. cb,
  10150. options
  10151. ) {
  10152. var vm = this;
  10153. if (isPlainObject(cb)) {
  10154. return createWatcher(vm, expOrFn, cb, options)
  10155. }
  10156. options = options || {};
  10157. options.user = true;
  10158. var watcher = new Watcher(vm, expOrFn, cb, options);
  10159. if (options.immediate) {
  10160. try {
  10161. cb.call(vm, watcher.value);
  10162. } catch (error) {
  10163. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  10164. }
  10165. }
  10166. return function unwatchFn () {
  10167. watcher.teardown();
  10168. }
  10169. };
  10170. }
  10171. /* */
  10172. var uid$3 = 0;
  10173. function initMixin (Vue) {
  10174. Vue.prototype._init = function (options) {
  10175. var vm = this;
  10176. // a uid
  10177. vm._uid = uid$3++;
  10178. var startTag, endTag;
  10179. /* istanbul ignore if */
  10180. if ( true && config.performance && mark) {
  10181. startTag = "vue-perf-start:" + (vm._uid);
  10182. endTag = "vue-perf-end:" + (vm._uid);
  10183. mark(startTag);
  10184. }
  10185. // a flag to avoid this being observed
  10186. vm._isVue = true;
  10187. // merge options
  10188. if (options && options._isComponent) {
  10189. // optimize internal component instantiation
  10190. // since dynamic options merging is pretty slow, and none of the
  10191. // internal component options needs special treatment.
  10192. initInternalComponent(vm, options);
  10193. } else {
  10194. vm.$options = mergeOptions(
  10195. resolveConstructorOptions(vm.constructor),
  10196. options || {},
  10197. vm
  10198. );
  10199. }
  10200. /* istanbul ignore else */
  10201. if (true) {
  10202. initProxy(vm);
  10203. } else {}
  10204. // expose real self
  10205. vm._self = vm;
  10206. initLifecycle(vm);
  10207. initEvents(vm);
  10208. initRender(vm);
  10209. callHook(vm, 'beforeCreate');
  10210. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  10211. initState(vm);
  10212. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  10213. !vm._$fallback && callHook(vm, 'created');
  10214. /* istanbul ignore if */
  10215. if ( true && config.performance && mark) {
  10216. vm._name = formatComponentName(vm, false);
  10217. mark(endTag);
  10218. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  10219. }
  10220. if (vm.$options.el) {
  10221. vm.$mount(vm.$options.el);
  10222. }
  10223. };
  10224. }
  10225. function initInternalComponent (vm, options) {
  10226. var opts = vm.$options = Object.create(vm.constructor.options);
  10227. // doing this because it's faster than dynamic enumeration.
  10228. var parentVnode = options._parentVnode;
  10229. opts.parent = options.parent;
  10230. opts._parentVnode = parentVnode;
  10231. var vnodeComponentOptions = parentVnode.componentOptions;
  10232. opts.propsData = vnodeComponentOptions.propsData;
  10233. opts._parentListeners = vnodeComponentOptions.listeners;
  10234. opts._renderChildren = vnodeComponentOptions.children;
  10235. opts._componentTag = vnodeComponentOptions.tag;
  10236. if (options.render) {
  10237. opts.render = options.render;
  10238. opts.staticRenderFns = options.staticRenderFns;
  10239. }
  10240. }
  10241. function resolveConstructorOptions (Ctor) {
  10242. var options = Ctor.options;
  10243. if (Ctor.super) {
  10244. var superOptions = resolveConstructorOptions(Ctor.super);
  10245. var cachedSuperOptions = Ctor.superOptions;
  10246. if (superOptions !== cachedSuperOptions) {
  10247. // super option changed,
  10248. // need to resolve new options.
  10249. Ctor.superOptions = superOptions;
  10250. // check if there are any late-modified/attached options (#4976)
  10251. var modifiedOptions = resolveModifiedOptions(Ctor);
  10252. // update base extend options
  10253. if (modifiedOptions) {
  10254. extend(Ctor.extendOptions, modifiedOptions);
  10255. }
  10256. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  10257. if (options.name) {
  10258. options.components[options.name] = Ctor;
  10259. }
  10260. }
  10261. }
  10262. return options
  10263. }
  10264. function resolveModifiedOptions (Ctor) {
  10265. var modified;
  10266. var latest = Ctor.options;
  10267. var sealed = Ctor.sealedOptions;
  10268. for (var key in latest) {
  10269. if (latest[key] !== sealed[key]) {
  10270. if (!modified) { modified = {}; }
  10271. modified[key] = latest[key];
  10272. }
  10273. }
  10274. return modified
  10275. }
  10276. function Vue (options) {
  10277. if ( true &&
  10278. !(this instanceof Vue)
  10279. ) {
  10280. warn('Vue is a constructor and should be called with the `new` keyword');
  10281. }
  10282. this._init(options);
  10283. }
  10284. initMixin(Vue);
  10285. stateMixin(Vue);
  10286. eventsMixin(Vue);
  10287. lifecycleMixin(Vue);
  10288. renderMixin(Vue);
  10289. /* */
  10290. function initUse (Vue) {
  10291. Vue.use = function (plugin) {
  10292. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  10293. if (installedPlugins.indexOf(plugin) > -1) {
  10294. return this
  10295. }
  10296. // additional parameters
  10297. var args = toArray(arguments, 1);
  10298. args.unshift(this);
  10299. if (typeof plugin.install === 'function') {
  10300. plugin.install.apply(plugin, args);
  10301. } else if (typeof plugin === 'function') {
  10302. plugin.apply(null, args);
  10303. }
  10304. installedPlugins.push(plugin);
  10305. return this
  10306. };
  10307. }
  10308. /* */
  10309. function initMixin$1 (Vue) {
  10310. Vue.mixin = function (mixin) {
  10311. this.options = mergeOptions(this.options, mixin);
  10312. return this
  10313. };
  10314. }
  10315. /* */
  10316. function initExtend (Vue) {
  10317. /**
  10318. * Each instance constructor, including Vue, has a unique
  10319. * cid. This enables us to create wrapped "child
  10320. * constructors" for prototypal inheritance and cache them.
  10321. */
  10322. Vue.cid = 0;
  10323. var cid = 1;
  10324. /**
  10325. * Class inheritance
  10326. */
  10327. Vue.extend = function (extendOptions) {
  10328. extendOptions = extendOptions || {};
  10329. var Super = this;
  10330. var SuperId = Super.cid;
  10331. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  10332. if (cachedCtors[SuperId]) {
  10333. return cachedCtors[SuperId]
  10334. }
  10335. var name = extendOptions.name || Super.options.name;
  10336. if ( true && name) {
  10337. validateComponentName(name);
  10338. }
  10339. var Sub = function VueComponent (options) {
  10340. this._init(options);
  10341. };
  10342. Sub.prototype = Object.create(Super.prototype);
  10343. Sub.prototype.constructor = Sub;
  10344. Sub.cid = cid++;
  10345. Sub.options = mergeOptions(
  10346. Super.options,
  10347. extendOptions
  10348. );
  10349. Sub['super'] = Super;
  10350. // For props and computed properties, we define the proxy getters on
  10351. // the Vue instances at extension time, on the extended prototype. This
  10352. // avoids Object.defineProperty calls for each instance created.
  10353. if (Sub.options.props) {
  10354. initProps$1(Sub);
  10355. }
  10356. if (Sub.options.computed) {
  10357. initComputed$1(Sub);
  10358. }
  10359. // allow further extension/mixin/plugin usage
  10360. Sub.extend = Super.extend;
  10361. Sub.mixin = Super.mixin;
  10362. Sub.use = Super.use;
  10363. // create asset registers, so extended classes
  10364. // can have their private assets too.
  10365. ASSET_TYPES.forEach(function (type) {
  10366. Sub[type] = Super[type];
  10367. });
  10368. // enable recursive self-lookup
  10369. if (name) {
  10370. Sub.options.components[name] = Sub;
  10371. }
  10372. // keep a reference to the super options at extension time.
  10373. // later at instantiation we can check if Super's options have
  10374. // been updated.
  10375. Sub.superOptions = Super.options;
  10376. Sub.extendOptions = extendOptions;
  10377. Sub.sealedOptions = extend({}, Sub.options);
  10378. // cache constructor
  10379. cachedCtors[SuperId] = Sub;
  10380. return Sub
  10381. };
  10382. }
  10383. function initProps$1 (Comp) {
  10384. var props = Comp.options.props;
  10385. for (var key in props) {
  10386. proxy(Comp.prototype, "_props", key);
  10387. }
  10388. }
  10389. function initComputed$1 (Comp) {
  10390. var computed = Comp.options.computed;
  10391. for (var key in computed) {
  10392. defineComputed(Comp.prototype, key, computed[key]);
  10393. }
  10394. }
  10395. /* */
  10396. function initAssetRegisters (Vue) {
  10397. /**
  10398. * Create asset registration methods.
  10399. */
  10400. ASSET_TYPES.forEach(function (type) {
  10401. Vue[type] = function (
  10402. id,
  10403. definition
  10404. ) {
  10405. if (!definition) {
  10406. return this.options[type + 's'][id]
  10407. } else {
  10408. /* istanbul ignore if */
  10409. if ( true && type === 'component') {
  10410. validateComponentName(id);
  10411. }
  10412. if (type === 'component' && isPlainObject(definition)) {
  10413. definition.name = definition.name || id;
  10414. definition = this.options._base.extend(definition);
  10415. }
  10416. if (type === 'directive' && typeof definition === 'function') {
  10417. definition = { bind: definition, update: definition };
  10418. }
  10419. this.options[type + 's'][id] = definition;
  10420. return definition
  10421. }
  10422. };
  10423. });
  10424. }
  10425. /* */
  10426. function getComponentName (opts) {
  10427. return opts && (opts.Ctor.options.name || opts.tag)
  10428. }
  10429. function matches (pattern, name) {
  10430. if (Array.isArray(pattern)) {
  10431. return pattern.indexOf(name) > -1
  10432. } else if (typeof pattern === 'string') {
  10433. return pattern.split(',').indexOf(name) > -1
  10434. } else if (isRegExp(pattern)) {
  10435. return pattern.test(name)
  10436. }
  10437. /* istanbul ignore next */
  10438. return false
  10439. }
  10440. function pruneCache (keepAliveInstance, filter) {
  10441. var cache = keepAliveInstance.cache;
  10442. var keys = keepAliveInstance.keys;
  10443. var _vnode = keepAliveInstance._vnode;
  10444. for (var key in cache) {
  10445. var cachedNode = cache[key];
  10446. if (cachedNode) {
  10447. var name = getComponentName(cachedNode.componentOptions);
  10448. if (name && !filter(name)) {
  10449. pruneCacheEntry(cache, key, keys, _vnode);
  10450. }
  10451. }
  10452. }
  10453. }
  10454. function pruneCacheEntry (
  10455. cache,
  10456. key,
  10457. keys,
  10458. current
  10459. ) {
  10460. var cached$$1 = cache[key];
  10461. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  10462. cached$$1.componentInstance.$destroy();
  10463. }
  10464. cache[key] = null;
  10465. remove(keys, key);
  10466. }
  10467. var patternTypes = [String, RegExp, Array];
  10468. var KeepAlive = {
  10469. name: 'keep-alive',
  10470. abstract: true,
  10471. props: {
  10472. include: patternTypes,
  10473. exclude: patternTypes,
  10474. max: [String, Number]
  10475. },
  10476. created: function created () {
  10477. this.cache = Object.create(null);
  10478. this.keys = [];
  10479. },
  10480. destroyed: function destroyed () {
  10481. for (var key in this.cache) {
  10482. pruneCacheEntry(this.cache, key, this.keys);
  10483. }
  10484. },
  10485. mounted: function mounted () {
  10486. var this$1 = this;
  10487. this.$watch('include', function (val) {
  10488. pruneCache(this$1, function (name) { return matches(val, name); });
  10489. });
  10490. this.$watch('exclude', function (val) {
  10491. pruneCache(this$1, function (name) { return !matches(val, name); });
  10492. });
  10493. },
  10494. render: function render () {
  10495. var slot = this.$slots.default;
  10496. var vnode = getFirstComponentChild(slot);
  10497. var componentOptions = vnode && vnode.componentOptions;
  10498. if (componentOptions) {
  10499. // check pattern
  10500. var name = getComponentName(componentOptions);
  10501. var ref = this;
  10502. var include = ref.include;
  10503. var exclude = ref.exclude;
  10504. if (
  10505. // not included
  10506. (include && (!name || !matches(include, name))) ||
  10507. // excluded
  10508. (exclude && name && matches(exclude, name))
  10509. ) {
  10510. return vnode
  10511. }
  10512. var ref$1 = this;
  10513. var cache = ref$1.cache;
  10514. var keys = ref$1.keys;
  10515. var key = vnode.key == null
  10516. // same constructor may get registered as different local components
  10517. // so cid alone is not enough (#3269)
  10518. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  10519. : vnode.key;
  10520. if (cache[key]) {
  10521. vnode.componentInstance = cache[key].componentInstance;
  10522. // make current key freshest
  10523. remove(keys, key);
  10524. keys.push(key);
  10525. } else {
  10526. cache[key] = vnode;
  10527. keys.push(key);
  10528. // prune oldest entry
  10529. if (this.max && keys.length > parseInt(this.max)) {
  10530. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  10531. }
  10532. }
  10533. vnode.data.keepAlive = true;
  10534. }
  10535. return vnode || (slot && slot[0])
  10536. }
  10537. };
  10538. var builtInComponents = {
  10539. KeepAlive: KeepAlive
  10540. };
  10541. /* */
  10542. function initGlobalAPI (Vue) {
  10543. // config
  10544. var configDef = {};
  10545. configDef.get = function () { return config; };
  10546. if (true) {
  10547. configDef.set = function () {
  10548. warn(
  10549. 'Do not replace the Vue.config object, set individual fields instead.'
  10550. );
  10551. };
  10552. }
  10553. Object.defineProperty(Vue, 'config', configDef);
  10554. // exposed util methods.
  10555. // NOTE: these are not considered part of the public API - avoid relying on
  10556. // them unless you are aware of the risk.
  10557. Vue.util = {
  10558. warn: warn,
  10559. extend: extend,
  10560. mergeOptions: mergeOptions,
  10561. defineReactive: defineReactive$$1
  10562. };
  10563. Vue.set = set;
  10564. Vue.delete = del;
  10565. Vue.nextTick = nextTick;
  10566. // 2.6 explicit observable API
  10567. Vue.observable = function (obj) {
  10568. observe(obj);
  10569. return obj
  10570. };
  10571. Vue.options = Object.create(null);
  10572. ASSET_TYPES.forEach(function (type) {
  10573. Vue.options[type + 's'] = Object.create(null);
  10574. });
  10575. // this is used to identify the "base" constructor to extend all plain-object
  10576. // components with in Weex's multi-instance scenarios.
  10577. Vue.options._base = Vue;
  10578. extend(Vue.options.components, builtInComponents);
  10579. initUse(Vue);
  10580. initMixin$1(Vue);
  10581. initExtend(Vue);
  10582. initAssetRegisters(Vue);
  10583. }
  10584. initGlobalAPI(Vue);
  10585. Object.defineProperty(Vue.prototype, '$isServer', {
  10586. get: isServerRendering
  10587. });
  10588. Object.defineProperty(Vue.prototype, '$ssrContext', {
  10589. get: function get () {
  10590. /* istanbul ignore next */
  10591. return this.$vnode && this.$vnode.ssrContext
  10592. }
  10593. });
  10594. // expose FunctionalRenderContext for ssr runtime helper installation
  10595. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  10596. value: FunctionalRenderContext
  10597. });
  10598. Vue.version = '2.6.11';
  10599. /**
  10600. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  10601. */
  10602. var ARRAYTYPE = '[object Array]';
  10603. var OBJECTTYPE = '[object Object]';
  10604. // const FUNCTIONTYPE = '[object Function]'
  10605. function diff(current, pre) {
  10606. var result = {};
  10607. syncKeys(current, pre);
  10608. _diff(current, pre, '', result);
  10609. return result
  10610. }
  10611. function syncKeys(current, pre) {
  10612. if (current === pre) { return }
  10613. var rootCurrentType = type(current);
  10614. var rootPreType = type(pre);
  10615. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  10616. if(Object.keys(current).length >= Object.keys(pre).length){
  10617. for (var key in pre) {
  10618. var currentValue = current[key];
  10619. if (currentValue === undefined) {
  10620. current[key] = null;
  10621. } else {
  10622. syncKeys(currentValue, pre[key]);
  10623. }
  10624. }
  10625. }
  10626. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  10627. if (current.length >= pre.length) {
  10628. pre.forEach(function (item, index) {
  10629. syncKeys(current[index], item);
  10630. });
  10631. }
  10632. }
  10633. }
  10634. function _diff(current, pre, path, result) {
  10635. if (current === pre) { return }
  10636. var rootCurrentType = type(current);
  10637. var rootPreType = type(pre);
  10638. if (rootCurrentType == OBJECTTYPE) {
  10639. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  10640. setResult(result, path, current);
  10641. } else {
  10642. var loop = function ( key ) {
  10643. var currentValue = current[key];
  10644. var preValue = pre[key];
  10645. var currentType = type(currentValue);
  10646. var preType = type(preValue);
  10647. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  10648. if (currentValue !== pre[key]) {
  10649. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10650. }
  10651. } else if (currentType == ARRAYTYPE) {
  10652. if (preType != ARRAYTYPE) {
  10653. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10654. } else {
  10655. if (currentValue.length < preValue.length) {
  10656. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10657. } else {
  10658. currentValue.forEach(function (item, index) {
  10659. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  10660. });
  10661. }
  10662. }
  10663. } else if (currentType == OBJECTTYPE) {
  10664. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  10665. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10666. } else {
  10667. for (var subKey in currentValue) {
  10668. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  10669. }
  10670. }
  10671. }
  10672. };
  10673. for (var key in current) loop( key );
  10674. }
  10675. } else if (rootCurrentType == ARRAYTYPE) {
  10676. if (rootPreType != ARRAYTYPE) {
  10677. setResult(result, path, current);
  10678. } else {
  10679. if (current.length < pre.length) {
  10680. setResult(result, path, current);
  10681. } else {
  10682. current.forEach(function (item, index) {
  10683. _diff(item, pre[index], path + '[' + index + ']', result);
  10684. });
  10685. }
  10686. }
  10687. } else {
  10688. setResult(result, path, current);
  10689. }
  10690. }
  10691. function setResult(result, k, v) {
  10692. // if (type(v) != FUNCTIONTYPE) {
  10693. result[k] = v;
  10694. // }
  10695. }
  10696. function type(obj) {
  10697. return Object.prototype.toString.call(obj)
  10698. }
  10699. /* */
  10700. function flushCallbacks$1(vm) {
  10701. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  10702. if (Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10703. var mpInstance = vm.$scope;
  10704. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10705. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  10706. }
  10707. var copies = vm.__next_tick_callbacks.slice(0);
  10708. vm.__next_tick_callbacks.length = 0;
  10709. for (var i = 0; i < copies.length; i++) {
  10710. copies[i]();
  10711. }
  10712. }
  10713. }
  10714. function hasRenderWatcher(vm) {
  10715. return queue.find(function (watcher) { return vm._watcher === watcher; })
  10716. }
  10717. function nextTick$1(vm, cb) {
  10718. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  10719. //2.nextTick 之前存在 render watcher
  10720. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  10721. if(Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10722. var mpInstance = vm.$scope;
  10723. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10724. ']:nextVueTick');
  10725. }
  10726. return nextTick(cb, vm)
  10727. }else{
  10728. if(Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10729. var mpInstance$1 = vm.$scope;
  10730. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  10731. ']:nextMPTick');
  10732. }
  10733. }
  10734. var _resolve;
  10735. if (!vm.__next_tick_callbacks) {
  10736. vm.__next_tick_callbacks = [];
  10737. }
  10738. vm.__next_tick_callbacks.push(function () {
  10739. if (cb) {
  10740. try {
  10741. cb.call(vm);
  10742. } catch (e) {
  10743. handleError(e, vm, 'nextTick');
  10744. }
  10745. } else if (_resolve) {
  10746. _resolve(vm);
  10747. }
  10748. });
  10749. // $flow-disable-line
  10750. if (!cb && typeof Promise !== 'undefined') {
  10751. return new Promise(function (resolve) {
  10752. _resolve = resolve;
  10753. })
  10754. }
  10755. }
  10756. /* */
  10757. function cloneWithData(vm) {
  10758. // 确保当前 vm 所有数据被同步
  10759. var ret = Object.create(null);
  10760. var dataKeys = [].concat(
  10761. Object.keys(vm._data || {}),
  10762. Object.keys(vm._computedWatchers || {}));
  10763. dataKeys.reduce(function(ret, key) {
  10764. ret[key] = vm[key];
  10765. return ret
  10766. }, ret);
  10767. // vue-composition-api
  10768. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  10769. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  10770. if (rawBindings) {
  10771. Object.keys(rawBindings).forEach(function (key) {
  10772. ret[key] = vm[key];
  10773. });
  10774. }
  10775. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  10776. Object.assign(ret, vm.$mp.data || {});
  10777. if (
  10778. Array.isArray(vm.$options.behaviors) &&
  10779. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  10780. ) { //form-field
  10781. ret['name'] = vm.name;
  10782. ret['value'] = vm.value;
  10783. }
  10784. return JSON.parse(JSON.stringify(ret))
  10785. }
  10786. var patch = function(oldVnode, vnode) {
  10787. var this$1 = this;
  10788. if (vnode === null) { //destroy
  10789. return
  10790. }
  10791. if (this.mpType === 'page' || this.mpType === 'component') {
  10792. var mpInstance = this.$scope;
  10793. var data = Object.create(null);
  10794. try {
  10795. data = cloneWithData(this);
  10796. } catch (err) {
  10797. console.error(err);
  10798. }
  10799. data.__webviewId__ = mpInstance.data.__webviewId__;
  10800. var mpData = Object.create(null);
  10801. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  10802. mpData[key] = mpInstance.data[key];
  10803. });
  10804. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  10805. if (Object.keys(diffData).length) {
  10806. if (Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10807. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  10808. ']差量更新',
  10809. JSON.stringify(diffData));
  10810. }
  10811. this.__next_tick_pending = true;
  10812. mpInstance.setData(diffData, function () {
  10813. this$1.__next_tick_pending = false;
  10814. flushCallbacks$1(this$1);
  10815. });
  10816. } else {
  10817. flushCallbacks$1(this);
  10818. }
  10819. }
  10820. };
  10821. /* */
  10822. function createEmptyRender() {
  10823. }
  10824. function mountComponent$1(
  10825. vm,
  10826. el,
  10827. hydrating
  10828. ) {
  10829. if (!vm.mpType) {//main.js 中的 new Vue
  10830. return vm
  10831. }
  10832. if (vm.mpType === 'app') {
  10833. vm.$options.render = createEmptyRender;
  10834. }
  10835. if (!vm.$options.render) {
  10836. vm.$options.render = createEmptyRender;
  10837. if (true) {
  10838. /* istanbul ignore if */
  10839. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  10840. vm.$options.el || el) {
  10841. warn(
  10842. 'You are using the runtime-only build of Vue where the template ' +
  10843. 'compiler is not available. Either pre-compile the templates into ' +
  10844. 'render functions, or use the compiler-included build.',
  10845. vm
  10846. );
  10847. } else {
  10848. warn(
  10849. 'Failed to mount component: template or render function not defined.',
  10850. vm
  10851. );
  10852. }
  10853. }
  10854. }
  10855. !vm._$fallback && callHook(vm, 'beforeMount');
  10856. var updateComponent = function () {
  10857. vm._update(vm._render(), hydrating);
  10858. };
  10859. // we set this to vm._watcher inside the watcher's constructor
  10860. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  10861. // component's mounted hook), which relies on vm._watcher being already defined
  10862. new Watcher(vm, updateComponent, noop, {
  10863. before: function before() {
  10864. if (vm._isMounted && !vm._isDestroyed) {
  10865. callHook(vm, 'beforeUpdate');
  10866. }
  10867. }
  10868. }, true /* isRenderWatcher */);
  10869. hydrating = false;
  10870. return vm
  10871. }
  10872. /* */
  10873. function renderClass (
  10874. staticClass,
  10875. dynamicClass
  10876. ) {
  10877. if (isDef(staticClass) || isDef(dynamicClass)) {
  10878. return concat(staticClass, stringifyClass(dynamicClass))
  10879. }
  10880. /* istanbul ignore next */
  10881. return ''
  10882. }
  10883. function concat (a, b) {
  10884. return a ? b ? (a + ' ' + b) : a : (b || '')
  10885. }
  10886. function stringifyClass (value) {
  10887. if (Array.isArray(value)) {
  10888. return stringifyArray(value)
  10889. }
  10890. if (isObject(value)) {
  10891. return stringifyObject(value)
  10892. }
  10893. if (typeof value === 'string') {
  10894. return value
  10895. }
  10896. /* istanbul ignore next */
  10897. return ''
  10898. }
  10899. function stringifyArray (value) {
  10900. var res = '';
  10901. var stringified;
  10902. for (var i = 0, l = value.length; i < l; i++) {
  10903. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  10904. if (res) { res += ' '; }
  10905. res += stringified;
  10906. }
  10907. }
  10908. return res
  10909. }
  10910. function stringifyObject (value) {
  10911. var res = '';
  10912. for (var key in value) {
  10913. if (value[key]) {
  10914. if (res) { res += ' '; }
  10915. res += key;
  10916. }
  10917. }
  10918. return res
  10919. }
  10920. /* */
  10921. var parseStyleText = cached(function (cssText) {
  10922. var res = {};
  10923. var listDelimiter = /;(?![^(]*\))/g;
  10924. var propertyDelimiter = /:(.+)/;
  10925. cssText.split(listDelimiter).forEach(function (item) {
  10926. if (item) {
  10927. var tmp = item.split(propertyDelimiter);
  10928. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  10929. }
  10930. });
  10931. return res
  10932. });
  10933. // normalize possible array / string values into Object
  10934. function normalizeStyleBinding (bindingStyle) {
  10935. if (Array.isArray(bindingStyle)) {
  10936. return toObject(bindingStyle)
  10937. }
  10938. if (typeof bindingStyle === 'string') {
  10939. return parseStyleText(bindingStyle)
  10940. }
  10941. return bindingStyle
  10942. }
  10943. /* */
  10944. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  10945. function getTarget(obj, path) {
  10946. var parts = path.split('.');
  10947. var key = parts[0];
  10948. if (key.indexOf('__$n') === 0) { //number index
  10949. key = parseInt(key.replace('__$n', ''));
  10950. }
  10951. if (parts.length === 1) {
  10952. return obj[key]
  10953. }
  10954. return getTarget(obj[key], parts.slice(1).join('.'))
  10955. }
  10956. function internalMixin(Vue) {
  10957. Vue.config.errorHandler = function(err, vm, info) {
  10958. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10959. console.error(err);
  10960. /* eslint-disable no-undef */
  10961. var app = typeof getApp === 'function' && getApp();
  10962. if (app && app.onError) {
  10963. app.onError(err);
  10964. }
  10965. };
  10966. var oldEmit = Vue.prototype.$emit;
  10967. Vue.prototype.$emit = function(event) {
  10968. if (this.$scope && event) {
  10969. (this.$scope['_triggerEvent'] || this.$scope['triggerEvent']).call(this.$scope, event, {
  10970. __args__: toArray(arguments, 1)
  10971. });
  10972. }
  10973. return oldEmit.apply(this, arguments)
  10974. };
  10975. Vue.prototype.$nextTick = function(fn) {
  10976. return nextTick$1(this, fn)
  10977. };
  10978. MP_METHODS.forEach(function (method) {
  10979. Vue.prototype[method] = function(args) {
  10980. if (this.$scope && this.$scope[method]) {
  10981. return this.$scope[method](args)
  10982. }
  10983. // mp-alipay
  10984. if (typeof my === 'undefined') {
  10985. return
  10986. }
  10987. if (method === 'createSelectorQuery') {
  10988. /* eslint-disable no-undef */
  10989. return my.createSelectorQuery(args)
  10990. } else if (method === 'createIntersectionObserver') {
  10991. /* eslint-disable no-undef */
  10992. return my.createIntersectionObserver(args)
  10993. }
  10994. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10995. };
  10996. });
  10997. Vue.prototype.__init_provide = initProvide;
  10998. Vue.prototype.__init_injections = initInjections;
  10999. Vue.prototype.__call_hook = function(hook, args) {
  11000. var vm = this;
  11001. // #7573 disable dep collection when invoking lifecycle hooks
  11002. pushTarget();
  11003. var handlers = vm.$options[hook];
  11004. var info = hook + " hook";
  11005. var ret;
  11006. if (handlers) {
  11007. for (var i = 0, j = handlers.length; i < j; i++) {
  11008. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  11009. }
  11010. }
  11011. if (vm._hasHookEvent) {
  11012. vm.$emit('hook:' + hook, args);
  11013. }
  11014. popTarget();
  11015. return ret
  11016. };
  11017. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  11018. if (Array.isArray(modifiers)) {
  11019. if (modifiers.indexOf('trim') !== -1) {
  11020. value = value.trim();
  11021. }
  11022. if (modifiers.indexOf('number') !== -1) {
  11023. value = this._n(value);
  11024. }
  11025. }
  11026. if (!target) {
  11027. target = this;
  11028. }
  11029. // 解决动态属性添加
  11030. Vue.set(target, key, value);
  11031. };
  11032. Vue.prototype.__set_sync = function(target, key, value) {
  11033. if (!target) {
  11034. target = this;
  11035. }
  11036. // 解决动态属性添加
  11037. Vue.set(target, key, value);
  11038. };
  11039. Vue.prototype.__get_orig = function(item) {
  11040. if (isPlainObject(item)) {
  11041. return item['$orig'] || item
  11042. }
  11043. return item
  11044. };
  11045. Vue.prototype.__get_value = function(dataPath, target) {
  11046. return getTarget(target || this, dataPath)
  11047. };
  11048. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  11049. return renderClass(staticClass, dynamicClass)
  11050. };
  11051. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  11052. if (!dynamicStyle && !staticStyle) {
  11053. return ''
  11054. }
  11055. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  11056. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  11057. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  11058. };
  11059. Vue.prototype.__map = function(val, iteratee) {
  11060. //TODO 暂不考虑 string
  11061. var ret, i, l, keys, key;
  11062. if (Array.isArray(val)) {
  11063. ret = new Array(val.length);
  11064. for (i = 0, l = val.length; i < l; i++) {
  11065. ret[i] = iteratee(val[i], i);
  11066. }
  11067. return ret
  11068. } else if (isObject(val)) {
  11069. keys = Object.keys(val);
  11070. ret = Object.create(null);
  11071. for (i = 0, l = keys.length; i < l; i++) {
  11072. key = keys[i];
  11073. ret[key] = iteratee(val[key], key, i);
  11074. }
  11075. return ret
  11076. } else if (typeof val === 'number') {
  11077. ret = new Array(val);
  11078. for (i = 0, l = val; i < l; i++) {
  11079. // 第一个参数暂时仍和小程序一致
  11080. ret[i] = iteratee(i, i);
  11081. }
  11082. return ret
  11083. }
  11084. return []
  11085. };
  11086. }
  11087. /* */
  11088. var LIFECYCLE_HOOKS$1 = [
  11089. //App
  11090. 'onLaunch',
  11091. 'onShow',
  11092. 'onHide',
  11093. 'onUniNViewMessage',
  11094. 'onPageNotFound',
  11095. 'onThemeChange',
  11096. 'onError',
  11097. 'onUnhandledRejection',
  11098. //Page
  11099. 'onInit',
  11100. 'onLoad',
  11101. // 'onShow',
  11102. 'onReady',
  11103. // 'onHide',
  11104. 'onUnload',
  11105. 'onPullDownRefresh',
  11106. 'onReachBottom',
  11107. 'onTabItemTap',
  11108. 'onAddToFavorites',
  11109. 'onShareTimeline',
  11110. 'onShareAppMessage',
  11111. 'onResize',
  11112. 'onPageScroll',
  11113. 'onNavigationBarButtonTap',
  11114. 'onBackPress',
  11115. 'onNavigationBarSearchInputChanged',
  11116. 'onNavigationBarSearchInputConfirmed',
  11117. 'onNavigationBarSearchInputClicked',
  11118. //Component
  11119. // 'onReady', // 兼容旧版本,应该移除该事件
  11120. 'onPageShow',
  11121. 'onPageHide',
  11122. 'onPageResize'
  11123. ];
  11124. function lifecycleMixin$1(Vue) {
  11125. //fixed vue-class-component
  11126. var oldExtend = Vue.extend;
  11127. Vue.extend = function(extendOptions) {
  11128. extendOptions = extendOptions || {};
  11129. var methods = extendOptions.methods;
  11130. if (methods) {
  11131. Object.keys(methods).forEach(function (methodName) {
  11132. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  11133. extendOptions[methodName] = methods[methodName];
  11134. delete methods[methodName];
  11135. }
  11136. });
  11137. }
  11138. return oldExtend.call(this, extendOptions)
  11139. };
  11140. var strategies = Vue.config.optionMergeStrategies;
  11141. var mergeHook = strategies.created;
  11142. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  11143. strategies[hook] = mergeHook;
  11144. });
  11145. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  11146. }
  11147. /* */
  11148. // install platform patch function
  11149. Vue.prototype.__patch__ = patch;
  11150. // public mount method
  11151. Vue.prototype.$mount = function(
  11152. el ,
  11153. hydrating
  11154. ) {
  11155. return mountComponent$1(this, el, hydrating)
  11156. };
  11157. lifecycleMixin$1(Vue);
  11158. internalMixin(Vue);
  11159. /* */
  11160. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  11161. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  11162. /***/ }),
  11163. /***/ 40:
  11164. /*!**********************************************************************************************************************!*\
  11165. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/function/throttle.js ***!
  11166. \**********************************************************************************************************************/
  11167. /*! no static exports found */
  11168. /***/ (function(module, exports, __webpack_require__) {
  11169. "use strict";
  11170. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timer, flag;
  11171. /**
  11172. * 节流原理:在一定时间内,只能触发一次
  11173. *
  11174. * @param {Function} func 要执行的回调函数
  11175. * @param {Number} wait 延时的时间
  11176. * @param {Boolean} immediate 是否立即执行
  11177. * @return null
  11178. */
  11179. function throttle(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  11180. if (immediate) {
  11181. if (!flag) {
  11182. flag = true;
  11183. // 如果是立即执行,则在wait毫秒内开始时执行
  11184. typeof func === 'function' && func();
  11185. timer = setTimeout(function () {
  11186. flag = false;
  11187. }, wait);
  11188. }
  11189. } else {
  11190. if (!flag) {
  11191. flag = true;
  11192. // 如果是非立即执行,则在wait毫秒内的结束处执行
  11193. timer = setTimeout(function () {
  11194. flag = false;
  11195. typeof func === 'function' && func();
  11196. }, wait);
  11197. }
  11198. }
  11199. };var _default =
  11200. throttle;exports.default = _default;
  11201. /***/ }),
  11202. /***/ 41:
  11203. /*!******************************************************************************************************************!*\
  11204. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/config/config.js ***!
  11205. \******************************************************************************************************************/
  11206. /*! no static exports found */
  11207. /***/ (function(module, exports, __webpack_require__) {
  11208. "use strict";
  11209. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 此版本发布于2020-11-19
  11210. var version = '1.8.2';var _default =
  11211. {
  11212. v: version,
  11213. version: version,
  11214. // 主题名称
  11215. type: [
  11216. 'primary',
  11217. 'success',
  11218. 'info',
  11219. 'error',
  11220. 'warning'] };exports.default = _default;
  11221. /***/ }),
  11222. /***/ 42:
  11223. /*!******************************************************************************************************************!*\
  11224. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/config/zIndex.js ***!
  11225. \******************************************************************************************************************/
  11226. /*! no static exports found */
  11227. /***/ (function(module, exports, __webpack_require__) {
  11228. "use strict";
  11229. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // uniapp在H5中各API的z-index值如下:
  11230. /**
  11231. * actionsheet: 999
  11232. * modal: 999
  11233. * navigate: 998
  11234. * tabbar: 998
  11235. * toast: 999
  11236. */var _default =
  11237. {
  11238. toast: 10090,
  11239. noNetwork: 10080,
  11240. // popup包含popup,actionsheet,keyboard,picker的值
  11241. popup: 10075,
  11242. mask: 10070,
  11243. navbar: 980,
  11244. topTips: 975,
  11245. sticky: 970,
  11246. indexListSticky: 965 };exports.default = _default;
  11247. /***/ }),
  11248. /***/ 43:
  11249. /*!******************************************************************************************************!*\
  11250. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/util.js ***!
  11251. \******************************************************************************************************/
  11252. /*! no static exports found */
  11253. /***/ (function(module, exports, __webpack_require__) {
  11254. "use strict";
  11255. /* 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 */ 22));var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 44));
  11256. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 45));
  11257. var _index = _interopRequireDefault(__webpack_require__(/*! ../../store/index.js */ 48));
  11258. var _storage = _interopRequireDefault(__webpack_require__(/*! ./storage.js */ 54));
  11259. var _DateFormat = _interopRequireDefault(__webpack_require__(/*! ../../js_sdk/xfl-DateFormat/DateFormat.js */ 55));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 _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;}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 _default =
  11260. {
  11261. // 返回
  11262. back: function back() {var pageNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
  11263. uni.navigateBack({ delta: pageNum });
  11264. _storage.default.setStorage('outTime', new Date().getTime());
  11265. },
  11266. // 打开新窗口
  11267. open: function open(url) {
  11268. uni.navigateTo({
  11269. url: url });
  11270. _storage.default.setStorage('outTime', new Date().getTime());
  11271. },
  11272. // 打开新窗口 关闭当前窗口
  11273. openNew: function openNew(url) {
  11274. uni.redirectTo({
  11275. url: url });
  11276. _storage.default.setStorage('outTime', new Date().getTime());
  11277. },
  11278. // 打开新窗口 关闭其他窗口
  11279. openReLaunch: function openReLaunch(url) {
  11280. uni.reLaunch({
  11281. url: url });
  11282. _storage.default.setStorage('outTime', new Date().getTime());
  11283. },
  11284. // 全局消息弹窗
  11285. openMsg: function openMsg() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var msgRead, alertList, roleKey, _loop, i, _ret;return _regenerator.default.wrap(function _callee$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  11286. // if(store.getters.isAlerting) {
  11287. // let timer = setInterval(() => {
  11288. // if(!store.getters.isAlerting) {
  11289. // clearInterval(timer)
  11290. // this.openMsg()
  11291. // }
  11292. // }, 500)
  11293. // return false
  11294. // } else {
  11295. // store.commit('msg/SET_ALERT', true)
  11296. // }
  11297. // 消息已读后移除当前弹窗列表
  11298. msgRead = function msgRead(id) {
  11299. _index.default.commit('msg/REMOVE_ALERT_ID', id);
  11300. _http.default.msgRead({ id: id }).then(function (res) {
  11301. console.log(res.msg, '消息已读utils');
  11302. });
  11303. };
  11304. alertList = [];
  11305. roleKey = _storage.default.getStorageSync('userInfo').roleKey;_context2.next = 5;return (
  11306. _http.default.getStatus().then(function (response) {
  11307. console.log('-----获取消息-----');
  11308. console.log(response);
  11309. var res = response.result;
  11310. alertList = res.alertList;
  11311. alertList.reverse();
  11312. }));case 5:_loop = /*#__PURE__*/_regenerator.default.mark(function _loop(
  11313. i) {var alert;return _regenerator.default.wrap(function _loop$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  11314. alert = alertList[i];
  11315. // 如果打开列表种已有改消息则不再弹窗
  11316. if (!(_index.default.getters.alertList.indexOf(alert.id) != -1)) {_context.next = 7;break;}
  11317. console.log('-----------消息已存在-----------', alert.id);
  11318. console.log(_index.default.getters.alertList);return _context.abrupt("return", "continue");case 7:
  11319. _index.default.commit('msg/SAVE_ALERT_ID', alert.id);
  11320. // 特殊处理data对象 里面包括一些订单号信息
  11321. try {
  11322. if (alert.data && typeof alert.data == 'string') {
  11323. alert.data = JSON.parse(alert.data);
  11324. }
  11325. }
  11326. catch (err) {
  11327. _message.default.showToast({ title: '消息格式错误!' });
  11328. }if (!(
  11329. alert.code == 0 || alert.code == 1)) {_context.next = 16;break;}
  11330. console.log('弹出新订单----');
  11331. // 只有四名角色在手机端收到新订单消息后才进行弹窗提醒
  11332. if (!['directInkPrinter', 'paperPrinter', 'heatPrinter', 'autoCut'].includes(roleKey)) {_context.next = 14;break;}_context.next = 14;return (
  11333. new Promise(function (resolve, reject) {
  11334. setTimeout(function () {
  11335. resolve();
  11336. }, 1000);
  11337. }).then(function (res) {
  11338. _this.open("/pages/popup/popup?info=".concat(JSON.stringify(alert)));
  11339. }));case 14:_context.next = 44;break;case 16:if (!(
  11340. alert.code == 4 || alert.code == 15)) {_context.next = 21;break;}_context.next = 19;return (
  11341. new Promise(function (resolve, reject) {
  11342. setTimeout(function () {
  11343. resolve();
  11344. }, 1000);
  11345. }).then(function (res) {
  11346. _this.open("/pages/popup/popup?info=".concat(JSON.stringify(alert)));
  11347. }));case 19:_context.next = 44;break;case 21:if (!(
  11348. alert.code == 6 || alert.code == 13)) {_context.next = 27;break;}
  11349. console.log('放置成功 拿取成功 提示消息--------------');_context.next = 25;return (
  11350. new Promise(function (resolve, reject) {
  11351. setTimeout(function () {
  11352. resolve();
  11353. }, 1000);
  11354. }).then(function (res) {
  11355. // this.open(`/pages/popup/popup?info=${ JSON.stringify(alert) }`)
  11356. // 如果是放置成功类型的消息 则保存dispatchNo 用于和放置类型消息的dispatchNo做对比
  11357. _index.default.commit('msg/SET_HIDDENT_ID', alert.data.dispatchNo);
  11358. uni.$emit('printer-list-reflash');
  11359. msgRead(alert.id);
  11360. }));case 25:_context.next = 44;break;case 27:if (!
  11361. [3, 5, 20, 21, 23].includes(alert.code)) {_context.next = 33;break;}
  11362. console.log('其他异常消息--------------');_context.next = 31;return (
  11363. new Promise(function (resolve, reject) {
  11364. setTimeout(function () {
  11365. resolve();
  11366. }, 1000);
  11367. }).then(function (res) {
  11368. _this.open("/pages/popup/popup?info=".concat(JSON.stringify(alert)));
  11369. }));case 31:_context.next = 44;break;case 33:if (!
  11370. [16, 17].includes(alert.code)) {_context.next = 38;break;}_context.next = 36;return (
  11371. new Promise(function (resolve, reject) {
  11372. setTimeout(function () {
  11373. resolve();
  11374. }, 1000);
  11375. }).then(function (res) {
  11376. uni.$emit('photographer-working-order', {
  11377. orderIDStr: alert.data.OrderIDStr,
  11378. id: alert.id });
  11379. // 帐篷拍照每次直接已读 需要的时候点击拍照再获取数据
  11380. if (alert.code === 16) {
  11381. msgRead(alert.id);
  11382. }
  11383. }));case 36:_context.next = 44;break;case 38:if (!
  11384. [31].includes(alert.code)) {_context.next = 43;break;}_context.next = 41;return (
  11385. new Promise(function (resolve, reject) {
  11386. setTimeout(function () {
  11387. resolve();
  11388. }, 1000);
  11389. }).then(function (res) {
  11390. uni.$emit('printer-list-reflash');
  11391. msgRead(alert.id);
  11392. }));case 41:_context.next = 44;break;case 43:
  11393. console.log('其他消息-----');
  11394. // msg.showToast({title: '未知消息类型!'})
  11395. case 44:case "end":return _context.stop();}}}, _loop);});_context2.t0 = _regenerator.default.keys(alertList);case 7:if ((_context2.t1 = _context2.t0()).done) {_context2.next = 15;break;}i = _context2.t1.value;return _context2.delegateYield(_loop(i), "t2", 10);case 10:_ret = _context2.t2;if (!(_ret === "continue")) {_context2.next = 13;break;}return _context2.abrupt("continue", 7);case 13:_context2.next = 7;break;case 15:case "end":return _context2.stop();}}}, _callee);}))();
  11396. },
  11397. // 获取设备信息
  11398. getSystemInfo: function getSystemInfo() {
  11399. var info = {};
  11400. uni.getSystemInfo({
  11401. success: function success(res) {
  11402. console.log(res);
  11403. info = res;
  11404. },
  11405. fail: function fail() {
  11406. _message.default.showToast({ title: '获取设备信息失败!' });
  11407. } });
  11408. return info;
  11409. },
  11410. // 表单验证
  11411. formValidate: function formValidate(el) {
  11412. return new Promise(function (resolve, reject) {
  11413. el.validate(function (valid) {
  11414. if (valid) {
  11415. resolve();
  11416. } else {
  11417. reject();
  11418. }
  11419. });
  11420. });
  11421. },
  11422. // uniapp获取本地图片地址
  11423. getUniAppImgPath: function getUniAppImgPath() {var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
  11424. _message.default.showToast({ title: '仅支持APP端' });
  11425. },
  11426. // 压缩图片
  11427. compressImage: function compressImage(path) {
  11428. return new Promise(function (resolve, reject) {
  11429. uni.compressImage({
  11430. src: path,
  11431. quality: 50,
  11432. width: '60%',
  11433. height: '60%',
  11434. success: function success(res) {
  11435. resolve(res.tempFilePath);
  11436. } });
  11437. });
  11438. },
  11439. // 获取文件base64文件编码
  11440. uploadFile: function uploadFile(path) {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2() {var handlePath;return _regenerator.default.wrap(function _callee2$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
  11441. handlePath = path;
  11442. // 解决分辨率过高错误
  11443. if (!(_storage.default.getStorageSync('mobileInfo').platform == 'ios')) {_context3.next = 4;break;}_context3.next = 4;return (
  11444. _this2.compressImage(path).then(function (res) {
  11445. handlePath = res;
  11446. }));case 4:return _context3.abrupt("return",
  11447. new Promise(function (resolve, reject) {
  11448. plus.io.resolveLocalFileSystemURL(handlePath,
  11449. function (entry) {
  11450. entry.file(function (file) {
  11451. console.log(file.size, 'size--');
  11452. var reader = new plus.io.FileReader();
  11453. reader.onloadend = function (e) {
  11454. resolve(e.target.result);
  11455. };
  11456. reader.readAsDataURL(file);
  11457. });
  11458. },
  11459. function (e) {
  11460. _message.default.hideLoading();
  11461. _message.default.showToast({ title: '读取文件失败:' + e });
  11462. });
  11463. }));case 5:case "end":return _context3.stop();}}}, _callee2);}))();
  11464. },
  11465. // 扫描二维码
  11466. uniScanCode: function uniScanCode() {
  11467. _message.default.showToast({ title: '仅APP端支持扫码功能!' });
  11468. },
  11469. // 扫码
  11470. scanCodeLogin: function scanCodeLogin() {var _this3 = this;
  11471. this.uniScanCode().then(function (res) {
  11472. var resultCode = res.result;
  11473. if (resultCode.indexOf('deLogin:') !== -1) {
  11474. _http.default.deviceLogin({
  11475. mac: resultCode.replace('deLogin:', '') }).
  11476. then(function (res) {
  11477. if (res.code == 0) {
  11478. _message.default.showToast({ title: '扫码成功!', success: 'success' });
  11479. } else {
  11480. _message.default.showToast({ title: res.msg });
  11481. }
  11482. });
  11483. } else if (resultCode.indexOf('station:') !== -1) {
  11484. // this.$emit('bindStation', resultCode.replace('station:', '')) this.$on('bind
  11485. _http.default.bindStation({ id: resultCode.replace('station:', '') }).then(function (res) {
  11486. console.log(res);
  11487. if (res.code == 0) {
  11488. _message.default.showToast({ title: '绑定成功!' });
  11489. } else {
  11490. _message.default.showToast({ title: res.msg });
  11491. }
  11492. });
  11493. } else if (resultCode.indexOf('qrLogin:') !== -1) {
  11494. var code = res.result.replace('qrLogin:', '');
  11495. _http.default.scanCodeLogin({
  11496. connectID: code.trim() }).
  11497. then(function (res) {
  11498. res.code === 0 ?
  11499. _message.default.showToast({ title: '扫码成功!', success: 'success' }) :
  11500. _message.default.showToast({ title: res.msg || '扫码失败!' });
  11501. });
  11502. } else if (resultCode.indexOf('orReject:') !== -1) {
  11503. var _code = res.result.replace('orReject:', '').split(':');
  11504. _this3.open("/pages/order/order-supplement?orderId=".concat(_code[0]));
  11505. } else {
  11506. return _message.default.showToast({ title: '二维码信息有误' });
  11507. }
  11508. });
  11509. },
  11510. /**
  11511. * 处理获取的消息列表 将列表信息归类通过一个字段 最后解析成一个对象
  11512. * @param {Object} data 目标数据
  11513. * @param {Array} handleData 将要归类处理的数组
  11514. * @param {String} filed 归类字段
  11515. * @param {String} type 特殊处理 如果已时间分类
  11516. **/
  11517. handleData: function handleData(data, _handleData, filed, type) {
  11518. if (_handleData && _handleData.length > 0) {
  11519. var key = filed;
  11520. var obj = _handleData.reduce(function (last, item) {
  11521. if (type == 'date') {
  11522. key = new _DateFormat.default(new Date(item[filed])).toString('yyyy-mm-dd');
  11523. } else {
  11524. key = item[filed];
  11525. }
  11526. if (last[key]) {
  11527. last[key].push(item);
  11528. } else {
  11529. last[key] = [item];
  11530. }
  11531. return last;
  11532. }, {});
  11533. for (var key1 in data) {
  11534. for (var key2 in obj) {
  11535. if (key1 == key2) {var _obj$key;
  11536. (_obj$key = obj[key2]).push.apply(_obj$key, _toConsumableArray(data[key1]));
  11537. }
  11538. }
  11539. }
  11540. data = _objectSpread(_objectSpread({}, data), obj);
  11541. return data;
  11542. }
  11543. },
  11544. // 返回两个时间的相差分钟数
  11545. getTimeDifference: function getTimeDifference(time1, time2) {
  11546. if (time1 && time2) {
  11547. return parseInt((new Date(time2).getTime() - new Date(time1).getTime()) / 1000 / 60) + '分钟';
  11548. } else {
  11549. return '';
  11550. }
  11551. },
  11552. // 设置用户在线
  11553. setOnline: function setOnline() {var _this4 = this;
  11554. // 指定的角色才有在离线功能
  11555. var roleKey = _storage.default.getStorageSync('userInfo').roleKey;
  11556. if (['directInkPrinter', 'paperPrinter', 'heatPrinter', 'autoCut', 'photoGrapher'].includes(roleKey)) {
  11557. _http.default.updatePhoneOnline({ onLineState: 1 }).then(function (res) {
  11558. console.log(res.msg, '在线');
  11559. // console.log(res)
  11560. if (res.code !== 0) {
  11561. _this4.setOutline();
  11562. setTimeout(function () {
  11563. _this4.setOnline();
  11564. }, 3000);
  11565. }
  11566. });
  11567. }
  11568. },
  11569. setOutline: function setOutline() {
  11570. var roleKey = _storage.default.getStorageSync('userInfo').roleKey;
  11571. if (['directInkPrinter', 'paperPrinter', 'heatPrinter', 'autoCut', 'photoGrapher'].includes(roleKey)) {
  11572. _http.default.updatePhoneOnline({ onLineState: 0 }).then(function (res) {
  11573. console.log(res, '离线');
  11574. if (res.code !== 0) {
  11575. // msg.showToast({title: '设备在离线切换失败!'})
  11576. }
  11577. });
  11578. }
  11579. },
  11580. // 对象转码
  11581. object2Code: function object2Code(obj) {
  11582. return encodeURIComponent(JSON.stringify(obj));
  11583. },
  11584. code2Object: function code2Object(code) {
  11585. return JSON.parse(decodeURIComponent(code));
  11586. },
  11587. utf8ByteToUnicodeStr: function utf8ByteToUnicodeStr(utf8Bytes) {
  11588. var unicodeStr = '';
  11589. for (var pos = 0; pos < utf8Bytes.length;) {
  11590. var flag = utf8Bytes[pos];
  11591. var unicode = 0;
  11592. if (flag >>> 7 === 0) {
  11593. unicodeStr += String.fromCharCode(utf8Bytes[pos]);
  11594. pos += 1;
  11595. } else if ((flag & 0xFC) === 0xFC) {
  11596. unicode = (utf8Bytes[pos] & 0x3) << 30;
  11597. unicode |= (utf8Bytes[pos + 1] & 0x3F) << 24;
  11598. unicode |= (utf8Bytes[pos + 2] & 0x3F) << 18;
  11599. unicode |= (utf8Bytes[pos + 3] & 0x3F) << 12;
  11600. unicode |= (utf8Bytes[pos + 4] & 0x3F) << 6;
  11601. unicode |= utf8Bytes[pos + 5] & 0x3F;
  11602. unicodeStr += String.fromCodePoint(unicode);
  11603. pos += 6;
  11604. } else if ((flag & 0xF8) === 0xF8) {
  11605. unicode = (utf8Bytes[pos] & 0x7) << 24;
  11606. unicode |= (utf8Bytes[pos + 1] & 0x3F) << 18;
  11607. unicode |= (utf8Bytes[pos + 2] & 0x3F) << 12;
  11608. unicode |= (utf8Bytes[pos + 3] & 0x3F) << 6;
  11609. unicode |= utf8Bytes[pos + 4] & 0x3F;
  11610. unicodeStr += String.fromCodePoint(unicode);
  11611. pos += 5;
  11612. } else if ((flag & 0xF0) === 0xF0) {
  11613. unicode = (utf8Bytes[pos] & 0xF) << 18;
  11614. unicode |= (utf8Bytes[pos + 1] & 0x3F) << 12;
  11615. unicode |= (utf8Bytes[pos + 2] & 0x3F) << 6;
  11616. unicode |= utf8Bytes[pos + 3] & 0x3F;
  11617. unicodeStr += String.fromCodePoint(unicode);
  11618. pos += 4;
  11619. } else if ((flag & 0xE0) === 0xE0) {
  11620. unicode = (utf8Bytes[pos] & 0x1F) << 12;;
  11621. unicode |= (utf8Bytes[pos + 1] & 0x3F) << 6;
  11622. unicode |= utf8Bytes[pos + 2] & 0x3F;
  11623. unicodeStr += String.fromCharCode(unicode);
  11624. pos += 3;
  11625. } else if ((flag & 0xC0) === 0xC0) {//110
  11626. unicode = (utf8Bytes[pos] & 0x3F) << 6;
  11627. unicode |= utf8Bytes[pos + 1] & 0x3F;
  11628. unicodeStr += String.fromCharCode(unicode);
  11629. pos += 2;
  11630. } else {
  11631. unicodeStr += String.fromCharCode(utf8Bytes[pos]);
  11632. pos += 1;
  11633. }
  11634. }
  11635. return unicodeStr;
  11636. },
  11637. /* 检测增量更新 */
  11638. updateVersion: function updateVersion() {var _this5 = this;
  11639. _http.default.DownloadApkFile().then(function (res) {
  11640. if (res.code === 0) {
  11641. if (res.result.updateApkType === 0 && res.result.ossUrl) {
  11642. plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
  11643. var version = _storage.default.getStorageSync('version');
  11644. if (res.result.version !== version) {
  11645. var downloadTask = uni.downloadFile({
  11646. url: res.result.ossUrl, //下载地址,必传
  11647. success: function success(downloadResult) {
  11648. if (downloadResult.statusCode === 200) {
  11649. plus.runtime.install(downloadResult.
  11650. tempFilePath, { //安装api
  11651. force: true },
  11652. function () {
  11653. console.log('install success...');
  11654. plus.nativeUI.showWaiting('更新完成');
  11655. _storage.default.setStorageSync('version', res.result.version);
  11656. setTimeout(function () {
  11657. plus.nativeUI.
  11658. closeWaiting();
  11659. plus.runtime.
  11660. restart(); //重启app
  11661. }, 1500);
  11662. },
  11663. function (e) {
  11664. console.error('install fail...');
  11665. });
  11666. }
  11667. },
  11668. fail: function fail(item) {
  11669. console.log(item);
  11670. } });
  11671. downloadTask.onProgressUpdate(function (item) {
  11672. if (item.progress < 100) {
  11673. plus.nativeUI.showWaiting('正在下载' + item.progress +
  11674. '%');
  11675. } else if (item.progress >= 100) {
  11676. plus.nativeUI.closeWaiting();
  11677. }
  11678. });
  11679. }
  11680. });
  11681. } else {
  11682. _this5.checkVersion(res.result.version, res.result.ossUrl);
  11683. }
  11684. }
  11685. });
  11686. },
  11687. // 检查更新
  11688. checkVersion: function checkVersion(version, ossUrl) {var _this6 = this;
  11689. if (version !== plus.runtime.version) {
  11690. uni.showModal({
  11691. title: '新版本',
  11692. content: '是否下载更新版本',
  11693. cancelText: '取消',
  11694. confirmText: '下载',
  11695. success: function success(res) {
  11696. if (res.confirm) {
  11697. _this6.androidUpdate(ossUrl);
  11698. }
  11699. } });
  11700. } else {
  11701. _storage.default.setStorageSync('version', version);
  11702. }
  11703. },
  11704. // 安卓更新
  11705. androidUpdate: function androidUpdate(url) {
  11706. uni.showLoading({
  11707. title: '下载中...' });
  11708. uni.downloadFile({ //执行下载
  11709. url: url, //下载地址
  11710. success: function success(downloadResult) {//下载成功
  11711. uni.hideLoading();
  11712. if (downloadResult.statusCode == 200) {
  11713. plus.runtime.install( //安装
  11714. downloadResult.tempFilePath, {
  11715. force: true },
  11716. function (res) {
  11717. plus.runtime.restart();
  11718. });
  11719. }
  11720. },
  11721. fail: function fail(err) {
  11722. _message.default.showToast({ title: err });
  11723. } });
  11724. } };exports.default = _default;
  11725. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11726. /***/ }),
  11727. /***/ 44:
  11728. /*!*********************************************************************************************************!*\
  11729. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/message.js ***!
  11730. \*********************************************************************************************************/
  11731. /*! no static exports found */
  11732. /***/ (function(module, exports, __webpack_require__) {
  11733. "use strict";
  11734. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  11735. showToast: function showToast(title, success) {
  11736. uni.showToast({
  11737. mask: true,
  11738. title: title,
  11739. duration: 2000,
  11740. icon: success || 'none' });
  11741. },
  11742. showLoading: function showLoading(title) {
  11743. uni.showLoading({
  11744. title: title || '加载中...',
  11745. mask: true });
  11746. },
  11747. hideLoading: function hideLoading() {
  11748. uni.hideLoading();
  11749. },
  11750. showTips: function showTips(el, _ref) {var title = _ref.title,type = _ref.type;
  11751. el.show({
  11752. title: title,
  11753. type: type || 'success',
  11754. duration: '2000' });
  11755. } };exports.default = _default;
  11756. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11757. /***/ }),
  11758. /***/ 45:
  11759. /*!******************************************************************************************************!*\
  11760. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/http.js ***!
  11761. \******************************************************************************************************/
  11762. /*! no static exports found */
  11763. /***/ (function(module, exports, __webpack_require__) {
  11764. "use strict";
  11765. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 46));
  11766. var _storage = _interopRequireDefault(__webpack_require__(/*! ./storage.js */ 54));var _ApiUrl;function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: 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 _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;}
  11767. var ApiUrl = (_ApiUrl = {
  11768. Login: "/api/Account/Login", // 登录
  11769. LoginQuit: "/api/User/LoginQuit", // 登出
  11770. GetUserInfo: "/api/User/GetUserInfo", // 获取用户信息
  11771. GetUserPageList: "/api/User/GetPageList", // 获取用户列表
  11772. DownloadApkFile: "/api/User/DownloadApkFile", // 获取更新版本号
  11773. GetZTreeChildren: "/api/BaseData/GetMaterialCategoryZTree" }, _defineProperty(_ApiUrl, "GetZTreeChildren",
  11774. "/api/BaseData/GetMaterialCategoryZTree"), _defineProperty(_ApiUrl, "Material",
  11775. "/api/BaseData/GetMaterialPageList"), _defineProperty(_ApiUrl, "GetStockHouse",
  11776. "/api/BaseData/GetStockHouse"), _defineProperty(_ApiUrl, "GetContractBatchPageList",
  11777. "/api/BaseData/GetContractBatchPageList"), _defineProperty(_ApiUrl, "ScanStockInQRCode",
  11778. "/api/StockInOut/ScanStockInQRCode"), _defineProperty(_ApiUrl, "BandingStockInRfidCode",
  11779. "/api/StockInOut/BandingStockInRfidCode"), _defineProperty(_ApiUrl, "GetStockInRfidLabel",
  11780. "/api/StockInOut/GetStockInRfidLabel"), _defineProperty(_ApiUrl, "AddRfidCodeStockTag",
  11781. "/api/StockInOut/AddRfidCodeStockTag"), _defineProperty(_ApiUrl, "ScanRfidCodeStockTag",
  11782. "/api/StockInOut/ScanRfidCodeStockTag"), _defineProperty(_ApiUrl, "GetStockCheckList",
  11783. "/api/StockQuantityCheck/GetStockCheckList"), _defineProperty(_ApiUrl, "GetStockCheckRecord",
  11784. "/api/StockQuantityCheck/GetStockCheckRecord"), _defineProperty(_ApiUrl, "ScanRfidTagCode",
  11785. "/api/StockQuantityCheck/ScanRfidTagCode"), _defineProperty(_ApiUrl, "SubmitStockCheck",
  11786. "/api/StockQuantityCheck/SubmitStockCheck"), _defineProperty(_ApiUrl, "GetQuantityCheckLake",
  11787. "/api/StockQuantityCheck/GetQuantityCheckLake"), _defineProperty(_ApiUrl, "AddStockQtyCheckAdjust",
  11788. "/api/StockQuantityCheck/AddStockQtyCheckAdjust"), _defineProperty(_ApiUrl, "CreateRfidStockTag",
  11789. "/api/StockInOut/CreateRfidStockTag"), _defineProperty(_ApiUrl, "GetStockTagData",
  11790. "/api/StockInOut/GetStockTagData"), _defineProperty(_ApiUrl, "GetStockTagMaterial",
  11791. "/api/StockInOut/GetStockTagMaterial"), _defineProperty(_ApiUrl, "EveryDayStorageCheckList",
  11792. "/api/Stock/EveryDayStorageCheckList"), _defineProperty(_ApiUrl, "CompleteEveryDayBatchCheck",
  11793. "/api/Stock/CompleteEveryDayBatchCheck"), _defineProperty(_ApiUrl, "PeopleStorageCheckList",
  11794. "/api/Stock/PeopleStorageCheckList"), _defineProperty(_ApiUrl, "RfidCompleteCheck",
  11795. "/api/Stock/RfidCompleteCheck"), _defineProperty(_ApiUrl, "SaveReplaceRfidCodeTag",
  11796. "/api/StockInOut/SaveReplaceRfidCodeTag"), _defineProperty(_ApiUrl, "GetStockDataPageList",
  11797. "/api/Stock/GetStockDataPageList"), _defineProperty(_ApiUrl, "DoStorageDataInOut",
  11798. "/api/Stock/DoStorageDataInOut"), _defineProperty(_ApiUrl, "GetBatchCheckList",
  11799. "/api/Stock/GetBatchCheckList"), _defineProperty(_ApiUrl, "GetBatchCheckRfid",
  11800. "/api/Stock/GetBatchCheckRfid"), _defineProperty(_ApiUrl, "CompleteBatchCheck",
  11801. "/api/Stock/CompleteBatchCheck"), _defineProperty(_ApiUrl, "GetEveryDayCheckRfid",
  11802. "/api/Stock/GetEveryDayCheckRfid"), _defineProperty(_ApiUrl, "SubmitEveryDayCheckFlow",
  11803. "/api/Stock/SubmitEveryDayCheckFlow"), _defineProperty(_ApiUrl, "GetUserCheckList",
  11804. "/api/Stock/GetUserCheckList"), _defineProperty(_ApiUrl, "SubmitUserCheck",
  11805. "/api/Stock/SubmitUserCheck"), _defineProperty(_ApiUrl, "CompleteUserCheck",
  11806. "/api/Stock/CompleteUserCheck"), _defineProperty(_ApiUrl, "GetStockDetailRfid",
  11807. "/api/Stock/GetStockDetailRfid"), _defineProperty(_ApiUrl, "GetScanfTagMaterial",
  11808. "/api/Stock/GetScanfTagMaterial"), _defineProperty(_ApiUrl, "EditTag",
  11809. "/api/Stock/EditTag"), _defineProperty(_ApiUrl, "DelTag",
  11810. "/api/Stock/DelTag"), _defineProperty(_ApiUrl, "CreateTag",
  11811. "/api/Stock/CreateTag"), _defineProperty(_ApiUrl, "SubmitCheckResult",
  11812. "/api/Stock/SubmitCheckResult"), _defineProperty(_ApiUrl, "SaveStockInBack",
  11813. "/api/StockInOut/SaveStockInBack"), _defineProperty(_ApiUrl, "AddApplyStockOutBill",
  11814. "/api/ApplyTake/AddApplyStockOutBill"), _defineProperty(_ApiUrl, "GetApplyStockOutTemp",
  11815. "/api/ApplyTake/GetApplyStockOutTemp"), _defineProperty(_ApiUrl, "AddApplySceneBack",
  11816. "/api/ApplyTake/AddApplySceneBack"), _defineProperty(_ApiUrl, "GetStockBackHouse",
  11817. "/api/ApplyTake/GetStockBackHouse"), _defineProperty(_ApiUrl, "CommitStockBackHouse",
  11818. "/api/ApplyTake/CommitStockBackHouse"), _defineProperty(_ApiUrl, "HandleMacStockInOut",
  11819. "/api/StockInOut/HandleMacStockInOut"), _defineProperty(_ApiUrl, "HandleMacStorageInOut",
  11820. "/api/Device/HandleMacStorageInOut"), _defineProperty(_ApiUrl, "UploadBase64",
  11821. "/api/Upload/UploadBase64"), _defineProperty(_ApiUrl, "AddStockExemptCheck",
  11822. "/api/StockQuantityCheck/AddStockExemptCheck"), _ApiUrl);var
  11823. Api = /*#__PURE__*/function () {function Api() {_classCallCheck(this, Api);}_createClass(Api, null, [{ key: "GetStockBackHouse", value: function GetStockBackHouse()
  11824. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11825. return _request.default.post(ApiUrl.GetStockBackHouse, params);
  11826. } }, { key: "CommitStockBackHouse", value: function CommitStockBackHouse()
  11827. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11828. return _request.default.post(ApiUrl.CommitStockBackHouse, params);
  11829. } }, { key: "AddApplySceneBack", value: function AddApplySceneBack()
  11830. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11831. return _request.default.post(ApiUrl.AddApplySceneBack, params);
  11832. } }, { key: "AddStockExemptCheck", value: function AddStockExemptCheck()
  11833. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11834. return _request.default.post(ApiUrl.AddStockExemptCheck, params);
  11835. } }, { key: "GetContractBatchPageList", value: function GetContractBatchPageList()
  11836. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11837. return _request.default.post(ApiUrl.GetContractBatchPageList, params);
  11838. } }, { key: "CreateTag", value: function CreateTag()
  11839. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11840. return _request.default.post(ApiUrl.CreateTag, params);
  11841. } }, { key: "SubmitCheckResult", value: function SubmitCheckResult()
  11842. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11843. return _request.default.post(ApiUrl.SubmitCheckResult, params);
  11844. } }, { key: "DownloadApkFile", value: function DownloadApkFile()
  11845. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11846. return _request.default.post(ApiUrl.DownloadApkFile, params);
  11847. } }, { key: "GetScanfTagMaterial", value: function GetScanfTagMaterial()
  11848. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11849. return _request.default.post(ApiUrl.GetScanfTagMaterial, params);
  11850. } }, { key: "EditTag", value: function EditTag()
  11851. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11852. return _request.default.post(ApiUrl.EditTag, params);
  11853. } }, { key: "DelTag", value: function DelTag()
  11854. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11855. return _request.default.post(ApiUrl.DelTag, params);
  11856. } }, { key: "GetStockDetailRfid", value: function GetStockDetailRfid()
  11857. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11858. return _request.default.post(ApiUrl.GetStockDetailRfid, params);
  11859. } }, { key: "CompleteUserCheck", value: function CompleteUserCheck()
  11860. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11861. return _request.default.post(ApiUrl.CompleteUserCheck, params);
  11862. } }, { key: "SubmitUserCheck", value: function SubmitUserCheck()
  11863. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11864. return _request.default.post(ApiUrl.SubmitUserCheck, params);
  11865. } }, { key: "GetUserCheckList", value: function GetUserCheckList()
  11866. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11867. return _request.default.post(ApiUrl.GetUserCheckList, params);
  11868. } }, { key: "SubmitEveryDayCheckFlow", value: function SubmitEveryDayCheckFlow()
  11869. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11870. return _request.default.post(ApiUrl.SubmitEveryDayCheckFlow, params);
  11871. } }, { key: "GetEveryDayCheckRfid", value: function GetEveryDayCheckRfid()
  11872. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11873. return _request.default.post(ApiUrl.GetEveryDayCheckRfid, params);
  11874. } }, { key: "CompleteEveryDayBatchCheck", value: function CompleteEveryDayBatchCheck()
  11875. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11876. return _request.default.post(ApiUrl.CompleteEveryDayBatchCheck, params);
  11877. } }, { key: "CompleteBatchCheck", value: function CompleteBatchCheck()
  11878. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11879. return _request.default.post(ApiUrl.CompleteBatchCheck, params);
  11880. } }, { key: "GetBatchCheckList", value: function GetBatchCheckList()
  11881. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11882. return _request.default.post(ApiUrl.GetBatchCheckList, params);
  11883. } }, { key: "GetBatchCheckRfid", value: function GetBatchCheckRfid()
  11884. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11885. return _request.default.post(ApiUrl.GetBatchCheckRfid, params);
  11886. } }, { key: "UploadBase64", value: function UploadBase64()
  11887. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11888. return _request.default.post(ApiUrl.UploadBase64, params);
  11889. } }, { key: "GetStockHouse", value: function GetStockHouse()
  11890. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11891. return _request.default.post(ApiUrl.GetStockHouse, params);
  11892. } }, { key: "HandleMacStorageInOut", value: function HandleMacStorageInOut()
  11893. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11894. return _request.default.post(ApiUrl.HandleMacStorageInOut, params);
  11895. } }, { key: "GetStockTagMaterial", value: function GetStockTagMaterial()
  11896. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11897. return _request.default.post(ApiUrl.GetStockTagMaterial, params);
  11898. } }, { key: "GetStockTagData", value: function GetStockTagData()
  11899. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11900. return _request.default.post(ApiUrl.GetStockTagData, params);
  11901. } }, { key: "GetStockDataPageList", value: function GetStockDataPageList()
  11902. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11903. return _request.default.post(ApiUrl.GetStockDataPageList, params);
  11904. } }, { key: "DoStorageDataInOut", value: function DoStorageDataInOut()
  11905. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11906. return _request.default.post(ApiUrl.DoStorageDataInOut, params);
  11907. } }, { key: "HandleMacStockInOut", value: function HandleMacStockInOut()
  11908. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11909. return _request.default.post(ApiUrl.HandleMacStockInOut, params);
  11910. } }, { key: "GetUserPageList", value: function GetUserPageList()
  11911. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11912. return _request.default.post(ApiUrl.GetUserPageList, params);
  11913. } }, { key: "GetApplyStockOutTemp", value: function GetApplyStockOutTemp()
  11914. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11915. return _request.default.post(ApiUrl.GetApplyStockOutTemp, params);
  11916. } }, { key: "GetUserInfo", value: function GetUserInfo()
  11917. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11918. return _request.default.post(ApiUrl.GetUserInfo, params);
  11919. } }, { key: "Login", value: function Login()
  11920. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11921. return _request.default.post(ApiUrl.Login, params);
  11922. } }, { key: "LoginQuit", value: function LoginQuit()
  11923. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11924. return _request.default.post(ApiUrl.LoginQuit, params);
  11925. } }, { key: "SaveReplaceRfidCodeTag", value: function SaveReplaceRfidCodeTag()
  11926. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11927. return _request.default.post(ApiUrl.SaveReplaceRfidCodeTag, params);
  11928. } }, { key: "CreateRfidStockTag", value: function CreateRfidStockTag()
  11929. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11930. return _request.default.post(ApiUrl.CreateRfidStockTag, params);
  11931. } }, { key: "AddApplyStockOutBill", value: function AddApplyStockOutBill()
  11932. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11933. return _request.default.post(ApiUrl.AddApplyStockOutBill, params);
  11934. } }, { key: "SaveStockInBack", value: function SaveStockInBack()
  11935. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11936. return _request.default.post(ApiUrl.SaveStockInBack, params);
  11937. } }, { key: "RfidCompleteCheck", value: function RfidCompleteCheck()
  11938. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11939. return _request.default.post(ApiUrl.RfidCompleteCheck, params);
  11940. } }, { key: "PeopleStorageCheckList", value: function PeopleStorageCheckList()
  11941. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11942. return _request.default.post(ApiUrl.PeopleStorageCheckList, params);
  11943. } }, { key: "EveryDayStorageCheckList", value: function EveryDayStorageCheckList()
  11944. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11945. return _request.default.post(ApiUrl.EveryDayStorageCheckList, params);
  11946. } }, { key: "AddStockQtyCheckAdjust", value: function AddStockQtyCheckAdjust()
  11947. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11948. return _request.default.post(ApiUrl.AddStockQtyCheckAdjust, params);
  11949. } }, { key: "GetQuantityCheckLake", value: function GetQuantityCheckLake()
  11950. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11951. return _request.default.post(ApiUrl.GetQuantityCheckLake, params);
  11952. } }, { key: "SubmitStockCheck", value: function SubmitStockCheck()
  11953. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11954. return _request.default.post(ApiUrl.SubmitStockCheck, params);
  11955. } }, { key: "ScanRfidTagCode", value: function ScanRfidTagCode()
  11956. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11957. return _request.default.post(ApiUrl.ScanRfidTagCode, params);
  11958. } }, { key: "GetStockCheckRecord", value: function GetStockCheckRecord()
  11959. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11960. return _request.default.post(ApiUrl.GetStockCheckRecord, params);
  11961. } }, { key: "GetStockCheckList", value: function GetStockCheckList()
  11962. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11963. return _request.default.post(ApiUrl.GetStockCheckList, params);
  11964. } }, { key: "ScanRfidCodeStockTag", value: function ScanRfidCodeStockTag()
  11965. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11966. return _request.default.post(ApiUrl.ScanRfidCodeStockTag, params);
  11967. } }, { key: "AddRfidCodeStockTag", value: function AddRfidCodeStockTag()
  11968. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11969. return _request.default.post(ApiUrl.AddRfidCodeStockTag, params);
  11970. } }, { key: "BandingStockInRfidCode", value: function BandingStockInRfidCode()
  11971. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11972. return _request.default.post(ApiUrl.BandingStockInRfidCode, params);
  11973. } }, { key: "GetStockInRfidLabel", value: function GetStockInRfidLabel()
  11974. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11975. return _request.default.post(ApiUrl.GetStockInRfidLabel, params);
  11976. } }, { key: "ScanStockInQRCode", value: function ScanStockInQRCode()
  11977. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11978. return _request.default.post(ApiUrl.ScanStockInQRCode, params);
  11979. } }, { key: "GetZTreeChildren", value: function GetZTreeChildren()
  11980. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11981. return _request.default.post(ApiUrl.GetZTreeChildren, params);
  11982. } }, { key: "Material", value: function Material()
  11983. {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11984. return _request.default.post(ApiUrl.Material, params);
  11985. } }]);return Api;}();var _default =
  11986. Api;exports.default = _default;
  11987. /***/ }),
  11988. /***/ 46:
  11989. /*!*********************************************************************************************************!*\
  11990. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/request.js ***!
  11991. \*********************************************************************************************************/
  11992. /*! no static exports found */
  11993. /***/ (function(module, exports, __webpack_require__) {
  11994. "use strict";
  11995. /* 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 */ 22));var _config = _interopRequireDefault(__webpack_require__(/*! ../config/config.js */ 47));
  11996. var _index = _interopRequireDefault(__webpack_require__(/*! ../../store/index.js */ 48));
  11997. var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 44));
  11998. var _statusCode = _interopRequireDefault(__webpack_require__(/*! ./statusCode.js */ 53));
  11999. var _util = _interopRequireDefault(__webpack_require__(/*! ./util.js */ 43));
  12000. var _storage = _interopRequireDefault(__webpack_require__(/*! ./storage.js */ 54));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 _default =
  12001. {
  12002. config: {
  12003. header: {
  12004. TargetCode: 3 },
  12005. data: {},
  12006. url: _config.default.baseUrl,
  12007. method: "POST",
  12008. timeout: 10000 },
  12009. request: function request() {var _arguments = arguments,_this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var options, token;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:options = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : {};_context.next = 3;return (
  12010. _storage.default.getStorageSync('token'));case 3:_context.t0 = _context.sent;if (_context.t0) {_context.next = 6;break;}_context.t0 = '';case 6:token = _context.t0;
  12011. options.data.token = token;
  12012. !options.data.isUnShowLoading && _message.default.showLoading(); // isUnShowLoading为true时不显示加载
  12013. return _context.abrupt("return", new Promise(function (resolve, reject) {
  12014. options.header = options.header || _this.config.header;
  12015. options.timeout = options.timeout || _this.config.timeout;
  12016. options.method = options.method || _this.config.method;
  12017. options.data = options.data || _this.config.data;
  12018. options.url = options.url;
  12019. options.success = function (response) {
  12020. !options.data.isUnShowLoading && _message.default.hideLoading();
  12021. if (response.statusCode === 404) {
  12022. console.log(options.url);
  12023. return _message.default.showToast('未知的请求!');
  12024. }
  12025. var res = response.data;
  12026. // 状态码处理
  12027. if (res.code == _statusCode.default.OCCUPY_CODE) {
  12028. _message.default.showToast('账号信息已过期,请重新登录!');
  12029. _storage.default.removeStorageSync('token');
  12030. return _util.default.openReLaunch('/pages/login/login');
  12031. } else if (res.code == _statusCode.default.UNKNOW_CODE) {
  12032. if (res.msg == 'The token field is required.') {
  12033. if (options.url.indexOf('api/Account/UpdatePhoneOnline') === -1) {
  12034. _message.default.showToast('登录信息有误,请重新登录!');
  12035. }
  12036. _storage.default.removeStorageSync('token');
  12037. return _util.default.openReLaunch('/pages/login/login');
  12038. } else {
  12039. console.log(options.url);
  12040. console.log(res);
  12041. return _message.default.showToast("\u5B57\u6BB5\u9519\u8BEF\uFF01\n".concat(res.msg));
  12042. }
  12043. } else if (res.code !== 0) {
  12044. _message.default.showToast("".concat(res.msg));
  12045. return resolve(res);
  12046. }
  12047. return resolve(res);
  12048. };
  12049. options.fail = function (err) {
  12050. console.log('请求失败');
  12051. console.log(err);
  12052. // console.log(options)
  12053. _message.default.showToast('请求失败,请检查网络是否正常!');
  12054. _message.default.hideLoading();
  12055. return reject(err);
  12056. };
  12057. uni.request(options);
  12058. }));case 10:case "end":return _context.stop();}}}, _callee);}))();
  12059. },
  12060. post: function post(url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12061. // 于测试切换ip
  12062. options.url = _config.default.baseUrl + url;
  12063. // console.log(options.url, 'url');
  12064. // options.url = config.baseUrl + url;
  12065. options.data = data;
  12066. options.method = 'POST';
  12067. return this.request(options);
  12068. },
  12069. get: function get(url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12070. options.url = _config.default.baseUrl + url;
  12071. options.method = 'GET';
  12072. return this.request(options);
  12073. } };exports.default = _default;
  12074. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12075. /***/ }),
  12076. /***/ 47:
  12077. /*!*********************************************************************************************************!*\
  12078. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/config/config.js ***!
  12079. \*********************************************************************************************************/
  12080. /*! no static exports found */
  12081. /***/ (function(module, exports, __webpack_require__) {
  12082. "use strict";
  12083. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  12084. baseUrl: true ? 'http://120.79.80.64:8002' : undefined
  12085. // baseUrl: process.env.NODE_ENV === 'development'? 'http://114.115.167.11:8055': 'http://114.115.167.1 ohia1:8055'
  12086. // baseUrl: process.env.NODE_ENV === 'development'? 'http://192.168.124.11:5003': 'http://192.168.0.128:5002'
  12087. };exports.default = _default;
  12088. /***/ }),
  12089. /***/ 48:
  12090. /*!**************************************************************************************************!*\
  12091. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/store/index.js ***!
  12092. \**************************************************************************************************/
  12093. /*! no static exports found */
  12094. /***/ (function(module, exports, __webpack_require__) {
  12095. "use strict";
  12096. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  12097. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 49));
  12098. var _getters = _interopRequireDefault(__webpack_require__(/*! ./getters */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  12099. _vue.default.use(_vuex.default);
  12100. var modulesFiles = __webpack_require__(51);
  12101. // you do not need `import app from './modules/app'`
  12102. // it will auto require all vuex module from modules file
  12103. var modules = modulesFiles.keys().reduce(function (modules, modulePath) {
  12104. // set './app.js' => 'app'
  12105. var moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
  12106. var value = modulesFiles(modulePath);
  12107. modules[moduleName] = value.default;
  12108. return modules;
  12109. }, {});
  12110. var store = new _vuex.default.Store({
  12111. modules: modules,
  12112. getters: _getters.default });var _default =
  12113. store;exports.default = _default;
  12114. /***/ }),
  12115. /***/ 49:
  12116. /*!**************************************************************************************!*\
  12117. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  12118. \**************************************************************************************/
  12119. /*! no static exports found */
  12120. /***/ (function(module, exports, __webpack_require__) {
  12121. "use strict";
  12122. /* WEBPACK VAR INJECTION */(function(global) {/*!
  12123. * vuex v3.6.2
  12124. * (c) 2021 Evan You
  12125. * @license MIT
  12126. */
  12127. function applyMixin (Vue) {
  12128. var version = Number(Vue.version.split('.')[0]);
  12129. if (version >= 2) {
  12130. Vue.mixin({ beforeCreate: vuexInit });
  12131. } else {
  12132. // override init and inject vuex init procedure
  12133. // for 1.x backwards compatibility.
  12134. var _init = Vue.prototype._init;
  12135. Vue.prototype._init = function (options) {
  12136. if ( options === void 0 ) options = {};
  12137. options.init = options.init
  12138. ? [vuexInit].concat(options.init)
  12139. : vuexInit;
  12140. _init.call(this, options);
  12141. };
  12142. }
  12143. /**
  12144. * Vuex init hook, injected into each instances init hooks list.
  12145. */
  12146. function vuexInit () {
  12147. var options = this.$options;
  12148. // store injection
  12149. if (options.store) {
  12150. this.$store = typeof options.store === 'function'
  12151. ? options.store()
  12152. : options.store;
  12153. } else if (options.parent && options.parent.$store) {
  12154. this.$store = options.parent.$store;
  12155. }
  12156. }
  12157. }
  12158. var target = typeof window !== 'undefined'
  12159. ? window
  12160. : typeof global !== 'undefined'
  12161. ? global
  12162. : {};
  12163. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  12164. function devtoolPlugin (store) {
  12165. if (!devtoolHook) { return }
  12166. store._devtoolHook = devtoolHook;
  12167. devtoolHook.emit('vuex:init', store);
  12168. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  12169. store.replaceState(targetState);
  12170. });
  12171. store.subscribe(function (mutation, state) {
  12172. devtoolHook.emit('vuex:mutation', mutation, state);
  12173. }, { prepend: true });
  12174. store.subscribeAction(function (action, state) {
  12175. devtoolHook.emit('vuex:action', action, state);
  12176. }, { prepend: true });
  12177. }
  12178. /**
  12179. * Get the first item that pass the test
  12180. * by second argument function
  12181. *
  12182. * @param {Array} list
  12183. * @param {Function} f
  12184. * @return {*}
  12185. */
  12186. function find (list, f) {
  12187. return list.filter(f)[0]
  12188. }
  12189. /**
  12190. * Deep copy the given object considering circular structure.
  12191. * This function caches all nested objects and its copies.
  12192. * If it detects circular structure, use cached copy to avoid infinite loop.
  12193. *
  12194. * @param {*} obj
  12195. * @param {Array<Object>} cache
  12196. * @return {*}
  12197. */
  12198. function deepCopy (obj, cache) {
  12199. if ( cache === void 0 ) cache = [];
  12200. // just return if obj is immutable value
  12201. if (obj === null || typeof obj !== 'object') {
  12202. return obj
  12203. }
  12204. // if obj is hit, it is in circular structure
  12205. var hit = find(cache, function (c) { return c.original === obj; });
  12206. if (hit) {
  12207. return hit.copy
  12208. }
  12209. var copy = Array.isArray(obj) ? [] : {};
  12210. // put the copy into cache at first
  12211. // because we want to refer it in recursive deepCopy
  12212. cache.push({
  12213. original: obj,
  12214. copy: copy
  12215. });
  12216. Object.keys(obj).forEach(function (key) {
  12217. copy[key] = deepCopy(obj[key], cache);
  12218. });
  12219. return copy
  12220. }
  12221. /**
  12222. * forEach for object
  12223. */
  12224. function forEachValue (obj, fn) {
  12225. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  12226. }
  12227. function isObject (obj) {
  12228. return obj !== null && typeof obj === 'object'
  12229. }
  12230. function isPromise (val) {
  12231. return val && typeof val.then === 'function'
  12232. }
  12233. function assert (condition, msg) {
  12234. if (!condition) { throw new Error(("[vuex] " + msg)) }
  12235. }
  12236. function partial (fn, arg) {
  12237. return function () {
  12238. return fn(arg)
  12239. }
  12240. }
  12241. // Base data struct for store's module, package with some attribute and method
  12242. var Module = function Module (rawModule, runtime) {
  12243. this.runtime = runtime;
  12244. // Store some children item
  12245. this._children = Object.create(null);
  12246. // Store the origin module object which passed by programmer
  12247. this._rawModule = rawModule;
  12248. var rawState = rawModule.state;
  12249. // Store the origin module's state
  12250. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  12251. };
  12252. var prototypeAccessors = { namespaced: { configurable: true } };
  12253. prototypeAccessors.namespaced.get = function () {
  12254. return !!this._rawModule.namespaced
  12255. };
  12256. Module.prototype.addChild = function addChild (key, module) {
  12257. this._children[key] = module;
  12258. };
  12259. Module.prototype.removeChild = function removeChild (key) {
  12260. delete this._children[key];
  12261. };
  12262. Module.prototype.getChild = function getChild (key) {
  12263. return this._children[key]
  12264. };
  12265. Module.prototype.hasChild = function hasChild (key) {
  12266. return key in this._children
  12267. };
  12268. Module.prototype.update = function update (rawModule) {
  12269. this._rawModule.namespaced = rawModule.namespaced;
  12270. if (rawModule.actions) {
  12271. this._rawModule.actions = rawModule.actions;
  12272. }
  12273. if (rawModule.mutations) {
  12274. this._rawModule.mutations = rawModule.mutations;
  12275. }
  12276. if (rawModule.getters) {
  12277. this._rawModule.getters = rawModule.getters;
  12278. }
  12279. };
  12280. Module.prototype.forEachChild = function forEachChild (fn) {
  12281. forEachValue(this._children, fn);
  12282. };
  12283. Module.prototype.forEachGetter = function forEachGetter (fn) {
  12284. if (this._rawModule.getters) {
  12285. forEachValue(this._rawModule.getters, fn);
  12286. }
  12287. };
  12288. Module.prototype.forEachAction = function forEachAction (fn) {
  12289. if (this._rawModule.actions) {
  12290. forEachValue(this._rawModule.actions, fn);
  12291. }
  12292. };
  12293. Module.prototype.forEachMutation = function forEachMutation (fn) {
  12294. if (this._rawModule.mutations) {
  12295. forEachValue(this._rawModule.mutations, fn);
  12296. }
  12297. };
  12298. Object.defineProperties( Module.prototype, prototypeAccessors );
  12299. var ModuleCollection = function ModuleCollection (rawRootModule) {
  12300. // register root module (Vuex.Store options)
  12301. this.register([], rawRootModule, false);
  12302. };
  12303. ModuleCollection.prototype.get = function get (path) {
  12304. return path.reduce(function (module, key) {
  12305. return module.getChild(key)
  12306. }, this.root)
  12307. };
  12308. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  12309. var module = this.root;
  12310. return path.reduce(function (namespace, key) {
  12311. module = module.getChild(key);
  12312. return namespace + (module.namespaced ? key + '/' : '')
  12313. }, '')
  12314. };
  12315. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  12316. update([], this.root, rawRootModule);
  12317. };
  12318. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  12319. var this$1 = this;
  12320. if ( runtime === void 0 ) runtime = true;
  12321. if ((true)) {
  12322. assertRawModule(path, rawModule);
  12323. }
  12324. var newModule = new Module(rawModule, runtime);
  12325. if (path.length === 0) {
  12326. this.root = newModule;
  12327. } else {
  12328. var parent = this.get(path.slice(0, -1));
  12329. parent.addChild(path[path.length - 1], newModule);
  12330. }
  12331. // register nested modules
  12332. if (rawModule.modules) {
  12333. forEachValue(rawModule.modules, function (rawChildModule, key) {
  12334. this$1.register(path.concat(key), rawChildModule, runtime);
  12335. });
  12336. }
  12337. };
  12338. ModuleCollection.prototype.unregister = function unregister (path) {
  12339. var parent = this.get(path.slice(0, -1));
  12340. var key = path[path.length - 1];
  12341. var child = parent.getChild(key);
  12342. if (!child) {
  12343. if ((true)) {
  12344. console.warn(
  12345. "[vuex] trying to unregister module '" + key + "', which is " +
  12346. "not registered"
  12347. );
  12348. }
  12349. return
  12350. }
  12351. if (!child.runtime) {
  12352. return
  12353. }
  12354. parent.removeChild(key);
  12355. };
  12356. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  12357. var parent = this.get(path.slice(0, -1));
  12358. var key = path[path.length - 1];
  12359. if (parent) {
  12360. return parent.hasChild(key)
  12361. }
  12362. return false
  12363. };
  12364. function update (path, targetModule, newModule) {
  12365. if ((true)) {
  12366. assertRawModule(path, newModule);
  12367. }
  12368. // update target module
  12369. targetModule.update(newModule);
  12370. // update nested modules
  12371. if (newModule.modules) {
  12372. for (var key in newModule.modules) {
  12373. if (!targetModule.getChild(key)) {
  12374. if ((true)) {
  12375. console.warn(
  12376. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  12377. 'manual reload is needed'
  12378. );
  12379. }
  12380. return
  12381. }
  12382. update(
  12383. path.concat(key),
  12384. targetModule.getChild(key),
  12385. newModule.modules[key]
  12386. );
  12387. }
  12388. }
  12389. }
  12390. var functionAssert = {
  12391. assert: function (value) { return typeof value === 'function'; },
  12392. expected: 'function'
  12393. };
  12394. var objectAssert = {
  12395. assert: function (value) { return typeof value === 'function' ||
  12396. (typeof value === 'object' && typeof value.handler === 'function'); },
  12397. expected: 'function or object with "handler" function'
  12398. };
  12399. var assertTypes = {
  12400. getters: functionAssert,
  12401. mutations: functionAssert,
  12402. actions: objectAssert
  12403. };
  12404. function assertRawModule (path, rawModule) {
  12405. Object.keys(assertTypes).forEach(function (key) {
  12406. if (!rawModule[key]) { return }
  12407. var assertOptions = assertTypes[key];
  12408. forEachValue(rawModule[key], function (value, type) {
  12409. assert(
  12410. assertOptions.assert(value),
  12411. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  12412. );
  12413. });
  12414. });
  12415. }
  12416. function makeAssertionMessage (path, key, type, value, expected) {
  12417. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  12418. if (path.length > 0) {
  12419. buf += " in module \"" + (path.join('.')) + "\"";
  12420. }
  12421. buf += " is " + (JSON.stringify(value)) + ".";
  12422. return buf
  12423. }
  12424. var Vue; // bind on install
  12425. var Store = function Store (options) {
  12426. var this$1 = this;
  12427. if ( options === void 0 ) options = {};
  12428. // Auto install if it is not done yet and `window` has `Vue`.
  12429. // To allow users to avoid auto-installation in some cases,
  12430. // this code should be placed here. See #731
  12431. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  12432. install(window.Vue);
  12433. }
  12434. if ((true)) {
  12435. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  12436. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  12437. assert(this instanceof Store, "store must be called with the new operator.");
  12438. }
  12439. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  12440. var strict = options.strict; if ( strict === void 0 ) strict = false;
  12441. // store internal state
  12442. this._committing = false;
  12443. this._actions = Object.create(null);
  12444. this._actionSubscribers = [];
  12445. this._mutations = Object.create(null);
  12446. this._wrappedGetters = Object.create(null);
  12447. this._modules = new ModuleCollection(options);
  12448. this._modulesNamespaceMap = Object.create(null);
  12449. this._subscribers = [];
  12450. this._watcherVM = new Vue();
  12451. this._makeLocalGettersCache = Object.create(null);
  12452. // bind commit and dispatch to self
  12453. var store = this;
  12454. var ref = this;
  12455. var dispatch = ref.dispatch;
  12456. var commit = ref.commit;
  12457. this.dispatch = function boundDispatch (type, payload) {
  12458. return dispatch.call(store, type, payload)
  12459. };
  12460. this.commit = function boundCommit (type, payload, options) {
  12461. return commit.call(store, type, payload, options)
  12462. };
  12463. // strict mode
  12464. this.strict = strict;
  12465. var state = this._modules.root.state;
  12466. // init root module.
  12467. // this also recursively registers all sub-modules
  12468. // and collects all module getters inside this._wrappedGetters
  12469. installModule(this, state, [], this._modules.root);
  12470. // initialize the store vm, which is responsible for the reactivity
  12471. // (also registers _wrappedGetters as computed properties)
  12472. resetStoreVM(this, state);
  12473. // apply plugins
  12474. plugins.forEach(function (plugin) { return plugin(this$1); });
  12475. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  12476. if (useDevtools) {
  12477. devtoolPlugin(this);
  12478. }
  12479. };
  12480. var prototypeAccessors$1 = { state: { configurable: true } };
  12481. prototypeAccessors$1.state.get = function () {
  12482. return this._vm._data.$$state
  12483. };
  12484. prototypeAccessors$1.state.set = function (v) {
  12485. if ((true)) {
  12486. assert(false, "use store.replaceState() to explicit replace store state.");
  12487. }
  12488. };
  12489. Store.prototype.commit = function commit (_type, _payload, _options) {
  12490. var this$1 = this;
  12491. // check object-style commit
  12492. var ref = unifyObjectStyle(_type, _payload, _options);
  12493. var type = ref.type;
  12494. var payload = ref.payload;
  12495. var options = ref.options;
  12496. var mutation = { type: type, payload: payload };
  12497. var entry = this._mutations[type];
  12498. if (!entry) {
  12499. if ((true)) {
  12500. console.error(("[vuex] unknown mutation type: " + type));
  12501. }
  12502. return
  12503. }
  12504. this._withCommit(function () {
  12505. entry.forEach(function commitIterator (handler) {
  12506. handler(payload);
  12507. });
  12508. });
  12509. this._subscribers
  12510. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12511. .forEach(function (sub) { return sub(mutation, this$1.state); });
  12512. if (
  12513. ( true) &&
  12514. options && options.silent
  12515. ) {
  12516. console.warn(
  12517. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  12518. 'Use the filter functionality in the vue-devtools'
  12519. );
  12520. }
  12521. };
  12522. Store.prototype.dispatch = function dispatch (_type, _payload) {
  12523. var this$1 = this;
  12524. // check object-style dispatch
  12525. var ref = unifyObjectStyle(_type, _payload);
  12526. var type = ref.type;
  12527. var payload = ref.payload;
  12528. var action = { type: type, payload: payload };
  12529. var entry = this._actions[type];
  12530. if (!entry) {
  12531. if ((true)) {
  12532. console.error(("[vuex] unknown action type: " + type));
  12533. }
  12534. return
  12535. }
  12536. try {
  12537. this._actionSubscribers
  12538. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12539. .filter(function (sub) { return sub.before; })
  12540. .forEach(function (sub) { return sub.before(action, this$1.state); });
  12541. } catch (e) {
  12542. if ((true)) {
  12543. console.warn("[vuex] error in before action subscribers: ");
  12544. console.error(e);
  12545. }
  12546. }
  12547. var result = entry.length > 1
  12548. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  12549. : entry[0](payload);
  12550. return new Promise(function (resolve, reject) {
  12551. result.then(function (res) {
  12552. try {
  12553. this$1._actionSubscribers
  12554. .filter(function (sub) { return sub.after; })
  12555. .forEach(function (sub) { return sub.after(action, this$1.state); });
  12556. } catch (e) {
  12557. if ((true)) {
  12558. console.warn("[vuex] error in after action subscribers: ");
  12559. console.error(e);
  12560. }
  12561. }
  12562. resolve(res);
  12563. }, function (error) {
  12564. try {
  12565. this$1._actionSubscribers
  12566. .filter(function (sub) { return sub.error; })
  12567. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  12568. } catch (e) {
  12569. if ((true)) {
  12570. console.warn("[vuex] error in error action subscribers: ");
  12571. console.error(e);
  12572. }
  12573. }
  12574. reject(error);
  12575. });
  12576. })
  12577. };
  12578. Store.prototype.subscribe = function subscribe (fn, options) {
  12579. return genericSubscribe(fn, this._subscribers, options)
  12580. };
  12581. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  12582. var subs = typeof fn === 'function' ? { before: fn } : fn;
  12583. return genericSubscribe(subs, this._actionSubscribers, options)
  12584. };
  12585. Store.prototype.watch = function watch (getter, cb, options) {
  12586. var this$1 = this;
  12587. if ((true)) {
  12588. assert(typeof getter === 'function', "store.watch only accepts a function.");
  12589. }
  12590. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  12591. };
  12592. Store.prototype.replaceState = function replaceState (state) {
  12593. var this$1 = this;
  12594. this._withCommit(function () {
  12595. this$1._vm._data.$$state = state;
  12596. });
  12597. };
  12598. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  12599. if ( options === void 0 ) options = {};
  12600. if (typeof path === 'string') { path = [path]; }
  12601. if ((true)) {
  12602. assert(Array.isArray(path), "module path must be a string or an Array.");
  12603. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  12604. }
  12605. this._modules.register(path, rawModule);
  12606. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  12607. // reset store to update getters...
  12608. resetStoreVM(this, this.state);
  12609. };
  12610. Store.prototype.unregisterModule = function unregisterModule (path) {
  12611. var this$1 = this;
  12612. if (typeof path === 'string') { path = [path]; }
  12613. if ((true)) {
  12614. assert(Array.isArray(path), "module path must be a string or an Array.");
  12615. }
  12616. this._modules.unregister(path);
  12617. this._withCommit(function () {
  12618. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  12619. Vue.delete(parentState, path[path.length - 1]);
  12620. });
  12621. resetStore(this);
  12622. };
  12623. Store.prototype.hasModule = function hasModule (path) {
  12624. if (typeof path === 'string') { path = [path]; }
  12625. if ((true)) {
  12626. assert(Array.isArray(path), "module path must be a string or an Array.");
  12627. }
  12628. return this._modules.isRegistered(path)
  12629. };
  12630. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  12631. this._modules.update(newOptions);
  12632. resetStore(this, true);
  12633. };
  12634. Store.prototype._withCommit = function _withCommit (fn) {
  12635. var committing = this._committing;
  12636. this._committing = true;
  12637. fn();
  12638. this._committing = committing;
  12639. };
  12640. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  12641. function genericSubscribe (fn, subs, options) {
  12642. if (subs.indexOf(fn) < 0) {
  12643. options && options.prepend
  12644. ? subs.unshift(fn)
  12645. : subs.push(fn);
  12646. }
  12647. return function () {
  12648. var i = subs.indexOf(fn);
  12649. if (i > -1) {
  12650. subs.splice(i, 1);
  12651. }
  12652. }
  12653. }
  12654. function resetStore (store, hot) {
  12655. store._actions = Object.create(null);
  12656. store._mutations = Object.create(null);
  12657. store._wrappedGetters = Object.create(null);
  12658. store._modulesNamespaceMap = Object.create(null);
  12659. var state = store.state;
  12660. // init all modules
  12661. installModule(store, state, [], store._modules.root, true);
  12662. // reset vm
  12663. resetStoreVM(store, state, hot);
  12664. }
  12665. function resetStoreVM (store, state, hot) {
  12666. var oldVm = store._vm;
  12667. // bind store public getters
  12668. store.getters = {};
  12669. // reset local getters cache
  12670. store._makeLocalGettersCache = Object.create(null);
  12671. var wrappedGetters = store._wrappedGetters;
  12672. var computed = {};
  12673. forEachValue(wrappedGetters, function (fn, key) {
  12674. // use computed to leverage its lazy-caching mechanism
  12675. // direct inline function use will lead to closure preserving oldVm.
  12676. // using partial to return function with only arguments preserved in closure environment.
  12677. computed[key] = partial(fn, store);
  12678. Object.defineProperty(store.getters, key, {
  12679. get: function () { return store._vm[key]; },
  12680. enumerable: true // for local getters
  12681. });
  12682. });
  12683. // use a Vue instance to store the state tree
  12684. // suppress warnings just in case the user has added
  12685. // some funky global mixins
  12686. var silent = Vue.config.silent;
  12687. Vue.config.silent = true;
  12688. store._vm = new Vue({
  12689. data: {
  12690. $$state: state
  12691. },
  12692. computed: computed
  12693. });
  12694. Vue.config.silent = silent;
  12695. // enable strict mode for new vm
  12696. if (store.strict) {
  12697. enableStrictMode(store);
  12698. }
  12699. if (oldVm) {
  12700. if (hot) {
  12701. // dispatch changes in all subscribed watchers
  12702. // to force getter re-evaluation for hot reloading.
  12703. store._withCommit(function () {
  12704. oldVm._data.$$state = null;
  12705. });
  12706. }
  12707. Vue.nextTick(function () { return oldVm.$destroy(); });
  12708. }
  12709. }
  12710. function installModule (store, rootState, path, module, hot) {
  12711. var isRoot = !path.length;
  12712. var namespace = store._modules.getNamespace(path);
  12713. // register in namespace map
  12714. if (module.namespaced) {
  12715. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  12716. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  12717. }
  12718. store._modulesNamespaceMap[namespace] = module;
  12719. }
  12720. // set state
  12721. if (!isRoot && !hot) {
  12722. var parentState = getNestedState(rootState, path.slice(0, -1));
  12723. var moduleName = path[path.length - 1];
  12724. store._withCommit(function () {
  12725. if ((true)) {
  12726. if (moduleName in parentState) {
  12727. console.warn(
  12728. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  12729. );
  12730. }
  12731. }
  12732. Vue.set(parentState, moduleName, module.state);
  12733. });
  12734. }
  12735. var local = module.context = makeLocalContext(store, namespace, path);
  12736. module.forEachMutation(function (mutation, key) {
  12737. var namespacedType = namespace + key;
  12738. registerMutation(store, namespacedType, mutation, local);
  12739. });
  12740. module.forEachAction(function (action, key) {
  12741. var type = action.root ? key : namespace + key;
  12742. var handler = action.handler || action;
  12743. registerAction(store, type, handler, local);
  12744. });
  12745. module.forEachGetter(function (getter, key) {
  12746. var namespacedType = namespace + key;
  12747. registerGetter(store, namespacedType, getter, local);
  12748. });
  12749. module.forEachChild(function (child, key) {
  12750. installModule(store, rootState, path.concat(key), child, hot);
  12751. });
  12752. }
  12753. /**
  12754. * make localized dispatch, commit, getters and state
  12755. * if there is no namespace, just use root ones
  12756. */
  12757. function makeLocalContext (store, namespace, path) {
  12758. var noNamespace = namespace === '';
  12759. var local = {
  12760. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  12761. var args = unifyObjectStyle(_type, _payload, _options);
  12762. var payload = args.payload;
  12763. var options = args.options;
  12764. var type = args.type;
  12765. if (!options || !options.root) {
  12766. type = namespace + type;
  12767. if (( true) && !store._actions[type]) {
  12768. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  12769. return
  12770. }
  12771. }
  12772. return store.dispatch(type, payload)
  12773. },
  12774. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  12775. var args = unifyObjectStyle(_type, _payload, _options);
  12776. var payload = args.payload;
  12777. var options = args.options;
  12778. var type = args.type;
  12779. if (!options || !options.root) {
  12780. type = namespace + type;
  12781. if (( true) && !store._mutations[type]) {
  12782. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  12783. return
  12784. }
  12785. }
  12786. store.commit(type, payload, options);
  12787. }
  12788. };
  12789. // getters and state object must be gotten lazily
  12790. // because they will be changed by vm update
  12791. Object.defineProperties(local, {
  12792. getters: {
  12793. get: noNamespace
  12794. ? function () { return store.getters; }
  12795. : function () { return makeLocalGetters(store, namespace); }
  12796. },
  12797. state: {
  12798. get: function () { return getNestedState(store.state, path); }
  12799. }
  12800. });
  12801. return local
  12802. }
  12803. function makeLocalGetters (store, namespace) {
  12804. if (!store._makeLocalGettersCache[namespace]) {
  12805. var gettersProxy = {};
  12806. var splitPos = namespace.length;
  12807. Object.keys(store.getters).forEach(function (type) {
  12808. // skip if the target getter is not match this namespace
  12809. if (type.slice(0, splitPos) !== namespace) { return }
  12810. // extract local getter type
  12811. var localType = type.slice(splitPos);
  12812. // Add a port to the getters proxy.
  12813. // Define as getter property because
  12814. // we do not want to evaluate the getters in this time.
  12815. Object.defineProperty(gettersProxy, localType, {
  12816. get: function () { return store.getters[type]; },
  12817. enumerable: true
  12818. });
  12819. });
  12820. store._makeLocalGettersCache[namespace] = gettersProxy;
  12821. }
  12822. return store._makeLocalGettersCache[namespace]
  12823. }
  12824. function registerMutation (store, type, handler, local) {
  12825. var entry = store._mutations[type] || (store._mutations[type] = []);
  12826. entry.push(function wrappedMutationHandler (payload) {
  12827. handler.call(store, local.state, payload);
  12828. });
  12829. }
  12830. function registerAction (store, type, handler, local) {
  12831. var entry = store._actions[type] || (store._actions[type] = []);
  12832. entry.push(function wrappedActionHandler (payload) {
  12833. var res = handler.call(store, {
  12834. dispatch: local.dispatch,
  12835. commit: local.commit,
  12836. getters: local.getters,
  12837. state: local.state,
  12838. rootGetters: store.getters,
  12839. rootState: store.state
  12840. }, payload);
  12841. if (!isPromise(res)) {
  12842. res = Promise.resolve(res);
  12843. }
  12844. if (store._devtoolHook) {
  12845. return res.catch(function (err) {
  12846. store._devtoolHook.emit('vuex:error', err);
  12847. throw err
  12848. })
  12849. } else {
  12850. return res
  12851. }
  12852. });
  12853. }
  12854. function registerGetter (store, type, rawGetter, local) {
  12855. if (store._wrappedGetters[type]) {
  12856. if ((true)) {
  12857. console.error(("[vuex] duplicate getter key: " + type));
  12858. }
  12859. return
  12860. }
  12861. store._wrappedGetters[type] = function wrappedGetter (store) {
  12862. return rawGetter(
  12863. local.state, // local state
  12864. local.getters, // local getters
  12865. store.state, // root state
  12866. store.getters // root getters
  12867. )
  12868. };
  12869. }
  12870. function enableStrictMode (store) {
  12871. store._vm.$watch(function () { return this._data.$$state }, function () {
  12872. if ((true)) {
  12873. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  12874. }
  12875. }, { deep: true, sync: true });
  12876. }
  12877. function getNestedState (state, path) {
  12878. return path.reduce(function (state, key) { return state[key]; }, state)
  12879. }
  12880. function unifyObjectStyle (type, payload, options) {
  12881. if (isObject(type) && type.type) {
  12882. options = payload;
  12883. payload = type;
  12884. type = type.type;
  12885. }
  12886. if ((true)) {
  12887. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  12888. }
  12889. return { type: type, payload: payload, options: options }
  12890. }
  12891. function install (_Vue) {
  12892. if (Vue && _Vue === Vue) {
  12893. if ((true)) {
  12894. console.error(
  12895. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  12896. );
  12897. }
  12898. return
  12899. }
  12900. Vue = _Vue;
  12901. applyMixin(Vue);
  12902. }
  12903. /**
  12904. * Reduce the code which written in Vue.js for getting the state.
  12905. * @param {String} [namespace] - Module's namespace
  12906. * @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.
  12907. * @param {Object}
  12908. */
  12909. var mapState = normalizeNamespace(function (namespace, states) {
  12910. var res = {};
  12911. if (( true) && !isValidMap(states)) {
  12912. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  12913. }
  12914. normalizeMap(states).forEach(function (ref) {
  12915. var key = ref.key;
  12916. var val = ref.val;
  12917. res[key] = function mappedState () {
  12918. var state = this.$store.state;
  12919. var getters = this.$store.getters;
  12920. if (namespace) {
  12921. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  12922. if (!module) {
  12923. return
  12924. }
  12925. state = module.context.state;
  12926. getters = module.context.getters;
  12927. }
  12928. return typeof val === 'function'
  12929. ? val.call(this, state, getters)
  12930. : state[val]
  12931. };
  12932. // mark vuex getter for devtools
  12933. res[key].vuex = true;
  12934. });
  12935. return res
  12936. });
  12937. /**
  12938. * Reduce the code which written in Vue.js for committing the mutation
  12939. * @param {String} [namespace] - Module's namespace
  12940. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  12941. * @return {Object}
  12942. */
  12943. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  12944. var res = {};
  12945. if (( true) && !isValidMap(mutations)) {
  12946. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  12947. }
  12948. normalizeMap(mutations).forEach(function (ref) {
  12949. var key = ref.key;
  12950. var val = ref.val;
  12951. res[key] = function mappedMutation () {
  12952. var args = [], len = arguments.length;
  12953. while ( len-- ) args[ len ] = arguments[ len ];
  12954. // Get the commit method from store
  12955. var commit = this.$store.commit;
  12956. if (namespace) {
  12957. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  12958. if (!module) {
  12959. return
  12960. }
  12961. commit = module.context.commit;
  12962. }
  12963. return typeof val === 'function'
  12964. ? val.apply(this, [commit].concat(args))
  12965. : commit.apply(this.$store, [val].concat(args))
  12966. };
  12967. });
  12968. return res
  12969. });
  12970. /**
  12971. * Reduce the code which written in Vue.js for getting the getters
  12972. * @param {String} [namespace] - Module's namespace
  12973. * @param {Object|Array} getters
  12974. * @return {Object}
  12975. */
  12976. var mapGetters = normalizeNamespace(function (namespace, getters) {
  12977. var res = {};
  12978. if (( true) && !isValidMap(getters)) {
  12979. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  12980. }
  12981. normalizeMap(getters).forEach(function (ref) {
  12982. var key = ref.key;
  12983. var val = ref.val;
  12984. // The namespace has been mutated by normalizeNamespace
  12985. val = namespace + val;
  12986. res[key] = function mappedGetter () {
  12987. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  12988. return
  12989. }
  12990. if (( true) && !(val in this.$store.getters)) {
  12991. console.error(("[vuex] unknown getter: " + val));
  12992. return
  12993. }
  12994. return this.$store.getters[val]
  12995. };
  12996. // mark vuex getter for devtools
  12997. res[key].vuex = true;
  12998. });
  12999. return res
  13000. });
  13001. /**
  13002. * Reduce the code which written in Vue.js for dispatch the action
  13003. * @param {String} [namespace] - Module's namespace
  13004. * @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.
  13005. * @return {Object}
  13006. */
  13007. var mapActions = normalizeNamespace(function (namespace, actions) {
  13008. var res = {};
  13009. if (( true) && !isValidMap(actions)) {
  13010. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  13011. }
  13012. normalizeMap(actions).forEach(function (ref) {
  13013. var key = ref.key;
  13014. var val = ref.val;
  13015. res[key] = function mappedAction () {
  13016. var args = [], len = arguments.length;
  13017. while ( len-- ) args[ len ] = arguments[ len ];
  13018. // get dispatch function from store
  13019. var dispatch = this.$store.dispatch;
  13020. if (namespace) {
  13021. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  13022. if (!module) {
  13023. return
  13024. }
  13025. dispatch = module.context.dispatch;
  13026. }
  13027. return typeof val === 'function'
  13028. ? val.apply(this, [dispatch].concat(args))
  13029. : dispatch.apply(this.$store, [val].concat(args))
  13030. };
  13031. });
  13032. return res
  13033. });
  13034. /**
  13035. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  13036. * @param {String} namespace
  13037. * @return {Object}
  13038. */
  13039. var createNamespacedHelpers = function (namespace) { return ({
  13040. mapState: mapState.bind(null, namespace),
  13041. mapGetters: mapGetters.bind(null, namespace),
  13042. mapMutations: mapMutations.bind(null, namespace),
  13043. mapActions: mapActions.bind(null, namespace)
  13044. }); };
  13045. /**
  13046. * Normalize the map
  13047. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  13048. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  13049. * @param {Array|Object} map
  13050. * @return {Object}
  13051. */
  13052. function normalizeMap (map) {
  13053. if (!isValidMap(map)) {
  13054. return []
  13055. }
  13056. return Array.isArray(map)
  13057. ? map.map(function (key) { return ({ key: key, val: key }); })
  13058. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  13059. }
  13060. /**
  13061. * Validate whether given map is valid or not
  13062. * @param {*} map
  13063. * @return {Boolean}
  13064. */
  13065. function isValidMap (map) {
  13066. return Array.isArray(map) || isObject(map)
  13067. }
  13068. /**
  13069. * 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.
  13070. * @param {Function} fn
  13071. * @return {Function}
  13072. */
  13073. function normalizeNamespace (fn) {
  13074. return function (namespace, map) {
  13075. if (typeof namespace !== 'string') {
  13076. map = namespace;
  13077. namespace = '';
  13078. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  13079. namespace += '/';
  13080. }
  13081. return fn(namespace, map)
  13082. }
  13083. }
  13084. /**
  13085. * Search a special module from store by namespace. if module not exist, print error message.
  13086. * @param {Object} store
  13087. * @param {String} helper
  13088. * @param {String} namespace
  13089. * @return {Object}
  13090. */
  13091. function getModuleByNamespace (store, helper, namespace) {
  13092. var module = store._modulesNamespaceMap[namespace];
  13093. if (( true) && !module) {
  13094. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  13095. }
  13096. return module
  13097. }
  13098. // Credits: borrowed code from fcomb/redux-logger
  13099. function createLogger (ref) {
  13100. if ( ref === void 0 ) ref = {};
  13101. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  13102. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  13103. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  13104. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  13105. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  13106. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  13107. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  13108. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  13109. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  13110. return function (store) {
  13111. var prevState = deepCopy(store.state);
  13112. if (typeof logger === 'undefined') {
  13113. return
  13114. }
  13115. if (logMutations) {
  13116. store.subscribe(function (mutation, state) {
  13117. var nextState = deepCopy(state);
  13118. if (filter(mutation, prevState, nextState)) {
  13119. var formattedTime = getFormattedTime();
  13120. var formattedMutation = mutationTransformer(mutation);
  13121. var message = "mutation " + (mutation.type) + formattedTime;
  13122. startMessage(logger, message, collapsed);
  13123. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  13124. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  13125. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  13126. endMessage(logger);
  13127. }
  13128. prevState = nextState;
  13129. });
  13130. }
  13131. if (logActions) {
  13132. store.subscribeAction(function (action, state) {
  13133. if (actionFilter(action, state)) {
  13134. var formattedTime = getFormattedTime();
  13135. var formattedAction = actionTransformer(action);
  13136. var message = "action " + (action.type) + formattedTime;
  13137. startMessage(logger, message, collapsed);
  13138. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  13139. endMessage(logger);
  13140. }
  13141. });
  13142. }
  13143. }
  13144. }
  13145. function startMessage (logger, message, collapsed) {
  13146. var startMessage = collapsed
  13147. ? logger.groupCollapsed
  13148. : logger.group;
  13149. // render
  13150. try {
  13151. startMessage.call(logger, message);
  13152. } catch (e) {
  13153. logger.log(message);
  13154. }
  13155. }
  13156. function endMessage (logger) {
  13157. try {
  13158. logger.groupEnd();
  13159. } catch (e) {
  13160. logger.log('—— log end ——');
  13161. }
  13162. }
  13163. function getFormattedTime () {
  13164. var time = new Date();
  13165. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  13166. }
  13167. function repeat (str, times) {
  13168. return (new Array(times + 1)).join(str)
  13169. }
  13170. function pad (num, maxLength) {
  13171. return repeat('0', maxLength - num.toString().length) + num
  13172. }
  13173. var index_cjs = {
  13174. Store: Store,
  13175. install: install,
  13176. version: '3.6.2',
  13177. mapState: mapState,
  13178. mapMutations: mapMutations,
  13179. mapGetters: mapGetters,
  13180. mapActions: mapActions,
  13181. createNamespacedHelpers: createNamespacedHelpers,
  13182. createLogger: createLogger
  13183. };
  13184. module.exports = index_cjs;
  13185. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  13186. /***/ }),
  13187. /***/ 5:
  13188. /*!**********************************************************************************************!*\
  13189. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/pages.json ***!
  13190. \**********************************************************************************************/
  13191. /*! no static exports found */
  13192. /***/ (function(module, exports) {
  13193. /***/ }),
  13194. /***/ 50:
  13195. /*!****************************************************************************************************!*\
  13196. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/store/getters.js ***!
  13197. \****************************************************************************************************/
  13198. /*! no static exports found */
  13199. /***/ (function(module, exports, __webpack_require__) {
  13200. "use strict";
  13201. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var getters = {
  13202. token: function token(state) {return state.user.token;} };var _default =
  13203. getters;exports.default = _default;
  13204. /***/ }),
  13205. /***/ 51:
  13206. /*!*************************************************************************************************************************!*\
  13207. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/store/modules sync nonrecursive \.js$ ***!
  13208. \*************************************************************************************************************************/
  13209. /*! no static exports found */
  13210. /***/ (function(module, exports, __webpack_require__) {
  13211. var map = {
  13212. "./user.js": 52
  13213. };
  13214. function webpackContext(req) {
  13215. var id = webpackContextResolve(req);
  13216. return __webpack_require__(id);
  13217. }
  13218. function webpackContextResolve(req) {
  13219. if(!__webpack_require__.o(map, req)) {
  13220. var e = new Error("Cannot find module '" + req + "'");
  13221. e.code = 'MODULE_NOT_FOUND';
  13222. throw e;
  13223. }
  13224. return map[req];
  13225. }
  13226. webpackContext.keys = function webpackContextKeys() {
  13227. return Object.keys(map);
  13228. };
  13229. webpackContext.resolve = webpackContextResolve;
  13230. module.exports = webpackContext;
  13231. webpackContext.id = 51;
  13232. /***/ }),
  13233. /***/ 52:
  13234. /*!*********************************************************************************************************!*\
  13235. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/store/modules/user.js ***!
  13236. \*********************************************************************************************************/
  13237. /*! no static exports found */
  13238. /***/ (function(module, exports, __webpack_require__) {
  13239. "use strict";
  13240. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  13241. token: '',
  13242. userInfo: {
  13243. account: '',
  13244. name: '',
  13245. jobNo: '',
  13246. roleKey: '',
  13247. isBindFace: '',
  13248. station: '',
  13249. color: '',
  13250. opreates: '' } };
  13251. var mutations = {
  13252. SET_TOKEN: function SET_TOKEN(state, token) {
  13253. state.token = token;
  13254. },
  13255. SET_USERINFO: function SET_USERINFO(state, userInfo) {
  13256. state.userInfo = userInfo;
  13257. } };
  13258. var actions = {
  13259. setToken: function setToken(_ref, token) {var commit = _ref.commit;
  13260. commit("SET_TOKEN", token);
  13261. },
  13262. setUserInfo: function setUserInfo(_ref2, userInfo) {var commit = _ref2.commit;
  13263. commit("SET_USERINFO", userInfo);
  13264. } };var _default =
  13265. {
  13266. namespaced: true,
  13267. state: state,
  13268. mutations: mutations,
  13269. actions: actions };exports.default = _default;
  13270. /***/ }),
  13271. /***/ 53:
  13272. /*!************************************************************************************************************!*\
  13273. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/statusCode.js ***!
  13274. \************************************************************************************************************/
  13275. /*! no static exports found */
  13276. /***/ (function(module, exports, __webpack_require__) {
  13277. "use strict";
  13278. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var statusCode = {
  13279. OCCUPY_CODE: 104, // 账户已被其他设备登录或者token已过期以及不正确
  13280. UNKNOW_CODE: 106 // 未获取token
  13281. };var _default =
  13282. statusCode;exports.default = _default;
  13283. /***/ }),
  13284. /***/ 54:
  13285. /*!*********************************************************************************************************!*\
  13286. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/storage.js ***!
  13287. \*********************************************************************************************************/
  13288. /*! no static exports found */
  13289. /***/ (function(module, exports, __webpack_require__) {
  13290. "use strict";
  13291. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  13292. setStorage: function setStorage(key, data) {
  13293. uni.setStorage({
  13294. key: key,
  13295. data: data });
  13296. },
  13297. getStorage: function getStorage(key) {
  13298. var res = null;
  13299. uni.getStorage({
  13300. key: key,
  13301. success: function success(res) {
  13302. return res.data;
  13303. } });
  13304. },
  13305. setStorageSync: function setStorageSync(key, data) {
  13306. try {
  13307. uni.setStorageSync(key, data);
  13308. } catch (e) {
  13309. console.log('setStorageSync error');
  13310. console.log(e);
  13311. }
  13312. },
  13313. getStorageSync: function getStorageSync(key) {
  13314. try {
  13315. return uni.getStorageSync(key);
  13316. } catch (e) {
  13317. console.log('getStorageSync error');
  13318. console.log(e);
  13319. }
  13320. },
  13321. removeStorageSync: function removeStorageSync(key) {
  13322. uni.removeStorageSync(key);
  13323. } };exports.default = _default;
  13324. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  13325. /***/ }),
  13326. /***/ 55:
  13327. /*!***********************************************************************************************************************!*\
  13328. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/js_sdk/xfl-DateFormat/DateFormat.js ***!
  13329. \***********************************************************************************************************************/
  13330. /*! no static exports found */
  13331. /***/ (function(module, exports, __webpack_require__) {
  13332. "use strict";
  13333. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;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 _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;}
  13334. /**
  13335. * 日期格式转换模块,还可以从字符串中提取日期,同时提供了几个数字格式转换函数。
  13336. * 2019.5.12 v1.0.0
  13337. *
  13338. ## 背景
  13339. 当需要将日期转换为指定的格式时,或者需要从某个字符串中按照指定的格式提取日期,均可使用本模块。
  13340. ## 使用说明
  13341. 格式标记的含意:
  13342. yyyy-四位阿拉伯数字的年份,如: 2018
  13343. YYYY-四位中文数字的年份,如: 二零一八
  13344. yy-两位阿拉伯数字的年份,如: 18
  13345. YY-两位中文数字的年份,如: 一八
  13346. mm-一位或两位阿拉伯数字的月数,如: 3 、 12
  13347. 0m-两位阿拉伯数字的月数,如: 03 、 12
  13348. MM-一位或两位中文数字的月数,如: 三、 十二
  13349. dd-一位或两位阿拉伯数字的日数,如: 3 、 12
  13350. 0d-两位阿拉伯数字的日数,如: 03 、 12、28
  13351. DD-中文数字的日数,如: 三、 十二、二十八
  13352. hh-一位或两位阿拉伯数字的小时数,如: 3 、 12
  13353. 0h-两位阿拉伯数字的小时数,如: 03 、 12
  13354. HH-中文数字的小时数,如: 三、 十二、二十三
  13355. ff-一位或两位阿拉伯数字的分钟数,如: 3 、 12、56
  13356. 0f-两位阿拉伯数字的分钟数,如: 03 、 12
  13357. 0F-中文数字的分钟,如: 零三、 十二、二十三
  13358. FF-中文数字的分钟,如: 三、 十二、二十三
  13359. ss-一位或两位阿拉伯数字的秒数,如: 3 、 12
  13360. 0s-两位阿拉伯数字的秒数,如: 03 、 12
  13361. 0S-中文数字的秒数,如: 零三、 十二、二十三
  13362. SS-中文数字的秒数,如: 三、 十二、二十三
  13363. w-阿拉伯数字的星期数,如: 1、6、7
  13364. W-中文数字的星期数,如: 一、三、六、日
  13365. WT-中文数字的星期数,如: 一、三、六、天
  13366. ### 属性
  13367. 这些属性是可读可写的,如果直接更改,则会自动计算其关联的其它值。
  13368. dataformat.year; //年 [1000, 3000]
  13369. dataformat.moth; //月 [1, 12]
  13370. dataformat.day; //日 [1, 31]
  13371. dataformat.hour; //时 [0, 23]
  13372. dataformat.minute; //分 [0, 59]
  13373. dataformat.second; //秒 [0, 59]
  13374. dataformat.mscond; //毫秒 [0, 999]
  13375. dataformat.week; //星期 [1, 7]
  13376. dataformat.timestamp; //时间戳
  13377. ### 构造函数
  13378. 构造函数内部直接调用的 setTime(ms, formatStr);
  13379. ### toString(formatStr)
  13380. 使用举例:
  13381. 1. toString() //结果: '2014-11-7 03:08:01'
  13382. 2. toString('yyyy-mm-dd hh:ff:ss') //结果: '2014-11-11 13:12:34'
  13383. 3. toString('yyyy年mm月dd日') //结果: '2014年11月11日'
  13384. 4. toString('yy年mm月dd日') //结果: '14年11月11日'
  13385. 5. toString('YY年MM月DD日') //结果: '一四年十一月八日'
  13386. 6. toString('星期W') //结果: '星期日' 或 '星期三'
  13387. 7. toString('星期WT') //结果: '星期天' 或 '星期三'
  13388. 8. toString('星期w') //结果: '星期1' 或 '星期7'
  13389. 9. toString('hh:0f:ss') //结果: '3:04:5'
  13390. 10. toString('date') //结果: '2014-11-7'
  13391. 11. toString('time') //结果: '03:08:01'
  13392. ### setTime(ms, formtStr)
  13393. 设置时间。如果存在 formatStr, 则表示从字符串 ms 中按 formatStr中的规则提取时间。
  13394. 使用举例:
  13395. 1. setTime( new Date() ); //传入一个时间对象
  13396. 2. setTime( new Date().getTime() ); //传入一个毫秒数
  13397. 3. setTime( new Date().getTime() ); //传入一个毫秒数
  13398. 4. setTime( new Date().getTime() + '' ); //传入一个毫秒数的字符串
  13399. 5. setTime(); //传入其它的值或不传入,则创建当前时间
  13400. 6. setTime(str, formatStr); //传入两个参数,第一个为字符串,第二个为格式规则,表示按照规则从字符串中提取时间
  13401. 7. setTime('今天是2014年8月9号,天气特别好,但明天是2014年8月10号,....', '明天是yyyy年mm月dd号'); // 得到 2014.8.10 0:0:0
  13402. ### fillChar(num, len, char)
  13403. 字符填充
  13404. 使用举例:
  13405. 1. fillChar(44, 5, '*'); //结果: '***44'
  13406. 2. fillChar(44, 5); //结果: '00044'
  13407. 3. fillChar('44', 5); //结果: ' 44'
  13408. 4. fillChar('aaa', 5); //结果: ' aa'
  13409. 5. fillChar('aaa', 5, '$'); //结果: '$$aaa'
  13410. 5. fillChar('aaa', 1, '$'); //结果: 'aaa' //指定的长度太小,不做任何操作。
  13411. ### perNumToChinese(num)
  13412. 将阿拉伯数字每一位对应转换为中文的格式。
  13413. 使用举例:
  13414. 1. perNumToChinese(34); //结果: '三四'
  13415. 2. perNumToChinese(3874); //结果: '三八七四'
  13416. 3. perNumToChinese('3874'); //结果: '三八七四'
  13417. 4. perNumToChinese('404'); //结果: '四零四'
  13418. 5. perNumToChinese('0 04 '); //结果: '零零四'
  13419. 6. perNumToChinese(' '); //结果: ''
  13420. ### perChineseToNum(numStr)
  13421. 将中文的格式的数字每一位对应转换为阿拉伯数字。 是perNumToChinese(num)的逆操作。
  13422. 使用举例:
  13423. 1. perChineseToNum('三四'); //结果: 34
  13424. 2. perChineseToNum('三八七四'); //结果: 3874
  13425. 3. perChineseToNum('四零四'); //结果: 404
  13426. 4. perChineseToNum('零零四'); //结果: 4
  13427. 5. perChineseToNum(' '); //结果: NaN
  13428. ### numToChinese(num)
  13429. 将阿拉伯数字转换为中文的格式 , 最多只能处理13位数(万亿)
  13430. 使用举例:
  13431. 1. numToChinese(0); //结果: '零'
  13432. 2. numToChinese(5); //结果: '五'
  13433. 3. numToChinese(16); //结果: '十六'
  13434. 4. numToChinese(34); //结果: '三十四'
  13435. 5. numToChinese(106); //结果: '一百零六'
  13436. 6. numToChinese(886); //结果: '八百八十六'
  13437. 7. numToChinese(1004); //结果: '一千零四'
  13438. 8. numToChinese(1000); //结果: '一千'
  13439. 9. numToChinese(9904); //结果: '九千九百零四'
  13440. 10. numToChinese(19904); //结果: '一万九千九百零四'
  13441. 11. numToChinese(10004); //结果: '一万零四'
  13442. 12. numToChinese(10000); //结果: '一万'
  13443. 13. numToChinese(100404); //结果: '十万零四百零四'
  13444. 14. numToChinese(9000000); //结果: '九百万'
  13445. 15. numToChinese(90000000); //结果: '九千万'
  13446. 16. numToChinese(900000000); //结果: '九亿'
  13447. 17. numToChinese(9000000000); //结果: '九十亿'
  13448. 18. numToChinese(9020030401); //结果: '九十亿零二千零三万零四百零一'
  13449. 19. numToChinese(90000000000); //结果: '九百亿'
  13450. 20. numToChinese(900000000000); //结果: '九千亿'
  13451. 21. numToChinese(9000000000000); //结果: '九万亿'
  13452. 22. numToChinese(90000000000000); //结果: undefined
  13453. ### chineseToNum (numStr)
  13454. 将中文的格式的数字转换为阿拉伯数字, 最多只能处理13位数(万亿)。 是 numToChinese(num) 函数的逆操作。
  13455. 使用举例:
  13456. 1. chineseToNum('十六'); //结果: 16
  13457. 2. chineseToNum('一万九千九百零四'); //结果: 19904
  13458. 3. chineseToNum('十万零四百零四'); //结果: 100404
  13459. 4. chineseToNum('九十亿零二千零三万零四百零一'); //结果: 9020030401
  13460. */var
  13461. DateFormat = /*#__PURE__*/function () {
  13462. function DateFormat(ms, formatStr) {_classCallCheck(this, DateFormat);_defineProperty(this, "__ANALYREGSTR",
  13463. {
  13464. 'yyyy': '\\d{4}', // [0000, 9999]
  13465. 'YYYY': '[零一二三四五六七八九]{4}', // [零零零零-九九九九]
  13466. 'yy': '\\d{2}', // [00, 99]
  13467. 'YY': '[零一二三四五六七八九]{2}', // [零零-九九]
  13468. 'mm': '[1-9]|1[012]', // [1, 12]
  13469. 'MM': '十[一二]?|[一二三四五六七八九]', // [一-十二]
  13470. '0m': '[0][1-9]|1[012]', // [01, 12]
  13471. 'dd': '3[01]|[12]0|[12]?[1-9]', // [1, 31]
  13472. 'DD': '三十[一]?|二?十[一二三四五六七八九]|[零一二三四五六七八九十]', // [一-三十一]
  13473. '0d': '[012][0-9]|3[01]', // [01, 31]
  13474. 'hh': '2[0-4]|[1]?[0-9]', // [0, 24]
  13475. 'HH': '二十[一二三]?|十[一二三四五六七八九]|[零一二三四五六七八九十]', // [零-二十四]
  13476. '0h': '[01][0-9]|2[0-4]', // [00, 24]
  13477. 'ff': '60|[1-5]?[0-9]', // [0, 60]
  13478. 'FF': '[二三四五]十[一二三四五六七八九]|十[一二三四五六七八九]|[二三四五六]十|[零一二三四五六七八九十]', // [零-六十]
  13479. '0F': '零[零一二三四五六七八九]|十[一二三四五六七八九]|[二三四五]十[一二三四五六七八九]|[二三四五六]十|十', // [零零-六十]
  13480. '0f': '[0-5][0-9]|60', // [00, 60]
  13481. 'ss': '60|[1-5]?[0-9]', // [0, 60]
  13482. 'SS': '[二三四五]十[一二三四五六七八九]|十[一二三四五六七八九]|[二三四五六]十|[零一二三四五六七八九十]', // [零-六十]
  13483. '0S': '零[零一二三四五六七八九]|十[一二三四五六七八九]|[二三四五]十[一二三四五六七八九]|[二三四五六]十|十', // [零零-六十]
  13484. '0s': '[0-5][0-9]|60', // [00, 60]
  13485. 'w': '7', // [7]
  13486. 'W': '日', //[天|日]
  13487. 'WT': '天' //[天|日]
  13488. });_defineProperty(this, "__SIZEPOW",
  13489. { '十': 1, '百': 2, '千': 3, '万': 4, '亿': 8 });_defineProperty(this, "__CHINANUM",
  13490. '零一二三四五六七八九十');_defineProperty(this, "__WEISTR",
  13491. ', 十, 百, 千, 万, 十万, 百万, 千万, 亿, 十亿, 百亿, 千亿, 万亿, 十万亿, 百万亿, 千万亿, 亿亿, 十亿亿, 百亿亿, 千亿亿, 万亿亿');_defineProperty(this, "__WEIARR",
  13492. null);this.setTime(ms, formatStr);}_createClass(DateFormat, [{ key: "setTime", value: function setTime(ms, formatStr) {//切换时间
  13493. if (formatStr && typeof ms === 'string') {var result;if (this.__analysis) {result = this.__analysis(ms, formatStr);}if (!result) {console.log('匹配时间失败,默认设置为当前时间');ms = '';} else {ms = result;}}var date;if (ms instanceof Date) {date = ms;} else if (typeof ms === 'number') {date = new Date(ms);} else if (parseInt(ms) > 0) {date = new Date(parseInt(ms));} else {if (typeof ms === 'object' && ms.y && ms.m && ms.d) {date = new Date(ms.y, ms.m - 1, ms.d, ms.h || 0, ms.f || 0, ms.s || 0, ms.ms || 0);} else {date = new Date();}}this.y = date.getFullYear(), //年 [1000, 3000]
  13494. this.m = date.getMonth() + 1, //月 [1, 12]
  13495. this.d = date.getDate(), //日 [1, 31]
  13496. this.h = date.getHours(), //时 [0, 23]
  13497. this.f = date.getMinutes(), //分 [0, 59]
  13498. this.s = date.getSeconds(), //秒 [0, 59]
  13499. this.ms = date.getMilliseconds(), //秒 [0, 9999]
  13500. this.w = date.getDay(); //星期 [1, 7]
  13501. if (this.w === 0) {//0表示星期天
  13502. this.w = 7;}this.timestamp = date.getTime(); //时间戳
  13503. this.__date = date;return this;} /***************************************************** 时间格式化 *********************************************** */ }, { key: "toString", value: function toString(formatStr) {//将时间转换为格式的字符串
  13504. if (formatStr) {if (formatStr === 'time') {//03:00:01
  13505. return this.fillChar(this.h, 2) + ':' + this.fillChar(this.f, 2) + ':' + this.fillChar(this.s, 2);} else if (formatStr === 'date') {//2014-11-7
  13506. return this.y + '-' + this.m + '-' + this.d;} else {return this.__replaceTime(formatStr);}} else {//2014-11-7 03:00:01
  13507. return this.y + '-' + this.m + '-' + this.d + ' ' + this.fillChar(this.h, 2) + ':' + this.fillChar(this.f, 2) + ':' + this.fillChar(this.s, 2);}} }, { key: "valueOf", value: function valueOf() {return this.toString();} }, { key: "__replaceTime", value: function __replaceTime(format) {var _this = this;var str = 'y{4}|Y{4}|y{2}|Y{2}|mm|MM|0m|dd|DD|0d|hh|HH|0h|ff|FF|0F|0f|ss|SS|0S|0s|w|WT|W';var reg = new RegExp(str, 'g');format = format.replace(reg, function (mstr) {switch (mstr) {case 'yyyy':return _this.y; // [0000, 9999]
  13508. case 'YYYY':return _this.perNumToChinese(_this.y); // [零零零零-九九九九]
  13509. case 'yy':return ('' + _this.y).slice(-2); // [00, 99]
  13510. case 'YY':return _this.perNumToChinese(+('' + _this.y).slice(-2)); // [零零-九九]
  13511. case 'mm':return _this.m; // [1, 12]
  13512. case 'MM':return _this.numToChinese(_this.m); // [一-十二]
  13513. case '0m':return _this.m < 10 ? '0' + _this.m : _this.m; // [01, 12]
  13514. case 'dd':return _this.d; // [1, 31]
  13515. case 'DD':return _this.numToChinese(_this.d); // [一-三十一]
  13516. case '0d':return _this.d < 10 ? '0' + _this.d : _this.d; // [01, 31]
  13517. case 'hh':return _this.h; // [0, 24]
  13518. case 'HH':return _this.numToChinese(_this.h); // [零-二十四]
  13519. case '0h':return _this.h < 10 ? '0' + _this.h : _this.h; // [00, 24]
  13520. case 'ff':return _this.f; // [0, 60]
  13521. case 'FF':return _this.numToChinese(_this.f); // [零-六十]
  13522. case '0F':return _this.f < 10 && _this.f > 0 ? '零' + _this.numToChinese(_this.f) : _this.numToChinese(_this.f); // [零零-六十]
  13523. case '0f':return _this.f < 10 ? '0' + _this.f : _this.f; // [00, 60]
  13524. case 'ss':return _this.s; // [0, 60]
  13525. case 'SS':return _this.numToChinese(_this.s); // [零-六十]
  13526. case '0S':return _this.s < 10 && _this.s > 0 ? '零' + _this.numToChinese(_this.s) : _this.numToChinese(_this.s); // [零零-六十]
  13527. case '0s':return _this.s < 10 ? '0' + _this.s : _this.s; // [00, 60]
  13528. case 'w':return _this.w; // [7]
  13529. case 'W':return _this.w == 7 ? '日' : _this.numToChinese(_this.w); // [天|日]
  13530. case 'WT':return _this.w == 7 ? '天' : _this.numToChinese(_this.w); // [天|日]
  13531. }});return format;} /***************************************************** 时间提取 *********************************************** */ }, { key: "__analysis", value: function __analysis(str, rule) {var _this2 = this; //从指定的字符串中根据规则提取日期和时间。
  13532. var resultObj;if (typeof rule === 'function') {resultObj = rule(str);if (!resultObj) {return null;}} else {resultObj = {};var str11 = 'y{4}|Y{4}|y{2}|Y{2}|mm|MM|0m|dd|DD|0d|hh|HH|0h|ff|FF|0F|0f|ss|SS|0S|0s|w|WT|W';var reg = new RegExp(str11, 'g'); // rule = 'yyyy年mm月'
  13533. var namesArr = [null]; // [null, 'yyyy', 'mm']
  13534. rule = rule.replace(reg, function (mstr) {var result = _this2.__ANALYREGSTR[mstr];if (result) {namesArr.push(mstr);return "(".concat(result, ")");}}); // rule = '(\\d{4})年([1-9]|1[012])月'
  13535. var resultArr = str.match(new RegExp(rule));if (resultArr) {for (var i = 1, val; i < namesArr.length; i++) {val = resultArr[i];if (val == null) {continue;}switch (namesArr[i]) {case 'yyyy':resultObj.y = +val;break; // [0000, 9999]
  13536. case 'YYYY':resultObj.y = this.perChineseToNum(val);break; // [零零零零-九九九九]
  13537. case 'yy':resultObj.y = +val + 2000;break; // [00, 99]
  13538. case 'YY':resultObj.y = this.perChineseToNum(val) + 2000;break; // [零零-九九]
  13539. case 'mm':resultObj.m = +val;break; // [1, 12]
  13540. case 'MM':resultObj.m = this.chineseToNum(val);break; // [一-十二]
  13541. case '0m':resultObj.m = +val;break; // [01, 12]
  13542. case 'dd':resultObj.d = +val;break; // [1, 31]
  13543. case 'DD':resultObj.d = this.chineseToNum(val);break; // [一-三十一]
  13544. case '0d':resultObj.d = +val;break; // [01, 31]
  13545. case 'hh':resultObj.h = +val;break; // [0, 24]
  13546. case 'HH':resultObj.h = this.chineseToNum(val);break; // [零-二十四]
  13547. case '0h':resultObj.h = +val;break; // [00, 24]
  13548. case 'ff':resultObj.f = +val;break; // [0, 60]
  13549. case 'FF':resultObj.f = this.chineseToNum(val);break; // [零-六十]
  13550. case '0F':resultObj.f = this.chineseToNum(val);break; // [零零-六十]
  13551. case '0f':resultObj.f = +val;break; // [00, 60]
  13552. case 'ss':resultObj.s = +val;break; // [0, 60]
  13553. case 'SS':resultObj.s = this.chineseToNum(val);break; // [零-六十]
  13554. case '0S':resultObj.s = this.chineseToNum(val);break; // [零零-六十]
  13555. case '0s':resultObj.s = +val;break; // [00, 60]
  13556. case 'w':resultObj.w = 7;break; // [7]
  13557. case 'W':resultObj.w = 7;break; // [天|日]
  13558. case 'WT':resultObj.w = 7;break; // [天|日]
  13559. }}} else {return null;}} // 'yyyy年mm月' '(\\d{4})年([1-9]|1[012])月'
  13560. return resultObj;} }, { key: "fillChar", /***************************************************** 字符填充部分 *********************************************** */ /**
  13561. * 在一个字符前面补充指定个数的字符。
  13562. * <br><font color="red">ref: null</font> <br>
  13563. * @public
  13564. * @param {string|number} num - 要操作的数字或字符串。
  13565. * @param {number} len - 要保留的最大长度。如果指定的长度不比传入的参数的本身的长度大,则不做任何操作。
  13566. * @param {string} [char=' '|'0'] - 当长度不足时,要在最前面补足的字符。第一个参数为数字时,默认为0,否则默认为' '。
  13567. * @example
  13568. 1. fillChar(44, 5, '*'); //结果: '***44'
  13569. 2. fillChar(44, 5); //结果: '00044'
  13570. 3. fillChar('44', 5); //结果: ' 44'
  13571. 4. fillChar('aaa', 5); //结果: ' aa'
  13572. 5. fillChar('aaa', 5, '$'); //结果: '$$aaa'
  13573. 5. fillChar('aaa', 1, '$'); //结果: 'aaa' //指定的长度太小,不做任何操作。
  13574. */value: function fillChar(num, len, char) {if (typeof num === 'number') {char = char || '0';} else {char = char || ' ';}var str = '' + num,charStr = '';if (str.length < len) {for (var i = 0, len1 = len - str.length; i < len1; i++) {charStr += char;}return charStr + str;}return str;} /***************************************************** 数字转换部分 *********************************************** */ }, { key: "chineseToNum", /**
  13575. * 将中文的格式的数字转换为阿拉伯数字, 最多只能处理13位数(万亿)。 是 numToChinese(num) 函数的逆操作。
  13576. * @example
  13577. 1. chineseToNum('十六'); //结果: 16
  13578. 2. chineseToNum('一万九千九百零四'); //结果: 19904
  13579. 3. chineseToNum('十万零四百零四'); //结果: 100404
  13580. 4. chineseToNum('九十亿零二千零三万零四百零一'); //结果: 9020030401
  13581. */value: function chineseToNum(numStr) {//目前只能处理万亿以下的数据
  13582. if (numStr.length === 1) {return this.perChineseToNum(numStr);}if (numStr.length === 2 && numStr[0] === '十') {return this.perChineseToNum(numStr[1]) + 10;}var arr;if (!numStr.match(/[亿万]/)) {arr = numStr.split('零');var num = 0,val = 0;for (var i = 0, str = ''; i < arr.length; i++) {str = arr[i];for (var j = 0; j < str.length; j++) {if (str[j].match(/[一二三四五六七八九]/)) {num += val;val = 1;val *= this.perChineseToNum(str[j]);} else {val *= Math.pow(10, this.__SIZEPOW[str[j]]);}}}num += val;return num;} else {arr = numStr.split('亿');if (arr.length > 1) {var arr1 = arr[1].split('万');return this.chineseToNum(arr[0]) * Math.pow(10, 8) + this.chineseToNum(arr1[0]) * 10000 + this.chineseToNum(arr1[1]);} else {return this.chineseToNum(arr[0]) * Math.pow(10, 8) + this.chineseToNum(arr[1]);}}} /**
  13583. * 将中文的格式的数字每一位对应转换为阿拉伯数字。 是perNumToChinese(num)的逆操作。
  13584. * @example
  13585. 1. perChineseToNum('三四'); //结果: 34
  13586. 2. perChineseToNum('三八七四'); //结果: 3874
  13587. 3. perChineseToNum('四零四'); //结果: 404
  13588. 4. perChineseToNum('零零四'); //结果: 4
  13589. 5. perChineseToNum(' '); //结果: NaN
  13590. */ }, { key: "perChineseToNum", value: function perChineseToNum(numStr) {var _this3 = this;return +numStr.replace(/[零一二三四五六七八九十\s]/g, function (str) {var index = _this3.__CHINANUM.indexOf(str);return index == null ? '' : index;});} /**
  13591. * 将阿拉伯数字转换为对应的汉字, 最多只能处理13位数(万亿)。
  13592. * <br><font color="red">ref: this.numToChina()、 this.weiNum() </font> <br>
  13593. * @public
  13594. * @param {number} num - 要转换的数字
  13595. * @example
  13596. 1. numToChinese(0); //结果: '零'
  13597. 2. numToChinese(5); //结果: '五'
  13598. 3. numToChinese(16); //结果: '十六'
  13599. 4. numToChinese(34); //结果: '三十四'
  13600. 5. numToChinese(106); //结果: '一百零六'
  13601. 6. numToChinese(886); //结果: '八百八十六'
  13602. 7. numToChinese(1004); //结果: '一千零四'
  13603. 8. numToChinese(1000); //结果: '一千'
  13604. 9. numToChinese(9904); //结果: '九千九百零四'
  13605. 10. numToChinese(19904); //结果: '一万九千九百零四'
  13606. 11. numToChinese(10004); //结果: '一万零四'
  13607. 12. numToChinese(10000); //结果: '一万'
  13608. 13. numToChinese(100404); //结果: '十万零四百零四'
  13609. 14. numToChinese(9000000); //结果: '九百万'
  13610. 15. numToChinese(90000000); //结果: '九千万'
  13611. 16. numToChinese(900000000); //结果: '九亿'
  13612. 17. numToChinese(9000000000); //结果: '九十亿'
  13613. 18. numToChinese(9020030401); //结果: '九十亿零二千零三万零四百零一'
  13614. 19. numToChinese(90000000000); //结果: '九百亿'
  13615. 20. numToChinese(900000000000); //结果: '九千亿'
  13616. 21. numToChinese(9000000000000); //结果: '九万亿'
  13617. 22. numToChinese(90000000000000); //结果: undefined
  13618. */ }, { key: "numToChinese", value: function numToChinese(num) {var numStr = '' + num;var len = numStr.length,result;if (num <= 10) {//处理0~9
  13619. return this.__CHINANUM[num];} else if (num < 20) {//处理10~20
  13620. return '十' + this.__CHINANUM[numStr[1]];} else if (len < 6) {//处理5位数(万)及以下
  13621. if (!this.__WEIARR) {this.__WEIARR = this.__WEISTR.split(', ');}var lastStr,resultStr = '',index;for (var i = 0; i < len; i++) {lastStr = this.__CHINANUM[numStr[i]];if (numStr[i] === '0') {index = null;for (var j = i + 1; j < len; j++) {if (numStr[j] !== '0') {index = j - 1;break;}}if (index === null) {break;} else {i = index;resultStr += '零';}} else {resultStr += lastStr + this.__WEIARR[len - i - 1];}}return resultStr;} else if (len < 9) {//处理8位数(千万)及以下
  13622. var low4Str = numStr.slice(-4),heigh4Str = numStr.slice(0, -4),isZero = '';isZero = heigh4Str.slice(-1) === '0' ? '零' : ''; //必须用这个,如504000,应该是 五十万零四千 而不是 五十万四千
  13623. if (isZero) {low4Str = +low4Str;if (low4Str === 0) {isZero = '';}}if (+heigh4Str !== 0) {isZero = '万' + isZero;}result = this.numToChinese(+heigh4Str) + isZero + this.numToChinese(+low4Str);return result.slice(-1) === '零' ? result.slice(0, -1) : result;} else if (len < 14) {//处理13位数(万亿)及以下
  13624. var low8Str = numStr.slice(-8),_heigh4Str = numStr.slice(0, -8),_isZero = '';_isZero = _heigh4Str.slice(-1) === '0' ? '零' : ''; //必须用这个
  13625. if (_isZero) {low8Str = +low8Str;if (low8Str === 0) {_isZero = '';}}if (+_heigh4Str !== 0) {_isZero = '亿' + _isZero;}result = this.numToChinese(+_heigh4Str) + _isZero + this.numToChinese(+low8Str);return result.slice(-1) === '零' ? result.slice(0, -1) : result;}} /**
  13626. * 按数字的位数将每一位数字转换为中文(注意,可以转换多位数字)
  13627. * <br><font color="red">ref: this.numToChina() </font> <br>
  13628. * @public
  13629. * @param {number|string} num - 要转换的数字
  13630. * @example
  13631. 1. perNumToChinese(34); //结果: '三四'
  13632. 2. perNumToChinese(3874); //结果: '三八七四'
  13633. 3. perNumToChinese('3874'); //结果: '三八七四'
  13634. 4. perNumToChinese('404'); //结果: '四零四'
  13635. 5. perNumToChinese('0 04 '); //结果: '零零四'
  13636. 6. perNumToChinese(' '); //结果: ''
  13637. */ }, { key: "perNumToChinese", value: function perNumToChinese(num) {var _this4 = this;return ('' + num).replace(/[\d\s]/g, function (index) {var result = _this4.__CHINANUM[index];return result ? result : '';});} }, { key: "year", set: function set(y) {if (this.y !== y) {this.__date.setFullYear(y);this.setTime(this.__date);}}, get: function get() {return this.y;} }, { key: "month", set: function set(y) {if (this.m !== y) {this.__date.setMonth(y - 1);this.setTime(this.__date);}}, get: function get() {return this.m;} }, { key: "day", set: function set(y) {if (this.d !== y) {this.__date.setDate(y);this.setTime(this.__date);}}, get: function get() {return this.d;} }, { key: "hour", set: function set(y) {if (this.h !== y) {this.__date.setHours(y);this.setTime(this.__date);}}, get: function get() {return this.h;} }, { key: "minute", set: function set(y) {if (this.f !== y) {this.__date.setMinutes(y);this.setTime(this.__date);}}, get: function get() {return this.f;} }, { key: "second", set: function set(y) {if (this.s !== y) {this.__date.setSeconds(y);this.setTime(this.__date);}}, get: function get() {return this.s;} }, { key: "msecond", set: function set(y) {if (this.ms !== y) {this.__date.setMilliseconds(y);this.setTime(this.__date);}}, get: function get() {return this.ms;} }, { key: "week", get: function get() {return this.w;} }]);return DateFormat;}();exports.default = DateFormat;
  13638. /***/ }),
  13639. /***/ 56:
  13640. /*!*********************************************************************************************************!*\
  13641. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/filters.js ***!
  13642. \*********************************************************************************************************/
  13643. /*! no static exports found */
  13644. /***/ (function(module, exports, __webpack_require__) {
  13645. "use strict";
  13646. Object.defineProperty(exports, "__esModule", { value: true });exports.dateFilter = dateFilter;exports.dateTimeFilter = dateTimeFilter;exports.dateTimeFilter2 = dateTimeFilter2;exports.dateTimeFilter3 = dateTimeFilter3;exports.date2Filter = date2Filter;exports.nodeStatuFilter = nodeStatuFilter;exports.shipmentNodeFilter = shipmentNodeFilter;exports.regular_shelf = regular_shelf;var _DateFormat = _interopRequireDefault(__webpack_require__(/*! ../../js_sdk/xfl-DateFormat/DateFormat.js */ 55));
  13647. var _SOtime = _interopRequireDefault(__webpack_require__(/*! ../../js_sdk/fl-SOtime/SOtime.js */ 57));
  13648. var _storage = _interopRequireDefault(__webpack_require__(/*! ./storage.js */ 54));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  13649. // 将日期过滤显示为 今天 昨天以及之前的日期 yyyy-mm-dd 格式
  13650. function dateFilter(value) {
  13651. var nowDate = new _DateFormat.default(new Date());
  13652. var nowDateStr = nowDate.toString('yyyy-mm-dd');
  13653. if (nowDateStr == value) {
  13654. return '今天';
  13655. } else if (_SOtime.default.time2(new Date(value).getTime()) == "昨天") {
  13656. return '昨天';
  13657. } else {
  13658. return value;
  13659. }
  13660. }
  13661. // 将日期过滤为 hh:ff:ss 格式
  13662. function dateTimeFilter(value) {
  13663. if (!value) {
  13664. return '';
  13665. }
  13666. var handleDate = new _DateFormat.default(new Date(value.replace(/-/g, '/')).getTime());
  13667. return handleDate.toString('hh:0f:ss') != 'NaN:NaN:NaN' ? handleDate.toString('hh:0f:ss') : '';
  13668. }
  13669. // 将日期过滤为 yyyy/mm/dd 格式
  13670. function dateTimeFilter2(value) {
  13671. if (!value) {
  13672. return '';
  13673. }
  13674. var handleDate = new _DateFormat.default(new Date(value.replace(/-/g, '/')).getTime());
  13675. return handleDate.toString('yyyy/mm/dd') != 'NaN/NaN/NaN' ? handleDate.toString('yyyy/mm/dd') : '';
  13676. }
  13677. // 将日期过滤为 yyyy-mm-dd 格式
  13678. function dateTimeFilter3(value) {
  13679. if (!value) {
  13680. return '';
  13681. }
  13682. var handleDate = new _DateFormat.default(new Date(value.replace(/-/g, '/')).getTime());
  13683. return handleDate.toString('yyyy-mm-dd') != 'NaN-NaN-NaN' ? handleDate.toString('yyyy-mm-dd') : '';
  13684. }
  13685. // 将日期过滤为 yyyy/mm/dd/hh:ff 格式
  13686. function date2Filter(value) {
  13687. if (!value) {
  13688. return '';
  13689. }
  13690. var handleDate = new _DateFormat.default(new Date(value.replace(/-/g, '/')).getTime());
  13691. return handleDate.toString('yyyy/mm/dd/hh:0f');
  13692. }
  13693. // 节点状态 1待完成 2申请补单 4补单完成 5补单驳回 3 已完成
  13694. function nodeStatuFilter(nodeCode) {
  13695. if (nodeCode == 1) {
  13696. return '待完成';
  13697. } else if (nodeCode == 2) {
  13698. return '申请补单';
  13699. } else if (nodeCode == 3) {
  13700. return '已完成';
  13701. } else if (nodeCode == 4) {
  13702. return '补单完成';
  13703. } else if (nodeCode == 5) {
  13704. return '补单驳回';
  13705. } else {
  13706. return '未知状态';
  13707. }
  13708. }
  13709. // expressCode":1, 状态0等待生产 1等待出货 2正在出货 3已包装 4已报关
  13710. // 出货节点状态
  13711. function shipmentNodeFilter(nodeCode) {
  13712. if (nodeCode == 0) {
  13713. return '等待生产';
  13714. } else if (nodeCode == 1) {
  13715. return '等待出货';
  13716. } else if (nodeCode == 2) {
  13717. return '正在出货';
  13718. } else if (nodeCode == 3) {
  13719. return '已包装';
  13720. } else if (nodeCode == 4) {
  13721. return '已报关';
  13722. } else {
  13723. return '未知状态';
  13724. }
  13725. }
  13726. function regular_shelf(s) {
  13727. if (!s) {
  13728. return '';
  13729. }
  13730. var tem = s;
  13731. tem = tem.replace(/架/, "# ");
  13732. tem = tem.replace(/格/, "");
  13733. return tem;
  13734. }
  13735. /***/ }),
  13736. /***/ 561:
  13737. /*!*****************************************************************************************************************!*\
  13738. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/util/emitter.js ***!
  13739. \*****************************************************************************************************************/
  13740. /*! no static exports found */
  13741. /***/ (function(module, exports, __webpack_require__) {
  13742. "use strict";
  13743. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  13744. * 递归使用 call 方式this指向
  13745. * @param componentName // 需要找的组件的名称
  13746. * @param eventName // 事件名称
  13747. * @param params // 需要传递的参数
  13748. */
  13749. function _broadcast(componentName, eventName, params) {
  13750. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  13751. this.$children.map(function (child) {
  13752. if (componentName === child.$options.name) {
  13753. child.$emit.apply(child, [eventName].concat(params));
  13754. } else {
  13755. _broadcast.apply(child, [componentName, eventName].concat(params));
  13756. }
  13757. });
  13758. }var _default =
  13759. {
  13760. methods: {
  13761. /**
  13762. * 派发 (向上查找) (一个)
  13763. * @param componentName // 需要找的组件的名称
  13764. * @param eventName // 事件名称
  13765. * @param params // 需要传递的参数
  13766. */
  13767. dispatch: function dispatch(componentName, eventName, params) {
  13768. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  13769. var name = parent.$options.name; // 获取当前组件实例的name
  13770. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  13771. // 循环出当前名称的一样的组件实例
  13772. while (parent && (!name || name !== componentName)) {
  13773. parent = parent.$parent;
  13774. if (parent) {
  13775. name = parent.$options.name;
  13776. }
  13777. }
  13778. // 有节点表示当前找到了name一样的实例
  13779. if (parent) {
  13780. parent.$emit.apply(parent, [eventName].concat(params));
  13781. }
  13782. },
  13783. /**
  13784. * 广播 (向下查找) (广播多个)
  13785. * @param componentName // 需要找的组件的名称
  13786. * @param eventName // 事件名称
  13787. * @param params // 需要传递的参数
  13788. */
  13789. broadcast: function broadcast(componentName, eventName, params) {
  13790. _broadcast.call(this, componentName, eventName, params);
  13791. } } };exports.default = _default;
  13792. /***/ }),
  13793. /***/ 562:
  13794. /*!*************************************************************************************************************************!*\
  13795. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/uview-ui/libs/util/async-validator.js ***!
  13796. \*************************************************************************************************************************/
  13797. /*! no static exports found */
  13798. /***/ (function(module, exports, __webpack_require__) {
  13799. "use strict";
  13800. /* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _extends() {
  13801. _extends = Object.assign || function (target) {
  13802. for (var i = 1; i < arguments.length; i++) {
  13803. var source = arguments[i];
  13804. for (var key in source) {
  13805. if (Object.prototype.hasOwnProperty.call(source, key)) {
  13806. target[key] = source[key];
  13807. }
  13808. }
  13809. }
  13810. return target;
  13811. };
  13812. return _extends.apply(this, arguments);
  13813. }
  13814. /* eslint no-console:0 */
  13815. var formatRegExp = /%[sdj%]/g;
  13816. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  13817. if (typeof process !== 'undefined' && Object({"VUE_APP_NAME":"智能仓储2","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !==
  13818. 'undefined' && typeof document !== 'undefined') {
  13819. warning = function warning(type, errors) {
  13820. if (typeof console !== 'undefined' && console.warn) {
  13821. if (errors.every(function (e) {
  13822. return typeof e === 'string';
  13823. })) {
  13824. console.warn(type, errors);
  13825. }
  13826. }
  13827. };
  13828. }
  13829. function convertFieldsError(errors) {
  13830. if (!errors || !errors.length) return null;
  13831. var fields = {};
  13832. errors.forEach(function (error) {
  13833. var field = error.field;
  13834. fields[field] = fields[field] || [];
  13835. fields[field].push(error);
  13836. });
  13837. return fields;
  13838. }
  13839. function format() {
  13840. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  13841. args[_key] = arguments[_key];
  13842. }
  13843. var i = 1;
  13844. var f = args[0];
  13845. var len = args.length;
  13846. if (typeof f === 'function') {
  13847. return f.apply(null, args.slice(1));
  13848. }
  13849. if (typeof f === 'string') {
  13850. var str = String(f).replace(formatRegExp, function (x) {
  13851. if (x === '%%') {
  13852. return '%';
  13853. }
  13854. if (i >= len) {
  13855. return x;
  13856. }
  13857. switch (x) {
  13858. case '%s':
  13859. return String(args[i++]);
  13860. case '%d':
  13861. return Number(args[i++]);
  13862. case '%j':
  13863. try {
  13864. return JSON.stringify(args[i++]);
  13865. } catch (_) {
  13866. return '[Circular]';
  13867. }
  13868. break;
  13869. default:
  13870. return x;}
  13871. });
  13872. for (var arg = args[i]; i < len; arg = args[++i]) {
  13873. str += " " + arg;
  13874. }
  13875. return str;
  13876. }
  13877. return f;
  13878. }
  13879. function isNativeStringType(type) {
  13880. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  13881. }
  13882. function isEmptyValue(value, type) {
  13883. if (value === undefined || value === null) {
  13884. return true;
  13885. }
  13886. if (type === 'array' && Array.isArray(value) && !value.length) {
  13887. return true;
  13888. }
  13889. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  13890. return true;
  13891. }
  13892. return false;
  13893. }
  13894. function asyncParallelArray(arr, func, callback) {
  13895. var results = [];
  13896. var total = 0;
  13897. var arrLength = arr.length;
  13898. function count(errors) {
  13899. results.push.apply(results, errors);
  13900. total++;
  13901. if (total === arrLength) {
  13902. callback(results);
  13903. }
  13904. }
  13905. arr.forEach(function (a) {
  13906. func(a, count);
  13907. });
  13908. }
  13909. function asyncSerialArray(arr, func, callback) {
  13910. var index = 0;
  13911. var arrLength = arr.length;
  13912. function next(errors) {
  13913. if (errors && errors.length) {
  13914. callback(errors);
  13915. return;
  13916. }
  13917. var original = index;
  13918. index = index + 1;
  13919. if (original < arrLength) {
  13920. func(arr[original], next);
  13921. } else {
  13922. callback([]);
  13923. }
  13924. }
  13925. next([]);
  13926. }
  13927. function flattenObjArr(objArr) {
  13928. var ret = [];
  13929. Object.keys(objArr).forEach(function (k) {
  13930. ret.push.apply(ret, objArr[k]);
  13931. });
  13932. return ret;
  13933. }
  13934. function asyncMap(objArr, option, func, callback) {
  13935. if (option.first) {
  13936. var _pending = new Promise(function (resolve, reject) {
  13937. var next = function next(errors) {
  13938. callback(errors);
  13939. return errors.length ? reject({
  13940. errors: errors,
  13941. fields: convertFieldsError(errors) }) :
  13942. resolve();
  13943. };
  13944. var flattenArr = flattenObjArr(objArr);
  13945. asyncSerialArray(flattenArr, func, next);
  13946. });
  13947. _pending["catch"](function (e) {
  13948. return e;
  13949. });
  13950. return _pending;
  13951. }
  13952. var firstFields = option.firstFields || [];
  13953. if (firstFields === true) {
  13954. firstFields = Object.keys(objArr);
  13955. }
  13956. var objArrKeys = Object.keys(objArr);
  13957. var objArrLength = objArrKeys.length;
  13958. var total = 0;
  13959. var results = [];
  13960. var pending = new Promise(function (resolve, reject) {
  13961. var next = function next(errors) {
  13962. results.push.apply(results, errors);
  13963. total++;
  13964. if (total === objArrLength) {
  13965. callback(results);
  13966. return results.length ? reject({
  13967. errors: results,
  13968. fields: convertFieldsError(results) }) :
  13969. resolve();
  13970. }
  13971. };
  13972. if (!objArrKeys.length) {
  13973. callback(results);
  13974. resolve();
  13975. }
  13976. objArrKeys.forEach(function (key) {
  13977. var arr = objArr[key];
  13978. if (firstFields.indexOf(key) !== -1) {
  13979. asyncSerialArray(arr, func, next);
  13980. } else {
  13981. asyncParallelArray(arr, func, next);
  13982. }
  13983. });
  13984. });
  13985. pending["catch"](function (e) {
  13986. return e;
  13987. });
  13988. return pending;
  13989. }
  13990. function complementError(rule) {
  13991. return function (oe) {
  13992. if (oe && oe.message) {
  13993. oe.field = oe.field || rule.fullField;
  13994. return oe;
  13995. }
  13996. return {
  13997. message: typeof oe === 'function' ? oe() : oe,
  13998. field: oe.field || rule.fullField };
  13999. };
  14000. }
  14001. function deepMerge(target, source) {
  14002. if (source) {
  14003. for (var s in source) {
  14004. if (source.hasOwnProperty(s)) {
  14005. var value = source[s];
  14006. if (typeof value === 'object' && typeof target[s] === 'object') {
  14007. target[s] = _extends({}, target[s], {}, value);
  14008. } else {
  14009. target[s] = value;
  14010. }
  14011. }
  14012. }
  14013. }
  14014. return target;
  14015. }
  14016. /**
  14017. * Rule for validating required fields.
  14018. *
  14019. * @param rule The validation rule.
  14020. * @param value The value of the field on the source object.
  14021. * @param source The source object being validated.
  14022. * @param errors An array of errors that this rule may add
  14023. * validation errors to.
  14024. * @param options The validation options.
  14025. * @param options.messages The validation messages.
  14026. */
  14027. function required(rule, value, source, errors, options, type) {
  14028. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  14029. errors.push(format(options.messages.required, rule.fullField));
  14030. }
  14031. }
  14032. /**
  14033. * Rule for validating whitespace.
  14034. *
  14035. * @param rule The validation rule.
  14036. * @param value The value of the field on the source object.
  14037. * @param source The source object being validated.
  14038. * @param errors An array of errors that this rule may add
  14039. * validation errors to.
  14040. * @param options The validation options.
  14041. * @param options.messages The validation messages.
  14042. */
  14043. function whitespace(rule, value, source, errors, options) {
  14044. if (/^\s+$/.test(value) || value === '') {
  14045. errors.push(format(options.messages.whitespace, rule.fullField));
  14046. }
  14047. }
  14048. /* eslint max-len:0 */
  14049. var pattern = {
  14050. // http://emailregex.com/
  14051. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  14052. url: new RegExp(
  14053. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  14054. 'i'),
  14055. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i };
  14056. var types = {
  14057. integer: function integer(value) {
  14058. return types.number(value) && parseInt(value, 10) === value;
  14059. },
  14060. "float": function float(value) {
  14061. return types.number(value) && !types.integer(value);
  14062. },
  14063. array: function array(value) {
  14064. return Array.isArray(value);
  14065. },
  14066. regexp: function regexp(value) {
  14067. if (value instanceof RegExp) {
  14068. return true;
  14069. }
  14070. try {
  14071. return !!new RegExp(value);
  14072. } catch (e) {
  14073. return false;
  14074. }
  14075. },
  14076. date: function date(value) {
  14077. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear ===
  14078. 'function';
  14079. },
  14080. number: function number(value) {
  14081. if (isNaN(value)) {
  14082. return false;
  14083. }
  14084. // 修改源码,将字符串数值先转为数值
  14085. return typeof +value === 'number';
  14086. },
  14087. object: function object(value) {
  14088. return typeof value === 'object' && !types.array(value);
  14089. },
  14090. method: function method(value) {
  14091. return typeof value === 'function';
  14092. },
  14093. email: function email(value) {
  14094. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  14095. },
  14096. url: function url(value) {
  14097. return typeof value === 'string' && !!value.match(pattern.url);
  14098. },
  14099. hex: function hex(value) {
  14100. return typeof value === 'string' && !!value.match(pattern.hex);
  14101. } };
  14102. /**
  14103. * Rule for validating the type of a value.
  14104. *
  14105. * @param rule The validation rule.
  14106. * @param value The value of the field on the source object.
  14107. * @param source The source object being validated.
  14108. * @param errors An array of errors that this rule may add
  14109. * validation errors to.
  14110. * @param options The validation options.
  14111. * @param options.messages The validation messages.
  14112. */
  14113. function type(rule, value, source, errors, options) {
  14114. if (rule.required && value === undefined) {
  14115. required(rule, value, source, errors, options);
  14116. return;
  14117. }
  14118. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  14119. var ruleType = rule.type;
  14120. if (custom.indexOf(ruleType) > -1) {
  14121. if (!types[ruleType](value)) {
  14122. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  14123. } // straight typeof check
  14124. } else if (ruleType && typeof value !== rule.type) {
  14125. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  14126. }
  14127. }
  14128. /**
  14129. * Rule for validating minimum and maximum allowed values.
  14130. *
  14131. * @param rule The validation rule.
  14132. * @param value The value of the field on the source object.
  14133. * @param source The source object being validated.
  14134. * @param errors An array of errors that this rule may add
  14135. * validation errors to.
  14136. * @param options The validation options.
  14137. * @param options.messages The validation messages.
  14138. */
  14139. function range(rule, value, source, errors, options) {
  14140. var len = typeof rule.len === 'number';
  14141. var min = typeof rule.min === 'number';
  14142. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  14143. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  14144. var val = value;
  14145. var key = null;
  14146. var num = typeof value === 'number';
  14147. var str = typeof value === 'string';
  14148. var arr = Array.isArray(value);
  14149. if (num) {
  14150. key = 'number';
  14151. } else if (str) {
  14152. key = 'string';
  14153. } else if (arr) {
  14154. key = 'array';
  14155. } // if the value is not of a supported type for range validation
  14156. // the validation rule rule should use the
  14157. // type property to also test for a particular type
  14158. if (!key) {
  14159. return false;
  14160. }
  14161. if (arr) {
  14162. val = value.length;
  14163. }
  14164. if (str) {
  14165. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  14166. val = value.replace(spRegexp, '_').length;
  14167. }
  14168. if (len) {
  14169. if (val !== rule.len) {
  14170. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  14171. }
  14172. } else if (min && !max && val < rule.min) {
  14173. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  14174. } else if (max && !min && val > rule.max) {
  14175. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  14176. } else if (min && max && (val < rule.min || val > rule.max)) {
  14177. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  14178. }
  14179. }
  14180. var ENUM = 'enum';
  14181. /**
  14182. * Rule for validating a value exists in an enumerable list.
  14183. *
  14184. * @param rule The validation rule.
  14185. * @param value The value of the field on the source object.
  14186. * @param source The source object being validated.
  14187. * @param errors An array of errors that this rule may add
  14188. * validation errors to.
  14189. * @param options The validation options.
  14190. * @param options.messages The validation messages.
  14191. */
  14192. function enumerable(rule, value, source, errors, options) {
  14193. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  14194. if (rule[ENUM].indexOf(value) === -1) {
  14195. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  14196. }
  14197. }
  14198. /**
  14199. * Rule for validating a regular expression pattern.
  14200. *
  14201. * @param rule The validation rule.
  14202. * @param value The value of the field on the source object.
  14203. * @param source The source object being validated.
  14204. * @param errors An array of errors that this rule may add
  14205. * validation errors to.
  14206. * @param options The validation options.
  14207. * @param options.messages The validation messages.
  14208. */
  14209. function pattern$1(rule, value, source, errors, options) {
  14210. if (rule.pattern) {
  14211. if (rule.pattern instanceof RegExp) {
  14212. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  14213. // flag is accidentally set to `true`, which in a validation scenario
  14214. // is not necessary and the result might be misleading
  14215. rule.pattern.lastIndex = 0;
  14216. if (!rule.pattern.test(value)) {
  14217. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  14218. }
  14219. } else if (typeof rule.pattern === 'string') {
  14220. var _pattern = new RegExp(rule.pattern);
  14221. if (!_pattern.test(value)) {
  14222. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  14223. }
  14224. }
  14225. }
  14226. }
  14227. var rules = {
  14228. required: required,
  14229. whitespace: whitespace,
  14230. type: type,
  14231. range: range,
  14232. "enum": enumerable,
  14233. pattern: pattern$1 };
  14234. /**
  14235. * Performs validation for string types.
  14236. *
  14237. * @param rule The validation rule.
  14238. * @param value The value of the field on the source object.
  14239. * @param callback The callback function.
  14240. * @param source The source object being validated.
  14241. * @param options The validation options.
  14242. * @param options.messages The validation messages.
  14243. */
  14244. function string(rule, value, callback, source, options) {
  14245. var errors = [];
  14246. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14247. if (validate) {
  14248. if (isEmptyValue(value, 'string') && !rule.required) {
  14249. return callback();
  14250. }
  14251. rules.required(rule, value, source, errors, options, 'string');
  14252. if (!isEmptyValue(value, 'string')) {
  14253. rules.type(rule, value, source, errors, options);
  14254. rules.range(rule, value, source, errors, options);
  14255. rules.pattern(rule, value, source, errors, options);
  14256. if (rule.whitespace === true) {
  14257. rules.whitespace(rule, value, source, errors, options);
  14258. }
  14259. }
  14260. }
  14261. callback(errors);
  14262. }
  14263. /**
  14264. * Validates a function.
  14265. *
  14266. * @param rule The validation rule.
  14267. * @param value The value of the field on the source object.
  14268. * @param callback The callback function.
  14269. * @param source The source object being validated.
  14270. * @param options The validation options.
  14271. * @param options.messages The validation messages.
  14272. */
  14273. function method(rule, value, callback, source, options) {
  14274. var errors = [];
  14275. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14276. if (validate) {
  14277. if (isEmptyValue(value) && !rule.required) {
  14278. return callback();
  14279. }
  14280. rules.required(rule, value, source, errors, options);
  14281. if (value !== undefined) {
  14282. rules.type(rule, value, source, errors, options);
  14283. }
  14284. }
  14285. callback(errors);
  14286. }
  14287. /**
  14288. * Validates a number.
  14289. *
  14290. * @param rule The validation rule.
  14291. * @param value The value of the field on the source object.
  14292. * @param callback The callback function.
  14293. * @param source The source object being validated.
  14294. * @param options The validation options.
  14295. * @param options.messages The validation messages.
  14296. */
  14297. function number(rule, value, callback, source, options) {
  14298. var errors = [];
  14299. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14300. if (validate) {
  14301. if (value === '') {
  14302. value = undefined;
  14303. }
  14304. if (isEmptyValue(value) && !rule.required) {
  14305. return callback();
  14306. }
  14307. rules.required(rule, value, source, errors, options);
  14308. if (value !== undefined) {
  14309. rules.type(rule, value, source, errors, options);
  14310. rules.range(rule, value, source, errors, options);
  14311. }
  14312. }
  14313. callback(errors);
  14314. }
  14315. /**
  14316. * Validates a boolean.
  14317. *
  14318. * @param rule The validation rule.
  14319. * @param value The value of the field on the source object.
  14320. * @param callback The callback function.
  14321. * @param source The source object being validated.
  14322. * @param options The validation options.
  14323. * @param options.messages The validation messages.
  14324. */
  14325. function _boolean(rule, value, callback, source, options) {
  14326. var errors = [];
  14327. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14328. if (validate) {
  14329. if (isEmptyValue(value) && !rule.required) {
  14330. return callback();
  14331. }
  14332. rules.required(rule, value, source, errors, options);
  14333. if (value !== undefined) {
  14334. rules.type(rule, value, source, errors, options);
  14335. }
  14336. }
  14337. callback(errors);
  14338. }
  14339. /**
  14340. * Validates the regular expression type.
  14341. *
  14342. * @param rule The validation rule.
  14343. * @param value The value of the field on the source object.
  14344. * @param callback The callback function.
  14345. * @param source The source object being validated.
  14346. * @param options The validation options.
  14347. * @param options.messages The validation messages.
  14348. */
  14349. function regexp(rule, value, callback, source, options) {
  14350. var errors = [];
  14351. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14352. if (validate) {
  14353. if (isEmptyValue(value) && !rule.required) {
  14354. return callback();
  14355. }
  14356. rules.required(rule, value, source, errors, options);
  14357. if (!isEmptyValue(value)) {
  14358. rules.type(rule, value, source, errors, options);
  14359. }
  14360. }
  14361. callback(errors);
  14362. }
  14363. /**
  14364. * Validates a number is an integer.
  14365. *
  14366. * @param rule The validation rule.
  14367. * @param value The value of the field on the source object.
  14368. * @param callback The callback function.
  14369. * @param source The source object being validated.
  14370. * @param options The validation options.
  14371. * @param options.messages The validation messages.
  14372. */
  14373. function integer(rule, value, callback, source, options) {
  14374. var errors = [];
  14375. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14376. if (validate) {
  14377. if (isEmptyValue(value) && !rule.required) {
  14378. return callback();
  14379. }
  14380. rules.required(rule, value, source, errors, options);
  14381. if (value !== undefined) {
  14382. rules.type(rule, value, source, errors, options);
  14383. rules.range(rule, value, source, errors, options);
  14384. }
  14385. }
  14386. callback(errors);
  14387. }
  14388. /**
  14389. * Validates a number is a floating point number.
  14390. *
  14391. * @param rule The validation rule.
  14392. * @param value The value of the field on the source object.
  14393. * @param callback The callback function.
  14394. * @param source The source object being validated.
  14395. * @param options The validation options.
  14396. * @param options.messages The validation messages.
  14397. */
  14398. function floatFn(rule, value, callback, source, options) {
  14399. var errors = [];
  14400. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14401. if (validate) {
  14402. if (isEmptyValue(value) && !rule.required) {
  14403. return callback();
  14404. }
  14405. rules.required(rule, value, source, errors, options);
  14406. if (value !== undefined) {
  14407. rules.type(rule, value, source, errors, options);
  14408. rules.range(rule, value, source, errors, options);
  14409. }
  14410. }
  14411. callback(errors);
  14412. }
  14413. /**
  14414. * Validates an array.
  14415. *
  14416. * @param rule The validation rule.
  14417. * @param value The value of the field on the source object.
  14418. * @param callback The callback function.
  14419. * @param source The source object being validated.
  14420. * @param options The validation options.
  14421. * @param options.messages The validation messages.
  14422. */
  14423. function array(rule, value, callback, source, options) {
  14424. var errors = [];
  14425. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14426. if (validate) {
  14427. if (isEmptyValue(value, 'array') && !rule.required) {
  14428. return callback();
  14429. }
  14430. rules.required(rule, value, source, errors, options, 'array');
  14431. if (!isEmptyValue(value, 'array')) {
  14432. rules.type(rule, value, source, errors, options);
  14433. rules.range(rule, value, source, errors, options);
  14434. }
  14435. }
  14436. callback(errors);
  14437. }
  14438. /**
  14439. * Validates an object.
  14440. *
  14441. * @param rule The validation rule.
  14442. * @param value The value of the field on the source object.
  14443. * @param callback The callback function.
  14444. * @param source The source object being validated.
  14445. * @param options The validation options.
  14446. * @param options.messages The validation messages.
  14447. */
  14448. function object(rule, value, callback, source, options) {
  14449. var errors = [];
  14450. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14451. if (validate) {
  14452. if (isEmptyValue(value) && !rule.required) {
  14453. return callback();
  14454. }
  14455. rules.required(rule, value, source, errors, options);
  14456. if (value !== undefined) {
  14457. rules.type(rule, value, source, errors, options);
  14458. }
  14459. }
  14460. callback(errors);
  14461. }
  14462. var ENUM$1 = 'enum';
  14463. /**
  14464. * Validates an enumerable list.
  14465. *
  14466. * @param rule The validation rule.
  14467. * @param value The value of the field on the source object.
  14468. * @param callback The callback function.
  14469. * @param source The source object being validated.
  14470. * @param options The validation options.
  14471. * @param options.messages The validation messages.
  14472. */
  14473. function enumerable$1(rule, value, callback, source, options) {
  14474. var errors = [];
  14475. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14476. if (validate) {
  14477. if (isEmptyValue(value) && !rule.required) {
  14478. return callback();
  14479. }
  14480. rules.required(rule, value, source, errors, options);
  14481. if (value !== undefined) {
  14482. rules[ENUM$1](rule, value, source, errors, options);
  14483. }
  14484. }
  14485. callback(errors);
  14486. }
  14487. /**
  14488. * Validates a regular expression pattern.
  14489. *
  14490. * Performs validation when a rule only contains
  14491. * a pattern property but is not declared as a string type.
  14492. *
  14493. * @param rule The validation rule.
  14494. * @param value The value of the field on the source object.
  14495. * @param callback The callback function.
  14496. * @param source The source object being validated.
  14497. * @param options The validation options.
  14498. * @param options.messages The validation messages.
  14499. */
  14500. function pattern$2(rule, value, callback, source, options) {
  14501. var errors = [];
  14502. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14503. if (validate) {
  14504. if (isEmptyValue(value, 'string') && !rule.required) {
  14505. return callback();
  14506. }
  14507. rules.required(rule, value, source, errors, options);
  14508. if (!isEmptyValue(value, 'string')) {
  14509. rules.pattern(rule, value, source, errors, options);
  14510. }
  14511. }
  14512. callback(errors);
  14513. }
  14514. function date(rule, value, callback, source, options) {
  14515. var errors = [];
  14516. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14517. if (validate) {
  14518. if (isEmptyValue(value) && !rule.required) {
  14519. return callback();
  14520. }
  14521. rules.required(rule, value, source, errors, options);
  14522. if (!isEmptyValue(value)) {
  14523. var dateObject;
  14524. if (typeof value === 'number') {
  14525. dateObject = new Date(value);
  14526. } else {
  14527. dateObject = value;
  14528. }
  14529. rules.type(rule, dateObject, source, errors, options);
  14530. if (dateObject) {
  14531. rules.range(rule, dateObject.getTime(), source, errors, options);
  14532. }
  14533. }
  14534. }
  14535. callback(errors);
  14536. }
  14537. function required$1(rule, value, callback, source, options) {
  14538. var errors = [];
  14539. var type = Array.isArray(value) ? 'array' : typeof value;
  14540. rules.required(rule, value, source, errors, options, type);
  14541. callback(errors);
  14542. }
  14543. function type$1(rule, value, callback, source, options) {
  14544. var ruleType = rule.type;
  14545. var errors = [];
  14546. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14547. if (validate) {
  14548. if (isEmptyValue(value, ruleType) && !rule.required) {
  14549. return callback();
  14550. }
  14551. rules.required(rule, value, source, errors, options, ruleType);
  14552. if (!isEmptyValue(value, ruleType)) {
  14553. rules.type(rule, value, source, errors, options);
  14554. }
  14555. }
  14556. callback(errors);
  14557. }
  14558. /**
  14559. * Performs validation for any type.
  14560. *
  14561. * @param rule The validation rule.
  14562. * @param value The value of the field on the source object.
  14563. * @param callback The callback function.
  14564. * @param source The source object being validated.
  14565. * @param options The validation options.
  14566. * @param options.messages The validation messages.
  14567. */
  14568. function any(rule, value, callback, source, options) {
  14569. var errors = [];
  14570. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14571. if (validate) {
  14572. if (isEmptyValue(value) && !rule.required) {
  14573. return callback();
  14574. }
  14575. rules.required(rule, value, source, errors, options);
  14576. }
  14577. callback(errors);
  14578. }
  14579. var validators = {
  14580. string: string,
  14581. method: method,
  14582. number: number,
  14583. "boolean": _boolean,
  14584. regexp: regexp,
  14585. integer: integer,
  14586. "float": floatFn,
  14587. array: array,
  14588. object: object,
  14589. "enum": enumerable$1,
  14590. pattern: pattern$2,
  14591. date: date,
  14592. url: type$1,
  14593. hex: type$1,
  14594. email: type$1,
  14595. required: required$1,
  14596. any: any };
  14597. function newMessages() {
  14598. return {
  14599. "default": 'Validation error on field %s',
  14600. required: '%s is required',
  14601. "enum": '%s must be one of %s',
  14602. whitespace: '%s cannot be empty',
  14603. date: {
  14604. format: '%s date %s is invalid for format %s',
  14605. parse: '%s date could not be parsed, %s is invalid ',
  14606. invalid: '%s date %s is invalid' },
  14607. types: {
  14608. string: '%s is not a %s',
  14609. method: '%s is not a %s (function)',
  14610. array: '%s is not an %s',
  14611. object: '%s is not an %s',
  14612. number: '%s is not a %s',
  14613. date: '%s is not a %s',
  14614. "boolean": '%s is not a %s',
  14615. integer: '%s is not an %s',
  14616. "float": '%s is not a %s',
  14617. regexp: '%s is not a valid %s',
  14618. email: '%s is not a valid %s',
  14619. url: '%s is not a valid %s',
  14620. hex: '%s is not a valid %s' },
  14621. string: {
  14622. len: '%s must be exactly %s characters',
  14623. min: '%s must be at least %s characters',
  14624. max: '%s cannot be longer than %s characters',
  14625. range: '%s must be between %s and %s characters' },
  14626. number: {
  14627. len: '%s must equal %s',
  14628. min: '%s cannot be less than %s',
  14629. max: '%s cannot be greater than %s',
  14630. range: '%s must be between %s and %s' },
  14631. array: {
  14632. len: '%s must be exactly %s in length',
  14633. min: '%s cannot be less than %s in length',
  14634. max: '%s cannot be greater than %s in length',
  14635. range: '%s must be between %s and %s in length' },
  14636. pattern: {
  14637. mismatch: '%s value %s does not match pattern %s' },
  14638. clone: function clone() {
  14639. var cloned = JSON.parse(JSON.stringify(this));
  14640. cloned.clone = this.clone;
  14641. return cloned;
  14642. } };
  14643. }
  14644. var messages = newMessages();
  14645. /**
  14646. * Encapsulates a validation schema.
  14647. *
  14648. * @param descriptor An object declaring validation rules
  14649. * for this schema.
  14650. */
  14651. function Schema(descriptor) {
  14652. this.rules = null;
  14653. this._messages = messages;
  14654. this.define(descriptor);
  14655. }
  14656. Schema.prototype = {
  14657. messages: function messages(_messages) {
  14658. if (_messages) {
  14659. this._messages = deepMerge(newMessages(), _messages);
  14660. }
  14661. return this._messages;
  14662. },
  14663. define: function define(rules) {
  14664. if (!rules) {
  14665. throw new Error('Cannot configure a schema with no rules');
  14666. }
  14667. if (typeof rules !== 'object' || Array.isArray(rules)) {
  14668. throw new Error('Rules must be an object');
  14669. }
  14670. this.rules = {};
  14671. var z;
  14672. var item;
  14673. for (z in rules) {
  14674. if (rules.hasOwnProperty(z)) {
  14675. item = rules[z];
  14676. this.rules[z] = Array.isArray(item) ? item : [item];
  14677. }
  14678. }
  14679. },
  14680. validate: function validate(source_, o, oc) {
  14681. var _this = this;
  14682. if (o === void 0) {
  14683. o = {};
  14684. }
  14685. if (oc === void 0) {
  14686. oc = function oc() {};
  14687. }
  14688. var source = source_;
  14689. var options = o;
  14690. var callback = oc;
  14691. if (typeof options === 'function') {
  14692. callback = options;
  14693. options = {};
  14694. }
  14695. if (!this.rules || Object.keys(this.rules).length === 0) {
  14696. if (callback) {
  14697. callback();
  14698. }
  14699. return Promise.resolve();
  14700. }
  14701. function complete(results) {
  14702. var i;
  14703. var errors = [];
  14704. var fields = {};
  14705. function add(e) {
  14706. if (Array.isArray(e)) {
  14707. var _errors;
  14708. errors = (_errors = errors).concat.apply(_errors, e);
  14709. } else {
  14710. errors.push(e);
  14711. }
  14712. }
  14713. for (i = 0; i < results.length; i++) {
  14714. add(results[i]);
  14715. }
  14716. if (!errors.length) {
  14717. errors = null;
  14718. fields = null;
  14719. } else {
  14720. fields = convertFieldsError(errors);
  14721. }
  14722. callback(errors, fields);
  14723. }
  14724. if (options.messages) {
  14725. var messages$1 = this.messages();
  14726. if (messages$1 === messages) {
  14727. messages$1 = newMessages();
  14728. }
  14729. deepMerge(messages$1, options.messages);
  14730. options.messages = messages$1;
  14731. } else {
  14732. options.messages = this.messages();
  14733. }
  14734. var arr;
  14735. var value;
  14736. var series = {};
  14737. var keys = options.keys || Object.keys(this.rules);
  14738. keys.forEach(function (z) {
  14739. arr = _this.rules[z];
  14740. value = source[z];
  14741. arr.forEach(function (r) {
  14742. var rule = r;
  14743. if (typeof rule.transform === 'function') {
  14744. if (source === source_) {
  14745. source = _extends({}, source);
  14746. }
  14747. value = source[z] = rule.transform(value);
  14748. }
  14749. if (typeof rule === 'function') {
  14750. rule = {
  14751. validator: rule };
  14752. } else {
  14753. rule = _extends({}, rule);
  14754. }
  14755. rule.validator = _this.getValidationMethod(rule);
  14756. rule.field = z;
  14757. rule.fullField = rule.fullField || z;
  14758. rule.type = _this.getType(rule);
  14759. if (!rule.validator) {
  14760. return;
  14761. }
  14762. series[z] = series[z] || [];
  14763. series[z].push({
  14764. rule: rule,
  14765. value: value,
  14766. source: source,
  14767. field: z });
  14768. });
  14769. });
  14770. var errorFields = {};
  14771. return asyncMap(series, options, function (data, doIt) {
  14772. var rule = data.rule;
  14773. var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField ===
  14774. 'object');
  14775. deep = deep && (rule.required || !rule.required && data.value);
  14776. rule.field = data.field;
  14777. function addFullfield(key, schema) {
  14778. return _extends({}, schema, {
  14779. fullField: rule.fullField + "." + key });
  14780. }
  14781. function cb(e) {
  14782. if (e === void 0) {
  14783. e = [];
  14784. }
  14785. var errors = e;
  14786. if (!Array.isArray(errors)) {
  14787. errors = [errors];
  14788. }
  14789. if (!options.suppressWarning && errors.length) {
  14790. Schema.warning('async-validator:', errors);
  14791. }
  14792. if (errors.length && rule.message) {
  14793. errors = [].concat(rule.message);
  14794. }
  14795. errors = errors.map(complementError(rule));
  14796. if (options.first && errors.length) {
  14797. errorFields[rule.field] = 1;
  14798. return doIt(errors);
  14799. }
  14800. if (!deep) {
  14801. doIt(errors);
  14802. } else {
  14803. // if rule is required but the target object
  14804. // does not exist fail at the rule level and don't
  14805. // go deeper
  14806. if (rule.required && !data.value) {
  14807. if (rule.message) {
  14808. errors = [].concat(rule.message).map(complementError(rule));
  14809. } else if (options.error) {
  14810. errors = [options.error(rule, format(options.messages.required, rule.field))];
  14811. } else {
  14812. errors = [];
  14813. }
  14814. return doIt(errors);
  14815. }
  14816. var fieldsSchema = {};
  14817. if (rule.defaultField) {
  14818. for (var k in data.value) {
  14819. if (data.value.hasOwnProperty(k)) {
  14820. fieldsSchema[k] = rule.defaultField;
  14821. }
  14822. }
  14823. }
  14824. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  14825. for (var f in fieldsSchema) {
  14826. if (fieldsSchema.hasOwnProperty(f)) {
  14827. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  14828. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  14829. }
  14830. }
  14831. var schema = new Schema(fieldsSchema);
  14832. schema.messages(options.messages);
  14833. if (data.rule.options) {
  14834. data.rule.options.messages = options.messages;
  14835. data.rule.options.error = options.error;
  14836. }
  14837. schema.validate(data.value, data.rule.options || options, function (errs) {
  14838. var finalErrors = [];
  14839. if (errors && errors.length) {
  14840. finalErrors.push.apply(finalErrors, errors);
  14841. }
  14842. if (errs && errs.length) {
  14843. finalErrors.push.apply(finalErrors, errs);
  14844. }
  14845. doIt(finalErrors.length ? finalErrors : null);
  14846. });
  14847. }
  14848. }
  14849. var res;
  14850. if (rule.asyncValidator) {
  14851. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  14852. } else if (rule.validator) {
  14853. res = rule.validator(rule, data.value, cb, data.source, options);
  14854. if (res === true) {
  14855. cb();
  14856. } else if (res === false) {
  14857. cb(rule.message || rule.field + " fails");
  14858. } else if (res instanceof Array) {
  14859. cb(res);
  14860. } else if (res instanceof Error) {
  14861. cb(res.message);
  14862. }
  14863. }
  14864. if (res && res.then) {
  14865. res.then(function () {
  14866. return cb();
  14867. }, function (e) {
  14868. return cb(e);
  14869. });
  14870. }
  14871. }, function (results) {
  14872. complete(results);
  14873. });
  14874. },
  14875. getType: function getType(rule) {
  14876. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  14877. rule.type = 'pattern';
  14878. }
  14879. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  14880. throw new Error(format('Unknown rule type %s', rule.type));
  14881. }
  14882. return rule.type || 'string';
  14883. },
  14884. getValidationMethod: function getValidationMethod(rule) {
  14885. if (typeof rule.validator === 'function') {
  14886. return rule.validator;
  14887. }
  14888. var keys = Object.keys(rule);
  14889. var messageIndex = keys.indexOf('message');
  14890. if (messageIndex !== -1) {
  14891. keys.splice(messageIndex, 1);
  14892. }
  14893. if (keys.length === 1 && keys[0] === 'required') {
  14894. return validators.required;
  14895. }
  14896. return validators[this.getType(rule)] || false;
  14897. } };
  14898. Schema.register = function register(type, validator) {
  14899. if (typeof validator !== 'function') {
  14900. throw new Error('Cannot register a validator by type, validator is not a function');
  14901. }
  14902. validators[type] = validator;
  14903. };
  14904. Schema.warning = warning;
  14905. Schema.messages = messages;var _default =
  14906. Schema;exports.default = _default;
  14907. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 563)))
  14908. /***/ }),
  14909. /***/ 563:
  14910. /*!********************************************************!*\
  14911. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  14912. \********************************************************/
  14913. /*! no static exports found */
  14914. /***/ (function(module, exports, __webpack_require__) {
  14915. exports.nextTick = function nextTick(fn) {
  14916. var args = Array.prototype.slice.call(arguments);
  14917. args.shift();
  14918. setTimeout(function () {
  14919. fn.apply(null, args);
  14920. }, 0);
  14921. };
  14922. exports.platform = exports.arch =
  14923. exports.execPath = exports.title = 'browser';
  14924. exports.pid = 1;
  14925. exports.browser = true;
  14926. exports.env = {};
  14927. exports.argv = [];
  14928. exports.binding = function (name) {
  14929. throw new Error('No such module. (Possibly not yet loaded)')
  14930. };
  14931. (function () {
  14932. var cwd = '/';
  14933. var path;
  14934. exports.cwd = function () { return cwd };
  14935. exports.chdir = function (dir) {
  14936. if (!path) path = __webpack_require__(/*! path */ 564);
  14937. cwd = path.resolve(dir, cwd);
  14938. };
  14939. })();
  14940. exports.exit = exports.kill =
  14941. exports.umask = exports.dlopen =
  14942. exports.uptime = exports.memoryUsage =
  14943. exports.uvCounters = function() {};
  14944. exports.features = {};
  14945. /***/ }),
  14946. /***/ 564:
  14947. /*!***********************************************!*\
  14948. !*** ./node_modules/path-browserify/index.js ***!
  14949. \***********************************************/
  14950. /*! no static exports found */
  14951. /***/ (function(module, exports, __webpack_require__) {
  14952. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  14953. // backported and transplited with Babel, with backwards-compat fixes
  14954. // Copyright Joyent, Inc. and other Node contributors.
  14955. //
  14956. // Permission is hereby granted, free of charge, to any person obtaining a
  14957. // copy of this software and associated documentation files (the
  14958. // "Software"), to deal in the Software without restriction, including
  14959. // without limitation the rights to use, copy, modify, merge, publish,
  14960. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14961. // persons to whom the Software is furnished to do so, subject to the
  14962. // following conditions:
  14963. //
  14964. // The above copyright notice and this permission notice shall be included
  14965. // in all copies or substantial portions of the Software.
  14966. //
  14967. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14968. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14969. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14970. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14971. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14972. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14973. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14974. // resolves . and .. elements in a path array with directory names there
  14975. // must be no slashes, empty elements, or device names (c:\) in the array
  14976. // (so also no leading and trailing slashes - it does not distinguish
  14977. // relative and absolute paths)
  14978. function normalizeArray(parts, allowAboveRoot) {
  14979. // if the path tries to go above the root, `up` ends up > 0
  14980. var up = 0;
  14981. for (var i = parts.length - 1; i >= 0; i--) {
  14982. var last = parts[i];
  14983. if (last === '.') {
  14984. parts.splice(i, 1);
  14985. } else if (last === '..') {
  14986. parts.splice(i, 1);
  14987. up++;
  14988. } else if (up) {
  14989. parts.splice(i, 1);
  14990. up--;
  14991. }
  14992. }
  14993. // if the path is allowed to go above the root, restore leading ..s
  14994. if (allowAboveRoot) {
  14995. for (; up--; up) {
  14996. parts.unshift('..');
  14997. }
  14998. }
  14999. return parts;
  15000. }
  15001. // path.resolve([from ...], to)
  15002. // posix version
  15003. exports.resolve = function() {
  15004. var resolvedPath = '',
  15005. resolvedAbsolute = false;
  15006. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  15007. var path = (i >= 0) ? arguments[i] : process.cwd();
  15008. // Skip empty and invalid entries
  15009. if (typeof path !== 'string') {
  15010. throw new TypeError('Arguments to path.resolve must be strings');
  15011. } else if (!path) {
  15012. continue;
  15013. }
  15014. resolvedPath = path + '/' + resolvedPath;
  15015. resolvedAbsolute = path.charAt(0) === '/';
  15016. }
  15017. // At this point the path should be resolved to a full absolute path, but
  15018. // handle relative paths to be safe (might happen when process.cwd() fails)
  15019. // Normalize the path
  15020. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  15021. return !!p;
  15022. }), !resolvedAbsolute).join('/');
  15023. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  15024. };
  15025. // path.normalize(path)
  15026. // posix version
  15027. exports.normalize = function(path) {
  15028. var isAbsolute = exports.isAbsolute(path),
  15029. trailingSlash = substr(path, -1) === '/';
  15030. // Normalize the path
  15031. path = normalizeArray(filter(path.split('/'), function(p) {
  15032. return !!p;
  15033. }), !isAbsolute).join('/');
  15034. if (!path && !isAbsolute) {
  15035. path = '.';
  15036. }
  15037. if (path && trailingSlash) {
  15038. path += '/';
  15039. }
  15040. return (isAbsolute ? '/' : '') + path;
  15041. };
  15042. // posix version
  15043. exports.isAbsolute = function(path) {
  15044. return path.charAt(0) === '/';
  15045. };
  15046. // posix version
  15047. exports.join = function() {
  15048. var paths = Array.prototype.slice.call(arguments, 0);
  15049. return exports.normalize(filter(paths, function(p, index) {
  15050. if (typeof p !== 'string') {
  15051. throw new TypeError('Arguments to path.join must be strings');
  15052. }
  15053. return p;
  15054. }).join('/'));
  15055. };
  15056. // path.relative(from, to)
  15057. // posix version
  15058. exports.relative = function(from, to) {
  15059. from = exports.resolve(from).substr(1);
  15060. to = exports.resolve(to).substr(1);
  15061. function trim(arr) {
  15062. var start = 0;
  15063. for (; start < arr.length; start++) {
  15064. if (arr[start] !== '') break;
  15065. }
  15066. var end = arr.length - 1;
  15067. for (; end >= 0; end--) {
  15068. if (arr[end] !== '') break;
  15069. }
  15070. if (start > end) return [];
  15071. return arr.slice(start, end - start + 1);
  15072. }
  15073. var fromParts = trim(from.split('/'));
  15074. var toParts = trim(to.split('/'));
  15075. var length = Math.min(fromParts.length, toParts.length);
  15076. var samePartsLength = length;
  15077. for (var i = 0; i < length; i++) {
  15078. if (fromParts[i] !== toParts[i]) {
  15079. samePartsLength = i;
  15080. break;
  15081. }
  15082. }
  15083. var outputParts = [];
  15084. for (var i = samePartsLength; i < fromParts.length; i++) {
  15085. outputParts.push('..');
  15086. }
  15087. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  15088. return outputParts.join('/');
  15089. };
  15090. exports.sep = '/';
  15091. exports.delimiter = ':';
  15092. exports.dirname = function (path) {
  15093. if (typeof path !== 'string') path = path + '';
  15094. if (path.length === 0) return '.';
  15095. var code = path.charCodeAt(0);
  15096. var hasRoot = code === 47 /*/*/;
  15097. var end = -1;
  15098. var matchedSlash = true;
  15099. for (var i = path.length - 1; i >= 1; --i) {
  15100. code = path.charCodeAt(i);
  15101. if (code === 47 /*/*/) {
  15102. if (!matchedSlash) {
  15103. end = i;
  15104. break;
  15105. }
  15106. } else {
  15107. // We saw the first non-path separator
  15108. matchedSlash = false;
  15109. }
  15110. }
  15111. if (end === -1) return hasRoot ? '/' : '.';
  15112. if (hasRoot && end === 1) {
  15113. // return '//';
  15114. // Backwards-compat fix:
  15115. return '/';
  15116. }
  15117. return path.slice(0, end);
  15118. };
  15119. function basename(path) {
  15120. if (typeof path !== 'string') path = path + '';
  15121. var start = 0;
  15122. var end = -1;
  15123. var matchedSlash = true;
  15124. var i;
  15125. for (i = path.length - 1; i >= 0; --i) {
  15126. if (path.charCodeAt(i) === 47 /*/*/) {
  15127. // If we reached a path separator that was not part of a set of path
  15128. // separators at the end of the string, stop now
  15129. if (!matchedSlash) {
  15130. start = i + 1;
  15131. break;
  15132. }
  15133. } else if (end === -1) {
  15134. // We saw the first non-path separator, mark this as the end of our
  15135. // path component
  15136. matchedSlash = false;
  15137. end = i + 1;
  15138. }
  15139. }
  15140. if (end === -1) return '';
  15141. return path.slice(start, end);
  15142. }
  15143. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  15144. // in new Node.js versions, so only basename() above is backported here
  15145. exports.basename = function (path, ext) {
  15146. var f = basename(path);
  15147. if (ext && f.substr(-1 * ext.length) === ext) {
  15148. f = f.substr(0, f.length - ext.length);
  15149. }
  15150. return f;
  15151. };
  15152. exports.extname = function (path) {
  15153. if (typeof path !== 'string') path = path + '';
  15154. var startDot = -1;
  15155. var startPart = 0;
  15156. var end = -1;
  15157. var matchedSlash = true;
  15158. // Track the state of characters (if any) we see before our first dot and
  15159. // after any path separator we find
  15160. var preDotState = 0;
  15161. for (var i = path.length - 1; i >= 0; --i) {
  15162. var code = path.charCodeAt(i);
  15163. if (code === 47 /*/*/) {
  15164. // If we reached a path separator that was not part of a set of path
  15165. // separators at the end of the string, stop now
  15166. if (!matchedSlash) {
  15167. startPart = i + 1;
  15168. break;
  15169. }
  15170. continue;
  15171. }
  15172. if (end === -1) {
  15173. // We saw the first non-path separator, mark this as the end of our
  15174. // extension
  15175. matchedSlash = false;
  15176. end = i + 1;
  15177. }
  15178. if (code === 46 /*.*/) {
  15179. // If this is our first dot, mark it as the start of our extension
  15180. if (startDot === -1)
  15181. startDot = i;
  15182. else if (preDotState !== 1)
  15183. preDotState = 1;
  15184. } else if (startDot !== -1) {
  15185. // We saw a non-dot and non-path separator before our dot, so we should
  15186. // have a good chance at having a non-empty extension
  15187. preDotState = -1;
  15188. }
  15189. }
  15190. if (startDot === -1 || end === -1 ||
  15191. // We saw a non-dot character immediately before the dot
  15192. preDotState === 0 ||
  15193. // The (right-most) trimmed path component is exactly '..'
  15194. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  15195. return '';
  15196. }
  15197. return path.slice(startDot, end);
  15198. };
  15199. function filter (xs, f) {
  15200. if (xs.filter) return xs.filter(f);
  15201. var res = [];
  15202. for (var i = 0; i < xs.length; i++) {
  15203. if (f(xs[i], i, xs)) res.push(xs[i]);
  15204. }
  15205. return res;
  15206. }
  15207. // String.prototype.substr - negative index don't work in IE8
  15208. var substr = 'ab'.substr(-1) === 'b'
  15209. ? function (str, start, len) { return str.substr(start, len) }
  15210. : function (str, start, len) {
  15211. if (start < 0) start = str.length + start;
  15212. return str.substr(start, len);
  15213. }
  15214. ;
  15215. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 563)))
  15216. /***/ }),
  15217. /***/ 57:
  15218. /*!**************************************************************************************************************!*\
  15219. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/js_sdk/fl-SOtime/SOtime.js ***!
  15220. \**************************************************************************************************************/
  15221. /*! no static exports found */
  15222. /***/ (function(module, exports) {
  15223. // time1 1593790157203 TO>>> 刚刚 || 3分钟前 || 1小时前 || 1天前 || 1周前 || 2月前 || 2019年11月11日
  15224. // time2 1593790157203 TO>>> 上午12:01 || 昨天 || 星期日 || 2019-11-11
  15225. // time3 1593790157203 TO>>> 2019-11-11 12:01
  15226. // time4 2019/11/11 || 2019/11/11 12:03 TO>>> 1593790157203
  15227. // time5 (1593790157203,1593790157205) (开始与结束时间戳) TO>>> 00:40 || 01:25 || 01:20:11 (时长)
  15228. var time1 = function time1(timer) {
  15229. var arrTimestamp = (timer + '').split('');
  15230. for (var start = 0; start < 13; start++) {
  15231. if (!arrTimestamp[start]) {
  15232. arrTimestamp[start] = '0';
  15233. }
  15234. }
  15235. timer = arrTimestamp.join('') * 1;
  15236. var minute = 1000 * 60;
  15237. var hour = minute * 60;
  15238. var day = hour * 24;
  15239. var halfamonth = day * 15;
  15240. var month = day * 30;
  15241. var now = new Date().getTime();
  15242. var diffValue = now - timer;
  15243. // 如果本地时间反而小于变量时间
  15244. if (diffValue < 0) {
  15245. return '不久前';
  15246. }
  15247. // 计算差异时间的量级
  15248. var monthC = diffValue / month;
  15249. var weekC = diffValue / (7 * day);
  15250. var dayC = diffValue / day;
  15251. var hourC = diffValue / hour;
  15252. var minC = diffValue / minute;
  15253. // 数值补0方法
  15254. var zero = function zero(value) {
  15255. if (value < 10) {
  15256. return '0' + value;
  15257. }
  15258. return value;
  15259. };
  15260. // 使用
  15261. if (monthC > 12) {
  15262. // 超过1年,直接显示年月日
  15263. return function () {
  15264. var date = new Date(timer);
  15265. return date.getFullYear() + '年' + zero(date.getMonth() + 1) + '月' + zero(date.getDate()) + '日';
  15266. }();
  15267. } else if (monthC >= 1) {
  15268. return parseInt(monthC) + "月前";
  15269. } else if (weekC >= 1) {
  15270. return parseInt(weekC) + "周前";
  15271. } else if (dayC >= 1) {
  15272. return parseInt(dayC) + "天前";
  15273. } else if (hourC >= 1) {
  15274. return parseInt(hourC) + "小时前";
  15275. } else if (minC >= 1) {
  15276. return parseInt(minC) + "分钟前";
  15277. }
  15278. return '刚刚';
  15279. };
  15280. var time2 = function time2(timer) {
  15281. var arrTimestamp = (timer + '').split('');
  15282. for (var start = 0; start < 13; start++) {
  15283. if (!arrTimestamp[start]) {
  15284. arrTimestamp[start] = '0';
  15285. }
  15286. }
  15287. var Etime = arrTimestamp.join('') * 1; //参数时间
  15288. var Etimer = new Date(Etime);
  15289. var Ntime = new Date().getTime(); //现在时间
  15290. var Ntimer = new Date();
  15291. var Eyear = Etimer.getFullYear(); //取得4位数的年份
  15292. var Emonth = Etimer.getMonth() + 1 < 10 ? '0' + (Etimer.getMonth() + 1) : Etimer.getMonth() + 1; //取得日期中的月份,其中0表示1月,11表示12月
  15293. var Edate = Etimer.getDate() < 10 ? '0' + Etimer.getDate() : Etimer.getDate(); //返回日期月份中的天数(1到31)
  15294. var Eweek = Etimer.getDay(); //返回日期月份中的周
  15295. var Ehour = Etimer.getHours() < 10 ? '0' + Etimer.getHours() : Etimer.getHours(); //返回日期中的小时数(0到23)
  15296. var Eminute = Etimer.getMinutes() < 10 ? '0' + Etimer.getMinutes() : Etimer.getMinutes(); //返回日期中的分钟数(0到59)
  15297. var today = new Date(new Date().setHours(0, 0, 0, 0)) / 1000 * 1000; //今天0点时间戳
  15298. var yesterday = today - 24 * 60 * 60 * 1000; //昨天0点时间戳
  15299. var beforeWeek = today - 7 * 24 * 60 * 60 * 1000; //一周前0点时间戳
  15300. // 今天的时间
  15301. if (today < Etime) {
  15302. if (Ehour < 12) {
  15303. return '上午' + Ehour + ':' + Eminute;
  15304. } else {
  15305. return '下午' + Ehour + ':' + Eminute;
  15306. }
  15307. }
  15308. // 昨天的时间
  15309. if (yesterday < Etime && Etime < today) {
  15310. return '昨天';
  15311. }
  15312. // 一周内的时间
  15313. if (beforeWeek < Etime) {
  15314. if (Eweek == 0) {
  15315. return "星期日";
  15316. } else if (Eweek == 1) {
  15317. return "星期一";
  15318. } else if (Eweek == 2) {
  15319. return "星期二";
  15320. } else if (Eweek == 3) {
  15321. return "星期三";
  15322. } else if (Eweek == 4) {
  15323. return "星期四";
  15324. } else if (Eweek == 5) {
  15325. return "星期五";
  15326. } else if (Eweek == 6) {
  15327. return "星期六";
  15328. }
  15329. }
  15330. // 更早的时间
  15331. return Eyear + '-' + Emonth + '-' + Edate;
  15332. };
  15333. var time3 = function time3(timer) {
  15334. var arrTimestamp = (timer + '').split('');
  15335. for (var start = 0; start < 13; start++) {
  15336. if (!arrTimestamp[start]) {
  15337. arrTimestamp[start] = '0';
  15338. }
  15339. }
  15340. var Etime = arrTimestamp.join('') * 1; //参数时间
  15341. var Etimer = new Date(Etime);
  15342. var Eyear = Etimer.getFullYear(); //取得4位数的年份
  15343. var Emonth = Etimer.getMonth() + 1 < 10 ? '0' + (Etimer.getMonth() + 1) : Etimer.getMonth() + 1; //取得日期中的月份,其中0表示1月,11表示12月
  15344. var Edate = Etimer.getDate() < 10 ? '0' + Etimer.getDate() : Etimer.getDate(); //返回日期月份中的天数(1到31)
  15345. var Ehour = Etimer.getHours() < 10 ? '0' + Etimer.getHours() : Etimer.getHours(); //返回日期中的小时数(0到23)
  15346. var Eminute = Etimer.getMinutes() < 10 ? '0' + Etimer.getMinutes() : Etimer.getMinutes(); //返回日期中的分钟数(0到59)
  15347. return Eyear + "-" + Emonth + "-" + Edate + " " + Ehour + ":" + Eminute;
  15348. };
  15349. var time4 = function time4(timer) {
  15350. var date = timer.replace(/\//g, '-');
  15351. date = timer.replace(/:/g, ':');
  15352. var Etimer = new Date(date);
  15353. var Etime = Etimer.getTime();
  15354. return Etime;
  15355. };
  15356. var time5 = function time5(sTime, eTime) {
  15357. if (sTime.length == 13) sTime = (sTime - 0) / 1000;
  15358. if (eTime.length == 13) eTime = (eTime - 0) / 1000;
  15359. var lang = 0;
  15360. var interval = Math.ceil((eTime - sTime) / 1000);
  15361. // 一分钟以内
  15362. if (interval < 60) {
  15363. if (interval < 10) {
  15364. lang = '0' + interval;
  15365. } else {
  15366. lang = interval;
  15367. }
  15368. return '00:' + lang;
  15369. }
  15370. // 一小时以内
  15371. if (60 < interval && interval < 3600) {
  15372. var langM = Math.floor(interval / 60);
  15373. var langS = Math.floor(interval - langM * 60);
  15374. if (langM < 10) langM = '0' + langM;
  15375. if (langS < 10) langS = '0' + langS;
  15376. return langM + ':' + langS;
  15377. }
  15378. // 一小时以上
  15379. if (3600 < interval) {
  15380. var langH = Math.floor(interval / 3600);
  15381. var langM = Math.floor(interval / 60 - langH * 60);
  15382. var langS = Math.floor(interval - langH * 3600 - langM * 60);
  15383. if (langH < 10) langH = '0' + langH;
  15384. if (langM < 10) langM = '0' + langM;
  15385. if (langS < 10) langS = '0' + langS;
  15386. return langH + ':' + langM + ':' + langS;
  15387. }
  15388. };
  15389. module.exports = {
  15390. time1: time1,
  15391. time2: time2,
  15392. time3: time3,
  15393. time4: time4,
  15394. time5: time5 };
  15395. /***/ }),
  15396. /***/ 58:
  15397. /*!*******************************************************************************************************!*\
  15398. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/mixin.js ***!
  15399. \*******************************************************************************************************/
  15400. /*! no static exports found */
  15401. /***/ (function(module, exports, __webpack_require__) {
  15402. "use strict";
  15403. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 22));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 _default = {
  15404. data: function data() {
  15405. return {
  15406. // 下拉刷新标识
  15407. _freshing: false,
  15408. triggered: false,
  15409. // 分页信息
  15410. pageIndex: 1,
  15411. pageSize: 10,
  15412. loadStatus: 'loadmore',
  15413. userInfo: this.$storage.getStorageSync('userInfo') || '' // 本地用户信息
  15414. };
  15415. },
  15416. methods: {
  15417. // 下拉刷新
  15418. onRefresh: function onRefresh() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  15419. _this.triggered = true;if (!
  15420. _this._freshing) {_context.next = 3;break;}return _context.abrupt("return");case 3:
  15421. _this.triggered = true;
  15422. _this._freshing = true;
  15423. _this.pageIndex = 1;
  15424. _this.data = [];_context.next = 9;return (
  15425. _this.getList());case 9:
  15426. // 太快会导致刷新两次
  15427. setTimeout(function () {
  15428. _this.triggered = false;
  15429. _this._freshing = false;
  15430. }, 1000);case 10:case "end":return _context.stop();}}}, _callee);}))();
  15431. },
  15432. // 分页加载更多
  15433. loadMore: function loadMore() {var _this2 = this;
  15434. if (this.loadStatus == "nomore") {
  15435. return false;
  15436. }
  15437. this.loadStatus = 'loading';
  15438. this.pageIndex++;
  15439. setTimeout(function () {
  15440. _this2.getList();
  15441. }, 300);
  15442. } } };exports.default = _default;
  15443. /***/ }),
  15444. /***/ 59:
  15445. /*!*****************************************************************************************************!*\
  15446. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/libs/utils/pda.js ***!
  15447. \*****************************************************************************************************/
  15448. /*! no static exports found */
  15449. /***/ (function(module, exports, __webpack_require__) {
  15450. "use strict";
  15451. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var uhf = uni.requireNativePlugin('js-uhf');
  15452. var pda = uni.requireNativePlugin('js-pda');var _default =
  15453. {
  15454. /* rfid扫描初始化 */
  15455. uhfInit: function uhfInit() {
  15456. return new Promise(function (resolve, reject) {
  15457. uhf.init({}, function (res) {
  15458. if (res.code === 0) {
  15459. console.log(res, '初始化成功');
  15460. resolve();
  15461. } else {
  15462. reject();
  15463. }
  15464. });
  15465. });
  15466. },
  15467. /* rfid扫描 */
  15468. uhfScan: function uhfScan() {
  15469. console.log('开始rfid扫描');
  15470. return new Promise(function (resolve, reject) {
  15471. uhf.start({}, function (res) {
  15472. console.log(res);
  15473. if (res.code === 0) {
  15474. resolve(res.data);
  15475. } else {
  15476. reject();
  15477. }
  15478. });
  15479. });
  15480. },
  15481. /* rfid连续扫描 */
  15482. uhfScans: function uhfScans() {
  15483. console.log('开始rfid连续扫描');
  15484. return new Promise(function (resolve, reject) {
  15485. uhf.starts({}, function (res) {
  15486. console.log(res);
  15487. if (res.code === 0) {
  15488. resolve(res.data);
  15489. } else {
  15490. reject();
  15491. }
  15492. });
  15493. });
  15494. },
  15495. /* rfid停止扫描 */
  15496. uhfStop: function uhfStop() {
  15497. console.log('停止rfid扫描');
  15498. uhf.stop({}, function (res) {});
  15499. },
  15500. /* rfid停止扫描 */
  15501. uhfStops: function uhfStops() {
  15502. console.log('停止rfid连续扫描');
  15503. uhf.stops({}, function (res) {});
  15504. },
  15505. /* rfid扫描关闭 */
  15506. uhfDestroy: function uhfDestroy() {
  15507. uhf.onDestroy({}, function (res) {});
  15508. } };exports.default = _default;
  15509. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  15510. /***/ }),
  15511. /***/ 640:
  15512. /*!*******************************************************************************************************************************************!*\
  15513. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/components/xiaolu-tree/code.js?vue&type=script&lang=js& ***!
  15514. \*******************************************************************************************************************************************/
  15515. /*! no static exports found */
  15516. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  15517. "use strict";
  15518. __webpack_require__.r(__webpack_exports__);
  15519. /* harmony import */ var _C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./code.js?vue&type=script&lang=js& */ 641);
  15520. /* harmony import */ var _C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  15521. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  15522. /* harmony default export */ __webpack_exports__["default"] = (_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_C_Users_hf_Desktop_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_code_js_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  15523. /***/ }),
  15524. /***/ 641:
  15525. /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  15526. !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/components/xiaolu-tree/code.js?vue&type=script&lang=js& ***!
  15527. \**********************************************************************************************************************************************************************************************************************************************************************************************************************************/
  15528. /*! no static exports found */
  15529. /***/ (function(module, exports, __webpack_require__) {
  15530. "use strict";
  15531. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 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 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);});};}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;}var search = function search() {__webpack_require__.e(/*! require.ensure | components/xiaolu-tree/components/search/index */ "components/xiaolu-tree/components/search/index").then((function () {return resolve(__webpack_require__(/*! ./components/search/index.vue */ 717));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default2 =
  15532. {
  15533. name: "tree",
  15534. props: {
  15535. trees: {
  15536. type: Array,
  15537. default: function _default() {
  15538. return [];
  15539. } },
  15540. //是否开启选中
  15541. isCheck: {
  15542. type: Boolean,
  15543. default: function _default() {
  15544. return false;
  15545. } },
  15546. parent: {
  15547. type: Boolean,
  15548. default: function _default() {
  15549. return false;
  15550. } },
  15551. max: {
  15552. type: Number,
  15553. default: function _default() {
  15554. return '-1';
  15555. } },
  15556. checkList: {
  15557. type: Array,
  15558. default: function _default() {return [];} },
  15559. parentList: {
  15560. type: Array,
  15561. default: function _default() {return [];} },
  15562. searchIf: {
  15563. type: Boolean,
  15564. default: function _default() {return true;} },
  15565. props: {
  15566. type: Object,
  15567. default: function _default() {
  15568. return {
  15569. label: 'name',
  15570. children: 'children',
  15571. multiple: false,
  15572. checkStrictly: false //不关联
  15573. };
  15574. } } },
  15575. data: function data() {
  15576. return {
  15577. isEnd: false,
  15578. categoryCode: '',
  15579. pageIndex: 1,
  15580. isre: false,
  15581. tree: this.trees,
  15582. newNum: 0,
  15583. oldNum: 0,
  15584. allData: this.trees,
  15585. tree_stack: [1],
  15586. parent_data: this.parentList || [], //选择父辈
  15587. searchResult: [],
  15588. tochild: false,
  15589. newCheckList: this.checkList,
  15590. scrollLeft: 999,
  15591. nodePathArray: [] };
  15592. },
  15593. /*
  15594. * 已兼容h5和小程序端,其它端没测试过,估计问题不大,只需要改一下传值的方式
  15595. *
  15596. * 如有问题可以加qq:122720267
  15597. *
  15598. * 使用该插件的朋友请给个好评,或者到git start一下
  15599. * git地址:https://github.com/LSZ579/xiaolu-tree-plugin.git
  15600. * 插件市场地址: https://ext.dcloud.net.cn/plugin?id=2423
  15601. *
  15602. */
  15603. components: {
  15604. search: search },
  15605. mounted: function mounted() {
  15606. if (this.props.multiple && this.props.checkStrictly) {
  15607. if (this.newCheckList.length != 0) {
  15608. this.checkAllChoose();
  15609. return;
  15610. }
  15611. for (var i = 0; i < this.tree.length; i++) {
  15612. this.$set(this.tree[i], 'bx', 0);
  15613. this.$set(this.tree[i], 'qx', 0);
  15614. }
  15615. }
  15616. if (!this.props.multiple && this.newCheckList.length > 0) {
  15617. this.getNodeRoute(this.allData, this.newCheckList[0].id);
  15618. var arr = this.nodePathArray.reverse();
  15619. if (arr.length == 0) return;
  15620. this.tree_stack = this.tree_stack.concat(arr);
  15621. this.tree = this.tree_stack[this.tree_stack.length - 1].children;
  15622. }
  15623. },
  15624. methods: {
  15625. getList: function getList() {var _this = this;
  15626. this.pageIndex += 1;
  15627. this.$http.Material({
  15628. categoryCode: this.categoryCode,
  15629. pageIndex: this.pageIndex,
  15630. pageSize: 20 }).
  15631. then(function (res) {
  15632. console.log(res);
  15633. if (res.code === 0) {var _this$tree;
  15634. if (res.result.isLastPage) {
  15635. _this.loadStatus = "nomore";
  15636. } else {
  15637. _this.loadStatus = "loadmore";
  15638. }
  15639. var array = res.result.list;
  15640. array.forEach(function (item) {
  15641. item.children = [];
  15642. item.user = true;
  15643. });
  15644. (_this$tree = _this.tree).push.apply(_this$tree, _toConsumableArray(array));
  15645. }
  15646. });
  15647. },
  15648. //多选
  15649. checkboxChange: function checkboxChange(item, index, bx, qx) {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var that, findIdex;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  15650. that = _this2;if (
  15651. _this2.props.multiple) {_context.next = 3;break;}return _context.abrupt("return");case 3:
  15652. findIdex = that.newCheckList.findIndex(function (e) {return item.id == e.id;});if (!(
  15653. findIdex > -1)) {_context.next = 8;break;} //反选
  15654. if (that.props.checkStrictly) {//关联子级
  15655. if (item.user) {//用户
  15656. that.newCheckList.splice(findIdex, 1);
  15657. } else {//非用户,取消所有下一级
  15658. that.getIdBydelete(item.children);
  15659. }
  15660. } else {
  15661. that.newCheckList.splice(findIdex, 1);
  15662. }_context.next = 24;break;case 8:if (!(
  15663. !item.user && that.props.checkStrictly)) {_context.next = 23;break;}if (!(
  15664. qx || bx)) {_context.next = 16;break;}_context.next = 12;return (
  15665. that.getIdBydelete(item.children));case 12:
  15666. item.qx = 0;item.bx = 0;_context.next = 20;break;case 16:
  15667. item.qx = 1;item.bx = 0;_context.next = 20;return (
  15668. that.chooseChild(item.children, item.id));case 20:
  15669. that.$emit('sendValue', that.newCheckList);
  15670. that.$forceUpdate();return _context.abrupt("return");case 23:
  15671. // if(item.user&&this.props.checkStrictly) this.getNodeRoute(this.allData,item.id);
  15672. that.newCheckList.push(_objectSpread({}, item));case 24:
  15673. that.$emit('sendValue', that.newCheckList);case 25:case "end":return _context.stop();}}}, _callee);}))();
  15674. },
  15675. // 取消下一级的选中
  15676. getIdBydelete: function getIdBydelete(arr) {var _this3 = this;
  15677. arr.forEach(function (e) {
  15678. if (e.user) {
  15679. for (var i = 0; i < _this3.newCheckList.length; i++) {
  15680. if (e.id == _this3.newCheckList[i].id) {
  15681. _this3.newCheckList.splice(i, 1);
  15682. break;
  15683. }
  15684. }
  15685. }
  15686. if (!e.user) {
  15687. _this3.getIdBydelete(e.children);
  15688. }
  15689. });
  15690. },
  15691. //取消父级
  15692. // deleteParent(id){
  15693. // for(var i = 0; i<this.parent_data.length;i++){
  15694. // if(id == this.parent_data[i].id) {
  15695. // this.parent_data.splice(i,1)
  15696. // break;
  15697. // }
  15698. // }
  15699. // },
  15700. // 关联下一级,选中
  15701. chooseChild: function chooseChild(arr, pid) {
  15702. var that = this;
  15703. for (var i = 0, len = arr.length; i < len; i++) {
  15704. var item = arr[i];
  15705. if (item.user) {
  15706. that.newCheckList.push(_objectSpread(_objectSpread({}, item), {}, { tree_stackId: pid }));
  15707. }
  15708. if (!item.user) {
  15709. this.chooseChild(item.children, item.id);
  15710. }
  15711. }
  15712. },
  15713. // (tree为目标树,targetId为目标节点id)
  15714. getNodeRoute: function getNodeRoute(tree, targetId) {
  15715. for (var index = 0; index < tree.length; index++) {
  15716. if (tree[index].children) {
  15717. var endRecursiveLoop = this.getNodeRoute(tree[index].children, targetId);
  15718. if (endRecursiveLoop) {
  15719. this.nodePathArray.push(tree[index]);
  15720. return true;
  15721. }
  15722. }
  15723. if (tree[index].id === targetId) {
  15724. return true;
  15725. }
  15726. }
  15727. },
  15728. //单选
  15729. checkbox: function checkbox(item, index) {
  15730. var that = this;
  15731. that.newCheckList = [];
  15732. that.newCheckList.push(that.tree[index]);
  15733. that.$emit('sendValue', that.newCheckList);
  15734. },
  15735. //到下一级
  15736. toChildren: function toChildren(item) {var _this4 = this;
  15737. if (item.isEnd) {
  15738. this.isEnd = true;
  15739. this.categoryCode = item.value;
  15740. this.$http.Material({
  15741. categoryCode: item.value,
  15742. pageIndex: this.pageIndex || 1,
  15743. pageSize: 20 }).
  15744. then(function (res) {
  15745. if (res.code === 0) {
  15746. if (res.result.isLastPage) {
  15747. _this4.loadStatus = "nomore";
  15748. } else {
  15749. _this4.loadStatus = "loadmore";
  15750. }
  15751. _this4.tree = res.result.list;
  15752. _this4.tree.forEach(function (item) {
  15753. item.children = [];
  15754. item.user = true;
  15755. });
  15756. }
  15757. });
  15758. } else {
  15759. if (item.user) return;
  15760. var that = this;
  15761. this.tochild = true;
  15762. var children = that.props.children;
  15763. if (!item.user && item[children].length > 0) {
  15764. that.tree = item[children];
  15765. if (that.tree_stack[0].id == item.id) {
  15766. that.tree_stack.push(item);
  15767. } else {
  15768. console.log('??????');
  15769. that.tree_stack.push(item);
  15770. console.log(that.tree_stack);
  15771. }
  15772. }
  15773. this.$nextTick(function () {
  15774. _this4.scrollLeft += 200;
  15775. });
  15776. if (this.props.checkStrictly) this.checkAllChoose();
  15777. this.$forceUpdate();
  15778. }
  15779. },
  15780. //搜索
  15781. confirmSearch: function confirmSearch(val) {var _this5 = this;
  15782. // this.searchResult = []
  15783. // this.search(this.allData, val)
  15784. this.isre = true;
  15785. this.tree_stack.splice(1, 6666);
  15786. // uni.showLoading({
  15787. // title: '正在查找'
  15788. // })
  15789. // setTimeout(() => {
  15790. // this.tree = this.searchResult
  15791. // uni.hideLoading()
  15792. // }, 300)
  15793. this.pageIndex = 1;
  15794. this.$http.Material({
  15795. key: val,
  15796. pageIndex: this.pageIndex,
  15797. pageSize: 20 }).
  15798. then(function (res) {
  15799. if (res.code === 0) {
  15800. _this5.tree = res.result.list;
  15801. _this5.tree.forEach(function (item) {
  15802. item.children = [];
  15803. item.user = true;
  15804. });
  15805. }
  15806. });
  15807. },
  15808. search: function search(data, keyword) {
  15809. var that = this;
  15810. var children = that.props.children;
  15811. for (var i = 0, len = data.length; i < len; i++) {
  15812. if (data[i].name.indexOf(keyword) >= 0) {
  15813. that.searchResult.push(data[i]);
  15814. }
  15815. if (!data[i].user && data[i][children].length > 0) {
  15816. that.search(data[i][children], keyword);
  15817. }
  15818. }
  15819. },
  15820. checkAllChoose: function checkAllChoose() {var _this6 = this;
  15821. var o = false,t = true;
  15822. this.tree.forEach(function (e, i) {
  15823. if (!e.user) {
  15824. e.qx = o;
  15825. e.bx = o;
  15826. var num2 = _this6.computAllNumber(e.children);
  15827. // console.log(this.newNum,this.oldNum)
  15828. if (_this6.newNum != 0 && _this6.oldNum != 0) {
  15829. if (_this6.newNum == _this6.oldNum) {
  15830. e.qx = t;e.bx = o;
  15831. } else {
  15832. e.qx = o;e.bx = t;
  15833. }
  15834. }
  15835. if (_this6.newNum != 0 && _this6.oldNum == 0) {
  15836. _this6.$set(_this6.tree[i], 'bx', o);_this6.$set(_this6.tree[i], 'qx', o);
  15837. }
  15838. _this6.$forceUpdate();
  15839. _this6.newNum = 0;
  15840. _this6.oldNum = 0;
  15841. }
  15842. });
  15843. },
  15844. computAllNumber: function computAllNumber(arr) {
  15845. for (var j = 0; j < arr.length; j++) {
  15846. var e = arr[j];
  15847. if (arr[j].user) {this.newNum++;}
  15848. this.checkSum(e.id);
  15849. if (!e.user) {
  15850. this.computAllNumber(e.children);
  15851. }
  15852. }
  15853. },
  15854. checkSum: function checkSum(id) {
  15855. for (var i = 0; i < this.newCheckList.length; i++) {
  15856. if (id == this.newCheckList[i].id) {
  15857. this.oldNum++;
  15858. break;
  15859. }
  15860. }
  15861. },
  15862. //返回其它层
  15863. backTree: function backTree(item, index) {
  15864. this.newCheckList = []; // 清除选中的数据
  15865. this.pageIndex = 1;
  15866. // isEnd 用于判断是否最后一级 如果为最后一级则列表标为可选
  15867. this.isEnd = false;
  15868. var that = this,max = 66666;
  15869. if (index == -1) {
  15870. that.tree = that.allData;
  15871. that.tree_stack.splice(1, max);
  15872. that.isre = false;
  15873. that.$refs.sea.clears();
  15874. } else if (index == -2) {
  15875. that.tree = that.searchResult;
  15876. that.tree_stack.splice(1, max);
  15877. } else {
  15878. if (that.tree_stack.length - index > 2) {
  15879. that.tree_stack.forEach(function (item, i) {
  15880. if (i > index) {
  15881. that.tree_stack.splice(i, max);
  15882. }
  15883. });
  15884. } else if (index == that.tree_stack.length - 1) {
  15885. } else {
  15886. that.tree_stack.splice(that.tree_stack.length - 1, 1);
  15887. }
  15888. that.tree = item[that.props.children];
  15889. }
  15890. if (this.props.checkStrictly) this.checkAllChoose();
  15891. this.$forceUpdate();
  15892. },
  15893. backConfirm: function backConfirm() {
  15894. // console.log(this.newCheckList)
  15895. if (this.newCheckList[0]) {
  15896. this.$emit('sendValue', this.newCheckList, 'back');
  15897. }
  15898. } } };exports.default = _default2;
  15899. /***/ }),
  15900. /***/ 66:
  15901. /*!**************************************************************************************************************!*\
  15902. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/static/images/login-bg.png ***!
  15903. \**************************************************************************************************************/
  15904. /*! no static exports found */
  15905. /***/ (function(module, exports) {
  15906. module.exports = "/static/images/login-bg.png";
  15907. /***/ }),
  15908. /***/ 691:
  15909. /*!*****************************************************************************************************************!*\
  15910. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/components/uni-popup/popup.js ***!
  15911. \*****************************************************************************************************************/
  15912. /*! no static exports found */
  15913. /***/ (function(module, exports, __webpack_require__) {
  15914. "use strict";
  15915. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 692));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  15916. // 定义 type 类型:弹出类型:top/bottom/center
  15917. var config = {
  15918. // 顶部弹出
  15919. top: 'top',
  15920. // 底部弹出
  15921. bottom: 'bottom',
  15922. // 居中弹出
  15923. center: 'center',
  15924. // 消息提示
  15925. message: 'top',
  15926. // 对话框
  15927. dialog: 'center',
  15928. // 分享
  15929. share: 'bottom' };var _default =
  15930. {
  15931. data: function data() {
  15932. return {
  15933. config: config };
  15934. },
  15935. mixins: [_message.default] };exports.default = _default;
  15936. /***/ }),
  15937. /***/ 692:
  15938. /*!*******************************************************************************************************************!*\
  15939. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/components/uni-popup/message.js ***!
  15940. \*******************************************************************************************************************/
  15941. /*! no static exports found */
  15942. /***/ (function(module, exports, __webpack_require__) {
  15943. "use strict";
  15944. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  15945. created: function created() {
  15946. if (this.type === 'message') {
  15947. // 不显示遮罩
  15948. this.maskShow = false;
  15949. // 获取子组件对象
  15950. this.childrenMsg = null;
  15951. }
  15952. },
  15953. methods: {
  15954. customOpen: function customOpen() {
  15955. if (this.childrenMsg) {
  15956. this.childrenMsg.open();
  15957. }
  15958. },
  15959. customClose: function customClose() {
  15960. if (this.childrenMsg) {
  15961. this.childrenMsg.close();
  15962. }
  15963. } } };exports.default = _default;
  15964. /***/ }),
  15965. /***/ 700:
  15966. /*!*****************************************************************************************************************!*\
  15967. !*** D:/hongxing/Storage.Android-master-b69d8bf046240e9cacf4cb7a1dacec1ffba4622e/components/uni-icons/icons.js ***!
  15968. \*****************************************************************************************************************/
  15969. /*! no static exports found */
  15970. /***/ (function(module, exports, __webpack_require__) {
  15971. "use strict";
  15972. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  15973. "pulldown": "\uE588",
  15974. "refreshempty": "\uE461",
  15975. "back": "\uE471",
  15976. "forward": "\uE470",
  15977. "more": "\uE507",
  15978. "more-filled": "\uE537",
  15979. "scan": "\uE612",
  15980. "qq": "\uE264",
  15981. "weibo": "\uE260",
  15982. "weixin": "\uE261",
  15983. "pengyouquan": "\uE262",
  15984. "loop": "\uE565",
  15985. "refresh": "\uE407",
  15986. "refresh-filled": "\uE437",
  15987. "arrowthindown": "\uE585",
  15988. "arrowthinleft": "\uE586",
  15989. "arrowthinright": "\uE587",
  15990. "arrowthinup": "\uE584",
  15991. "undo-filled": "\uE7D6",
  15992. "undo": "\uE406",
  15993. "redo": "\uE405",
  15994. "redo-filled": "\uE7D9",
  15995. "bars": "\uE563",
  15996. "chatboxes": "\uE203",
  15997. "camera": "\uE301",
  15998. "chatboxes-filled": "\uE233",
  15999. "camera-filled": "\uE7EF",
  16000. "cart-filled": "\uE7F4",
  16001. "cart": "\uE7F5",
  16002. "checkbox-filled": "\uE442",
  16003. "checkbox": "\uE7FA",
  16004. "arrowleft": "\uE582",
  16005. "arrowdown": "\uE581",
  16006. "arrowright": "\uE583",
  16007. "smallcircle-filled": "\uE801",
  16008. "arrowup": "\uE580",
  16009. "circle": "\uE411",
  16010. "eye-filled": "\uE568",
  16011. "eye-slash-filled": "\uE822",
  16012. "eye-slash": "\uE823",
  16013. "eye": "\uE824",
  16014. "flag-filled": "\uE825",
  16015. "flag": "\uE508",
  16016. "gear-filled": "\uE532",
  16017. "reload": "\uE462",
  16018. "gear": "\uE502",
  16019. "hand-thumbsdown-filled": "\uE83B",
  16020. "hand-thumbsdown": "\uE83C",
  16021. "hand-thumbsup-filled": "\uE83D",
  16022. "heart-filled": "\uE83E",
  16023. "hand-thumbsup": "\uE83F",
  16024. "heart": "\uE840",
  16025. "home": "\uE500",
  16026. "info": "\uE504",
  16027. "home-filled": "\uE530",
  16028. "info-filled": "\uE534",
  16029. "circle-filled": "\uE441",
  16030. "chat-filled": "\uE847",
  16031. "chat": "\uE263",
  16032. "mail-open-filled": "\uE84D",
  16033. "email-filled": "\uE231",
  16034. "mail-open": "\uE84E",
  16035. "email": "\uE201",
  16036. "checkmarkempty": "\uE472",
  16037. "list": "\uE562",
  16038. "locked-filled": "\uE856",
  16039. "locked": "\uE506",
  16040. "map-filled": "\uE85C",
  16041. "map-pin": "\uE85E",
  16042. "map-pin-ellipse": "\uE864",
  16043. "map": "\uE364",
  16044. "minus-filled": "\uE440",
  16045. "mic-filled": "\uE332",
  16046. "minus": "\uE410",
  16047. "micoff": "\uE360",
  16048. "mic": "\uE302",
  16049. "clear": "\uE434",
  16050. "smallcircle": "\uE868",
  16051. "close": "\uE404",
  16052. "closeempty": "\uE460",
  16053. "paperclip": "\uE567",
  16054. "paperplane": "\uE503",
  16055. "paperplane-filled": "\uE86E",
  16056. "person-filled": "\uE131",
  16057. "contact-filled": "\uE130",
  16058. "person": "\uE101",
  16059. "contact": "\uE100",
  16060. "images-filled": "\uE87A",
  16061. "phone": "\uE200",
  16062. "images": "\uE87B",
  16063. "image": "\uE363",
  16064. "image-filled": "\uE877",
  16065. "location-filled": "\uE333",
  16066. "location": "\uE303",
  16067. "plus-filled": "\uE439",
  16068. "plus": "\uE409",
  16069. "plusempty": "\uE468",
  16070. "help-filled": "\uE535",
  16071. "help": "\uE505",
  16072. "navigate-filled": "\uE884",
  16073. "navigate": "\uE501",
  16074. "mic-slash-filled": "\uE892",
  16075. "search": "\uE466",
  16076. "settings": "\uE560",
  16077. "sound": "\uE590",
  16078. "sound-filled": "\uE8A1",
  16079. "spinner-cycle": "\uE465",
  16080. "download-filled": "\uE8A4",
  16081. "personadd-filled": "\uE132",
  16082. "videocam-filled": "\uE8AF",
  16083. "personadd": "\uE102",
  16084. "upload": "\uE402",
  16085. "upload-filled": "\uE8B1",
  16086. "starhalf": "\uE463",
  16087. "star-filled": "\uE438",
  16088. "star": "\uE408",
  16089. "trash": "\uE401",
  16090. "phone-filled": "\uE230",
  16091. "compose": "\uE400",
  16092. "videocam": "\uE300",
  16093. "trash-filled": "\uE8DC",
  16094. "download": "\uE403",
  16095. "chatbubble-filled": "\uE232",
  16096. "chatbubble": "\uE202",
  16097. "cloud-download": "\uE8E4",
  16098. "cloud-upload-filled": "\uE8E5",
  16099. "cloud-upload": "\uE8E6",
  16100. "cloud-download-filled": "\uE8E9",
  16101. "headphones": "\uE8BF",
  16102. "shop": "\uE609" };exports.default = _default;
  16103. /***/ })
  16104. }]);
  16105. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map