vendor.js 681 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. var _default = target[key];
  40. exports.default = _default;
  41. /***/ }),
  42. /* 2 */
  43. /*!************************************************************!*\
  44. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  45. \************************************************************/
  46. /*! no static exports found */
  47. /***/ (function(module, exports, __webpack_require__) {
  48. "use strict";
  49. /* WEBPACK VAR INJECTION */(function(wx, global) {
  50. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  51. Object.defineProperty(exports, "__esModule", {
  52. value: true
  53. });
  54. exports.createApp = createApp;
  55. exports.createComponent = createComponent;
  56. exports.createPage = createPage;
  57. exports.createPlugin = createPlugin;
  58. exports.createSubpackageApp = createSubpackageApp;
  59. exports.default = void 0;
  60. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  61. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  62. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  63. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  64. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  65. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  66. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  67. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  68. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  69. var realAtob;
  70. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  71. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  72. if (typeof atob !== 'function') {
  73. realAtob = function realAtob(str) {
  74. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  75. if (!b64re.test(str)) {
  76. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  77. }
  78. // Adding the padding if missing, for semplicity
  79. str += '=='.slice(2 - (str.length & 3));
  80. var bitmap;
  81. var result = '';
  82. var r1;
  83. var r2;
  84. var i = 0;
  85. for (; i < str.length;) {
  86. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  87. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  88. }
  89. return result;
  90. };
  91. } else {
  92. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  93. realAtob = atob;
  94. }
  95. function b64DecodeUnicode(str) {
  96. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  97. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  98. }).join(''));
  99. }
  100. function getCurrentUserInfo() {
  101. var token = wx.getStorageSync('uni_id_token') || '';
  102. var tokenArr = token.split('.');
  103. if (!token || tokenArr.length !== 3) {
  104. return {
  105. uid: null,
  106. role: [],
  107. permission: [],
  108. tokenExpired: 0
  109. };
  110. }
  111. var userInfo;
  112. try {
  113. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  114. } catch (error) {
  115. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  116. }
  117. userInfo.tokenExpired = userInfo.exp * 1000;
  118. delete userInfo.exp;
  119. delete userInfo.iat;
  120. return userInfo;
  121. }
  122. function uniIdMixin(Vue) {
  123. Vue.prototype.uniIDHasRole = function (roleId) {
  124. var _getCurrentUserInfo = getCurrentUserInfo(),
  125. role = _getCurrentUserInfo.role;
  126. return role.indexOf(roleId) > -1;
  127. };
  128. Vue.prototype.uniIDHasPermission = function (permissionId) {
  129. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  130. permission = _getCurrentUserInfo2.permission;
  131. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  132. };
  133. Vue.prototype.uniIDTokenValid = function () {
  134. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  135. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  136. return tokenExpired > Date.now();
  137. };
  138. }
  139. var _toString = Object.prototype.toString;
  140. var hasOwnProperty = Object.prototype.hasOwnProperty;
  141. function isFn(fn) {
  142. return typeof fn === 'function';
  143. }
  144. function isStr(str) {
  145. return typeof str === 'string';
  146. }
  147. function isObject(obj) {
  148. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  149. }
  150. function isPlainObject(obj) {
  151. return _toString.call(obj) === '[object Object]';
  152. }
  153. function hasOwn(obj, key) {
  154. return hasOwnProperty.call(obj, key);
  155. }
  156. function noop() {}
  157. /**
  158. * Create a cached version of a pure function.
  159. */
  160. function cached(fn) {
  161. var cache = Object.create(null);
  162. return function cachedFn(str) {
  163. var hit = cache[str];
  164. return hit || (cache[str] = fn(str));
  165. };
  166. }
  167. /**
  168. * Camelize a hyphen-delimited string.
  169. */
  170. var camelizeRE = /-(\w)/g;
  171. var camelize = cached(function (str) {
  172. return str.replace(camelizeRE, function (_, c) {
  173. return c ? c.toUpperCase() : '';
  174. });
  175. });
  176. function sortObject(obj) {
  177. var sortObj = {};
  178. if (isPlainObject(obj)) {
  179. Object.keys(obj).sort().forEach(function (key) {
  180. sortObj[key] = obj[key];
  181. });
  182. }
  183. return !Object.keys(sortObj) ? obj : sortObj;
  184. }
  185. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  186. var globalInterceptors = {};
  187. var scopedInterceptors = {};
  188. function mergeHook(parentVal, childVal) {
  189. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  190. return res ? dedupeHooks(res) : res;
  191. }
  192. function dedupeHooks(hooks) {
  193. var res = [];
  194. for (var i = 0; i < hooks.length; i++) {
  195. if (res.indexOf(hooks[i]) === -1) {
  196. res.push(hooks[i]);
  197. }
  198. }
  199. return res;
  200. }
  201. function removeHook(hooks, hook) {
  202. var index = hooks.indexOf(hook);
  203. if (index !== -1) {
  204. hooks.splice(index, 1);
  205. }
  206. }
  207. function mergeInterceptorHook(interceptor, option) {
  208. Object.keys(option).forEach(function (hook) {
  209. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  210. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  211. }
  212. });
  213. }
  214. function removeInterceptorHook(interceptor, option) {
  215. if (!interceptor || !option) {
  216. return;
  217. }
  218. Object.keys(option).forEach(function (hook) {
  219. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  220. removeHook(interceptor[hook], option[hook]);
  221. }
  222. });
  223. }
  224. function addInterceptor(method, option) {
  225. if (typeof method === 'string' && isPlainObject(option)) {
  226. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  227. } else if (isPlainObject(method)) {
  228. mergeInterceptorHook(globalInterceptors, method);
  229. }
  230. }
  231. function removeInterceptor(method, option) {
  232. if (typeof method === 'string') {
  233. if (isPlainObject(option)) {
  234. removeInterceptorHook(scopedInterceptors[method], option);
  235. } else {
  236. delete scopedInterceptors[method];
  237. }
  238. } else if (isPlainObject(method)) {
  239. removeInterceptorHook(globalInterceptors, method);
  240. }
  241. }
  242. function wrapperHook(hook, params) {
  243. return function (data) {
  244. return hook(data, params) || data;
  245. };
  246. }
  247. function isPromise(obj) {
  248. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  249. }
  250. function queue(hooks, data, params) {
  251. var promise = false;
  252. for (var i = 0; i < hooks.length; i++) {
  253. var hook = hooks[i];
  254. if (promise) {
  255. promise = Promise.resolve(wrapperHook(hook, params));
  256. } else {
  257. var res = hook(data, params);
  258. if (isPromise(res)) {
  259. promise = Promise.resolve(res);
  260. }
  261. if (res === false) {
  262. return {
  263. then: function then() {}
  264. };
  265. }
  266. }
  267. }
  268. return promise || {
  269. then: function then(callback) {
  270. return callback(data);
  271. }
  272. };
  273. }
  274. function wrapperOptions(interceptor) {
  275. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  276. ['success', 'fail', 'complete'].forEach(function (name) {
  277. if (Array.isArray(interceptor[name])) {
  278. var oldCallback = options[name];
  279. options[name] = function callbackInterceptor(res) {
  280. queue(interceptor[name], res, options).then(function (res) {
  281. /* eslint-disable no-mixed-operators */
  282. return isFn(oldCallback) && oldCallback(res) || res;
  283. });
  284. };
  285. }
  286. });
  287. return options;
  288. }
  289. function wrapperReturnValue(method, returnValue) {
  290. var returnValueHooks = [];
  291. if (Array.isArray(globalInterceptors.returnValue)) {
  292. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  293. }
  294. var interceptor = scopedInterceptors[method];
  295. if (interceptor && Array.isArray(interceptor.returnValue)) {
  296. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  297. }
  298. returnValueHooks.forEach(function (hook) {
  299. returnValue = hook(returnValue) || returnValue;
  300. });
  301. return returnValue;
  302. }
  303. function getApiInterceptorHooks(method) {
  304. var interceptor = Object.create(null);
  305. Object.keys(globalInterceptors).forEach(function (hook) {
  306. if (hook !== 'returnValue') {
  307. interceptor[hook] = globalInterceptors[hook].slice();
  308. }
  309. });
  310. var scopedInterceptor = scopedInterceptors[method];
  311. if (scopedInterceptor) {
  312. Object.keys(scopedInterceptor).forEach(function (hook) {
  313. if (hook !== 'returnValue') {
  314. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  315. }
  316. });
  317. }
  318. return interceptor;
  319. }
  320. function invokeApi(method, api, options) {
  321. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  322. params[_key - 3] = arguments[_key];
  323. }
  324. var interceptor = getApiInterceptorHooks(method);
  325. if (interceptor && Object.keys(interceptor).length) {
  326. if (Array.isArray(interceptor.invoke)) {
  327. var res = queue(interceptor.invoke, options);
  328. return res.then(function (options) {
  329. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  330. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  331. });
  332. } else {
  333. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  334. }
  335. }
  336. return api.apply(void 0, [options].concat(params));
  337. }
  338. var promiseInterceptor = {
  339. returnValue: function returnValue(res) {
  340. if (!isPromise(res)) {
  341. return res;
  342. }
  343. return new Promise(function (resolve, reject) {
  344. res.then(function (res) {
  345. if (res[0]) {
  346. reject(res[0]);
  347. } else {
  348. resolve(res[1]);
  349. }
  350. });
  351. });
  352. }
  353. };
  354. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  355. var CONTEXT_API_RE = /^create|Manager$/;
  356. // Context例外情况
  357. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  358. // 同步例外情况
  359. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  360. var CALLBACK_API_RE = /^on|^off/;
  361. function isContextApi(name) {
  362. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  363. }
  364. function isSyncApi(name) {
  365. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  366. }
  367. function isCallbackApi(name) {
  368. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  369. }
  370. function handlePromise(promise) {
  371. return promise.then(function (data) {
  372. return [null, data];
  373. }).catch(function (err) {
  374. return [err];
  375. });
  376. }
  377. function shouldPromise(name) {
  378. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  379. return false;
  380. }
  381. return true;
  382. }
  383. /* eslint-disable no-extend-native */
  384. if (!Promise.prototype.finally) {
  385. Promise.prototype.finally = function (callback) {
  386. var promise = this.constructor;
  387. return this.then(function (value) {
  388. return promise.resolve(callback()).then(function () {
  389. return value;
  390. });
  391. }, function (reason) {
  392. return promise.resolve(callback()).then(function () {
  393. throw reason;
  394. });
  395. });
  396. };
  397. }
  398. function promisify(name, api) {
  399. if (!shouldPromise(name) || !isFn(api)) {
  400. return api;
  401. }
  402. return function promiseApi() {
  403. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  404. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  405. params[_key2 - 1] = arguments[_key2];
  406. }
  407. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  408. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  409. }
  410. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  411. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  412. success: resolve,
  413. fail: reject
  414. })].concat(params));
  415. })));
  416. };
  417. }
  418. var EPS = 1e-4;
  419. var BASE_DEVICE_WIDTH = 750;
  420. var isIOS = false;
  421. var deviceWidth = 0;
  422. var deviceDPR = 0;
  423. function checkDeviceWidth() {
  424. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  425. platform = _wx$getSystemInfoSync.platform,
  426. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  427. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  428. deviceWidth = windowWidth;
  429. deviceDPR = pixelRatio;
  430. isIOS = platform === 'ios';
  431. }
  432. function upx2px(number, newDeviceWidth) {
  433. if (deviceWidth === 0) {
  434. checkDeviceWidth();
  435. }
  436. number = Number(number);
  437. if (number === 0) {
  438. return 0;
  439. }
  440. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  441. if (result < 0) {
  442. result = -result;
  443. }
  444. result = Math.floor(result + EPS);
  445. if (result === 0) {
  446. if (deviceDPR === 1 || !isIOS) {
  447. result = 1;
  448. } else {
  449. result = 0.5;
  450. }
  451. }
  452. return number < 0 ? -result : result;
  453. }
  454. var LOCALE_ZH_HANS = 'zh-Hans';
  455. var LOCALE_ZH_HANT = 'zh-Hant';
  456. var LOCALE_EN = 'en';
  457. var LOCALE_FR = 'fr';
  458. var LOCALE_ES = 'es';
  459. var messages = {};
  460. var locale;
  461. {
  462. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  463. }
  464. function initI18nMessages() {
  465. if (!isEnableLocale()) {
  466. return;
  467. }
  468. var localeKeys = Object.keys(__uniConfig.locales);
  469. if (localeKeys.length) {
  470. localeKeys.forEach(function (locale) {
  471. var curMessages = messages[locale];
  472. var userMessages = __uniConfig.locales[locale];
  473. if (curMessages) {
  474. Object.assign(curMessages, userMessages);
  475. } else {
  476. messages[locale] = userMessages;
  477. }
  478. });
  479. }
  480. }
  481. initI18nMessages();
  482. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  483. var t = i18n.t;
  484. var i18nMixin = i18n.mixin = {
  485. beforeCreate: function beforeCreate() {
  486. var _this = this;
  487. var unwatch = i18n.i18n.watchLocale(function () {
  488. _this.$forceUpdate();
  489. });
  490. this.$once('hook:beforeDestroy', function () {
  491. unwatch();
  492. });
  493. },
  494. methods: {
  495. $$t: function $$t(key, values) {
  496. return t(key, values);
  497. }
  498. }
  499. };
  500. var setLocale = i18n.setLocale;
  501. var getLocale = i18n.getLocale;
  502. function initAppLocale(Vue, appVm, locale) {
  503. var state = Vue.observable({
  504. locale: locale || i18n.getLocale()
  505. });
  506. var localeWatchers = [];
  507. appVm.$watchLocale = function (fn) {
  508. localeWatchers.push(fn);
  509. };
  510. Object.defineProperty(appVm, '$locale', {
  511. get: function get() {
  512. return state.locale;
  513. },
  514. set: function set(v) {
  515. state.locale = v;
  516. localeWatchers.forEach(function (watch) {
  517. return watch(v);
  518. });
  519. }
  520. });
  521. }
  522. function isEnableLocale() {
  523. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  524. }
  525. function include(str, parts) {
  526. return !!parts.find(function (part) {
  527. return str.indexOf(part) !== -1;
  528. });
  529. }
  530. function startsWith(str, parts) {
  531. return parts.find(function (part) {
  532. return str.indexOf(part) === 0;
  533. });
  534. }
  535. function normalizeLocale(locale, messages) {
  536. if (!locale) {
  537. return;
  538. }
  539. locale = locale.trim().replace(/_/g, '-');
  540. if (messages && messages[locale]) {
  541. return locale;
  542. }
  543. locale = locale.toLowerCase();
  544. if (locale === 'chinese') {
  545. // 支付宝
  546. return LOCALE_ZH_HANS;
  547. }
  548. if (locale.indexOf('zh') === 0) {
  549. if (locale.indexOf('-hans') > -1) {
  550. return LOCALE_ZH_HANS;
  551. }
  552. if (locale.indexOf('-hant') > -1) {
  553. return LOCALE_ZH_HANT;
  554. }
  555. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  556. return LOCALE_ZH_HANT;
  557. }
  558. return LOCALE_ZH_HANS;
  559. }
  560. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  561. if (lang) {
  562. return lang;
  563. }
  564. }
  565. // export function initI18n() {
  566. // const localeKeys = Object.keys(__uniConfig.locales || {})
  567. // if (localeKeys.length) {
  568. // localeKeys.forEach((locale) =>
  569. // i18n.add(locale, __uniConfig.locales[locale])
  570. // )
  571. // }
  572. // }
  573. function getLocale$1() {
  574. // 优先使用 $locale
  575. if (isFn(getApp)) {
  576. var app = getApp({
  577. allowDefault: true
  578. });
  579. if (app && app.$vm) {
  580. return app.$vm.$locale;
  581. }
  582. }
  583. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  584. }
  585. function setLocale$1(locale) {
  586. var app = isFn(getApp) ? getApp() : false;
  587. if (!app) {
  588. return false;
  589. }
  590. var oldLocale = app.$vm.$locale;
  591. if (oldLocale !== locale) {
  592. app.$vm.$locale = locale;
  593. onLocaleChangeCallbacks.forEach(function (fn) {
  594. return fn({
  595. locale: locale
  596. });
  597. });
  598. return true;
  599. }
  600. return false;
  601. }
  602. var onLocaleChangeCallbacks = [];
  603. function onLocaleChange(fn) {
  604. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  605. onLocaleChangeCallbacks.push(fn);
  606. }
  607. }
  608. if (typeof global !== 'undefined') {
  609. global.getLocale = getLocale$1;
  610. }
  611. var interceptors = {
  612. promiseInterceptor: promiseInterceptor
  613. };
  614. var baseApi = /*#__PURE__*/Object.freeze({
  615. __proto__: null,
  616. upx2px: upx2px,
  617. getLocale: getLocale$1,
  618. setLocale: setLocale$1,
  619. onLocaleChange: onLocaleChange,
  620. addInterceptor: addInterceptor,
  621. removeInterceptor: removeInterceptor,
  622. interceptors: interceptors
  623. });
  624. function findExistsPageIndex(url) {
  625. var pages = getCurrentPages();
  626. var len = pages.length;
  627. while (len--) {
  628. var page = pages[len];
  629. if (page.$page && page.$page.fullPath === url) {
  630. return len;
  631. }
  632. }
  633. return -1;
  634. }
  635. var redirectTo = {
  636. name: function name(fromArgs) {
  637. if (fromArgs.exists === 'back' && fromArgs.delta) {
  638. return 'navigateBack';
  639. }
  640. return 'redirectTo';
  641. },
  642. args: function args(fromArgs) {
  643. if (fromArgs.exists === 'back' && fromArgs.url) {
  644. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  645. if (existsPageIndex !== -1) {
  646. var delta = getCurrentPages().length - 1 - existsPageIndex;
  647. if (delta > 0) {
  648. fromArgs.delta = delta;
  649. }
  650. }
  651. }
  652. }
  653. };
  654. var previewImage = {
  655. args: function args(fromArgs) {
  656. var currentIndex = parseInt(fromArgs.current);
  657. if (isNaN(currentIndex)) {
  658. return;
  659. }
  660. var urls = fromArgs.urls;
  661. if (!Array.isArray(urls)) {
  662. return;
  663. }
  664. var len = urls.length;
  665. if (!len) {
  666. return;
  667. }
  668. if (currentIndex < 0) {
  669. currentIndex = 0;
  670. } else if (currentIndex >= len) {
  671. currentIndex = len - 1;
  672. }
  673. if (currentIndex > 0) {
  674. fromArgs.current = urls[currentIndex];
  675. fromArgs.urls = urls.filter(function (item, index) {
  676. return index < currentIndex ? item !== urls[currentIndex] : true;
  677. });
  678. } else {
  679. fromArgs.current = urls[0];
  680. }
  681. return {
  682. indicator: false,
  683. loop: false
  684. };
  685. }
  686. };
  687. var UUID_KEY = '__DC_STAT_UUID';
  688. var deviceId;
  689. function useDeviceId(result) {
  690. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  691. if (!deviceId) {
  692. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  693. wx.setStorage({
  694. key: UUID_KEY,
  695. data: deviceId
  696. });
  697. }
  698. result.deviceId = deviceId;
  699. }
  700. function addSafeAreaInsets(result) {
  701. if (result.safeArea) {
  702. var safeArea = result.safeArea;
  703. result.safeAreaInsets = {
  704. top: safeArea.top,
  705. left: safeArea.left,
  706. right: result.windowWidth - safeArea.right,
  707. bottom: result.screenHeight - safeArea.bottom
  708. };
  709. }
  710. }
  711. function populateParameters(result) {
  712. var _result$brand = result.brand,
  713. brand = _result$brand === void 0 ? '' : _result$brand,
  714. _result$model = result.model,
  715. model = _result$model === void 0 ? '' : _result$model,
  716. _result$system = result.system,
  717. system = _result$system === void 0 ? '' : _result$system,
  718. _result$language = result.language,
  719. language = _result$language === void 0 ? '' : _result$language,
  720. theme = result.theme,
  721. version = result.version,
  722. platform = result.platform,
  723. fontSizeSetting = result.fontSizeSetting,
  724. SDKVersion = result.SDKVersion,
  725. pixelRatio = result.pixelRatio,
  726. deviceOrientation = result.deviceOrientation;
  727. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  728. var extraParam = {};
  729. // osName osVersion
  730. var osName = '';
  731. var osVersion = '';
  732. {
  733. osName = system.split(' ')[0] || '';
  734. osVersion = system.split(' ')[1] || '';
  735. }
  736. var hostVersion = version;
  737. // deviceType
  738. var deviceType = getGetDeviceType(result, model);
  739. // deviceModel
  740. var deviceBrand = getDeviceBrand(brand);
  741. // hostName
  742. var _hostName = getHostName(result);
  743. // deviceOrientation
  744. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  745. // devicePixelRatio
  746. var _devicePixelRatio = pixelRatio;
  747. // SDKVersion
  748. var _SDKVersion = SDKVersion;
  749. // hostLanguage
  750. var hostLanguage = language.replace(/_/g, '-');
  751. // wx.getAccountInfoSync
  752. var parameters = {
  753. appId: "__UNI__E00CD61",
  754. appName: "wx",
  755. appVersion: "1.0.0",
  756. appVersionCode: "100",
  757. appLanguage: getAppLanguage(hostLanguage),
  758. uniCompileVersion: "4.15",
  759. uniRuntimeVersion: "4.15",
  760. uniPlatform: undefined || "mp-weixin",
  761. deviceBrand: deviceBrand,
  762. deviceModel: model,
  763. deviceType: deviceType,
  764. devicePixelRatio: _devicePixelRatio,
  765. deviceOrientation: _deviceOrientation,
  766. osName: osName.toLocaleLowerCase(),
  767. osVersion: osVersion,
  768. hostTheme: theme,
  769. hostVersion: hostVersion,
  770. hostLanguage: hostLanguage,
  771. hostName: _hostName,
  772. hostSDKVersion: _SDKVersion,
  773. hostFontSizeSetting: fontSizeSetting,
  774. windowTop: 0,
  775. windowBottom: 0,
  776. // TODO
  777. osLanguage: undefined,
  778. osTheme: undefined,
  779. ua: undefined,
  780. hostPackageName: undefined,
  781. browserName: undefined,
  782. browserVersion: undefined
  783. };
  784. Object.assign(result, parameters, extraParam);
  785. }
  786. function getGetDeviceType(result, model) {
  787. var deviceType = result.deviceType || 'phone';
  788. {
  789. var deviceTypeMaps = {
  790. ipad: 'pad',
  791. windows: 'pc',
  792. mac: 'pc'
  793. };
  794. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  795. var _model = model.toLocaleLowerCase();
  796. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  797. var _m = deviceTypeMapsKeys[index];
  798. if (_model.indexOf(_m) !== -1) {
  799. deviceType = deviceTypeMaps[_m];
  800. break;
  801. }
  802. }
  803. }
  804. return deviceType;
  805. }
  806. function getDeviceBrand(brand) {
  807. var deviceBrand = brand;
  808. if (deviceBrand) {
  809. deviceBrand = brand.toLocaleLowerCase();
  810. }
  811. return deviceBrand;
  812. }
  813. function getAppLanguage(defaultLanguage) {
  814. return getLocale$1 ? getLocale$1() : defaultLanguage;
  815. }
  816. function getHostName(result) {
  817. var _platform = 'WeChat';
  818. var _hostName = result.hostName || _platform; // mp-jd
  819. {
  820. if (result.environment) {
  821. _hostName = result.environment;
  822. } else if (result.host && result.host.env) {
  823. _hostName = result.host.env;
  824. }
  825. }
  826. return _hostName;
  827. }
  828. var getSystemInfo = {
  829. returnValue: function returnValue(result) {
  830. useDeviceId(result);
  831. addSafeAreaInsets(result);
  832. populateParameters(result);
  833. }
  834. };
  835. var showActionSheet = {
  836. args: function args(fromArgs) {
  837. if ((0, _typeof2.default)(fromArgs) === 'object') {
  838. fromArgs.alertText = fromArgs.title;
  839. }
  840. }
  841. };
  842. var getAppBaseInfo = {
  843. returnValue: function returnValue(result) {
  844. var _result = result,
  845. version = _result.version,
  846. language = _result.language,
  847. SDKVersion = _result.SDKVersion,
  848. theme = _result.theme;
  849. var _hostName = getHostName(result);
  850. var hostLanguage = language.replace('_', '-');
  851. result = sortObject(Object.assign(result, {
  852. appId: "__UNI__E00CD61",
  853. appName: "wx",
  854. appVersion: "1.0.0",
  855. appVersionCode: "100",
  856. appLanguage: getAppLanguage(hostLanguage),
  857. hostVersion: version,
  858. hostLanguage: hostLanguage,
  859. hostName: _hostName,
  860. hostSDKVersion: SDKVersion,
  861. hostTheme: theme
  862. }));
  863. }
  864. };
  865. var getDeviceInfo = {
  866. returnValue: function returnValue(result) {
  867. var _result2 = result,
  868. brand = _result2.brand,
  869. model = _result2.model;
  870. var deviceType = getGetDeviceType(result, model);
  871. var deviceBrand = getDeviceBrand(brand);
  872. useDeviceId(result);
  873. result = sortObject(Object.assign(result, {
  874. deviceType: deviceType,
  875. deviceBrand: deviceBrand,
  876. deviceModel: model
  877. }));
  878. }
  879. };
  880. var getWindowInfo = {
  881. returnValue: function returnValue(result) {
  882. addSafeAreaInsets(result);
  883. result = sortObject(Object.assign(result, {
  884. windowTop: 0,
  885. windowBottom: 0
  886. }));
  887. }
  888. };
  889. var getAppAuthorizeSetting = {
  890. returnValue: function returnValue(result) {
  891. var locationReducedAccuracy = result.locationReducedAccuracy;
  892. result.locationAccuracy = 'unsupported';
  893. if (locationReducedAccuracy === true) {
  894. result.locationAccuracy = 'reduced';
  895. } else if (locationReducedAccuracy === false) {
  896. result.locationAccuracy = 'full';
  897. }
  898. }
  899. };
  900. // import navigateTo from 'uni-helpers/navigate-to'
  901. var compressImage = {
  902. args: function args(fromArgs) {
  903. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  904. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  905. fromArgs.compressHeight = fromArgs.compressedHeight;
  906. }
  907. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  908. fromArgs.compressWidth = fromArgs.compressedWidth;
  909. }
  910. }
  911. };
  912. var protocols = {
  913. redirectTo: redirectTo,
  914. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  915. previewImage: previewImage,
  916. getSystemInfo: getSystemInfo,
  917. getSystemInfoSync: getSystemInfo,
  918. showActionSheet: showActionSheet,
  919. getAppBaseInfo: getAppBaseInfo,
  920. getDeviceInfo: getDeviceInfo,
  921. getWindowInfo: getWindowInfo,
  922. getAppAuthorizeSetting: getAppAuthorizeSetting,
  923. compressImage: compressImage
  924. };
  925. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  926. var canIUses = [];
  927. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  928. function processCallback(methodName, method, returnValue) {
  929. return function (res) {
  930. return method(processReturnValue(methodName, res, returnValue));
  931. };
  932. }
  933. function processArgs(methodName, fromArgs) {
  934. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  935. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  936. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  937. if (isPlainObject(fromArgs)) {
  938. // 一般 api 的参数解析
  939. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  940. if (isFn(argsOption)) {
  941. argsOption = argsOption(fromArgs, toArgs) || {};
  942. }
  943. for (var key in fromArgs) {
  944. if (hasOwn(argsOption, key)) {
  945. var keyOption = argsOption[key];
  946. if (isFn(keyOption)) {
  947. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  948. }
  949. if (!keyOption) {
  950. // 不支持的参数
  951. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  952. } else if (isStr(keyOption)) {
  953. // 重写参数 key
  954. toArgs[keyOption] = fromArgs[key];
  955. } else if (isPlainObject(keyOption)) {
  956. // {name:newName,value:value}可重新指定参数 key:value
  957. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  958. }
  959. } else if (CALLBACKS.indexOf(key) !== -1) {
  960. if (isFn(fromArgs[key])) {
  961. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  962. }
  963. } else {
  964. if (!keepFromArgs) {
  965. toArgs[key] = fromArgs[key];
  966. }
  967. }
  968. }
  969. return toArgs;
  970. } else if (isFn(fromArgs)) {
  971. fromArgs = processCallback(methodName, fromArgs, returnValue);
  972. }
  973. return fromArgs;
  974. }
  975. function processReturnValue(methodName, res, returnValue) {
  976. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  977. if (isFn(protocols.returnValue)) {
  978. // 处理通用 returnValue
  979. res = protocols.returnValue(methodName, res);
  980. }
  981. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  982. }
  983. function wrapper(methodName, method) {
  984. if (hasOwn(protocols, methodName)) {
  985. var protocol = protocols[methodName];
  986. if (!protocol) {
  987. // 暂不支持的 api
  988. return function () {
  989. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  990. };
  991. }
  992. return function (arg1, arg2) {
  993. // 目前 api 最多两个参数
  994. var options = protocol;
  995. if (isFn(protocol)) {
  996. options = protocol(arg1);
  997. }
  998. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  999. var args = [arg1];
  1000. if (typeof arg2 !== 'undefined') {
  1001. args.push(arg2);
  1002. }
  1003. if (isFn(options.name)) {
  1004. methodName = options.name(arg1);
  1005. } else if (isStr(options.name)) {
  1006. methodName = options.name;
  1007. }
  1008. var returnValue = wx[methodName].apply(wx, args);
  1009. if (isSyncApi(methodName)) {
  1010. // 同步 api
  1011. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1012. }
  1013. return returnValue;
  1014. };
  1015. }
  1016. return method;
  1017. }
  1018. var todoApis = Object.create(null);
  1019. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1020. function createTodoApi(name) {
  1021. return function todoApi(_ref) {
  1022. var fail = _ref.fail,
  1023. complete = _ref.complete;
  1024. var res = {
  1025. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1026. };
  1027. isFn(fail) && fail(res);
  1028. isFn(complete) && complete(res);
  1029. };
  1030. }
  1031. TODOS.forEach(function (name) {
  1032. todoApis[name] = createTodoApi(name);
  1033. });
  1034. var providers = {
  1035. oauth: ['weixin'],
  1036. share: ['weixin'],
  1037. payment: ['wxpay'],
  1038. push: ['weixin']
  1039. };
  1040. function getProvider(_ref2) {
  1041. var service = _ref2.service,
  1042. success = _ref2.success,
  1043. fail = _ref2.fail,
  1044. complete = _ref2.complete;
  1045. var res = false;
  1046. if (providers[service]) {
  1047. res = {
  1048. errMsg: 'getProvider:ok',
  1049. service: service,
  1050. provider: providers[service]
  1051. };
  1052. isFn(success) && success(res);
  1053. } else {
  1054. res = {
  1055. errMsg: 'getProvider:fail service not found'
  1056. };
  1057. isFn(fail) && fail(res);
  1058. }
  1059. isFn(complete) && complete(res);
  1060. }
  1061. var extraApi = /*#__PURE__*/Object.freeze({
  1062. __proto__: null,
  1063. getProvider: getProvider
  1064. });
  1065. var getEmitter = function () {
  1066. var Emitter;
  1067. return function getUniEmitter() {
  1068. if (!Emitter) {
  1069. Emitter = new _vue.default();
  1070. }
  1071. return Emitter;
  1072. };
  1073. }();
  1074. function apply(ctx, method, args) {
  1075. return ctx[method].apply(ctx, args);
  1076. }
  1077. function $on() {
  1078. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1079. }
  1080. function $off() {
  1081. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1082. }
  1083. function $once() {
  1084. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1085. }
  1086. function $emit() {
  1087. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1088. }
  1089. var eventApi = /*#__PURE__*/Object.freeze({
  1090. __proto__: null,
  1091. $on: $on,
  1092. $off: $off,
  1093. $once: $once,
  1094. $emit: $emit
  1095. });
  1096. /**
  1097. * 框架内 try-catch
  1098. */
  1099. /**
  1100. * 开发者 try-catch
  1101. */
  1102. function tryCatch(fn) {
  1103. return function () {
  1104. try {
  1105. return fn.apply(fn, arguments);
  1106. } catch (e) {
  1107. // TODO
  1108. console.error(e);
  1109. }
  1110. };
  1111. }
  1112. function getApiCallbacks(params) {
  1113. var apiCallbacks = {};
  1114. for (var name in params) {
  1115. var param = params[name];
  1116. if (isFn(param)) {
  1117. apiCallbacks[name] = tryCatch(param);
  1118. delete params[name];
  1119. }
  1120. }
  1121. return apiCallbacks;
  1122. }
  1123. var cid;
  1124. var cidErrMsg;
  1125. var enabled;
  1126. function normalizePushMessage(message) {
  1127. try {
  1128. return JSON.parse(message);
  1129. } catch (e) {}
  1130. return message;
  1131. }
  1132. function invokePushCallback(args) {
  1133. if (args.type === 'enabled') {
  1134. enabled = true;
  1135. } else if (args.type === 'clientId') {
  1136. cid = args.cid;
  1137. cidErrMsg = args.errMsg;
  1138. invokeGetPushCidCallbacks(cid, args.errMsg);
  1139. } else if (args.type === 'pushMsg') {
  1140. var message = {
  1141. type: 'receive',
  1142. data: normalizePushMessage(args.message)
  1143. };
  1144. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1145. var callback = onPushMessageCallbacks[i];
  1146. callback(message);
  1147. // 该消息已被阻止
  1148. if (message.stopped) {
  1149. break;
  1150. }
  1151. }
  1152. } else if (args.type === 'click') {
  1153. onPushMessageCallbacks.forEach(function (callback) {
  1154. callback({
  1155. type: 'click',
  1156. data: normalizePushMessage(args.message)
  1157. });
  1158. });
  1159. }
  1160. }
  1161. var getPushCidCallbacks = [];
  1162. function invokeGetPushCidCallbacks(cid, errMsg) {
  1163. getPushCidCallbacks.forEach(function (callback) {
  1164. callback(cid, errMsg);
  1165. });
  1166. getPushCidCallbacks.length = 0;
  1167. }
  1168. function getPushClientId(args) {
  1169. if (!isPlainObject(args)) {
  1170. args = {};
  1171. }
  1172. var _getApiCallbacks = getApiCallbacks(args),
  1173. success = _getApiCallbacks.success,
  1174. fail = _getApiCallbacks.fail,
  1175. complete = _getApiCallbacks.complete;
  1176. var hasSuccess = isFn(success);
  1177. var hasFail = isFn(fail);
  1178. var hasComplete = isFn(complete);
  1179. Promise.resolve().then(function () {
  1180. if (typeof enabled === 'undefined') {
  1181. enabled = false;
  1182. cid = '';
  1183. cidErrMsg = 'uniPush is not enabled';
  1184. }
  1185. getPushCidCallbacks.push(function (cid, errMsg) {
  1186. var res;
  1187. if (cid) {
  1188. res = {
  1189. errMsg: 'getPushClientId:ok',
  1190. cid: cid
  1191. };
  1192. hasSuccess && success(res);
  1193. } else {
  1194. res = {
  1195. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1196. };
  1197. hasFail && fail(res);
  1198. }
  1199. hasComplete && complete(res);
  1200. });
  1201. if (typeof cid !== 'undefined') {
  1202. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1203. }
  1204. });
  1205. }
  1206. var onPushMessageCallbacks = [];
  1207. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1208. var onPushMessage = function onPushMessage(fn) {
  1209. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1210. onPushMessageCallbacks.push(fn);
  1211. }
  1212. };
  1213. var offPushMessage = function offPushMessage(fn) {
  1214. if (!fn) {
  1215. onPushMessageCallbacks.length = 0;
  1216. } else {
  1217. var index = onPushMessageCallbacks.indexOf(fn);
  1218. if (index > -1) {
  1219. onPushMessageCallbacks.splice(index, 1);
  1220. }
  1221. }
  1222. };
  1223. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1224. if (!baseInfo) {
  1225. baseInfo = wx.getSystemInfoSync();
  1226. }
  1227. var host = baseInfo ? baseInfo.host : null;
  1228. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1229. var api = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. shareVideoMessage: shareVideoMessage,
  1232. getPushClientId: getPushClientId,
  1233. onPushMessage: onPushMessage,
  1234. offPushMessage: offPushMessage,
  1235. invokePushCallback: invokePushCallback
  1236. });
  1237. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1238. function findVmByVueId(vm, vuePid) {
  1239. var $children = vm.$children;
  1240. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1241. for (var i = $children.length - 1; i >= 0; i--) {
  1242. var childVm = $children[i];
  1243. if (childVm.$scope._$vueId === vuePid) {
  1244. return childVm;
  1245. }
  1246. }
  1247. // 反向递归查找
  1248. var parentVm;
  1249. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1250. parentVm = findVmByVueId($children[_i], vuePid);
  1251. if (parentVm) {
  1252. return parentVm;
  1253. }
  1254. }
  1255. }
  1256. function initBehavior(options) {
  1257. return Behavior(options);
  1258. }
  1259. function isPage() {
  1260. return !!this.route;
  1261. }
  1262. function initRelation(detail) {
  1263. this.triggerEvent('__l', detail);
  1264. }
  1265. function selectAllComponents(mpInstance, selector, $refs) {
  1266. var components = mpInstance.selectAllComponents(selector) || [];
  1267. components.forEach(function (component) {
  1268. var ref = component.dataset.ref;
  1269. $refs[ref] = component.$vm || toSkip(component);
  1270. {
  1271. if (component.dataset.vueGeneric === 'scoped') {
  1272. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1273. selectAllComponents(scopedComponent, selector, $refs);
  1274. });
  1275. }
  1276. }
  1277. });
  1278. }
  1279. function syncRefs(refs, newRefs) {
  1280. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1281. var newKeys = Object.keys(newRefs);
  1282. newKeys.forEach(function (key) {
  1283. var oldValue = refs[key];
  1284. var newValue = newRefs[key];
  1285. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1286. return oldValue.includes(value);
  1287. })) {
  1288. return;
  1289. }
  1290. refs[key] = newValue;
  1291. oldKeys.delete(key);
  1292. });
  1293. oldKeys.forEach(function (key) {
  1294. delete refs[key];
  1295. });
  1296. return refs;
  1297. }
  1298. function initRefs(vm) {
  1299. var mpInstance = vm.$scope;
  1300. var refs = {};
  1301. Object.defineProperty(vm, '$refs', {
  1302. get: function get() {
  1303. var $refs = {};
  1304. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1305. // TODO 暂不考虑 for 中的 scoped
  1306. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1307. forComponents.forEach(function (component) {
  1308. var ref = component.dataset.ref;
  1309. if (!$refs[ref]) {
  1310. $refs[ref] = [];
  1311. }
  1312. $refs[ref].push(component.$vm || toSkip(component));
  1313. });
  1314. return syncRefs(refs, $refs);
  1315. }
  1316. });
  1317. }
  1318. function handleLink(event) {
  1319. var _ref3 = event.detail || event.value,
  1320. vuePid = _ref3.vuePid,
  1321. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1322. var parentVm;
  1323. if (vuePid) {
  1324. parentVm = findVmByVueId(this.$vm, vuePid);
  1325. }
  1326. if (!parentVm) {
  1327. parentVm = this.$vm;
  1328. }
  1329. vueOptions.parent = parentVm;
  1330. }
  1331. function markMPComponent(component) {
  1332. // 在 Vue 中标记为小程序组件
  1333. var IS_MP = '__v_isMPComponent';
  1334. Object.defineProperty(component, IS_MP, {
  1335. configurable: true,
  1336. enumerable: false,
  1337. value: true
  1338. });
  1339. return component;
  1340. }
  1341. function toSkip(obj) {
  1342. var OB = '__ob__';
  1343. var SKIP = '__v_skip';
  1344. if (isObject(obj) && Object.isExtensible(obj)) {
  1345. // 避免被 @vue/composition-api 观测
  1346. Object.defineProperty(obj, OB, {
  1347. configurable: true,
  1348. enumerable: false,
  1349. value: (0, _defineProperty2.default)({}, SKIP, true)
  1350. });
  1351. }
  1352. return obj;
  1353. }
  1354. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1355. function initWorkletMethods(mpMethods, vueMethods) {
  1356. if (vueMethods) {
  1357. Object.keys(vueMethods).forEach(function (name) {
  1358. var matches = name.match(WORKLET_RE);
  1359. if (matches) {
  1360. var workletName = matches[1];
  1361. mpMethods[name] = vueMethods[name];
  1362. mpMethods[workletName] = vueMethods[workletName];
  1363. }
  1364. });
  1365. }
  1366. }
  1367. var MPPage = Page;
  1368. var MPComponent = Component;
  1369. var customizeRE = /:/g;
  1370. var customize = cached(function (str) {
  1371. return camelize(str.replace(customizeRE, '-'));
  1372. });
  1373. function initTriggerEvent(mpInstance) {
  1374. var oldTriggerEvent = mpInstance.triggerEvent;
  1375. var newTriggerEvent = function newTriggerEvent(event) {
  1376. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1377. args[_key3 - 1] = arguments[_key3];
  1378. }
  1379. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1380. if (this.$vm || this.dataset && this.dataset.comType) {
  1381. event = customize(event);
  1382. } else {
  1383. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1384. var newEvent = customize(event);
  1385. if (newEvent !== event) {
  1386. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1387. }
  1388. }
  1389. return oldTriggerEvent.apply(this, [event].concat(args));
  1390. };
  1391. try {
  1392. // 京东小程序 triggerEvent 为只读
  1393. mpInstance.triggerEvent = newTriggerEvent;
  1394. } catch (error) {
  1395. mpInstance._triggerEvent = newTriggerEvent;
  1396. }
  1397. }
  1398. function initHook(name, options, isComponent) {
  1399. var oldHook = options[name];
  1400. options[name] = function () {
  1401. markMPComponent(this);
  1402. initTriggerEvent(this);
  1403. if (oldHook) {
  1404. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1405. args[_key4] = arguments[_key4];
  1406. }
  1407. return oldHook.apply(this, args);
  1408. }
  1409. };
  1410. }
  1411. if (!MPPage.__$wrappered) {
  1412. MPPage.__$wrappered = true;
  1413. Page = function Page() {
  1414. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1415. initHook('onLoad', options);
  1416. return MPPage(options);
  1417. };
  1418. Page.after = MPPage.after;
  1419. Component = function Component() {
  1420. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1421. initHook('created', options);
  1422. return MPComponent(options);
  1423. };
  1424. }
  1425. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1426. function initMocks(vm, mocks) {
  1427. var mpInstance = vm.$mp[vm.mpType];
  1428. mocks.forEach(function (mock) {
  1429. if (hasOwn(mpInstance, mock)) {
  1430. vm[mock] = mpInstance[mock];
  1431. }
  1432. });
  1433. }
  1434. function hasHook(hook, vueOptions) {
  1435. if (!vueOptions) {
  1436. return true;
  1437. }
  1438. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1439. return true;
  1440. }
  1441. vueOptions = vueOptions.default || vueOptions;
  1442. if (isFn(vueOptions)) {
  1443. if (isFn(vueOptions.extendOptions[hook])) {
  1444. return true;
  1445. }
  1446. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1447. return true;
  1448. }
  1449. return false;
  1450. }
  1451. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1452. return true;
  1453. }
  1454. var mixins = vueOptions.mixins;
  1455. if (Array.isArray(mixins)) {
  1456. return !!mixins.find(function (mixin) {
  1457. return hasHook(hook, mixin);
  1458. });
  1459. }
  1460. }
  1461. function initHooks(mpOptions, hooks, vueOptions) {
  1462. hooks.forEach(function (hook) {
  1463. if (hasHook(hook, vueOptions)) {
  1464. mpOptions[hook] = function (args) {
  1465. return this.$vm && this.$vm.__call_hook(hook, args);
  1466. };
  1467. }
  1468. });
  1469. }
  1470. function initUnknownHooks(mpOptions, vueOptions) {
  1471. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1472. findHooks(vueOptions).forEach(function (hook) {
  1473. return initHook$1(mpOptions, hook, excludes);
  1474. });
  1475. }
  1476. function findHooks(vueOptions) {
  1477. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1478. if (vueOptions) {
  1479. Object.keys(vueOptions).forEach(function (name) {
  1480. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1481. hooks.push(name);
  1482. }
  1483. });
  1484. }
  1485. return hooks;
  1486. }
  1487. function initHook$1(mpOptions, hook, excludes) {
  1488. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1489. mpOptions[hook] = function (args) {
  1490. return this.$vm && this.$vm.__call_hook(hook, args);
  1491. };
  1492. }
  1493. }
  1494. function initVueComponent(Vue, vueOptions) {
  1495. vueOptions = vueOptions.default || vueOptions;
  1496. var VueComponent;
  1497. if (isFn(vueOptions)) {
  1498. VueComponent = vueOptions;
  1499. } else {
  1500. VueComponent = Vue.extend(vueOptions);
  1501. }
  1502. vueOptions = VueComponent.options;
  1503. return [VueComponent, vueOptions];
  1504. }
  1505. function initSlots(vm, vueSlots) {
  1506. if (Array.isArray(vueSlots) && vueSlots.length) {
  1507. var $slots = Object.create(null);
  1508. vueSlots.forEach(function (slotName) {
  1509. $slots[slotName] = true;
  1510. });
  1511. vm.$scopedSlots = vm.$slots = $slots;
  1512. }
  1513. }
  1514. function initVueIds(vueIds, mpInstance) {
  1515. vueIds = (vueIds || '').split(',');
  1516. var len = vueIds.length;
  1517. if (len === 1) {
  1518. mpInstance._$vueId = vueIds[0];
  1519. } else if (len === 2) {
  1520. mpInstance._$vueId = vueIds[0];
  1521. mpInstance._$vuePid = vueIds[1];
  1522. }
  1523. }
  1524. function initData(vueOptions, context) {
  1525. var data = vueOptions.data || {};
  1526. var methods = vueOptions.methods || {};
  1527. if (typeof data === 'function') {
  1528. try {
  1529. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1530. } catch (e) {
  1531. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1532. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1533. }
  1534. }
  1535. } else {
  1536. try {
  1537. // 对 data 格式化
  1538. data = JSON.parse(JSON.stringify(data));
  1539. } catch (e) {}
  1540. }
  1541. if (!isPlainObject(data)) {
  1542. data = {};
  1543. }
  1544. Object.keys(methods).forEach(function (methodName) {
  1545. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1546. data[methodName] = methods[methodName];
  1547. }
  1548. });
  1549. return data;
  1550. }
  1551. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1552. function createObserver(name) {
  1553. return function observer(newVal, oldVal) {
  1554. if (this.$vm) {
  1555. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1556. }
  1557. };
  1558. }
  1559. function initBehaviors(vueOptions, initBehavior) {
  1560. var vueBehaviors = vueOptions.behaviors;
  1561. var vueExtends = vueOptions.extends;
  1562. var vueMixins = vueOptions.mixins;
  1563. var vueProps = vueOptions.props;
  1564. if (!vueProps) {
  1565. vueOptions.props = vueProps = [];
  1566. }
  1567. var behaviors = [];
  1568. if (Array.isArray(vueBehaviors)) {
  1569. vueBehaviors.forEach(function (behavior) {
  1570. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1571. if (behavior === 'uni://form-field') {
  1572. if (Array.isArray(vueProps)) {
  1573. vueProps.push('name');
  1574. vueProps.push('value');
  1575. } else {
  1576. vueProps.name = {
  1577. type: String,
  1578. default: ''
  1579. };
  1580. vueProps.value = {
  1581. type: [String, Number, Boolean, Array, Object, Date],
  1582. default: ''
  1583. };
  1584. }
  1585. }
  1586. });
  1587. }
  1588. if (isPlainObject(vueExtends) && vueExtends.props) {
  1589. behaviors.push(initBehavior({
  1590. properties: initProperties(vueExtends.props, true)
  1591. }));
  1592. }
  1593. if (Array.isArray(vueMixins)) {
  1594. vueMixins.forEach(function (vueMixin) {
  1595. if (isPlainObject(vueMixin) && vueMixin.props) {
  1596. behaviors.push(initBehavior({
  1597. properties: initProperties(vueMixin.props, true)
  1598. }));
  1599. }
  1600. });
  1601. }
  1602. return behaviors;
  1603. }
  1604. function parsePropType(key, type, defaultValue, file) {
  1605. // [String]=>String
  1606. if (Array.isArray(type) && type.length === 1) {
  1607. return type[0];
  1608. }
  1609. return type;
  1610. }
  1611. function initProperties(props) {
  1612. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1613. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1614. var options = arguments.length > 3 ? arguments[3] : undefined;
  1615. var properties = {};
  1616. if (!isBehavior) {
  1617. properties.vueId = {
  1618. type: String,
  1619. value: ''
  1620. };
  1621. {
  1622. if (options.virtualHost) {
  1623. properties.virtualHostStyle = {
  1624. type: null,
  1625. value: ''
  1626. };
  1627. properties.virtualHostClass = {
  1628. type: null,
  1629. value: ''
  1630. };
  1631. }
  1632. }
  1633. // scopedSlotsCompiler auto
  1634. properties.scopedSlotsCompiler = {
  1635. type: String,
  1636. value: ''
  1637. };
  1638. properties.vueSlots = {
  1639. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1640. type: null,
  1641. value: [],
  1642. observer: function observer(newVal, oldVal) {
  1643. var $slots = Object.create(null);
  1644. newVal.forEach(function (slotName) {
  1645. $slots[slotName] = true;
  1646. });
  1647. this.setData({
  1648. $slots: $slots
  1649. });
  1650. }
  1651. };
  1652. }
  1653. if (Array.isArray(props)) {
  1654. // ['title']
  1655. props.forEach(function (key) {
  1656. properties[key] = {
  1657. type: null,
  1658. observer: createObserver(key)
  1659. };
  1660. });
  1661. } else if (isPlainObject(props)) {
  1662. // {title:{type:String,default:''},content:String}
  1663. Object.keys(props).forEach(function (key) {
  1664. var opts = props[key];
  1665. if (isPlainObject(opts)) {
  1666. // title:{type:String,default:''}
  1667. var value = opts.default;
  1668. if (isFn(value)) {
  1669. value = value();
  1670. }
  1671. opts.type = parsePropType(key, opts.type);
  1672. properties[key] = {
  1673. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1674. value: value,
  1675. observer: createObserver(key)
  1676. };
  1677. } else {
  1678. // content:String
  1679. var type = parsePropType(key, opts);
  1680. properties[key] = {
  1681. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1682. observer: createObserver(key)
  1683. };
  1684. }
  1685. });
  1686. }
  1687. return properties;
  1688. }
  1689. function wrapper$1(event) {
  1690. // TODO 又得兼容 mpvue 的 mp 对象
  1691. try {
  1692. event.mp = JSON.parse(JSON.stringify(event));
  1693. } catch (e) {}
  1694. event.stopPropagation = noop;
  1695. event.preventDefault = noop;
  1696. event.target = event.target || {};
  1697. if (!hasOwn(event, 'detail')) {
  1698. event.detail = {};
  1699. }
  1700. if (hasOwn(event, 'markerId')) {
  1701. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1702. event.detail.markerId = event.markerId;
  1703. }
  1704. if (isPlainObject(event.detail)) {
  1705. event.target = Object.assign({}, event.target, event.detail);
  1706. }
  1707. return event;
  1708. }
  1709. function getExtraValue(vm, dataPathsArray) {
  1710. var context = vm;
  1711. dataPathsArray.forEach(function (dataPathArray) {
  1712. var dataPath = dataPathArray[0];
  1713. var value = dataPathArray[2];
  1714. if (dataPath || typeof value !== 'undefined') {
  1715. // ['','',index,'disable']
  1716. var propPath = dataPathArray[1];
  1717. var valuePath = dataPathArray[3];
  1718. var vFor;
  1719. if (Number.isInteger(dataPath)) {
  1720. vFor = dataPath;
  1721. } else if (!dataPath) {
  1722. vFor = context;
  1723. } else if (typeof dataPath === 'string' && dataPath) {
  1724. if (dataPath.indexOf('#s#') === 0) {
  1725. vFor = dataPath.substr(3);
  1726. } else {
  1727. vFor = vm.__get_value(dataPath, context);
  1728. }
  1729. }
  1730. if (Number.isInteger(vFor)) {
  1731. context = value;
  1732. } else if (!propPath) {
  1733. context = vFor[value];
  1734. } else {
  1735. if (Array.isArray(vFor)) {
  1736. context = vFor.find(function (vForItem) {
  1737. return vm.__get_value(propPath, vForItem) === value;
  1738. });
  1739. } else if (isPlainObject(vFor)) {
  1740. context = Object.keys(vFor).find(function (vForKey) {
  1741. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1742. });
  1743. } else {
  1744. console.error('v-for 暂不支持循环数据:', vFor);
  1745. }
  1746. }
  1747. if (valuePath) {
  1748. context = vm.__get_value(valuePath, context);
  1749. }
  1750. }
  1751. });
  1752. return context;
  1753. }
  1754. function processEventExtra(vm, extra, event, __args__) {
  1755. var extraObj = {};
  1756. if (Array.isArray(extra) && extra.length) {
  1757. /**
  1758. *[
  1759. * ['data.items', 'data.id', item.data.id],
  1760. * ['metas', 'id', meta.id]
  1761. *],
  1762. *[
  1763. * ['data.items', 'data.id', item.data.id],
  1764. * ['metas', 'id', meta.id]
  1765. *],
  1766. *'test'
  1767. */
  1768. extra.forEach(function (dataPath, index) {
  1769. if (typeof dataPath === 'string') {
  1770. if (!dataPath) {
  1771. // model,prop.sync
  1772. extraObj['$' + index] = vm;
  1773. } else {
  1774. if (dataPath === '$event') {
  1775. // $event
  1776. extraObj['$' + index] = event;
  1777. } else if (dataPath === 'arguments') {
  1778. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1779. } else if (dataPath.indexOf('$event.') === 0) {
  1780. // $event.target.value
  1781. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1782. } else {
  1783. extraObj['$' + index] = vm.__get_value(dataPath);
  1784. }
  1785. }
  1786. } else {
  1787. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1788. }
  1789. });
  1790. }
  1791. return extraObj;
  1792. }
  1793. function getObjByArray(arr) {
  1794. var obj = {};
  1795. for (var i = 1; i < arr.length; i++) {
  1796. var element = arr[i];
  1797. obj[element[0]] = element[1];
  1798. }
  1799. return obj;
  1800. }
  1801. function processEventArgs(vm, event) {
  1802. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1803. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1804. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1805. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1806. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1807. // fixed 用户直接触发 mpInstance.triggerEvent
  1808. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1809. if (isCustom) {
  1810. // 自定义事件
  1811. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1812. if (!args.length) {
  1813. // 无参数,直接传入 event 或 detail 数组
  1814. if (isCustomMPEvent) {
  1815. return [event];
  1816. }
  1817. return __args__;
  1818. }
  1819. }
  1820. var extraObj = processEventExtra(vm, extra, event, __args__);
  1821. var ret = [];
  1822. args.forEach(function (arg) {
  1823. if (arg === '$event') {
  1824. if (methodName === '__set_model' && !isCustom) {
  1825. // input v-model value
  1826. ret.push(event.target.value);
  1827. } else {
  1828. if (isCustom && !isCustomMPEvent) {
  1829. ret.push(__args__[0]);
  1830. } else {
  1831. // wxcomponent 组件或内置组件
  1832. ret.push(event);
  1833. }
  1834. }
  1835. } else {
  1836. if (Array.isArray(arg) && arg[0] === 'o') {
  1837. ret.push(getObjByArray(arg));
  1838. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1839. ret.push(extraObj[arg]);
  1840. } else {
  1841. ret.push(arg);
  1842. }
  1843. }
  1844. });
  1845. return ret;
  1846. }
  1847. var ONCE = '~';
  1848. var CUSTOM = '^';
  1849. function isMatchEventType(eventType, optType) {
  1850. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1851. }
  1852. function getContextVm(vm) {
  1853. var $parent = vm.$parent;
  1854. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1855. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1856. $parent = $parent.$parent;
  1857. }
  1858. return $parent && $parent.$parent;
  1859. }
  1860. function handleEvent(event) {
  1861. var _this2 = this;
  1862. event = wrapper$1(event);
  1863. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1864. var dataset = (event.currentTarget || event.target).dataset;
  1865. if (!dataset) {
  1866. return console.warn('事件信息不存在');
  1867. }
  1868. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1869. if (!eventOpts) {
  1870. return console.warn('事件信息不存在');
  1871. }
  1872. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1873. var eventType = event.type;
  1874. var ret = [];
  1875. eventOpts.forEach(function (eventOpt) {
  1876. var type = eventOpt[0];
  1877. var eventsArray = eventOpt[1];
  1878. var isCustom = type.charAt(0) === CUSTOM;
  1879. type = isCustom ? type.slice(1) : type;
  1880. var isOnce = type.charAt(0) === ONCE;
  1881. type = isOnce ? type.slice(1) : type;
  1882. if (eventsArray && isMatchEventType(eventType, type)) {
  1883. eventsArray.forEach(function (eventArray) {
  1884. var methodName = eventArray[0];
  1885. if (methodName) {
  1886. var handlerCtx = _this2.$vm;
  1887. if (handlerCtx.$options.generic) {
  1888. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1889. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1890. }
  1891. if (methodName === '$emit') {
  1892. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1893. return;
  1894. }
  1895. var handler = handlerCtx[methodName];
  1896. if (!isFn(handler)) {
  1897. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1898. var path = _this2.route || _this2.is;
  1899. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1900. }
  1901. if (isOnce) {
  1902. if (handler.once) {
  1903. return;
  1904. }
  1905. handler.once = true;
  1906. }
  1907. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1908. params = Array.isArray(params) ? params : [];
  1909. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1910. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1911. // eslint-disable-next-line no-sparse-arrays
  1912. params = params.concat([,,,,,,,,,, event]);
  1913. }
  1914. ret.push(handler.apply(handlerCtx, params));
  1915. }
  1916. });
  1917. }
  1918. });
  1919. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1920. return ret[0];
  1921. }
  1922. }
  1923. var eventChannels = {};
  1924. function getEventChannel(id) {
  1925. var eventChannel = eventChannels[id];
  1926. delete eventChannels[id];
  1927. return eventChannel;
  1928. }
  1929. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1930. function initEventChannel() {
  1931. _vue.default.prototype.getOpenerEventChannel = function () {
  1932. // 微信小程序使用自身getOpenerEventChannel
  1933. {
  1934. return this.$scope.getOpenerEventChannel();
  1935. }
  1936. };
  1937. var callHook = _vue.default.prototype.__call_hook;
  1938. _vue.default.prototype.__call_hook = function (hook, args) {
  1939. if (hook === 'onLoad' && args && args.__id__) {
  1940. this.__eventChannel__ = getEventChannel(args.__id__);
  1941. delete args.__id__;
  1942. }
  1943. return callHook.call(this, hook, args);
  1944. };
  1945. }
  1946. function initScopedSlotsParams() {
  1947. var center = {};
  1948. var parents = {};
  1949. function currentId(fn) {
  1950. var vueIds = this.$options.propsData.vueId;
  1951. if (vueIds) {
  1952. var vueId = vueIds.split(',')[0];
  1953. fn(vueId);
  1954. }
  1955. }
  1956. _vue.default.prototype.$hasSSP = function (vueId) {
  1957. var slot = center[vueId];
  1958. if (!slot) {
  1959. parents[vueId] = this;
  1960. this.$on('hook:destroyed', function () {
  1961. delete parents[vueId];
  1962. });
  1963. }
  1964. return slot;
  1965. };
  1966. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  1967. var slot = center[vueId];
  1968. if (slot) {
  1969. var params = slot[name] || [];
  1970. if (needAll) {
  1971. return params;
  1972. }
  1973. return params[0];
  1974. }
  1975. };
  1976. _vue.default.prototype.$setSSP = function (name, value) {
  1977. var index = 0;
  1978. currentId.call(this, function (vueId) {
  1979. var slot = center[vueId];
  1980. var params = slot[name] = slot[name] || [];
  1981. params.push(value);
  1982. index = params.length - 1;
  1983. });
  1984. return index;
  1985. };
  1986. _vue.default.prototype.$initSSP = function () {
  1987. currentId.call(this, function (vueId) {
  1988. center[vueId] = {};
  1989. });
  1990. };
  1991. _vue.default.prototype.$callSSP = function () {
  1992. currentId.call(this, function (vueId) {
  1993. if (parents[vueId]) {
  1994. parents[vueId].$forceUpdate();
  1995. }
  1996. });
  1997. };
  1998. _vue.default.mixin({
  1999. destroyed: function destroyed() {
  2000. var propsData = this.$options.propsData;
  2001. var vueId = propsData && propsData.vueId;
  2002. if (vueId) {
  2003. delete center[vueId];
  2004. delete parents[vueId];
  2005. }
  2006. }
  2007. });
  2008. }
  2009. function parseBaseApp(vm, _ref4) {
  2010. var mocks = _ref4.mocks,
  2011. initRefs = _ref4.initRefs;
  2012. initEventChannel();
  2013. {
  2014. initScopedSlotsParams();
  2015. }
  2016. if (vm.$options.store) {
  2017. _vue.default.prototype.$store = vm.$options.store;
  2018. }
  2019. uniIdMixin(_vue.default);
  2020. _vue.default.prototype.mpHost = "mp-weixin";
  2021. _vue.default.mixin({
  2022. beforeCreate: function beforeCreate() {
  2023. if (!this.$options.mpType) {
  2024. return;
  2025. }
  2026. this.mpType = this.$options.mpType;
  2027. this.$mp = (0, _defineProperty2.default)({
  2028. data: {}
  2029. }, this.mpType, this.$options.mpInstance);
  2030. this.$scope = this.$options.mpInstance;
  2031. delete this.$options.mpType;
  2032. delete this.$options.mpInstance;
  2033. if (this.mpType === 'page' && typeof getApp === 'function') {
  2034. // hack vue-i18n
  2035. var app = getApp();
  2036. if (app.$vm && app.$vm.$i18n) {
  2037. this._i18n = app.$vm.$i18n;
  2038. }
  2039. }
  2040. if (this.mpType !== 'app') {
  2041. initRefs(this);
  2042. initMocks(this, mocks);
  2043. }
  2044. }
  2045. });
  2046. var appOptions = {
  2047. onLaunch: function onLaunch(args) {
  2048. if (this.$vm) {
  2049. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2050. return;
  2051. }
  2052. {
  2053. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2054. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2055. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2056. }
  2057. }
  2058. this.$vm = vm;
  2059. this.$vm.$mp = {
  2060. app: this
  2061. };
  2062. this.$vm.$scope = this;
  2063. // vm 上也挂载 globalData
  2064. this.$vm.globalData = this.globalData;
  2065. this.$vm._isMounted = true;
  2066. this.$vm.__call_hook('mounted', args);
  2067. this.$vm.__call_hook('onLaunch', args);
  2068. }
  2069. };
  2070. // 兼容旧版本 globalData
  2071. appOptions.globalData = vm.$options.globalData || {};
  2072. // 将 methods 中的方法挂在 getApp() 中
  2073. var methods = vm.$options.methods;
  2074. if (methods) {
  2075. Object.keys(methods).forEach(function (name) {
  2076. appOptions[name] = methods[name];
  2077. });
  2078. }
  2079. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2080. initHooks(appOptions, hooks);
  2081. initUnknownHooks(appOptions, vm.$options);
  2082. return appOptions;
  2083. }
  2084. function parseApp(vm) {
  2085. return parseBaseApp(vm, {
  2086. mocks: mocks,
  2087. initRefs: initRefs
  2088. });
  2089. }
  2090. function createApp(vm) {
  2091. App(parseApp(vm));
  2092. return vm;
  2093. }
  2094. var encodeReserveRE = /[!'()*]/g;
  2095. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2096. return '%' + c.charCodeAt(0).toString(16);
  2097. };
  2098. var commaRE = /%2C/g;
  2099. // fixed encodeURIComponent which is more conformant to RFC3986:
  2100. // - escapes [!'()*]
  2101. // - preserve commas
  2102. var encode = function encode(str) {
  2103. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2104. };
  2105. function stringifyQuery(obj) {
  2106. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2107. var res = obj ? Object.keys(obj).map(function (key) {
  2108. var val = obj[key];
  2109. if (val === undefined) {
  2110. return '';
  2111. }
  2112. if (val === null) {
  2113. return encodeStr(key);
  2114. }
  2115. if (Array.isArray(val)) {
  2116. var result = [];
  2117. val.forEach(function (val2) {
  2118. if (val2 === undefined) {
  2119. return;
  2120. }
  2121. if (val2 === null) {
  2122. result.push(encodeStr(key));
  2123. } else {
  2124. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2125. }
  2126. });
  2127. return result.join('&');
  2128. }
  2129. return encodeStr(key) + '=' + encodeStr(val);
  2130. }).filter(function (x) {
  2131. return x.length > 0;
  2132. }).join('&') : null;
  2133. return res ? "?".concat(res) : '';
  2134. }
  2135. function parseBaseComponent(vueComponentOptions) {
  2136. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2137. isPage = _ref5.isPage,
  2138. initRelation = _ref5.initRelation;
  2139. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2140. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2141. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2142. VueComponent = _initVueComponent2[0],
  2143. vueOptions = _initVueComponent2[1];
  2144. var options = _objectSpread({
  2145. multipleSlots: true,
  2146. // styleIsolation: 'apply-shared',
  2147. addGlobalClass: true
  2148. }, vueOptions.options || {});
  2149. {
  2150. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2151. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2152. Object.assign(options, vueOptions['mp-weixin'].options);
  2153. }
  2154. }
  2155. var componentOptions = {
  2156. options: options,
  2157. data: initData(vueOptions, _vue.default.prototype),
  2158. behaviors: initBehaviors(vueOptions, initBehavior),
  2159. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2160. lifetimes: {
  2161. attached: function attached() {
  2162. var properties = this.properties;
  2163. var options = {
  2164. mpType: isPage.call(this) ? 'page' : 'component',
  2165. mpInstance: this,
  2166. propsData: properties
  2167. };
  2168. initVueIds(properties.vueId, this);
  2169. // 处理父子关系
  2170. initRelation.call(this, {
  2171. vuePid: this._$vuePid,
  2172. vueOptions: options
  2173. });
  2174. // 初始化 vue 实例
  2175. this.$vm = new VueComponent(options);
  2176. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2177. initSlots(this.$vm, properties.vueSlots);
  2178. // 触发首次 setData
  2179. this.$vm.$mount();
  2180. },
  2181. ready: function ready() {
  2182. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2183. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2184. if (this.$vm) {
  2185. this.$vm._isMounted = true;
  2186. this.$vm.__call_hook('mounted');
  2187. this.$vm.__call_hook('onReady');
  2188. }
  2189. },
  2190. detached: function detached() {
  2191. this.$vm && this.$vm.$destroy();
  2192. }
  2193. },
  2194. pageLifetimes: {
  2195. show: function show(args) {
  2196. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2197. },
  2198. hide: function hide() {
  2199. this.$vm && this.$vm.__call_hook('onPageHide');
  2200. },
  2201. resize: function resize(size) {
  2202. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2203. }
  2204. },
  2205. methods: {
  2206. __l: handleLink,
  2207. __e: handleEvent
  2208. }
  2209. };
  2210. // externalClasses
  2211. if (vueOptions.externalClasses) {
  2212. componentOptions.externalClasses = vueOptions.externalClasses;
  2213. }
  2214. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2215. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2216. componentOptions.methods[callMethod] = function (args) {
  2217. return this.$vm[callMethod](args);
  2218. };
  2219. });
  2220. }
  2221. if (needVueOptions) {
  2222. return [componentOptions, vueOptions, VueComponent];
  2223. }
  2224. if (isPage) {
  2225. return componentOptions;
  2226. }
  2227. return [componentOptions, VueComponent];
  2228. }
  2229. function parseComponent(vueComponentOptions, needVueOptions) {
  2230. return parseBaseComponent(vueComponentOptions, {
  2231. isPage: isPage,
  2232. initRelation: initRelation
  2233. }, needVueOptions);
  2234. }
  2235. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2236. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2237. function parseBasePage(vuePageOptions) {
  2238. var _parseComponent = parseComponent(vuePageOptions, true),
  2239. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2240. pageOptions = _parseComponent2[0],
  2241. vueOptions = _parseComponent2[1];
  2242. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2243. pageOptions.methods.onLoad = function (query) {
  2244. this.options = query;
  2245. var copyQuery = Object.assign({}, query);
  2246. delete copyQuery.__id__;
  2247. this.$page = {
  2248. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2249. };
  2250. this.$vm.$mp.query = query; // 兼容 mpvue
  2251. this.$vm.__call_hook('onLoad', query);
  2252. };
  2253. {
  2254. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2255. }
  2256. {
  2257. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2258. }
  2259. return pageOptions;
  2260. }
  2261. function parsePage(vuePageOptions) {
  2262. return parseBasePage(vuePageOptions);
  2263. }
  2264. function createPage(vuePageOptions) {
  2265. {
  2266. return Component(parsePage(vuePageOptions));
  2267. }
  2268. }
  2269. function createComponent(vueOptions) {
  2270. {
  2271. return Component(parseComponent(vueOptions));
  2272. }
  2273. }
  2274. function createSubpackageApp(vm) {
  2275. var appOptions = parseApp(vm);
  2276. var app = getApp({
  2277. allowDefault: true
  2278. });
  2279. vm.$scope = app;
  2280. var globalData = app.globalData;
  2281. if (globalData) {
  2282. Object.keys(appOptions.globalData).forEach(function (name) {
  2283. if (!hasOwn(globalData, name)) {
  2284. globalData[name] = appOptions.globalData[name];
  2285. }
  2286. });
  2287. }
  2288. Object.keys(appOptions).forEach(function (name) {
  2289. if (!hasOwn(app, name)) {
  2290. app[name] = appOptions[name];
  2291. }
  2292. });
  2293. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2294. wx.onAppShow(function () {
  2295. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2296. args[_key5] = arguments[_key5];
  2297. }
  2298. vm.__call_hook('onShow', args);
  2299. });
  2300. }
  2301. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2302. wx.onAppHide(function () {
  2303. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2304. args[_key6] = arguments[_key6];
  2305. }
  2306. vm.__call_hook('onHide', args);
  2307. });
  2308. }
  2309. if (isFn(appOptions.onLaunch)) {
  2310. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2311. vm.__call_hook('onLaunch', args);
  2312. }
  2313. return vm;
  2314. }
  2315. function createPlugin(vm) {
  2316. var appOptions = parseApp(vm);
  2317. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2318. wx.onAppShow(function () {
  2319. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2320. args[_key7] = arguments[_key7];
  2321. }
  2322. vm.__call_hook('onShow', args);
  2323. });
  2324. }
  2325. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2326. wx.onAppHide(function () {
  2327. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2328. args[_key8] = arguments[_key8];
  2329. }
  2330. vm.__call_hook('onHide', args);
  2331. });
  2332. }
  2333. if (isFn(appOptions.onLaunch)) {
  2334. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2335. vm.__call_hook('onLaunch', args);
  2336. }
  2337. return vm;
  2338. }
  2339. todos.forEach(function (todoApi) {
  2340. protocols[todoApi] = false;
  2341. });
  2342. canIUses.forEach(function (canIUseApi) {
  2343. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2344. if (!wx.canIUse(apiName)) {
  2345. protocols[canIUseApi] = false;
  2346. }
  2347. });
  2348. var uni = {};
  2349. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2350. uni = new Proxy({}, {
  2351. get: function get(target, name) {
  2352. if (hasOwn(target, name)) {
  2353. return target[name];
  2354. }
  2355. if (baseApi[name]) {
  2356. return baseApi[name];
  2357. }
  2358. if (api[name]) {
  2359. return promisify(name, api[name]);
  2360. }
  2361. {
  2362. if (extraApi[name]) {
  2363. return promisify(name, extraApi[name]);
  2364. }
  2365. if (todoApis[name]) {
  2366. return promisify(name, todoApis[name]);
  2367. }
  2368. }
  2369. if (eventApi[name]) {
  2370. return eventApi[name];
  2371. }
  2372. return promisify(name, wrapper(name, wx[name]));
  2373. },
  2374. set: function set(target, name, value) {
  2375. target[name] = value;
  2376. return true;
  2377. }
  2378. });
  2379. } else {
  2380. Object.keys(baseApi).forEach(function (name) {
  2381. uni[name] = baseApi[name];
  2382. });
  2383. {
  2384. Object.keys(todoApis).forEach(function (name) {
  2385. uni[name] = promisify(name, todoApis[name]);
  2386. });
  2387. Object.keys(extraApi).forEach(function (name) {
  2388. uni[name] = promisify(name, extraApi[name]);
  2389. });
  2390. }
  2391. Object.keys(eventApi).forEach(function (name) {
  2392. uni[name] = eventApi[name];
  2393. });
  2394. Object.keys(api).forEach(function (name) {
  2395. uni[name] = promisify(name, api[name]);
  2396. });
  2397. Object.keys(wx).forEach(function (name) {
  2398. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2399. uni[name] = promisify(name, wrapper(name, wx[name]));
  2400. }
  2401. });
  2402. }
  2403. wx.createApp = createApp;
  2404. wx.createPage = createPage;
  2405. wx.createComponent = createComponent;
  2406. wx.createSubpackageApp = createSubpackageApp;
  2407. wx.createPlugin = createPlugin;
  2408. var uni$1 = uni;
  2409. var _default = uni$1;
  2410. exports.default = _default;
  2411. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2412. /***/ }),
  2413. /* 3 */
  2414. /*!***********************************!*\
  2415. !*** (webpack)/buildin/global.js ***!
  2416. \***********************************/
  2417. /*! no static exports found */
  2418. /***/ (function(module, exports) {
  2419. var g;
  2420. // This works in non-strict mode
  2421. g = (function() {
  2422. return this;
  2423. })();
  2424. try {
  2425. // This works if eval is allowed (see CSP)
  2426. g = g || new Function("return this")();
  2427. } catch (e) {
  2428. // This works if the window reference is available
  2429. if (typeof window === "object") g = window;
  2430. }
  2431. // g can still be undefined, but nothing to do about it...
  2432. // We return undefined, instead of nothing here, so it's
  2433. // easier to handle this case. if(!global) { ...}
  2434. module.exports = g;
  2435. /***/ }),
  2436. /* 4 */
  2437. /*!**********************************************************************!*\
  2438. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2439. \**********************************************************************/
  2440. /*! no static exports found */
  2441. /***/ (function(module, exports) {
  2442. function _interopRequireDefault(obj) {
  2443. return obj && obj.__esModule ? obj : {
  2444. "default": obj
  2445. };
  2446. }
  2447. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2448. /***/ }),
  2449. /* 5 */
  2450. /*!**************************************************************!*\
  2451. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2452. \**************************************************************/
  2453. /*! no static exports found */
  2454. /***/ (function(module, exports, __webpack_require__) {
  2455. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2456. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2457. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2458. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2459. function _slicedToArray(arr, i) {
  2460. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2461. }
  2462. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2463. /***/ }),
  2464. /* 6 */
  2465. /*!***************************************************************!*\
  2466. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2467. \***************************************************************/
  2468. /*! no static exports found */
  2469. /***/ (function(module, exports) {
  2470. function _arrayWithHoles(arr) {
  2471. if (Array.isArray(arr)) return arr;
  2472. }
  2473. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2474. /***/ }),
  2475. /* 7 */
  2476. /*!*********************************************************************!*\
  2477. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2478. \*********************************************************************/
  2479. /*! no static exports found */
  2480. /***/ (function(module, exports) {
  2481. function _iterableToArrayLimit(r, l) {
  2482. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  2483. if (null != t) {
  2484. var e,
  2485. n,
  2486. i,
  2487. u,
  2488. a = [],
  2489. f = !0,
  2490. o = !1;
  2491. try {
  2492. if (i = (t = t.call(r)).next, 0 === l) {
  2493. if (Object(t) !== t) return;
  2494. f = !1;
  2495. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  2496. ;
  2497. }
  2498. } catch (r) {
  2499. o = !0, n = r;
  2500. } finally {
  2501. try {
  2502. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  2503. } finally {
  2504. if (o) throw n;
  2505. }
  2506. }
  2507. return a;
  2508. }
  2509. }
  2510. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2511. /***/ }),
  2512. /* 8 */
  2513. /*!***************************************************************************!*\
  2514. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2515. \***************************************************************************/
  2516. /*! no static exports found */
  2517. /***/ (function(module, exports, __webpack_require__) {
  2518. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2519. function _unsupportedIterableToArray(o, minLen) {
  2520. if (!o) return;
  2521. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2522. var n = Object.prototype.toString.call(o).slice(8, -1);
  2523. if (n === "Object" && o.constructor) n = o.constructor.name;
  2524. if (n === "Map" || n === "Set") return Array.from(o);
  2525. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2526. }
  2527. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2528. /***/ }),
  2529. /* 9 */
  2530. /*!*****************************************************************!*\
  2531. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2532. \*****************************************************************/
  2533. /*! no static exports found */
  2534. /***/ (function(module, exports) {
  2535. function _arrayLikeToArray(arr, len) {
  2536. if (len == null || len > arr.length) len = arr.length;
  2537. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2538. arr2[i] = arr[i];
  2539. }
  2540. return arr2;
  2541. }
  2542. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2543. /***/ }),
  2544. /* 10 */
  2545. /*!****************************************************************!*\
  2546. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2547. \****************************************************************/
  2548. /*! no static exports found */
  2549. /***/ (function(module, exports) {
  2550. function _nonIterableRest() {
  2551. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2552. }
  2553. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2554. /***/ }),
  2555. /* 11 */
  2556. /*!***************************************************************!*\
  2557. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2558. \***************************************************************/
  2559. /*! no static exports found */
  2560. /***/ (function(module, exports, __webpack_require__) {
  2561. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2562. function _defineProperty(obj, key, value) {
  2563. key = toPropertyKey(key);
  2564. if (key in obj) {
  2565. Object.defineProperty(obj, key, {
  2566. value: value,
  2567. enumerable: true,
  2568. configurable: true,
  2569. writable: true
  2570. });
  2571. } else {
  2572. obj[key] = value;
  2573. }
  2574. return obj;
  2575. }
  2576. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2577. /***/ }),
  2578. /* 12 */
  2579. /*!**************************************************************!*\
  2580. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2581. \**************************************************************/
  2582. /*! no static exports found */
  2583. /***/ (function(module, exports, __webpack_require__) {
  2584. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2585. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2586. function toPropertyKey(t) {
  2587. var i = toPrimitive(t, "string");
  2588. return "symbol" == _typeof(i) ? i : i + "";
  2589. }
  2590. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /* 13 */
  2593. /*!*******************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2595. \*******************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _typeof(o) {
  2599. "@babel/helpers - typeof";
  2600. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  2601. return typeof o;
  2602. } : function (o) {
  2603. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  2604. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  2605. }
  2606. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2607. /***/ }),
  2608. /* 14 */
  2609. /*!************************************************************!*\
  2610. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2611. \************************************************************/
  2612. /*! no static exports found */
  2613. /***/ (function(module, exports, __webpack_require__) {
  2614. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2615. function toPrimitive(t, r) {
  2616. if ("object" != _typeof(t) || !t) return t;
  2617. var e = t[Symbol.toPrimitive];
  2618. if (void 0 !== e) {
  2619. var i = e.call(t, r || "default");
  2620. if ("object" != _typeof(i)) return i;
  2621. throw new TypeError("@@toPrimitive must return a primitive value.");
  2622. }
  2623. return ("string" === r ? String : Number)(t);
  2624. }
  2625. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2626. /***/ }),
  2627. /* 15 */
  2628. /*!**********************************************************!*\
  2629. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2630. \**********************************************************/
  2631. /*! no static exports found */
  2632. /***/ (function(module, exports, __webpack_require__) {
  2633. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2634. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2635. function _construct(t, e, r) {
  2636. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  2637. var o = [null];
  2638. o.push.apply(o, e);
  2639. var p = new (t.bind.apply(t, o))();
  2640. return r && setPrototypeOf(p, r.prototype), p;
  2641. }
  2642. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2643. /***/ }),
  2644. /* 16 */
  2645. /*!***************************************************************!*\
  2646. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2647. \***************************************************************/
  2648. /*! no static exports found */
  2649. /***/ (function(module, exports) {
  2650. function _setPrototypeOf(o, p) {
  2651. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2652. o.__proto__ = p;
  2653. return o;
  2654. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2655. return _setPrototypeOf(o, p);
  2656. }
  2657. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2658. /***/ }),
  2659. /* 17 */
  2660. /*!*************************************************************************!*\
  2661. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2662. \*************************************************************************/
  2663. /*! no static exports found */
  2664. /***/ (function(module, exports) {
  2665. function _isNativeReflectConstruct() {
  2666. try {
  2667. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2668. } catch (t) {}
  2669. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  2670. return !!t;
  2671. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  2672. }
  2673. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2674. /***/ }),
  2675. /* 18 */
  2676. /*!******************************************************************!*\
  2677. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2678. \******************************************************************/
  2679. /*! no static exports found */
  2680. /***/ (function(module, exports, __webpack_require__) {
  2681. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2682. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2683. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2684. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2685. function _toConsumableArray(arr) {
  2686. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2687. }
  2688. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2689. /***/ }),
  2690. /* 19 */
  2691. /*!******************************************************************!*\
  2692. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2693. \******************************************************************/
  2694. /*! no static exports found */
  2695. /***/ (function(module, exports, __webpack_require__) {
  2696. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2697. function _arrayWithoutHoles(arr) {
  2698. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2699. }
  2700. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2701. /***/ }),
  2702. /* 20 */
  2703. /*!****************************************************************!*\
  2704. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2705. \****************************************************************/
  2706. /*! no static exports found */
  2707. /***/ (function(module, exports) {
  2708. function _iterableToArray(iter) {
  2709. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2710. }
  2711. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2712. /***/ }),
  2713. /* 21 */
  2714. /*!******************************************************************!*\
  2715. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2716. \******************************************************************/
  2717. /*! no static exports found */
  2718. /***/ (function(module, exports) {
  2719. function _nonIterableSpread() {
  2720. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2721. }
  2722. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2723. /***/ }),
  2724. /* 22 */
  2725. /*!*************************************************************!*\
  2726. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2727. \*************************************************************/
  2728. /*! no static exports found */
  2729. /***/ (function(module, exports, __webpack_require__) {
  2730. "use strict";
  2731. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2732. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2733. Object.defineProperty(exports, "__esModule", {
  2734. value: true
  2735. });
  2736. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2737. exports.compileI18nJsonStr = compileI18nJsonStr;
  2738. exports.hasI18nJson = hasI18nJson;
  2739. exports.initVueI18n = initVueI18n;
  2740. exports.isI18nStr = isI18nStr;
  2741. exports.isString = void 0;
  2742. exports.normalizeLocale = normalizeLocale;
  2743. exports.parseI18nJson = parseI18nJson;
  2744. exports.resolveLocale = resolveLocale;
  2745. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2746. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2747. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2748. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2749. var isObject = function isObject(val) {
  2750. return val !== null && (0, _typeof2.default)(val) === 'object';
  2751. };
  2752. var defaultDelimiters = ['{', '}'];
  2753. var BaseFormatter = /*#__PURE__*/function () {
  2754. function BaseFormatter() {
  2755. (0, _classCallCheck2.default)(this, BaseFormatter);
  2756. this._caches = Object.create(null);
  2757. }
  2758. (0, _createClass2.default)(BaseFormatter, [{
  2759. key: "interpolate",
  2760. value: function interpolate(message, values) {
  2761. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2762. if (!values) {
  2763. return [message];
  2764. }
  2765. var tokens = this._caches[message];
  2766. if (!tokens) {
  2767. tokens = parse(message, delimiters);
  2768. this._caches[message] = tokens;
  2769. }
  2770. return compile(tokens, values);
  2771. }
  2772. }]);
  2773. return BaseFormatter;
  2774. }();
  2775. exports.Formatter = BaseFormatter;
  2776. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2777. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2778. function parse(format, _ref) {
  2779. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2780. startDelimiter = _ref2[0],
  2781. endDelimiter = _ref2[1];
  2782. var tokens = [];
  2783. var position = 0;
  2784. var text = '';
  2785. while (position < format.length) {
  2786. var char = format[position++];
  2787. if (char === startDelimiter) {
  2788. if (text) {
  2789. tokens.push({
  2790. type: 'text',
  2791. value: text
  2792. });
  2793. }
  2794. text = '';
  2795. var sub = '';
  2796. char = format[position++];
  2797. while (char !== undefined && char !== endDelimiter) {
  2798. sub += char;
  2799. char = format[position++];
  2800. }
  2801. var isClosed = char === endDelimiter;
  2802. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2803. tokens.push({
  2804. value: sub,
  2805. type: type
  2806. });
  2807. }
  2808. // else if (char === '%') {
  2809. // // when found rails i18n syntax, skip text capture
  2810. // if (format[position] !== '{') {
  2811. // text += char
  2812. // }
  2813. // }
  2814. else {
  2815. text += char;
  2816. }
  2817. }
  2818. text && tokens.push({
  2819. type: 'text',
  2820. value: text
  2821. });
  2822. return tokens;
  2823. }
  2824. function compile(tokens, values) {
  2825. var compiled = [];
  2826. var index = 0;
  2827. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2828. if (mode === 'unknown') {
  2829. return compiled;
  2830. }
  2831. while (index < tokens.length) {
  2832. var token = tokens[index];
  2833. switch (token.type) {
  2834. case 'text':
  2835. compiled.push(token.value);
  2836. break;
  2837. case 'list':
  2838. compiled.push(values[parseInt(token.value, 10)]);
  2839. break;
  2840. case 'named':
  2841. if (mode === 'named') {
  2842. compiled.push(values[token.value]);
  2843. } else {
  2844. if (true) {
  2845. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2846. }
  2847. }
  2848. break;
  2849. case 'unknown':
  2850. if (true) {
  2851. console.warn("Detect 'unknown' type of token!");
  2852. }
  2853. break;
  2854. }
  2855. index++;
  2856. }
  2857. return compiled;
  2858. }
  2859. var LOCALE_ZH_HANS = 'zh-Hans';
  2860. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2861. var LOCALE_ZH_HANT = 'zh-Hant';
  2862. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2863. var LOCALE_EN = 'en';
  2864. exports.LOCALE_EN = LOCALE_EN;
  2865. var LOCALE_FR = 'fr';
  2866. exports.LOCALE_FR = LOCALE_FR;
  2867. var LOCALE_ES = 'es';
  2868. exports.LOCALE_ES = LOCALE_ES;
  2869. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2870. var hasOwn = function hasOwn(val, key) {
  2871. return hasOwnProperty.call(val, key);
  2872. };
  2873. var defaultFormatter = new BaseFormatter();
  2874. function include(str, parts) {
  2875. return !!parts.find(function (part) {
  2876. return str.indexOf(part) !== -1;
  2877. });
  2878. }
  2879. function startsWith(str, parts) {
  2880. return parts.find(function (part) {
  2881. return str.indexOf(part) === 0;
  2882. });
  2883. }
  2884. function normalizeLocale(locale, messages) {
  2885. if (!locale) {
  2886. return;
  2887. }
  2888. locale = locale.trim().replace(/_/g, '-');
  2889. if (messages && messages[locale]) {
  2890. return locale;
  2891. }
  2892. locale = locale.toLowerCase();
  2893. if (locale === 'chinese') {
  2894. // 支付宝
  2895. return LOCALE_ZH_HANS;
  2896. }
  2897. if (locale.indexOf('zh') === 0) {
  2898. if (locale.indexOf('-hans') > -1) {
  2899. return LOCALE_ZH_HANS;
  2900. }
  2901. if (locale.indexOf('-hant') > -1) {
  2902. return LOCALE_ZH_HANT;
  2903. }
  2904. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2905. return LOCALE_ZH_HANT;
  2906. }
  2907. return LOCALE_ZH_HANS;
  2908. }
  2909. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2910. if (messages && Object.keys(messages).length > 0) {
  2911. locales = Object.keys(messages);
  2912. }
  2913. var lang = startsWith(locale, locales);
  2914. if (lang) {
  2915. return lang;
  2916. }
  2917. }
  2918. var I18n = /*#__PURE__*/function () {
  2919. function I18n(_ref3) {
  2920. var locale = _ref3.locale,
  2921. fallbackLocale = _ref3.fallbackLocale,
  2922. messages = _ref3.messages,
  2923. watcher = _ref3.watcher,
  2924. formater = _ref3.formater;
  2925. (0, _classCallCheck2.default)(this, I18n);
  2926. this.locale = LOCALE_EN;
  2927. this.fallbackLocale = LOCALE_EN;
  2928. this.message = {};
  2929. this.messages = {};
  2930. this.watchers = [];
  2931. if (fallbackLocale) {
  2932. this.fallbackLocale = fallbackLocale;
  2933. }
  2934. this.formater = formater || defaultFormatter;
  2935. this.messages = messages || {};
  2936. this.setLocale(locale || LOCALE_EN);
  2937. if (watcher) {
  2938. this.watchLocale(watcher);
  2939. }
  2940. }
  2941. (0, _createClass2.default)(I18n, [{
  2942. key: "setLocale",
  2943. value: function setLocale(locale) {
  2944. var _this = this;
  2945. var oldLocale = this.locale;
  2946. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2947. if (!this.messages[this.locale]) {
  2948. // 可能初始化时不存在
  2949. this.messages[this.locale] = {};
  2950. }
  2951. this.message = this.messages[this.locale];
  2952. // 仅发生变化时,通知
  2953. if (oldLocale !== this.locale) {
  2954. this.watchers.forEach(function (watcher) {
  2955. watcher(_this.locale, oldLocale);
  2956. });
  2957. }
  2958. }
  2959. }, {
  2960. key: "getLocale",
  2961. value: function getLocale() {
  2962. return this.locale;
  2963. }
  2964. }, {
  2965. key: "watchLocale",
  2966. value: function watchLocale(fn) {
  2967. var _this2 = this;
  2968. var index = this.watchers.push(fn) - 1;
  2969. return function () {
  2970. _this2.watchers.splice(index, 1);
  2971. };
  2972. }
  2973. }, {
  2974. key: "add",
  2975. value: function add(locale, message) {
  2976. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2977. var curMessages = this.messages[locale];
  2978. if (curMessages) {
  2979. if (override) {
  2980. Object.assign(curMessages, message);
  2981. } else {
  2982. Object.keys(message).forEach(function (key) {
  2983. if (!hasOwn(curMessages, key)) {
  2984. curMessages[key] = message[key];
  2985. }
  2986. });
  2987. }
  2988. } else {
  2989. this.messages[locale] = message;
  2990. }
  2991. }
  2992. }, {
  2993. key: "f",
  2994. value: function f(message, values, delimiters) {
  2995. return this.formater.interpolate(message, values, delimiters).join('');
  2996. }
  2997. }, {
  2998. key: "t",
  2999. value: function t(key, locale, values) {
  3000. var message = this.message;
  3001. if (typeof locale === 'string') {
  3002. locale = normalizeLocale(locale, this.messages);
  3003. locale && (message = this.messages[locale]);
  3004. } else {
  3005. values = locale;
  3006. }
  3007. if (!hasOwn(message, key)) {
  3008. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3009. return key;
  3010. }
  3011. return this.formater.interpolate(message[key], values).join('');
  3012. }
  3013. }]);
  3014. return I18n;
  3015. }();
  3016. exports.I18n = I18n;
  3017. function watchAppLocale(appVm, i18n) {
  3018. // 需要保证 watch 的触发在组件渲染之前
  3019. if (appVm.$watchLocale) {
  3020. // vue2
  3021. appVm.$watchLocale(function (newLocale) {
  3022. i18n.setLocale(newLocale);
  3023. });
  3024. } else {
  3025. appVm.$watch(function () {
  3026. return appVm.$locale;
  3027. }, function (newLocale) {
  3028. i18n.setLocale(newLocale);
  3029. });
  3030. }
  3031. }
  3032. function getDefaultLocale() {
  3033. if (typeof uni !== 'undefined' && uni.getLocale) {
  3034. return uni.getLocale();
  3035. }
  3036. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3037. if (typeof global !== 'undefined' && global.getLocale) {
  3038. return global.getLocale();
  3039. }
  3040. return LOCALE_EN;
  3041. }
  3042. function initVueI18n(locale) {
  3043. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3044. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3045. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3046. // 兼容旧版本入参
  3047. if (typeof locale !== 'string') {
  3048. var _ref4 = [messages, locale];
  3049. locale = _ref4[0];
  3050. messages = _ref4[1];
  3051. }
  3052. if (typeof locale !== 'string') {
  3053. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3054. locale = getDefaultLocale();
  3055. }
  3056. if (typeof fallbackLocale !== 'string') {
  3057. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3058. }
  3059. var i18n = new I18n({
  3060. locale: locale,
  3061. fallbackLocale: fallbackLocale,
  3062. messages: messages,
  3063. watcher: watcher
  3064. });
  3065. var _t = function t(key, values) {
  3066. if (typeof getApp !== 'function') {
  3067. // app view
  3068. /* eslint-disable no-func-assign */
  3069. _t = function t(key, values) {
  3070. return i18n.t(key, values);
  3071. };
  3072. } else {
  3073. var isWatchedAppLocale = false;
  3074. _t = function t(key, values) {
  3075. var appVm = getApp().$vm;
  3076. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3077. // options: {
  3078. // type: Array,
  3079. // default () {
  3080. // return [{
  3081. // icon: 'shop',
  3082. // text: t("uni-goods-nav.options.shop"),
  3083. // }, {
  3084. // icon: 'cart',
  3085. // text: t("uni-goods-nav.options.cart")
  3086. // }]
  3087. // }
  3088. // },
  3089. if (appVm) {
  3090. // 触发响应式
  3091. appVm.$locale;
  3092. if (!isWatchedAppLocale) {
  3093. isWatchedAppLocale = true;
  3094. watchAppLocale(appVm, i18n);
  3095. }
  3096. }
  3097. return i18n.t(key, values);
  3098. };
  3099. }
  3100. return _t(key, values);
  3101. };
  3102. return {
  3103. i18n: i18n,
  3104. f: function f(message, values, delimiters) {
  3105. return i18n.f(message, values, delimiters);
  3106. },
  3107. t: function t(key, values) {
  3108. return _t(key, values);
  3109. },
  3110. add: function add(locale, message) {
  3111. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3112. return i18n.add(locale, message, override);
  3113. },
  3114. watch: function watch(fn) {
  3115. return i18n.watchLocale(fn);
  3116. },
  3117. getLocale: function getLocale() {
  3118. return i18n.getLocale();
  3119. },
  3120. setLocale: function setLocale(newLocale) {
  3121. return i18n.setLocale(newLocale);
  3122. }
  3123. };
  3124. }
  3125. var isString = function isString(val) {
  3126. return typeof val === 'string';
  3127. };
  3128. exports.isString = isString;
  3129. var formater;
  3130. function hasI18nJson(jsonObj, delimiters) {
  3131. if (!formater) {
  3132. formater = new BaseFormatter();
  3133. }
  3134. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3135. var value = jsonObj[key];
  3136. if (isString(value)) {
  3137. if (isI18nStr(value, delimiters)) {
  3138. return true;
  3139. }
  3140. } else {
  3141. return hasI18nJson(value, delimiters);
  3142. }
  3143. });
  3144. }
  3145. function parseI18nJson(jsonObj, values, delimiters) {
  3146. if (!formater) {
  3147. formater = new BaseFormatter();
  3148. }
  3149. walkJsonObj(jsonObj, function (jsonObj, key) {
  3150. var value = jsonObj[key];
  3151. if (isString(value)) {
  3152. if (isI18nStr(value, delimiters)) {
  3153. jsonObj[key] = compileStr(value, values, delimiters);
  3154. }
  3155. } else {
  3156. parseI18nJson(value, values, delimiters);
  3157. }
  3158. });
  3159. return jsonObj;
  3160. }
  3161. function compileI18nJsonStr(jsonStr, _ref5) {
  3162. var locale = _ref5.locale,
  3163. locales = _ref5.locales,
  3164. delimiters = _ref5.delimiters;
  3165. if (!isI18nStr(jsonStr, delimiters)) {
  3166. return jsonStr;
  3167. }
  3168. if (!formater) {
  3169. formater = new BaseFormatter();
  3170. }
  3171. var localeValues = [];
  3172. Object.keys(locales).forEach(function (name) {
  3173. if (name !== locale) {
  3174. localeValues.push({
  3175. locale: name,
  3176. values: locales[name]
  3177. });
  3178. }
  3179. });
  3180. localeValues.unshift({
  3181. locale: locale,
  3182. values: locales[locale]
  3183. });
  3184. try {
  3185. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3186. } catch (e) {}
  3187. return jsonStr;
  3188. }
  3189. function isI18nStr(value, delimiters) {
  3190. return value.indexOf(delimiters[0]) > -1;
  3191. }
  3192. function compileStr(value, values, delimiters) {
  3193. return formater.interpolate(value, values, delimiters).join('');
  3194. }
  3195. function compileValue(jsonObj, key, localeValues, delimiters) {
  3196. var value = jsonObj[key];
  3197. if (isString(value)) {
  3198. // 存在国际化
  3199. if (isI18nStr(value, delimiters)) {
  3200. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3201. if (localeValues.length > 1) {
  3202. // 格式化国际化语言
  3203. var valueLocales = jsonObj[key + 'Locales'] = {};
  3204. localeValues.forEach(function (localValue) {
  3205. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3206. });
  3207. }
  3208. }
  3209. } else {
  3210. compileJsonObj(value, localeValues, delimiters);
  3211. }
  3212. }
  3213. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3214. walkJsonObj(jsonObj, function (jsonObj, key) {
  3215. compileValue(jsonObj, key, localeValues, delimiters);
  3216. });
  3217. return jsonObj;
  3218. }
  3219. function walkJsonObj(jsonObj, walk) {
  3220. if (Array.isArray(jsonObj)) {
  3221. for (var i = 0; i < jsonObj.length; i++) {
  3222. if (walk(jsonObj, i)) {
  3223. return true;
  3224. }
  3225. }
  3226. } else if (isObject(jsonObj)) {
  3227. for (var key in jsonObj) {
  3228. if (walk(jsonObj, key)) {
  3229. return true;
  3230. }
  3231. }
  3232. }
  3233. return false;
  3234. }
  3235. function resolveLocale(locales) {
  3236. return function (locale) {
  3237. if (!locale) {
  3238. return locale;
  3239. }
  3240. locale = normalizeLocale(locale) || locale;
  3241. return resolveLocaleChain(locale).find(function (locale) {
  3242. return locales.indexOf(locale) > -1;
  3243. });
  3244. };
  3245. }
  3246. function resolveLocaleChain(locale) {
  3247. var chain = [];
  3248. var tokens = locale.split('-');
  3249. while (tokens.length) {
  3250. chain.push(tokens.join('-'));
  3251. tokens.pop();
  3252. }
  3253. return chain;
  3254. }
  3255. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3256. /***/ }),
  3257. /* 23 */
  3258. /*!***************************************************************!*\
  3259. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3260. \***************************************************************/
  3261. /*! no static exports found */
  3262. /***/ (function(module, exports) {
  3263. function _classCallCheck(instance, Constructor) {
  3264. if (!(instance instanceof Constructor)) {
  3265. throw new TypeError("Cannot call a class as a function");
  3266. }
  3267. }
  3268. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3269. /***/ }),
  3270. /* 24 */
  3271. /*!************************************************************!*\
  3272. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3273. \************************************************************/
  3274. /*! no static exports found */
  3275. /***/ (function(module, exports, __webpack_require__) {
  3276. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3277. function _defineProperties(target, props) {
  3278. for (var i = 0; i < props.length; i++) {
  3279. var descriptor = props[i];
  3280. descriptor.enumerable = descriptor.enumerable || false;
  3281. descriptor.configurable = true;
  3282. if ("value" in descriptor) descriptor.writable = true;
  3283. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3284. }
  3285. }
  3286. function _createClass(Constructor, protoProps, staticProps) {
  3287. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3288. if (staticProps) _defineProperties(Constructor, staticProps);
  3289. Object.defineProperty(Constructor, "prototype", {
  3290. writable: false
  3291. });
  3292. return Constructor;
  3293. }
  3294. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3295. /***/ }),
  3296. /* 25 */
  3297. /*!******************************************************************************************!*\
  3298. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3299. \******************************************************************************************/
  3300. /*! exports provided: default */
  3301. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3302. "use strict";
  3303. __webpack_require__.r(__webpack_exports__);
  3304. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3305. * Vue.js v2.6.11
  3306. * (c) 2014-2023 Evan You
  3307. * Released under the MIT License.
  3308. */
  3309. /* */
  3310. var emptyObject = Object.freeze({});
  3311. // These helpers produce better VM code in JS engines due to their
  3312. // explicitness and function inlining.
  3313. function isUndef (v) {
  3314. return v === undefined || v === null
  3315. }
  3316. function isDef (v) {
  3317. return v !== undefined && v !== null
  3318. }
  3319. function isTrue (v) {
  3320. return v === true
  3321. }
  3322. function isFalse (v) {
  3323. return v === false
  3324. }
  3325. /**
  3326. * Check if value is primitive.
  3327. */
  3328. function isPrimitive (value) {
  3329. return (
  3330. typeof value === 'string' ||
  3331. typeof value === 'number' ||
  3332. // $flow-disable-line
  3333. typeof value === 'symbol' ||
  3334. typeof value === 'boolean'
  3335. )
  3336. }
  3337. /**
  3338. * Quick object check - this is primarily used to tell
  3339. * Objects from primitive values when we know the value
  3340. * is a JSON-compliant type.
  3341. */
  3342. function isObject (obj) {
  3343. return obj !== null && typeof obj === 'object'
  3344. }
  3345. /**
  3346. * Get the raw type string of a value, e.g., [object Object].
  3347. */
  3348. var _toString = Object.prototype.toString;
  3349. function toRawType (value) {
  3350. return _toString.call(value).slice(8, -1)
  3351. }
  3352. /**
  3353. * Strict object type check. Only returns true
  3354. * for plain JavaScript objects.
  3355. */
  3356. function isPlainObject (obj) {
  3357. return _toString.call(obj) === '[object Object]'
  3358. }
  3359. function isRegExp (v) {
  3360. return _toString.call(v) === '[object RegExp]'
  3361. }
  3362. /**
  3363. * Check if val is a valid array index.
  3364. */
  3365. function isValidArrayIndex (val) {
  3366. var n = parseFloat(String(val));
  3367. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3368. }
  3369. function isPromise (val) {
  3370. return (
  3371. isDef(val) &&
  3372. typeof val.then === 'function' &&
  3373. typeof val.catch === 'function'
  3374. )
  3375. }
  3376. /**
  3377. * Convert a value to a string that is actually rendered.
  3378. */
  3379. function toString (val) {
  3380. return val == null
  3381. ? ''
  3382. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3383. ? JSON.stringify(val, null, 2)
  3384. : String(val)
  3385. }
  3386. /**
  3387. * Convert an input value to a number for persistence.
  3388. * If the conversion fails, return original string.
  3389. */
  3390. function toNumber (val) {
  3391. var n = parseFloat(val);
  3392. return isNaN(n) ? val : n
  3393. }
  3394. /**
  3395. * Make a map and return a function for checking if a key
  3396. * is in that map.
  3397. */
  3398. function makeMap (
  3399. str,
  3400. expectsLowerCase
  3401. ) {
  3402. var map = Object.create(null);
  3403. var list = str.split(',');
  3404. for (var i = 0; i < list.length; i++) {
  3405. map[list[i]] = true;
  3406. }
  3407. return expectsLowerCase
  3408. ? function (val) { return map[val.toLowerCase()]; }
  3409. : function (val) { return map[val]; }
  3410. }
  3411. /**
  3412. * Check if a tag is a built-in tag.
  3413. */
  3414. var isBuiltInTag = makeMap('slot,component', true);
  3415. /**
  3416. * Check if an attribute is a reserved attribute.
  3417. */
  3418. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3419. /**
  3420. * Remove an item from an array.
  3421. */
  3422. function remove (arr, item) {
  3423. if (arr.length) {
  3424. var index = arr.indexOf(item);
  3425. if (index > -1) {
  3426. return arr.splice(index, 1)
  3427. }
  3428. }
  3429. }
  3430. /**
  3431. * Check whether an object has the property.
  3432. */
  3433. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3434. function hasOwn (obj, key) {
  3435. return hasOwnProperty.call(obj, key)
  3436. }
  3437. /**
  3438. * Create a cached version of a pure function.
  3439. */
  3440. function cached (fn) {
  3441. var cache = Object.create(null);
  3442. return (function cachedFn (str) {
  3443. var hit = cache[str];
  3444. return hit || (cache[str] = fn(str))
  3445. })
  3446. }
  3447. /**
  3448. * Camelize a hyphen-delimited string.
  3449. */
  3450. var camelizeRE = /-(\w)/g;
  3451. var camelize = cached(function (str) {
  3452. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3453. });
  3454. /**
  3455. * Capitalize a string.
  3456. */
  3457. var capitalize = cached(function (str) {
  3458. return str.charAt(0).toUpperCase() + str.slice(1)
  3459. });
  3460. /**
  3461. * Hyphenate a camelCase string.
  3462. */
  3463. var hyphenateRE = /\B([A-Z])/g;
  3464. var hyphenate = cached(function (str) {
  3465. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3466. });
  3467. /**
  3468. * Simple bind polyfill for environments that do not support it,
  3469. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3470. * since native bind is now performant enough in most browsers.
  3471. * But removing it would mean breaking code that was able to run in
  3472. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3473. */
  3474. /* istanbul ignore next */
  3475. function polyfillBind (fn, ctx) {
  3476. function boundFn (a) {
  3477. var l = arguments.length;
  3478. return l
  3479. ? l > 1
  3480. ? fn.apply(ctx, arguments)
  3481. : fn.call(ctx, a)
  3482. : fn.call(ctx)
  3483. }
  3484. boundFn._length = fn.length;
  3485. return boundFn
  3486. }
  3487. function nativeBind (fn, ctx) {
  3488. return fn.bind(ctx)
  3489. }
  3490. var bind = Function.prototype.bind
  3491. ? nativeBind
  3492. : polyfillBind;
  3493. /**
  3494. * Convert an Array-like object to a real Array.
  3495. */
  3496. function toArray (list, start) {
  3497. start = start || 0;
  3498. var i = list.length - start;
  3499. var ret = new Array(i);
  3500. while (i--) {
  3501. ret[i] = list[i + start];
  3502. }
  3503. return ret
  3504. }
  3505. /**
  3506. * Mix properties into target object.
  3507. */
  3508. function extend (to, _from) {
  3509. for (var key in _from) {
  3510. to[key] = _from[key];
  3511. }
  3512. return to
  3513. }
  3514. /**
  3515. * Merge an Array of Objects into a single Object.
  3516. */
  3517. function toObject (arr) {
  3518. var res = {};
  3519. for (var i = 0; i < arr.length; i++) {
  3520. if (arr[i]) {
  3521. extend(res, arr[i]);
  3522. }
  3523. }
  3524. return res
  3525. }
  3526. /* eslint-disable no-unused-vars */
  3527. /**
  3528. * Perform no operation.
  3529. * Stubbing args to make Flow happy without leaving useless transpiled code
  3530. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3531. */
  3532. function noop (a, b, c) {}
  3533. /**
  3534. * Always return false.
  3535. */
  3536. var no = function (a, b, c) { return false; };
  3537. /* eslint-enable no-unused-vars */
  3538. /**
  3539. * Return the same value.
  3540. */
  3541. var identity = function (_) { return _; };
  3542. /**
  3543. * Check if two values are loosely equal - that is,
  3544. * if they are plain objects, do they have the same shape?
  3545. */
  3546. function looseEqual (a, b) {
  3547. if (a === b) { return true }
  3548. var isObjectA = isObject(a);
  3549. var isObjectB = isObject(b);
  3550. if (isObjectA && isObjectB) {
  3551. try {
  3552. var isArrayA = Array.isArray(a);
  3553. var isArrayB = Array.isArray(b);
  3554. if (isArrayA && isArrayB) {
  3555. return a.length === b.length && a.every(function (e, i) {
  3556. return looseEqual(e, b[i])
  3557. })
  3558. } else if (a instanceof Date && b instanceof Date) {
  3559. return a.getTime() === b.getTime()
  3560. } else if (!isArrayA && !isArrayB) {
  3561. var keysA = Object.keys(a);
  3562. var keysB = Object.keys(b);
  3563. return keysA.length === keysB.length && keysA.every(function (key) {
  3564. return looseEqual(a[key], b[key])
  3565. })
  3566. } else {
  3567. /* istanbul ignore next */
  3568. return false
  3569. }
  3570. } catch (e) {
  3571. /* istanbul ignore next */
  3572. return false
  3573. }
  3574. } else if (!isObjectA && !isObjectB) {
  3575. return String(a) === String(b)
  3576. } else {
  3577. return false
  3578. }
  3579. }
  3580. /**
  3581. * Return the first index at which a loosely equal value can be
  3582. * found in the array (if value is a plain object, the array must
  3583. * contain an object of the same shape), or -1 if it is not present.
  3584. */
  3585. function looseIndexOf (arr, val) {
  3586. for (var i = 0; i < arr.length; i++) {
  3587. if (looseEqual(arr[i], val)) { return i }
  3588. }
  3589. return -1
  3590. }
  3591. /**
  3592. * Ensure a function is called only once.
  3593. */
  3594. function once (fn) {
  3595. var called = false;
  3596. return function () {
  3597. if (!called) {
  3598. called = true;
  3599. fn.apply(this, arguments);
  3600. }
  3601. }
  3602. }
  3603. var ASSET_TYPES = [
  3604. 'component',
  3605. 'directive',
  3606. 'filter'
  3607. ];
  3608. var LIFECYCLE_HOOKS = [
  3609. 'beforeCreate',
  3610. 'created',
  3611. 'beforeMount',
  3612. 'mounted',
  3613. 'beforeUpdate',
  3614. 'updated',
  3615. 'beforeDestroy',
  3616. 'destroyed',
  3617. 'activated',
  3618. 'deactivated',
  3619. 'errorCaptured',
  3620. 'serverPrefetch'
  3621. ];
  3622. /* */
  3623. var config = ({
  3624. /**
  3625. * Option merge strategies (used in core/util/options)
  3626. */
  3627. // $flow-disable-line
  3628. optionMergeStrategies: Object.create(null),
  3629. /**
  3630. * Whether to suppress warnings.
  3631. */
  3632. silent: false,
  3633. /**
  3634. * Show production mode tip message on boot?
  3635. */
  3636. productionTip: "development" !== 'production',
  3637. /**
  3638. * Whether to enable devtools
  3639. */
  3640. devtools: "development" !== 'production',
  3641. /**
  3642. * Whether to record perf
  3643. */
  3644. performance: false,
  3645. /**
  3646. * Error handler for watcher errors
  3647. */
  3648. errorHandler: null,
  3649. /**
  3650. * Warn handler for watcher warns
  3651. */
  3652. warnHandler: null,
  3653. /**
  3654. * Ignore certain custom elements
  3655. */
  3656. ignoredElements: [],
  3657. /**
  3658. * Custom user key aliases for v-on
  3659. */
  3660. // $flow-disable-line
  3661. keyCodes: Object.create(null),
  3662. /**
  3663. * Check if a tag is reserved so that it cannot be registered as a
  3664. * component. This is platform-dependent and may be overwritten.
  3665. */
  3666. isReservedTag: no,
  3667. /**
  3668. * Check if an attribute is reserved so that it cannot be used as a component
  3669. * prop. This is platform-dependent and may be overwritten.
  3670. */
  3671. isReservedAttr: no,
  3672. /**
  3673. * Check if a tag is an unknown element.
  3674. * Platform-dependent.
  3675. */
  3676. isUnknownElement: no,
  3677. /**
  3678. * Get the namespace of an element
  3679. */
  3680. getTagNamespace: noop,
  3681. /**
  3682. * Parse the real tag name for the specific platform.
  3683. */
  3684. parsePlatformTagName: identity,
  3685. /**
  3686. * Check if an attribute must be bound using property, e.g. value
  3687. * Platform-dependent.
  3688. */
  3689. mustUseProp: no,
  3690. /**
  3691. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3692. * This will significantly reduce performance if set to false.
  3693. */
  3694. async: true,
  3695. /**
  3696. * Exposed for legacy reasons
  3697. */
  3698. _lifecycleHooks: LIFECYCLE_HOOKS
  3699. });
  3700. /* */
  3701. /**
  3702. * unicode letters used for parsing html tags, component names and property paths.
  3703. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3704. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3705. */
  3706. 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/;
  3707. /**
  3708. * Check if a string starts with $ or _
  3709. */
  3710. function isReserved (str) {
  3711. var c = (str + '').charCodeAt(0);
  3712. return c === 0x24 || c === 0x5F
  3713. }
  3714. /**
  3715. * Define a property.
  3716. */
  3717. function def (obj, key, val, enumerable) {
  3718. Object.defineProperty(obj, key, {
  3719. value: val,
  3720. enumerable: !!enumerable,
  3721. writable: true,
  3722. configurable: true
  3723. });
  3724. }
  3725. /**
  3726. * Parse simple path.
  3727. */
  3728. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3729. function parsePath (path) {
  3730. if (bailRE.test(path)) {
  3731. return
  3732. }
  3733. var segments = path.split('.');
  3734. return function (obj) {
  3735. for (var i = 0; i < segments.length; i++) {
  3736. if (!obj) { return }
  3737. obj = obj[segments[i]];
  3738. }
  3739. return obj
  3740. }
  3741. }
  3742. /* */
  3743. // can we use __proto__?
  3744. var hasProto = '__proto__' in {};
  3745. // Browser environment sniffing
  3746. var inBrowser = typeof window !== 'undefined';
  3747. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3748. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3749. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3750. var isIE = UA && /msie|trident/.test(UA);
  3751. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3752. var isEdge = UA && UA.indexOf('edge/') > 0;
  3753. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3754. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3755. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3756. var isPhantomJS = UA && /phantomjs/.test(UA);
  3757. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3758. // Firefox has a "watch" function on Object.prototype...
  3759. var nativeWatch = ({}).watch;
  3760. if (inBrowser) {
  3761. try {
  3762. var opts = {};
  3763. Object.defineProperty(opts, 'passive', ({
  3764. get: function get () {
  3765. }
  3766. })); // https://github.com/facebook/flow/issues/285
  3767. window.addEventListener('test-passive', null, opts);
  3768. } catch (e) {}
  3769. }
  3770. // this needs to be lazy-evaled because vue may be required before
  3771. // vue-server-renderer can set VUE_ENV
  3772. var _isServer;
  3773. var isServerRendering = function () {
  3774. if (_isServer === undefined) {
  3775. /* istanbul ignore if */
  3776. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3777. // detect presence of vue-server-renderer and avoid
  3778. // Webpack shimming the process
  3779. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3780. } else {
  3781. _isServer = false;
  3782. }
  3783. }
  3784. return _isServer
  3785. };
  3786. // detect devtools
  3787. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3788. /* istanbul ignore next */
  3789. function isNative (Ctor) {
  3790. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3791. }
  3792. var hasSymbol =
  3793. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3794. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3795. var _Set;
  3796. /* istanbul ignore if */ // $flow-disable-line
  3797. if (typeof Set !== 'undefined' && isNative(Set)) {
  3798. // use native Set when available.
  3799. _Set = Set;
  3800. } else {
  3801. // a non-standard Set polyfill that only works with primitive keys.
  3802. _Set = /*@__PURE__*/(function () {
  3803. function Set () {
  3804. this.set = Object.create(null);
  3805. }
  3806. Set.prototype.has = function has (key) {
  3807. return this.set[key] === true
  3808. };
  3809. Set.prototype.add = function add (key) {
  3810. this.set[key] = true;
  3811. };
  3812. Set.prototype.clear = function clear () {
  3813. this.set = Object.create(null);
  3814. };
  3815. return Set;
  3816. }());
  3817. }
  3818. /* */
  3819. var warn = noop;
  3820. var tip = noop;
  3821. var generateComponentTrace = (noop); // work around flow check
  3822. var formatComponentName = (noop);
  3823. if (true) {
  3824. var hasConsole = typeof console !== 'undefined';
  3825. var classifyRE = /(?:^|[-_])(\w)/g;
  3826. var classify = function (str) { return str
  3827. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3828. .replace(/[-_]/g, ''); };
  3829. warn = function (msg, vm) {
  3830. var trace = vm ? generateComponentTrace(vm) : '';
  3831. if (config.warnHandler) {
  3832. config.warnHandler.call(null, msg, vm, trace);
  3833. } else if (hasConsole && (!config.silent)) {
  3834. console.error(("[Vue warn]: " + msg + trace));
  3835. }
  3836. };
  3837. tip = function (msg, vm) {
  3838. if (hasConsole && (!config.silent)) {
  3839. console.warn("[Vue tip]: " + msg + (
  3840. vm ? generateComponentTrace(vm) : ''
  3841. ));
  3842. }
  3843. };
  3844. formatComponentName = function (vm, includeFile) {
  3845. if (vm.$root === vm) {
  3846. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3847. return ('') + vm.$options.__file
  3848. }
  3849. return '<Root>'
  3850. }
  3851. var options = typeof vm === 'function' && vm.cid != null
  3852. ? vm.options
  3853. : vm._isVue
  3854. ? vm.$options || vm.constructor.options
  3855. : vm;
  3856. var name = options.name || options._componentTag;
  3857. var file = options.__file;
  3858. if (!name && file) {
  3859. var match = file.match(/([^/\\]+)\.vue$/);
  3860. name = match && match[1];
  3861. }
  3862. return (
  3863. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3864. (file && includeFile !== false ? (" at " + file) : '')
  3865. )
  3866. };
  3867. var repeat = function (str, n) {
  3868. var res = '';
  3869. while (n) {
  3870. if (n % 2 === 1) { res += str; }
  3871. if (n > 1) { str += str; }
  3872. n >>= 1;
  3873. }
  3874. return res
  3875. };
  3876. generateComponentTrace = function (vm) {
  3877. if (vm._isVue && vm.$parent) {
  3878. var tree = [];
  3879. var currentRecursiveSequence = 0;
  3880. while (vm && vm.$options.name !== 'PageBody') {
  3881. if (tree.length > 0) {
  3882. var last = tree[tree.length - 1];
  3883. if (last.constructor === vm.constructor) {
  3884. currentRecursiveSequence++;
  3885. vm = vm.$parent;
  3886. continue
  3887. } else if (currentRecursiveSequence > 0) {
  3888. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3889. currentRecursiveSequence = 0;
  3890. }
  3891. }
  3892. !vm.$options.isReserved && tree.push(vm);
  3893. vm = vm.$parent;
  3894. }
  3895. return '\n\nfound in\n\n' + tree
  3896. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3897. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3898. : formatComponentName(vm))); })
  3899. .join('\n')
  3900. } else {
  3901. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3902. }
  3903. };
  3904. }
  3905. /* */
  3906. var uid = 0;
  3907. /**
  3908. * A dep is an observable that can have multiple
  3909. * directives subscribing to it.
  3910. */
  3911. var Dep = function Dep () {
  3912. this.id = uid++;
  3913. this.subs = [];
  3914. };
  3915. Dep.prototype.addSub = function addSub (sub) {
  3916. this.subs.push(sub);
  3917. };
  3918. Dep.prototype.removeSub = function removeSub (sub) {
  3919. remove(this.subs, sub);
  3920. };
  3921. Dep.prototype.depend = function depend () {
  3922. if (Dep.SharedObject.target) {
  3923. Dep.SharedObject.target.addDep(this);
  3924. }
  3925. };
  3926. Dep.prototype.notify = function notify () {
  3927. // stabilize the subscriber list first
  3928. var subs = this.subs.slice();
  3929. if ( true && !config.async) {
  3930. // subs aren't sorted in scheduler if not running async
  3931. // we need to sort them now to make sure they fire in correct
  3932. // order
  3933. subs.sort(function (a, b) { return a.id - b.id; });
  3934. }
  3935. for (var i = 0, l = subs.length; i < l; i++) {
  3936. subs[i].update();
  3937. }
  3938. };
  3939. // The current target watcher being evaluated.
  3940. // This is globally unique because only one watcher
  3941. // can be evaluated at a time.
  3942. // fixed by xxxxxx (nvue shared vuex)
  3943. /* eslint-disable no-undef */
  3944. Dep.SharedObject = {};
  3945. Dep.SharedObject.target = null;
  3946. Dep.SharedObject.targetStack = [];
  3947. function pushTarget (target) {
  3948. Dep.SharedObject.targetStack.push(target);
  3949. Dep.SharedObject.target = target;
  3950. Dep.target = target;
  3951. }
  3952. function popTarget () {
  3953. Dep.SharedObject.targetStack.pop();
  3954. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3955. Dep.target = Dep.SharedObject.target;
  3956. }
  3957. /* */
  3958. var VNode = function VNode (
  3959. tag,
  3960. data,
  3961. children,
  3962. text,
  3963. elm,
  3964. context,
  3965. componentOptions,
  3966. asyncFactory
  3967. ) {
  3968. this.tag = tag;
  3969. this.data = data;
  3970. this.children = children;
  3971. this.text = text;
  3972. this.elm = elm;
  3973. this.ns = undefined;
  3974. this.context = context;
  3975. this.fnContext = undefined;
  3976. this.fnOptions = undefined;
  3977. this.fnScopeId = undefined;
  3978. this.key = data && data.key;
  3979. this.componentOptions = componentOptions;
  3980. this.componentInstance = undefined;
  3981. this.parent = undefined;
  3982. this.raw = false;
  3983. this.isStatic = false;
  3984. this.isRootInsert = true;
  3985. this.isComment = false;
  3986. this.isCloned = false;
  3987. this.isOnce = false;
  3988. this.asyncFactory = asyncFactory;
  3989. this.asyncMeta = undefined;
  3990. this.isAsyncPlaceholder = false;
  3991. };
  3992. var prototypeAccessors = { child: { configurable: true } };
  3993. // DEPRECATED: alias for componentInstance for backwards compat.
  3994. /* istanbul ignore next */
  3995. prototypeAccessors.child.get = function () {
  3996. return this.componentInstance
  3997. };
  3998. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3999. var createEmptyVNode = function (text) {
  4000. if ( text === void 0 ) text = '';
  4001. var node = new VNode();
  4002. node.text = text;
  4003. node.isComment = true;
  4004. return node
  4005. };
  4006. function createTextVNode (val) {
  4007. return new VNode(undefined, undefined, undefined, String(val))
  4008. }
  4009. // optimized shallow clone
  4010. // used for static nodes and slot nodes because they may be reused across
  4011. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4012. // on their elm reference.
  4013. function cloneVNode (vnode) {
  4014. var cloned = new VNode(
  4015. vnode.tag,
  4016. vnode.data,
  4017. // #7975
  4018. // clone children array to avoid mutating original in case of cloning
  4019. // a child.
  4020. vnode.children && vnode.children.slice(),
  4021. vnode.text,
  4022. vnode.elm,
  4023. vnode.context,
  4024. vnode.componentOptions,
  4025. vnode.asyncFactory
  4026. );
  4027. cloned.ns = vnode.ns;
  4028. cloned.isStatic = vnode.isStatic;
  4029. cloned.key = vnode.key;
  4030. cloned.isComment = vnode.isComment;
  4031. cloned.fnContext = vnode.fnContext;
  4032. cloned.fnOptions = vnode.fnOptions;
  4033. cloned.fnScopeId = vnode.fnScopeId;
  4034. cloned.asyncMeta = vnode.asyncMeta;
  4035. cloned.isCloned = true;
  4036. return cloned
  4037. }
  4038. /*
  4039. * not type checking this file because flow doesn't play well with
  4040. * dynamically accessing methods on Array prototype
  4041. */
  4042. var arrayProto = Array.prototype;
  4043. var arrayMethods = Object.create(arrayProto);
  4044. var methodsToPatch = [
  4045. 'push',
  4046. 'pop',
  4047. 'shift',
  4048. 'unshift',
  4049. 'splice',
  4050. 'sort',
  4051. 'reverse'
  4052. ];
  4053. /**
  4054. * Intercept mutating methods and emit events
  4055. */
  4056. methodsToPatch.forEach(function (method) {
  4057. // cache original method
  4058. var original = arrayProto[method];
  4059. def(arrayMethods, method, function mutator () {
  4060. var args = [], len = arguments.length;
  4061. while ( len-- ) args[ len ] = arguments[ len ];
  4062. var result = original.apply(this, args);
  4063. var ob = this.__ob__;
  4064. var inserted;
  4065. switch (method) {
  4066. case 'push':
  4067. case 'unshift':
  4068. inserted = args;
  4069. break
  4070. case 'splice':
  4071. inserted = args.slice(2);
  4072. break
  4073. }
  4074. if (inserted) { ob.observeArray(inserted); }
  4075. // notify change
  4076. ob.dep.notify();
  4077. return result
  4078. });
  4079. });
  4080. /* */
  4081. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4082. /**
  4083. * In some cases we may want to disable observation inside a component's
  4084. * update computation.
  4085. */
  4086. var shouldObserve = true;
  4087. function toggleObserving (value) {
  4088. shouldObserve = value;
  4089. }
  4090. /**
  4091. * Observer class that is attached to each observed
  4092. * object. Once attached, the observer converts the target
  4093. * object's property keys into getter/setters that
  4094. * collect dependencies and dispatch updates.
  4095. */
  4096. var Observer = function Observer (value) {
  4097. this.value = value;
  4098. this.dep = new Dep();
  4099. this.vmCount = 0;
  4100. def(value, '__ob__', this);
  4101. if (Array.isArray(value)) {
  4102. if (hasProto) {
  4103. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4104. if(value.push !== value.__proto__.push){
  4105. copyAugment(value, arrayMethods, arrayKeys);
  4106. } else {
  4107. protoAugment(value, arrayMethods);
  4108. }
  4109. }
  4110. } else {
  4111. copyAugment(value, arrayMethods, arrayKeys);
  4112. }
  4113. this.observeArray(value);
  4114. } else {
  4115. this.walk(value);
  4116. }
  4117. };
  4118. /**
  4119. * Walk through all properties and convert them into
  4120. * getter/setters. This method should only be called when
  4121. * value type is Object.
  4122. */
  4123. Observer.prototype.walk = function walk (obj) {
  4124. var keys = Object.keys(obj);
  4125. for (var i = 0; i < keys.length; i++) {
  4126. defineReactive$$1(obj, keys[i]);
  4127. }
  4128. };
  4129. /**
  4130. * Observe a list of Array items.
  4131. */
  4132. Observer.prototype.observeArray = function observeArray (items) {
  4133. for (var i = 0, l = items.length; i < l; i++) {
  4134. observe(items[i]);
  4135. }
  4136. };
  4137. // helpers
  4138. /**
  4139. * Augment a target Object or Array by intercepting
  4140. * the prototype chain using __proto__
  4141. */
  4142. function protoAugment (target, src) {
  4143. /* eslint-disable no-proto */
  4144. target.__proto__ = src;
  4145. /* eslint-enable no-proto */
  4146. }
  4147. /**
  4148. * Augment a target Object or Array by defining
  4149. * hidden properties.
  4150. */
  4151. /* istanbul ignore next */
  4152. function copyAugment (target, src, keys) {
  4153. for (var i = 0, l = keys.length; i < l; i++) {
  4154. var key = keys[i];
  4155. def(target, key, src[key]);
  4156. }
  4157. }
  4158. /**
  4159. * Attempt to create an observer instance for a value,
  4160. * returns the new observer if successfully observed,
  4161. * or the existing observer if the value already has one.
  4162. */
  4163. function observe (value, asRootData) {
  4164. if (!isObject(value) || value instanceof VNode) {
  4165. return
  4166. }
  4167. var ob;
  4168. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4169. ob = value.__ob__;
  4170. } else if (
  4171. shouldObserve &&
  4172. !isServerRendering() &&
  4173. (Array.isArray(value) || isPlainObject(value)) &&
  4174. Object.isExtensible(value) &&
  4175. !value._isVue &&
  4176. !value.__v_isMPComponent
  4177. ) {
  4178. ob = new Observer(value);
  4179. }
  4180. if (asRootData && ob) {
  4181. ob.vmCount++;
  4182. }
  4183. return ob
  4184. }
  4185. /**
  4186. * Define a reactive property on an Object.
  4187. */
  4188. function defineReactive$$1 (
  4189. obj,
  4190. key,
  4191. val,
  4192. customSetter,
  4193. shallow
  4194. ) {
  4195. var dep = new Dep();
  4196. var property = Object.getOwnPropertyDescriptor(obj, key);
  4197. if (property && property.configurable === false) {
  4198. return
  4199. }
  4200. // cater for pre-defined getter/setters
  4201. var getter = property && property.get;
  4202. var setter = property && property.set;
  4203. if ((!getter || setter) && arguments.length === 2) {
  4204. val = obj[key];
  4205. }
  4206. var childOb = !shallow && observe(val);
  4207. Object.defineProperty(obj, key, {
  4208. enumerable: true,
  4209. configurable: true,
  4210. get: function reactiveGetter () {
  4211. var value = getter ? getter.call(obj) : val;
  4212. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4213. dep.depend();
  4214. if (childOb) {
  4215. childOb.dep.depend();
  4216. if (Array.isArray(value)) {
  4217. dependArray(value);
  4218. }
  4219. }
  4220. }
  4221. return value
  4222. },
  4223. set: function reactiveSetter (newVal) {
  4224. var value = getter ? getter.call(obj) : val;
  4225. /* eslint-disable no-self-compare */
  4226. if (newVal === value || (newVal !== newVal && value !== value)) {
  4227. return
  4228. }
  4229. /* eslint-enable no-self-compare */
  4230. if ( true && customSetter) {
  4231. customSetter();
  4232. }
  4233. // #7981: for accessor properties without setter
  4234. if (getter && !setter) { return }
  4235. if (setter) {
  4236. setter.call(obj, newVal);
  4237. } else {
  4238. val = newVal;
  4239. }
  4240. childOb = !shallow && observe(newVal);
  4241. dep.notify();
  4242. }
  4243. });
  4244. }
  4245. /**
  4246. * Set a property on an object. Adds the new property and
  4247. * triggers change notification if the property doesn't
  4248. * already exist.
  4249. */
  4250. function set (target, key, val) {
  4251. if ( true &&
  4252. (isUndef(target) || isPrimitive(target))
  4253. ) {
  4254. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4255. }
  4256. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4257. target.length = Math.max(target.length, key);
  4258. target.splice(key, 1, val);
  4259. return val
  4260. }
  4261. if (key in target && !(key in Object.prototype)) {
  4262. target[key] = val;
  4263. return val
  4264. }
  4265. var ob = (target).__ob__;
  4266. if (target._isVue || (ob && ob.vmCount)) {
  4267. true && warn(
  4268. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4269. 'at runtime - declare it upfront in the data option.'
  4270. );
  4271. return val
  4272. }
  4273. if (!ob) {
  4274. target[key] = val;
  4275. return val
  4276. }
  4277. defineReactive$$1(ob.value, key, val);
  4278. ob.dep.notify();
  4279. return val
  4280. }
  4281. /**
  4282. * Delete a property and trigger change if necessary.
  4283. */
  4284. function del (target, key) {
  4285. if ( true &&
  4286. (isUndef(target) || isPrimitive(target))
  4287. ) {
  4288. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4289. }
  4290. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4291. target.splice(key, 1);
  4292. return
  4293. }
  4294. var ob = (target).__ob__;
  4295. if (target._isVue || (ob && ob.vmCount)) {
  4296. true && warn(
  4297. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4298. '- just set it to null.'
  4299. );
  4300. return
  4301. }
  4302. if (!hasOwn(target, key)) {
  4303. return
  4304. }
  4305. delete target[key];
  4306. if (!ob) {
  4307. return
  4308. }
  4309. ob.dep.notify();
  4310. }
  4311. /**
  4312. * Collect dependencies on array elements when the array is touched, since
  4313. * we cannot intercept array element access like property getters.
  4314. */
  4315. function dependArray (value) {
  4316. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4317. e = value[i];
  4318. e && e.__ob__ && e.__ob__.dep.depend();
  4319. if (Array.isArray(e)) {
  4320. dependArray(e);
  4321. }
  4322. }
  4323. }
  4324. /* */
  4325. /**
  4326. * Option overwriting strategies are functions that handle
  4327. * how to merge a parent option value and a child option
  4328. * value into the final value.
  4329. */
  4330. var strats = config.optionMergeStrategies;
  4331. /**
  4332. * Options with restrictions
  4333. */
  4334. if (true) {
  4335. strats.el = strats.propsData = function (parent, child, vm, key) {
  4336. if (!vm) {
  4337. warn(
  4338. "option \"" + key + "\" can only be used during instance " +
  4339. 'creation with the `new` keyword.'
  4340. );
  4341. }
  4342. return defaultStrat(parent, child)
  4343. };
  4344. }
  4345. /**
  4346. * Helper that recursively merges two data objects together.
  4347. */
  4348. function mergeData (to, from) {
  4349. if (!from) { return to }
  4350. var key, toVal, fromVal;
  4351. var keys = hasSymbol
  4352. ? Reflect.ownKeys(from)
  4353. : Object.keys(from);
  4354. for (var i = 0; i < keys.length; i++) {
  4355. key = keys[i];
  4356. // in case the object is already observed...
  4357. if (key === '__ob__') { continue }
  4358. toVal = to[key];
  4359. fromVal = from[key];
  4360. if (!hasOwn(to, key)) {
  4361. set(to, key, fromVal);
  4362. } else if (
  4363. toVal !== fromVal &&
  4364. isPlainObject(toVal) &&
  4365. isPlainObject(fromVal)
  4366. ) {
  4367. mergeData(toVal, fromVal);
  4368. }
  4369. }
  4370. return to
  4371. }
  4372. /**
  4373. * Data
  4374. */
  4375. function mergeDataOrFn (
  4376. parentVal,
  4377. childVal,
  4378. vm
  4379. ) {
  4380. if (!vm) {
  4381. // in a Vue.extend merge, both should be functions
  4382. if (!childVal) {
  4383. return parentVal
  4384. }
  4385. if (!parentVal) {
  4386. return childVal
  4387. }
  4388. // when parentVal & childVal are both present,
  4389. // we need to return a function that returns the
  4390. // merged result of both functions... no need to
  4391. // check if parentVal is a function here because
  4392. // it has to be a function to pass previous merges.
  4393. return function mergedDataFn () {
  4394. return mergeData(
  4395. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4396. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4397. )
  4398. }
  4399. } else {
  4400. return function mergedInstanceDataFn () {
  4401. // instance merge
  4402. var instanceData = typeof childVal === 'function'
  4403. ? childVal.call(vm, vm)
  4404. : childVal;
  4405. var defaultData = typeof parentVal === 'function'
  4406. ? parentVal.call(vm, vm)
  4407. : parentVal;
  4408. if (instanceData) {
  4409. return mergeData(instanceData, defaultData)
  4410. } else {
  4411. return defaultData
  4412. }
  4413. }
  4414. }
  4415. }
  4416. strats.data = function (
  4417. parentVal,
  4418. childVal,
  4419. vm
  4420. ) {
  4421. if (!vm) {
  4422. if (childVal && typeof childVal !== 'function') {
  4423. true && warn(
  4424. 'The "data" option should be a function ' +
  4425. 'that returns a per-instance value in component ' +
  4426. 'definitions.',
  4427. vm
  4428. );
  4429. return parentVal
  4430. }
  4431. return mergeDataOrFn(parentVal, childVal)
  4432. }
  4433. return mergeDataOrFn(parentVal, childVal, vm)
  4434. };
  4435. /**
  4436. * Hooks and props are merged as arrays.
  4437. */
  4438. function mergeHook (
  4439. parentVal,
  4440. childVal
  4441. ) {
  4442. var res = childVal
  4443. ? parentVal
  4444. ? parentVal.concat(childVal)
  4445. : Array.isArray(childVal)
  4446. ? childVal
  4447. : [childVal]
  4448. : parentVal;
  4449. return res
  4450. ? dedupeHooks(res)
  4451. : res
  4452. }
  4453. function dedupeHooks (hooks) {
  4454. var res = [];
  4455. for (var i = 0; i < hooks.length; i++) {
  4456. if (res.indexOf(hooks[i]) === -1) {
  4457. res.push(hooks[i]);
  4458. }
  4459. }
  4460. return res
  4461. }
  4462. LIFECYCLE_HOOKS.forEach(function (hook) {
  4463. strats[hook] = mergeHook;
  4464. });
  4465. /**
  4466. * Assets
  4467. *
  4468. * When a vm is present (instance creation), we need to do
  4469. * a three-way merge between constructor options, instance
  4470. * options and parent options.
  4471. */
  4472. function mergeAssets (
  4473. parentVal,
  4474. childVal,
  4475. vm,
  4476. key
  4477. ) {
  4478. var res = Object.create(parentVal || null);
  4479. if (childVal) {
  4480. true && assertObjectType(key, childVal, vm);
  4481. return extend(res, childVal)
  4482. } else {
  4483. return res
  4484. }
  4485. }
  4486. ASSET_TYPES.forEach(function (type) {
  4487. strats[type + 's'] = mergeAssets;
  4488. });
  4489. /**
  4490. * Watchers.
  4491. *
  4492. * Watchers hashes should not overwrite one
  4493. * another, so we merge them as arrays.
  4494. */
  4495. strats.watch = function (
  4496. parentVal,
  4497. childVal,
  4498. vm,
  4499. key
  4500. ) {
  4501. // work around Firefox's Object.prototype.watch...
  4502. if (parentVal === nativeWatch) { parentVal = undefined; }
  4503. if (childVal === nativeWatch) { childVal = undefined; }
  4504. /* istanbul ignore if */
  4505. if (!childVal) { return Object.create(parentVal || null) }
  4506. if (true) {
  4507. assertObjectType(key, childVal, vm);
  4508. }
  4509. if (!parentVal) { return childVal }
  4510. var ret = {};
  4511. extend(ret, parentVal);
  4512. for (var key$1 in childVal) {
  4513. var parent = ret[key$1];
  4514. var child = childVal[key$1];
  4515. if (parent && !Array.isArray(parent)) {
  4516. parent = [parent];
  4517. }
  4518. ret[key$1] = parent
  4519. ? parent.concat(child)
  4520. : Array.isArray(child) ? child : [child];
  4521. }
  4522. return ret
  4523. };
  4524. /**
  4525. * Other object hashes.
  4526. */
  4527. strats.props =
  4528. strats.methods =
  4529. strats.inject =
  4530. strats.computed = function (
  4531. parentVal,
  4532. childVal,
  4533. vm,
  4534. key
  4535. ) {
  4536. if (childVal && "development" !== 'production') {
  4537. assertObjectType(key, childVal, vm);
  4538. }
  4539. if (!parentVal) { return childVal }
  4540. var ret = Object.create(null);
  4541. extend(ret, parentVal);
  4542. if (childVal) { extend(ret, childVal); }
  4543. return ret
  4544. };
  4545. strats.provide = mergeDataOrFn;
  4546. /**
  4547. * Default strategy.
  4548. */
  4549. var defaultStrat = function (parentVal, childVal) {
  4550. return childVal === undefined
  4551. ? parentVal
  4552. : childVal
  4553. };
  4554. /**
  4555. * Validate component names
  4556. */
  4557. function checkComponents (options) {
  4558. for (var key in options.components) {
  4559. validateComponentName(key);
  4560. }
  4561. }
  4562. function validateComponentName (name) {
  4563. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4564. warn(
  4565. 'Invalid component name: "' + name + '". Component names ' +
  4566. 'should conform to valid custom element name in html5 specification.'
  4567. );
  4568. }
  4569. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4570. warn(
  4571. 'Do not use built-in or reserved HTML elements as component ' +
  4572. 'id: ' + name
  4573. );
  4574. }
  4575. }
  4576. /**
  4577. * Ensure all props option syntax are normalized into the
  4578. * Object-based format.
  4579. */
  4580. function normalizeProps (options, vm) {
  4581. var props = options.props;
  4582. if (!props) { return }
  4583. var res = {};
  4584. var i, val, name;
  4585. if (Array.isArray(props)) {
  4586. i = props.length;
  4587. while (i--) {
  4588. val = props[i];
  4589. if (typeof val === 'string') {
  4590. name = camelize(val);
  4591. res[name] = { type: null };
  4592. } else if (true) {
  4593. warn('props must be strings when using array syntax.');
  4594. }
  4595. }
  4596. } else if (isPlainObject(props)) {
  4597. for (var key in props) {
  4598. val = props[key];
  4599. name = camelize(key);
  4600. res[name] = isPlainObject(val)
  4601. ? val
  4602. : { type: val };
  4603. }
  4604. } else if (true) {
  4605. warn(
  4606. "Invalid value for option \"props\": expected an Array or an Object, " +
  4607. "but got " + (toRawType(props)) + ".",
  4608. vm
  4609. );
  4610. }
  4611. options.props = res;
  4612. }
  4613. /**
  4614. * Normalize all injections into Object-based format
  4615. */
  4616. function normalizeInject (options, vm) {
  4617. var inject = options.inject;
  4618. if (!inject) { return }
  4619. var normalized = options.inject = {};
  4620. if (Array.isArray(inject)) {
  4621. for (var i = 0; i < inject.length; i++) {
  4622. normalized[inject[i]] = { from: inject[i] };
  4623. }
  4624. } else if (isPlainObject(inject)) {
  4625. for (var key in inject) {
  4626. var val = inject[key];
  4627. normalized[key] = isPlainObject(val)
  4628. ? extend({ from: key }, val)
  4629. : { from: val };
  4630. }
  4631. } else if (true) {
  4632. warn(
  4633. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4634. "but got " + (toRawType(inject)) + ".",
  4635. vm
  4636. );
  4637. }
  4638. }
  4639. /**
  4640. * Normalize raw function directives into object format.
  4641. */
  4642. function normalizeDirectives (options) {
  4643. var dirs = options.directives;
  4644. if (dirs) {
  4645. for (var key in dirs) {
  4646. var def$$1 = dirs[key];
  4647. if (typeof def$$1 === 'function') {
  4648. dirs[key] = { bind: def$$1, update: def$$1 };
  4649. }
  4650. }
  4651. }
  4652. }
  4653. function assertObjectType (name, value, vm) {
  4654. if (!isPlainObject(value)) {
  4655. warn(
  4656. "Invalid value for option \"" + name + "\": expected an Object, " +
  4657. "but got " + (toRawType(value)) + ".",
  4658. vm
  4659. );
  4660. }
  4661. }
  4662. /**
  4663. * Merge two option objects into a new one.
  4664. * Core utility used in both instantiation and inheritance.
  4665. */
  4666. function mergeOptions (
  4667. parent,
  4668. child,
  4669. vm
  4670. ) {
  4671. if (true) {
  4672. checkComponents(child);
  4673. }
  4674. if (typeof child === 'function') {
  4675. child = child.options;
  4676. }
  4677. normalizeProps(child, vm);
  4678. normalizeInject(child, vm);
  4679. normalizeDirectives(child);
  4680. // Apply extends and mixins on the child options,
  4681. // but only if it is a raw options object that isn't
  4682. // the result of another mergeOptions call.
  4683. // Only merged options has the _base property.
  4684. if (!child._base) {
  4685. if (child.extends) {
  4686. parent = mergeOptions(parent, child.extends, vm);
  4687. }
  4688. if (child.mixins) {
  4689. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4690. parent = mergeOptions(parent, child.mixins[i], vm);
  4691. }
  4692. }
  4693. }
  4694. var options = {};
  4695. var key;
  4696. for (key in parent) {
  4697. mergeField(key);
  4698. }
  4699. for (key in child) {
  4700. if (!hasOwn(parent, key)) {
  4701. mergeField(key);
  4702. }
  4703. }
  4704. function mergeField (key) {
  4705. var strat = strats[key] || defaultStrat;
  4706. options[key] = strat(parent[key], child[key], vm, key);
  4707. }
  4708. return options
  4709. }
  4710. /**
  4711. * Resolve an asset.
  4712. * This function is used because child instances need access
  4713. * to assets defined in its ancestor chain.
  4714. */
  4715. function resolveAsset (
  4716. options,
  4717. type,
  4718. id,
  4719. warnMissing
  4720. ) {
  4721. /* istanbul ignore if */
  4722. if (typeof id !== 'string') {
  4723. return
  4724. }
  4725. var assets = options[type];
  4726. // check local registration variations first
  4727. if (hasOwn(assets, id)) { return assets[id] }
  4728. var camelizedId = camelize(id);
  4729. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4730. var PascalCaseId = capitalize(camelizedId);
  4731. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4732. // fallback to prototype chain
  4733. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4734. if ( true && warnMissing && !res) {
  4735. warn(
  4736. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4737. options
  4738. );
  4739. }
  4740. return res
  4741. }
  4742. /* */
  4743. function validateProp (
  4744. key,
  4745. propOptions,
  4746. propsData,
  4747. vm
  4748. ) {
  4749. var prop = propOptions[key];
  4750. var absent = !hasOwn(propsData, key);
  4751. var value = propsData[key];
  4752. // boolean casting
  4753. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4754. if (booleanIndex > -1) {
  4755. if (absent && !hasOwn(prop, 'default')) {
  4756. value = false;
  4757. } else if (value === '' || value === hyphenate(key)) {
  4758. // only cast empty string / same name to boolean if
  4759. // boolean has higher priority
  4760. var stringIndex = getTypeIndex(String, prop.type);
  4761. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4762. value = true;
  4763. }
  4764. }
  4765. }
  4766. // check default value
  4767. if (value === undefined) {
  4768. value = getPropDefaultValue(vm, prop, key);
  4769. // since the default value is a fresh copy,
  4770. // make sure to observe it.
  4771. var prevShouldObserve = shouldObserve;
  4772. toggleObserving(true);
  4773. observe(value);
  4774. toggleObserving(prevShouldObserve);
  4775. }
  4776. if (
  4777. true
  4778. ) {
  4779. assertProp(prop, key, value, vm, absent);
  4780. }
  4781. return value
  4782. }
  4783. /**
  4784. * Get the default value of a prop.
  4785. */
  4786. function getPropDefaultValue (vm, prop, key) {
  4787. // no default, return undefined
  4788. if (!hasOwn(prop, 'default')) {
  4789. return undefined
  4790. }
  4791. var def = prop.default;
  4792. // warn against non-factory defaults for Object & Array
  4793. if ( true && isObject(def)) {
  4794. warn(
  4795. 'Invalid default value for prop "' + key + '": ' +
  4796. 'Props with type Object/Array must use a factory function ' +
  4797. 'to return the default value.',
  4798. vm
  4799. );
  4800. }
  4801. // the raw prop value was also undefined from previous render,
  4802. // return previous default value to avoid unnecessary watcher trigger
  4803. if (vm && vm.$options.propsData &&
  4804. vm.$options.propsData[key] === undefined &&
  4805. vm._props[key] !== undefined
  4806. ) {
  4807. return vm._props[key]
  4808. }
  4809. // call factory function for non-Function types
  4810. // a value is Function if its prototype is function even across different execution context
  4811. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4812. ? def.call(vm)
  4813. : def
  4814. }
  4815. /**
  4816. * Assert whether a prop is valid.
  4817. */
  4818. function assertProp (
  4819. prop,
  4820. name,
  4821. value,
  4822. vm,
  4823. absent
  4824. ) {
  4825. if (prop.required && absent) {
  4826. warn(
  4827. 'Missing required prop: "' + name + '"',
  4828. vm
  4829. );
  4830. return
  4831. }
  4832. if (value == null && !prop.required) {
  4833. return
  4834. }
  4835. var type = prop.type;
  4836. var valid = !type || type === true;
  4837. var expectedTypes = [];
  4838. if (type) {
  4839. if (!Array.isArray(type)) {
  4840. type = [type];
  4841. }
  4842. for (var i = 0; i < type.length && !valid; i++) {
  4843. var assertedType = assertType(value, type[i]);
  4844. expectedTypes.push(assertedType.expectedType || '');
  4845. valid = assertedType.valid;
  4846. }
  4847. }
  4848. if (!valid) {
  4849. warn(
  4850. getInvalidTypeMessage(name, value, expectedTypes),
  4851. vm
  4852. );
  4853. return
  4854. }
  4855. var validator = prop.validator;
  4856. if (validator) {
  4857. if (!validator(value)) {
  4858. warn(
  4859. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4860. vm
  4861. );
  4862. }
  4863. }
  4864. }
  4865. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4866. function assertType (value, type) {
  4867. var valid;
  4868. var expectedType = getType(type);
  4869. if (simpleCheckRE.test(expectedType)) {
  4870. var t = typeof value;
  4871. valid = t === expectedType.toLowerCase();
  4872. // for primitive wrapper objects
  4873. if (!valid && t === 'object') {
  4874. valid = value instanceof type;
  4875. }
  4876. } else if (expectedType === 'Object') {
  4877. valid = isPlainObject(value);
  4878. } else if (expectedType === 'Array') {
  4879. valid = Array.isArray(value);
  4880. } else {
  4881. valid = value instanceof type;
  4882. }
  4883. return {
  4884. valid: valid,
  4885. expectedType: expectedType
  4886. }
  4887. }
  4888. /**
  4889. * Use function string name to check built-in types,
  4890. * because a simple equality check will fail when running
  4891. * across different vms / iframes.
  4892. */
  4893. function getType (fn) {
  4894. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4895. return match ? match[1] : ''
  4896. }
  4897. function isSameType (a, b) {
  4898. return getType(a) === getType(b)
  4899. }
  4900. function getTypeIndex (type, expectedTypes) {
  4901. if (!Array.isArray(expectedTypes)) {
  4902. return isSameType(expectedTypes, type) ? 0 : -1
  4903. }
  4904. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4905. if (isSameType(expectedTypes[i], type)) {
  4906. return i
  4907. }
  4908. }
  4909. return -1
  4910. }
  4911. function getInvalidTypeMessage (name, value, expectedTypes) {
  4912. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4913. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4914. var expectedType = expectedTypes[0];
  4915. var receivedType = toRawType(value);
  4916. var expectedValue = styleValue(value, expectedType);
  4917. var receivedValue = styleValue(value, receivedType);
  4918. // check if we need to specify expected value
  4919. if (expectedTypes.length === 1 &&
  4920. isExplicable(expectedType) &&
  4921. !isBoolean(expectedType, receivedType)) {
  4922. message += " with value " + expectedValue;
  4923. }
  4924. message += ", got " + receivedType + " ";
  4925. // check if we need to specify received value
  4926. if (isExplicable(receivedType)) {
  4927. message += "with value " + receivedValue + ".";
  4928. }
  4929. return message
  4930. }
  4931. function styleValue (value, type) {
  4932. if (type === 'String') {
  4933. return ("\"" + value + "\"")
  4934. } else if (type === 'Number') {
  4935. return ("" + (Number(value)))
  4936. } else {
  4937. return ("" + value)
  4938. }
  4939. }
  4940. function isExplicable (value) {
  4941. var explicitTypes = ['string', 'number', 'boolean'];
  4942. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4943. }
  4944. function isBoolean () {
  4945. var args = [], len = arguments.length;
  4946. while ( len-- ) args[ len ] = arguments[ len ];
  4947. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4948. }
  4949. /* */
  4950. function handleError (err, vm, info) {
  4951. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4952. // See: https://github.com/vuejs/vuex/issues/1505
  4953. pushTarget();
  4954. try {
  4955. if (vm) {
  4956. var cur = vm;
  4957. while ((cur = cur.$parent)) {
  4958. var hooks = cur.$options.errorCaptured;
  4959. if (hooks) {
  4960. for (var i = 0; i < hooks.length; i++) {
  4961. try {
  4962. var capture = hooks[i].call(cur, err, vm, info) === false;
  4963. if (capture) { return }
  4964. } catch (e) {
  4965. globalHandleError(e, cur, 'errorCaptured hook');
  4966. }
  4967. }
  4968. }
  4969. }
  4970. }
  4971. globalHandleError(err, vm, info);
  4972. } finally {
  4973. popTarget();
  4974. }
  4975. }
  4976. function invokeWithErrorHandling (
  4977. handler,
  4978. context,
  4979. args,
  4980. vm,
  4981. info
  4982. ) {
  4983. var res;
  4984. try {
  4985. res = args ? handler.apply(context, args) : handler.call(context);
  4986. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4987. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4988. // issue #9511
  4989. // avoid catch triggering multiple times when nested calls
  4990. res._handled = true;
  4991. }
  4992. } catch (e) {
  4993. handleError(e, vm, info);
  4994. }
  4995. return res
  4996. }
  4997. function globalHandleError (err, vm, info) {
  4998. if (config.errorHandler) {
  4999. try {
  5000. return config.errorHandler.call(null, err, vm, info)
  5001. } catch (e) {
  5002. // if the user intentionally throws the original error in the handler,
  5003. // do not log it twice
  5004. if (e !== err) {
  5005. logError(e, null, 'config.errorHandler');
  5006. }
  5007. }
  5008. }
  5009. logError(err, vm, info);
  5010. }
  5011. function logError (err, vm, info) {
  5012. if (true) {
  5013. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5014. }
  5015. /* istanbul ignore else */
  5016. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5017. console.error(err);
  5018. } else {
  5019. throw err
  5020. }
  5021. }
  5022. /* */
  5023. var callbacks = [];
  5024. var pending = false;
  5025. function flushCallbacks () {
  5026. pending = false;
  5027. var copies = callbacks.slice(0);
  5028. callbacks.length = 0;
  5029. for (var i = 0; i < copies.length; i++) {
  5030. copies[i]();
  5031. }
  5032. }
  5033. // Here we have async deferring wrappers using microtasks.
  5034. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5035. // However, it has subtle problems when state is changed right before repaint
  5036. // (e.g. #6813, out-in transitions).
  5037. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5038. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5039. // So we now use microtasks everywhere, again.
  5040. // A major drawback of this tradeoff is that there are some scenarios
  5041. // where microtasks have too high a priority and fire in between supposedly
  5042. // sequential events (e.g. #4521, #6690, which have workarounds)
  5043. // or even between bubbling of the same event (#6566).
  5044. var timerFunc;
  5045. // The nextTick behavior leverages the microtask queue, which can be accessed
  5046. // via either native Promise.then or MutationObserver.
  5047. // MutationObserver has wider support, however it is seriously bugged in
  5048. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5049. // completely stops working after triggering a few times... so, if native
  5050. // Promise is available, we will use it:
  5051. /* istanbul ignore next, $flow-disable-line */
  5052. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5053. var p = Promise.resolve();
  5054. timerFunc = function () {
  5055. p.then(flushCallbacks);
  5056. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5057. // it can get stuck in a weird state where callbacks are pushed into the
  5058. // microtask queue but the queue isn't being flushed, until the browser
  5059. // needs to do some other work, e.g. handle a timer. Therefore we can
  5060. // "force" the microtask queue to be flushed by adding an empty timer.
  5061. if (isIOS) { setTimeout(noop); }
  5062. };
  5063. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5064. isNative(MutationObserver) ||
  5065. // PhantomJS and iOS 7.x
  5066. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5067. )) {
  5068. // Use MutationObserver where native Promise is not available,
  5069. // e.g. PhantomJS, iOS7, Android 4.4
  5070. // (#6466 MutationObserver is unreliable in IE11)
  5071. var counter = 1;
  5072. var observer = new MutationObserver(flushCallbacks);
  5073. var textNode = document.createTextNode(String(counter));
  5074. observer.observe(textNode, {
  5075. characterData: true
  5076. });
  5077. timerFunc = function () {
  5078. counter = (counter + 1) % 2;
  5079. textNode.data = String(counter);
  5080. };
  5081. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5082. // Fallback to setImmediate.
  5083. // Technically it leverages the (macro) task queue,
  5084. // but it is still a better choice than setTimeout.
  5085. timerFunc = function () {
  5086. setImmediate(flushCallbacks);
  5087. };
  5088. } else {
  5089. // Fallback to setTimeout.
  5090. timerFunc = function () {
  5091. setTimeout(flushCallbacks, 0);
  5092. };
  5093. }
  5094. function nextTick (cb, ctx) {
  5095. var _resolve;
  5096. callbacks.push(function () {
  5097. if (cb) {
  5098. try {
  5099. cb.call(ctx);
  5100. } catch (e) {
  5101. handleError(e, ctx, 'nextTick');
  5102. }
  5103. } else if (_resolve) {
  5104. _resolve(ctx);
  5105. }
  5106. });
  5107. if (!pending) {
  5108. pending = true;
  5109. timerFunc();
  5110. }
  5111. // $flow-disable-line
  5112. if (!cb && typeof Promise !== 'undefined') {
  5113. return new Promise(function (resolve) {
  5114. _resolve = resolve;
  5115. })
  5116. }
  5117. }
  5118. /* */
  5119. /* not type checking this file because flow doesn't play well with Proxy */
  5120. var initProxy;
  5121. if (true) {
  5122. var allowedGlobals = makeMap(
  5123. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5124. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5125. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5126. 'require' // for Webpack/Browserify
  5127. );
  5128. var warnNonPresent = function (target, key) {
  5129. warn(
  5130. "Property or method \"" + key + "\" is not defined on the instance but " +
  5131. 'referenced during render. Make sure that this property is reactive, ' +
  5132. 'either in the data option, or for class-based components, by ' +
  5133. 'initializing the property. ' +
  5134. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5135. target
  5136. );
  5137. };
  5138. var warnReservedPrefix = function (target, key) {
  5139. warn(
  5140. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5141. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5142. 'prevent conflicts with Vue internals. ' +
  5143. 'See: https://vuejs.org/v2/api/#data',
  5144. target
  5145. );
  5146. };
  5147. var hasProxy =
  5148. typeof Proxy !== 'undefined' && isNative(Proxy);
  5149. if (hasProxy) {
  5150. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5151. config.keyCodes = new Proxy(config.keyCodes, {
  5152. set: function set (target, key, value) {
  5153. if (isBuiltInModifier(key)) {
  5154. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5155. return false
  5156. } else {
  5157. target[key] = value;
  5158. return true
  5159. }
  5160. }
  5161. });
  5162. }
  5163. var hasHandler = {
  5164. has: function has (target, key) {
  5165. var has = key in target;
  5166. var isAllowed = allowedGlobals(key) ||
  5167. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5168. if (!has && !isAllowed) {
  5169. if (key in target.$data) { warnReservedPrefix(target, key); }
  5170. else { warnNonPresent(target, key); }
  5171. }
  5172. return has || !isAllowed
  5173. }
  5174. };
  5175. var getHandler = {
  5176. get: function get (target, key) {
  5177. if (typeof key === 'string' && !(key in target)) {
  5178. if (key in target.$data) { warnReservedPrefix(target, key); }
  5179. else { warnNonPresent(target, key); }
  5180. }
  5181. return target[key]
  5182. }
  5183. };
  5184. initProxy = function initProxy (vm) {
  5185. if (hasProxy) {
  5186. // determine which proxy handler to use
  5187. var options = vm.$options;
  5188. var handlers = options.render && options.render._withStripped
  5189. ? getHandler
  5190. : hasHandler;
  5191. vm._renderProxy = new Proxy(vm, handlers);
  5192. } else {
  5193. vm._renderProxy = vm;
  5194. }
  5195. };
  5196. }
  5197. /* */
  5198. var seenObjects = new _Set();
  5199. /**
  5200. * Recursively traverse an object to evoke all converted
  5201. * getters, so that every nested property inside the object
  5202. * is collected as a "deep" dependency.
  5203. */
  5204. function traverse (val) {
  5205. _traverse(val, seenObjects);
  5206. seenObjects.clear();
  5207. }
  5208. function _traverse (val, seen) {
  5209. var i, keys;
  5210. var isA = Array.isArray(val);
  5211. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5212. return
  5213. }
  5214. if (val.__ob__) {
  5215. var depId = val.__ob__.dep.id;
  5216. if (seen.has(depId)) {
  5217. return
  5218. }
  5219. seen.add(depId);
  5220. }
  5221. if (isA) {
  5222. i = val.length;
  5223. while (i--) { _traverse(val[i], seen); }
  5224. } else {
  5225. keys = Object.keys(val);
  5226. i = keys.length;
  5227. while (i--) { _traverse(val[keys[i]], seen); }
  5228. }
  5229. }
  5230. var mark;
  5231. var measure;
  5232. if (true) {
  5233. var perf = inBrowser && window.performance;
  5234. /* istanbul ignore if */
  5235. if (
  5236. perf &&
  5237. perf.mark &&
  5238. perf.measure &&
  5239. perf.clearMarks &&
  5240. perf.clearMeasures
  5241. ) {
  5242. mark = function (tag) { return perf.mark(tag); };
  5243. measure = function (name, startTag, endTag) {
  5244. perf.measure(name, startTag, endTag);
  5245. perf.clearMarks(startTag);
  5246. perf.clearMarks(endTag);
  5247. // perf.clearMeasures(name)
  5248. };
  5249. }
  5250. }
  5251. /* */
  5252. var normalizeEvent = cached(function (name) {
  5253. var passive = name.charAt(0) === '&';
  5254. name = passive ? name.slice(1) : name;
  5255. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5256. name = once$$1 ? name.slice(1) : name;
  5257. var capture = name.charAt(0) === '!';
  5258. name = capture ? name.slice(1) : name;
  5259. return {
  5260. name: name,
  5261. once: once$$1,
  5262. capture: capture,
  5263. passive: passive
  5264. }
  5265. });
  5266. function createFnInvoker (fns, vm) {
  5267. function invoker () {
  5268. var arguments$1 = arguments;
  5269. var fns = invoker.fns;
  5270. if (Array.isArray(fns)) {
  5271. var cloned = fns.slice();
  5272. for (var i = 0; i < cloned.length; i++) {
  5273. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5274. }
  5275. } else {
  5276. // return handler return value for single handlers
  5277. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5278. }
  5279. }
  5280. invoker.fns = fns;
  5281. return invoker
  5282. }
  5283. function updateListeners (
  5284. on,
  5285. oldOn,
  5286. add,
  5287. remove$$1,
  5288. createOnceHandler,
  5289. vm
  5290. ) {
  5291. var name, def$$1, cur, old, event;
  5292. for (name in on) {
  5293. def$$1 = cur = on[name];
  5294. old = oldOn[name];
  5295. event = normalizeEvent(name);
  5296. if (isUndef(cur)) {
  5297. true && warn(
  5298. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5299. vm
  5300. );
  5301. } else if (isUndef(old)) {
  5302. if (isUndef(cur.fns)) {
  5303. cur = on[name] = createFnInvoker(cur, vm);
  5304. }
  5305. if (isTrue(event.once)) {
  5306. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5307. }
  5308. add(event.name, cur, event.capture, event.passive, event.params);
  5309. } else if (cur !== old) {
  5310. old.fns = cur;
  5311. on[name] = old;
  5312. }
  5313. }
  5314. for (name in oldOn) {
  5315. if (isUndef(on[name])) {
  5316. event = normalizeEvent(name);
  5317. remove$$1(event.name, oldOn[name], event.capture);
  5318. }
  5319. }
  5320. }
  5321. /* */
  5322. /* */
  5323. // fixed by xxxxxx (mp properties)
  5324. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5325. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5326. if (isUndef(propOptions)) {
  5327. return res
  5328. }
  5329. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5330. var attrs = data.attrs;
  5331. var props = data.props;
  5332. if (isDef(attrs) || isDef(props)) {
  5333. for (var key in propOptions) {
  5334. var altKey = hyphenate(key);
  5335. var result = checkProp(res, props, key, altKey, true) ||
  5336. checkProp(res, attrs, key, altKey, false);
  5337. // externalClass
  5338. if (
  5339. result &&
  5340. res[key] &&
  5341. externalClasses.indexOf(altKey) !== -1 &&
  5342. context[camelize(res[key])]
  5343. ) {
  5344. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5345. res[key] = context[camelize(res[key])];
  5346. }
  5347. }
  5348. }
  5349. return res
  5350. }
  5351. function extractPropsFromVNodeData (
  5352. data,
  5353. Ctor,
  5354. tag,
  5355. context// fixed by xxxxxx
  5356. ) {
  5357. // we are only extracting raw values here.
  5358. // validation and default values are handled in the child
  5359. // component itself.
  5360. var propOptions = Ctor.options.props;
  5361. if (isUndef(propOptions)) {
  5362. // fixed by xxxxxx
  5363. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5364. }
  5365. var res = {};
  5366. var attrs = data.attrs;
  5367. var props = data.props;
  5368. if (isDef(attrs) || isDef(props)) {
  5369. for (var key in propOptions) {
  5370. var altKey = hyphenate(key);
  5371. if (true) {
  5372. var keyInLowerCase = key.toLowerCase();
  5373. if (
  5374. key !== keyInLowerCase &&
  5375. attrs && hasOwn(attrs, keyInLowerCase)
  5376. ) {
  5377. tip(
  5378. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5379. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5380. " \"" + key + "\". " +
  5381. "Note that HTML attributes are case-insensitive and camelCased " +
  5382. "props need to use their kebab-case equivalents when using in-DOM " +
  5383. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5384. );
  5385. }
  5386. }
  5387. checkProp(res, props, key, altKey, true) ||
  5388. checkProp(res, attrs, key, altKey, false);
  5389. }
  5390. }
  5391. // fixed by xxxxxx
  5392. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5393. }
  5394. function checkProp (
  5395. res,
  5396. hash,
  5397. key,
  5398. altKey,
  5399. preserve
  5400. ) {
  5401. if (isDef(hash)) {
  5402. if (hasOwn(hash, key)) {
  5403. res[key] = hash[key];
  5404. if (!preserve) {
  5405. delete hash[key];
  5406. }
  5407. return true
  5408. } else if (hasOwn(hash, altKey)) {
  5409. res[key] = hash[altKey];
  5410. if (!preserve) {
  5411. delete hash[altKey];
  5412. }
  5413. return true
  5414. }
  5415. }
  5416. return false
  5417. }
  5418. /* */
  5419. // The template compiler attempts to minimize the need for normalization by
  5420. // statically analyzing the template at compile time.
  5421. //
  5422. // For plain HTML markup, normalization can be completely skipped because the
  5423. // generated render function is guaranteed to return Array<VNode>. There are
  5424. // two cases where extra normalization is needed:
  5425. // 1. When the children contains components - because a functional component
  5426. // may return an Array instead of a single root. In this case, just a simple
  5427. // normalization is needed - if any child is an Array, we flatten the whole
  5428. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5429. // because functional components already normalize their own children.
  5430. function simpleNormalizeChildren (children) {
  5431. for (var i = 0; i < children.length; i++) {
  5432. if (Array.isArray(children[i])) {
  5433. return Array.prototype.concat.apply([], children)
  5434. }
  5435. }
  5436. return children
  5437. }
  5438. // 2. When the children contains constructs that always generated nested Arrays,
  5439. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5440. // with hand-written render functions / JSX. In such cases a full normalization
  5441. // is needed to cater to all possible types of children values.
  5442. function normalizeChildren (children) {
  5443. return isPrimitive(children)
  5444. ? [createTextVNode(children)]
  5445. : Array.isArray(children)
  5446. ? normalizeArrayChildren(children)
  5447. : undefined
  5448. }
  5449. function isTextNode (node) {
  5450. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5451. }
  5452. function normalizeArrayChildren (children, nestedIndex) {
  5453. var res = [];
  5454. var i, c, lastIndex, last;
  5455. for (i = 0; i < children.length; i++) {
  5456. c = children[i];
  5457. if (isUndef(c) || typeof c === 'boolean') { continue }
  5458. lastIndex = res.length - 1;
  5459. last = res[lastIndex];
  5460. // nested
  5461. if (Array.isArray(c)) {
  5462. if (c.length > 0) {
  5463. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5464. // merge adjacent text nodes
  5465. if (isTextNode(c[0]) && isTextNode(last)) {
  5466. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5467. c.shift();
  5468. }
  5469. res.push.apply(res, c);
  5470. }
  5471. } else if (isPrimitive(c)) {
  5472. if (isTextNode(last)) {
  5473. // merge adjacent text nodes
  5474. // this is necessary for SSR hydration because text nodes are
  5475. // essentially merged when rendered to HTML strings
  5476. res[lastIndex] = createTextVNode(last.text + c);
  5477. } else if (c !== '') {
  5478. // convert primitive to vnode
  5479. res.push(createTextVNode(c));
  5480. }
  5481. } else {
  5482. if (isTextNode(c) && isTextNode(last)) {
  5483. // merge adjacent text nodes
  5484. res[lastIndex] = createTextVNode(last.text + c.text);
  5485. } else {
  5486. // default key for nested array children (likely generated by v-for)
  5487. if (isTrue(children._isVList) &&
  5488. isDef(c.tag) &&
  5489. isUndef(c.key) &&
  5490. isDef(nestedIndex)) {
  5491. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5492. }
  5493. res.push(c);
  5494. }
  5495. }
  5496. }
  5497. return res
  5498. }
  5499. /* */
  5500. function initProvide (vm) {
  5501. var provide = vm.$options.provide;
  5502. if (provide) {
  5503. vm._provided = typeof provide === 'function'
  5504. ? provide.call(vm)
  5505. : provide;
  5506. }
  5507. }
  5508. function initInjections (vm) {
  5509. var result = resolveInject(vm.$options.inject, vm);
  5510. if (result) {
  5511. toggleObserving(false);
  5512. Object.keys(result).forEach(function (key) {
  5513. /* istanbul ignore else */
  5514. if (true) {
  5515. defineReactive$$1(vm, key, result[key], function () {
  5516. warn(
  5517. "Avoid mutating an injected value directly since the changes will be " +
  5518. "overwritten whenever the provided component re-renders. " +
  5519. "injection being mutated: \"" + key + "\"",
  5520. vm
  5521. );
  5522. });
  5523. } else {}
  5524. });
  5525. toggleObserving(true);
  5526. }
  5527. }
  5528. function resolveInject (inject, vm) {
  5529. if (inject) {
  5530. // inject is :any because flow is not smart enough to figure out cached
  5531. var result = Object.create(null);
  5532. var keys = hasSymbol
  5533. ? Reflect.ownKeys(inject)
  5534. : Object.keys(inject);
  5535. for (var i = 0; i < keys.length; i++) {
  5536. var key = keys[i];
  5537. // #6574 in case the inject object is observed...
  5538. if (key === '__ob__') { continue }
  5539. var provideKey = inject[key].from;
  5540. var source = vm;
  5541. while (source) {
  5542. if (source._provided && hasOwn(source._provided, provideKey)) {
  5543. result[key] = source._provided[provideKey];
  5544. break
  5545. }
  5546. source = source.$parent;
  5547. }
  5548. if (!source) {
  5549. if ('default' in inject[key]) {
  5550. var provideDefault = inject[key].default;
  5551. result[key] = typeof provideDefault === 'function'
  5552. ? provideDefault.call(vm)
  5553. : provideDefault;
  5554. } else if (true) {
  5555. warn(("Injection \"" + key + "\" not found"), vm);
  5556. }
  5557. }
  5558. }
  5559. return result
  5560. }
  5561. }
  5562. /* */
  5563. /**
  5564. * Runtime helper for resolving raw children VNodes into a slot object.
  5565. */
  5566. function resolveSlots (
  5567. children,
  5568. context
  5569. ) {
  5570. if (!children || !children.length) {
  5571. return {}
  5572. }
  5573. var slots = {};
  5574. for (var i = 0, l = children.length; i < l; i++) {
  5575. var child = children[i];
  5576. var data = child.data;
  5577. // remove slot attribute if the node is resolved as a Vue slot node
  5578. if (data && data.attrs && data.attrs.slot) {
  5579. delete data.attrs.slot;
  5580. }
  5581. // named slots should only be respected if the vnode was rendered in the
  5582. // same context.
  5583. if ((child.context === context || child.fnContext === context) &&
  5584. data && data.slot != null
  5585. ) {
  5586. var name = data.slot;
  5587. var slot = (slots[name] || (slots[name] = []));
  5588. if (child.tag === 'template') {
  5589. slot.push.apply(slot, child.children || []);
  5590. } else {
  5591. slot.push(child);
  5592. }
  5593. } else {
  5594. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5595. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5596. (slots['page'] || (slots['page'] = [])).push(child);
  5597. }else{
  5598. (slots.default || (slots.default = [])).push(child);
  5599. }
  5600. }
  5601. }
  5602. // ignore slots that contains only whitespace
  5603. for (var name$1 in slots) {
  5604. if (slots[name$1].every(isWhitespace)) {
  5605. delete slots[name$1];
  5606. }
  5607. }
  5608. return slots
  5609. }
  5610. function isWhitespace (node) {
  5611. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5612. }
  5613. /* */
  5614. function normalizeScopedSlots (
  5615. slots,
  5616. normalSlots,
  5617. prevSlots
  5618. ) {
  5619. var res;
  5620. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5621. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5622. var key = slots && slots.$key;
  5623. if (!slots) {
  5624. res = {};
  5625. } else if (slots._normalized) {
  5626. // fast path 1: child component re-render only, parent did not change
  5627. return slots._normalized
  5628. } else if (
  5629. isStable &&
  5630. prevSlots &&
  5631. prevSlots !== emptyObject &&
  5632. key === prevSlots.$key &&
  5633. !hasNormalSlots &&
  5634. !prevSlots.$hasNormal
  5635. ) {
  5636. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5637. // only need to normalize once
  5638. return prevSlots
  5639. } else {
  5640. res = {};
  5641. for (var key$1 in slots) {
  5642. if (slots[key$1] && key$1[0] !== '$') {
  5643. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5644. }
  5645. }
  5646. }
  5647. // expose normal slots on scopedSlots
  5648. for (var key$2 in normalSlots) {
  5649. if (!(key$2 in res)) {
  5650. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5651. }
  5652. }
  5653. // avoriaz seems to mock a non-extensible $scopedSlots object
  5654. // and when that is passed down this would cause an error
  5655. if (slots && Object.isExtensible(slots)) {
  5656. (slots)._normalized = res;
  5657. }
  5658. def(res, '$stable', isStable);
  5659. def(res, '$key', key);
  5660. def(res, '$hasNormal', hasNormalSlots);
  5661. return res
  5662. }
  5663. function normalizeScopedSlot(normalSlots, key, fn) {
  5664. var normalized = function () {
  5665. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5666. res = res && typeof res === 'object' && !Array.isArray(res)
  5667. ? [res] // single vnode
  5668. : normalizeChildren(res);
  5669. return res && (
  5670. res.length === 0 ||
  5671. (res.length === 1 && res[0].isComment) // #9658
  5672. ) ? undefined
  5673. : res
  5674. };
  5675. // this is a slot using the new v-slot syntax without scope. although it is
  5676. // compiled as a scoped slot, render fn users would expect it to be present
  5677. // on this.$slots because the usage is semantically a normal slot.
  5678. if (fn.proxy) {
  5679. Object.defineProperty(normalSlots, key, {
  5680. get: normalized,
  5681. enumerable: true,
  5682. configurable: true
  5683. });
  5684. }
  5685. return normalized
  5686. }
  5687. function proxyNormalSlot(slots, key) {
  5688. return function () { return slots[key]; }
  5689. }
  5690. /* */
  5691. /**
  5692. * Runtime helper for rendering v-for lists.
  5693. */
  5694. function renderList (
  5695. val,
  5696. render
  5697. ) {
  5698. var ret, i, l, keys, key;
  5699. if (Array.isArray(val) || typeof val === 'string') {
  5700. ret = new Array(val.length);
  5701. for (i = 0, l = val.length; i < l; i++) {
  5702. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5703. }
  5704. } else if (typeof val === 'number') {
  5705. ret = new Array(val);
  5706. for (i = 0; i < val; i++) {
  5707. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5708. }
  5709. } else if (isObject(val)) {
  5710. if (hasSymbol && val[Symbol.iterator]) {
  5711. ret = [];
  5712. var iterator = val[Symbol.iterator]();
  5713. var result = iterator.next();
  5714. while (!result.done) {
  5715. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5716. result = iterator.next();
  5717. }
  5718. } else {
  5719. keys = Object.keys(val);
  5720. ret = new Array(keys.length);
  5721. for (i = 0, l = keys.length; i < l; i++) {
  5722. key = keys[i];
  5723. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5724. }
  5725. }
  5726. }
  5727. if (!isDef(ret)) {
  5728. ret = [];
  5729. }
  5730. (ret)._isVList = true;
  5731. return ret
  5732. }
  5733. /* */
  5734. /**
  5735. * Runtime helper for rendering <slot>
  5736. */
  5737. function renderSlot (
  5738. name,
  5739. fallback,
  5740. props,
  5741. bindObject
  5742. ) {
  5743. var scopedSlotFn = this.$scopedSlots[name];
  5744. var nodes;
  5745. if (scopedSlotFn) { // scoped slot
  5746. props = props || {};
  5747. if (bindObject) {
  5748. if ( true && !isObject(bindObject)) {
  5749. warn(
  5750. 'slot v-bind without argument expects an Object',
  5751. this
  5752. );
  5753. }
  5754. props = extend(extend({}, bindObject), props);
  5755. }
  5756. // fixed by xxxxxx app-plus scopedSlot
  5757. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5758. } else {
  5759. nodes = this.$slots[name] || fallback;
  5760. }
  5761. var target = props && props.slot;
  5762. if (target) {
  5763. return this.$createElement('template', { slot: target }, nodes)
  5764. } else {
  5765. return nodes
  5766. }
  5767. }
  5768. /* */
  5769. /**
  5770. * Runtime helper for resolving filters
  5771. */
  5772. function resolveFilter (id) {
  5773. return resolveAsset(this.$options, 'filters', id, true) || identity
  5774. }
  5775. /* */
  5776. function isKeyNotMatch (expect, actual) {
  5777. if (Array.isArray(expect)) {
  5778. return expect.indexOf(actual) === -1
  5779. } else {
  5780. return expect !== actual
  5781. }
  5782. }
  5783. /**
  5784. * Runtime helper for checking keyCodes from config.
  5785. * exposed as Vue.prototype._k
  5786. * passing in eventKeyName as last argument separately for backwards compat
  5787. */
  5788. function checkKeyCodes (
  5789. eventKeyCode,
  5790. key,
  5791. builtInKeyCode,
  5792. eventKeyName,
  5793. builtInKeyName
  5794. ) {
  5795. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5796. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5797. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5798. } else if (mappedKeyCode) {
  5799. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5800. } else if (eventKeyName) {
  5801. return hyphenate(eventKeyName) !== key
  5802. }
  5803. }
  5804. /* */
  5805. /**
  5806. * Runtime helper for merging v-bind="object" into a VNode's data.
  5807. */
  5808. function bindObjectProps (
  5809. data,
  5810. tag,
  5811. value,
  5812. asProp,
  5813. isSync
  5814. ) {
  5815. if (value) {
  5816. if (!isObject(value)) {
  5817. true && warn(
  5818. 'v-bind without argument expects an Object or Array value',
  5819. this
  5820. );
  5821. } else {
  5822. if (Array.isArray(value)) {
  5823. value = toObject(value);
  5824. }
  5825. var hash;
  5826. var loop = function ( key ) {
  5827. if (
  5828. key === 'class' ||
  5829. key === 'style' ||
  5830. isReservedAttribute(key)
  5831. ) {
  5832. hash = data;
  5833. } else {
  5834. var type = data.attrs && data.attrs.type;
  5835. hash = asProp || config.mustUseProp(tag, type, key)
  5836. ? data.domProps || (data.domProps = {})
  5837. : data.attrs || (data.attrs = {});
  5838. }
  5839. var camelizedKey = camelize(key);
  5840. var hyphenatedKey = hyphenate(key);
  5841. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5842. hash[key] = value[key];
  5843. if (isSync) {
  5844. var on = data.on || (data.on = {});
  5845. on[("update:" + key)] = function ($event) {
  5846. value[key] = $event;
  5847. };
  5848. }
  5849. }
  5850. };
  5851. for (var key in value) loop( key );
  5852. }
  5853. }
  5854. return data
  5855. }
  5856. /* */
  5857. /**
  5858. * Runtime helper for rendering static trees.
  5859. */
  5860. function renderStatic (
  5861. index,
  5862. isInFor
  5863. ) {
  5864. var cached = this._staticTrees || (this._staticTrees = []);
  5865. var tree = cached[index];
  5866. // if has already-rendered static tree and not inside v-for,
  5867. // we can reuse the same tree.
  5868. if (tree && !isInFor) {
  5869. return tree
  5870. }
  5871. // otherwise, render a fresh tree.
  5872. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5873. this._renderProxy,
  5874. null,
  5875. this // for render fns generated for functional component templates
  5876. );
  5877. markStatic(tree, ("__static__" + index), false);
  5878. return tree
  5879. }
  5880. /**
  5881. * Runtime helper for v-once.
  5882. * Effectively it means marking the node as static with a unique key.
  5883. */
  5884. function markOnce (
  5885. tree,
  5886. index,
  5887. key
  5888. ) {
  5889. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5890. return tree
  5891. }
  5892. function markStatic (
  5893. tree,
  5894. key,
  5895. isOnce
  5896. ) {
  5897. if (Array.isArray(tree)) {
  5898. for (var i = 0; i < tree.length; i++) {
  5899. if (tree[i] && typeof tree[i] !== 'string') {
  5900. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5901. }
  5902. }
  5903. } else {
  5904. markStaticNode(tree, key, isOnce);
  5905. }
  5906. }
  5907. function markStaticNode (node, key, isOnce) {
  5908. node.isStatic = true;
  5909. node.key = key;
  5910. node.isOnce = isOnce;
  5911. }
  5912. /* */
  5913. function bindObjectListeners (data, value) {
  5914. if (value) {
  5915. if (!isPlainObject(value)) {
  5916. true && warn(
  5917. 'v-on without argument expects an Object value',
  5918. this
  5919. );
  5920. } else {
  5921. var on = data.on = data.on ? extend({}, data.on) : {};
  5922. for (var key in value) {
  5923. var existing = on[key];
  5924. var ours = value[key];
  5925. on[key] = existing ? [].concat(existing, ours) : ours;
  5926. }
  5927. }
  5928. }
  5929. return data
  5930. }
  5931. /* */
  5932. function resolveScopedSlots (
  5933. fns, // see flow/vnode
  5934. res,
  5935. // the following are added in 2.6
  5936. hasDynamicKeys,
  5937. contentHashKey
  5938. ) {
  5939. res = res || { $stable: !hasDynamicKeys };
  5940. for (var i = 0; i < fns.length; i++) {
  5941. var slot = fns[i];
  5942. if (Array.isArray(slot)) {
  5943. resolveScopedSlots(slot, res, hasDynamicKeys);
  5944. } else if (slot) {
  5945. // marker for reverse proxying v-slot without scope on this.$slots
  5946. if (slot.proxy) {
  5947. slot.fn.proxy = true;
  5948. }
  5949. res[slot.key] = slot.fn;
  5950. }
  5951. }
  5952. if (contentHashKey) {
  5953. (res).$key = contentHashKey;
  5954. }
  5955. return res
  5956. }
  5957. /* */
  5958. function bindDynamicKeys (baseObj, values) {
  5959. for (var i = 0; i < values.length; i += 2) {
  5960. var key = values[i];
  5961. if (typeof key === 'string' && key) {
  5962. baseObj[values[i]] = values[i + 1];
  5963. } else if ( true && key !== '' && key !== null) {
  5964. // null is a special value for explicitly removing a binding
  5965. warn(
  5966. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5967. this
  5968. );
  5969. }
  5970. }
  5971. return baseObj
  5972. }
  5973. // helper to dynamically append modifier runtime markers to event names.
  5974. // ensure only append when value is already string, otherwise it will be cast
  5975. // to string and cause the type check to miss.
  5976. function prependModifier (value, symbol) {
  5977. return typeof value === 'string' ? symbol + value : value
  5978. }
  5979. /* */
  5980. function installRenderHelpers (target) {
  5981. target._o = markOnce;
  5982. target._n = toNumber;
  5983. target._s = toString;
  5984. target._l = renderList;
  5985. target._t = renderSlot;
  5986. target._q = looseEqual;
  5987. target._i = looseIndexOf;
  5988. target._m = renderStatic;
  5989. target._f = resolveFilter;
  5990. target._k = checkKeyCodes;
  5991. target._b = bindObjectProps;
  5992. target._v = createTextVNode;
  5993. target._e = createEmptyVNode;
  5994. target._u = resolveScopedSlots;
  5995. target._g = bindObjectListeners;
  5996. target._d = bindDynamicKeys;
  5997. target._p = prependModifier;
  5998. }
  5999. /* */
  6000. function FunctionalRenderContext (
  6001. data,
  6002. props,
  6003. children,
  6004. parent,
  6005. Ctor
  6006. ) {
  6007. var this$1 = this;
  6008. var options = Ctor.options;
  6009. // ensure the createElement function in functional components
  6010. // gets a unique context - this is necessary for correct named slot check
  6011. var contextVm;
  6012. if (hasOwn(parent, '_uid')) {
  6013. contextVm = Object.create(parent);
  6014. // $flow-disable-line
  6015. contextVm._original = parent;
  6016. } else {
  6017. // the context vm passed in is a functional context as well.
  6018. // in this case we want to make sure we are able to get a hold to the
  6019. // real context instance.
  6020. contextVm = parent;
  6021. // $flow-disable-line
  6022. parent = parent._original;
  6023. }
  6024. var isCompiled = isTrue(options._compiled);
  6025. var needNormalization = !isCompiled;
  6026. this.data = data;
  6027. this.props = props;
  6028. this.children = children;
  6029. this.parent = parent;
  6030. this.listeners = data.on || emptyObject;
  6031. this.injections = resolveInject(options.inject, parent);
  6032. this.slots = function () {
  6033. if (!this$1.$slots) {
  6034. normalizeScopedSlots(
  6035. data.scopedSlots,
  6036. this$1.$slots = resolveSlots(children, parent)
  6037. );
  6038. }
  6039. return this$1.$slots
  6040. };
  6041. Object.defineProperty(this, 'scopedSlots', ({
  6042. enumerable: true,
  6043. get: function get () {
  6044. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6045. }
  6046. }));
  6047. // support for compiled functional template
  6048. if (isCompiled) {
  6049. // exposing $options for renderStatic()
  6050. this.$options = options;
  6051. // pre-resolve slots for renderSlot()
  6052. this.$slots = this.slots();
  6053. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6054. }
  6055. if (options._scopeId) {
  6056. this._c = function (a, b, c, d) {
  6057. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6058. if (vnode && !Array.isArray(vnode)) {
  6059. vnode.fnScopeId = options._scopeId;
  6060. vnode.fnContext = parent;
  6061. }
  6062. return vnode
  6063. };
  6064. } else {
  6065. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6066. }
  6067. }
  6068. installRenderHelpers(FunctionalRenderContext.prototype);
  6069. function createFunctionalComponent (
  6070. Ctor,
  6071. propsData,
  6072. data,
  6073. contextVm,
  6074. children
  6075. ) {
  6076. var options = Ctor.options;
  6077. var props = {};
  6078. var propOptions = options.props;
  6079. if (isDef(propOptions)) {
  6080. for (var key in propOptions) {
  6081. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6082. }
  6083. } else {
  6084. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6085. if (isDef(data.props)) { mergeProps(props, data.props); }
  6086. }
  6087. var renderContext = new FunctionalRenderContext(
  6088. data,
  6089. props,
  6090. children,
  6091. contextVm,
  6092. Ctor
  6093. );
  6094. var vnode = options.render.call(null, renderContext._c, renderContext);
  6095. if (vnode instanceof VNode) {
  6096. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6097. } else if (Array.isArray(vnode)) {
  6098. var vnodes = normalizeChildren(vnode) || [];
  6099. var res = new Array(vnodes.length);
  6100. for (var i = 0; i < vnodes.length; i++) {
  6101. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6102. }
  6103. return res
  6104. }
  6105. }
  6106. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6107. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6108. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6109. // that should not be matched to match.
  6110. var clone = cloneVNode(vnode);
  6111. clone.fnContext = contextVm;
  6112. clone.fnOptions = options;
  6113. if (true) {
  6114. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6115. }
  6116. if (data.slot) {
  6117. (clone.data || (clone.data = {})).slot = data.slot;
  6118. }
  6119. return clone
  6120. }
  6121. function mergeProps (to, from) {
  6122. for (var key in from) {
  6123. to[camelize(key)] = from[key];
  6124. }
  6125. }
  6126. /* */
  6127. /* */
  6128. /* */
  6129. /* */
  6130. // inline hooks to be invoked on component VNodes during patch
  6131. var componentVNodeHooks = {
  6132. init: function init (vnode, hydrating) {
  6133. if (
  6134. vnode.componentInstance &&
  6135. !vnode.componentInstance._isDestroyed &&
  6136. vnode.data.keepAlive
  6137. ) {
  6138. // kept-alive components, treat as a patch
  6139. var mountedNode = vnode; // work around flow
  6140. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6141. } else {
  6142. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6143. vnode,
  6144. activeInstance
  6145. );
  6146. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6147. }
  6148. },
  6149. prepatch: function prepatch (oldVnode, vnode) {
  6150. var options = vnode.componentOptions;
  6151. var child = vnode.componentInstance = oldVnode.componentInstance;
  6152. updateChildComponent(
  6153. child,
  6154. options.propsData, // updated props
  6155. options.listeners, // updated listeners
  6156. vnode, // new parent vnode
  6157. options.children // new children
  6158. );
  6159. },
  6160. insert: function insert (vnode) {
  6161. var context = vnode.context;
  6162. var componentInstance = vnode.componentInstance;
  6163. if (!componentInstance._isMounted) {
  6164. callHook(componentInstance, 'onServiceCreated');
  6165. callHook(componentInstance, 'onServiceAttached');
  6166. componentInstance._isMounted = true;
  6167. callHook(componentInstance, 'mounted');
  6168. }
  6169. if (vnode.data.keepAlive) {
  6170. if (context._isMounted) {
  6171. // vue-router#1212
  6172. // During updates, a kept-alive component's child components may
  6173. // change, so directly walking the tree here may call activated hooks
  6174. // on incorrect children. Instead we push them into a queue which will
  6175. // be processed after the whole patch process ended.
  6176. queueActivatedComponent(componentInstance);
  6177. } else {
  6178. activateChildComponent(componentInstance, true /* direct */);
  6179. }
  6180. }
  6181. },
  6182. destroy: function destroy (vnode) {
  6183. var componentInstance = vnode.componentInstance;
  6184. if (!componentInstance._isDestroyed) {
  6185. if (!vnode.data.keepAlive) {
  6186. componentInstance.$destroy();
  6187. } else {
  6188. deactivateChildComponent(componentInstance, true /* direct */);
  6189. }
  6190. }
  6191. }
  6192. };
  6193. var hooksToMerge = Object.keys(componentVNodeHooks);
  6194. function createComponent (
  6195. Ctor,
  6196. data,
  6197. context,
  6198. children,
  6199. tag
  6200. ) {
  6201. if (isUndef(Ctor)) {
  6202. return
  6203. }
  6204. var baseCtor = context.$options._base;
  6205. // plain options object: turn it into a constructor
  6206. if (isObject(Ctor)) {
  6207. Ctor = baseCtor.extend(Ctor);
  6208. }
  6209. // if at this stage it's not a constructor or an async component factory,
  6210. // reject.
  6211. if (typeof Ctor !== 'function') {
  6212. if (true) {
  6213. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6214. }
  6215. return
  6216. }
  6217. // async component
  6218. var asyncFactory;
  6219. if (isUndef(Ctor.cid)) {
  6220. asyncFactory = Ctor;
  6221. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6222. if (Ctor === undefined) {
  6223. // return a placeholder node for async component, which is rendered
  6224. // as a comment node but preserves all the raw information for the node.
  6225. // the information will be used for async server-rendering and hydration.
  6226. return createAsyncPlaceholder(
  6227. asyncFactory,
  6228. data,
  6229. context,
  6230. children,
  6231. tag
  6232. )
  6233. }
  6234. }
  6235. data = data || {};
  6236. // resolve constructor options in case global mixins are applied after
  6237. // component constructor creation
  6238. resolveConstructorOptions(Ctor);
  6239. // transform component v-model data into props & events
  6240. if (isDef(data.model)) {
  6241. transformModel(Ctor.options, data);
  6242. }
  6243. // extract props
  6244. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6245. // functional component
  6246. if (isTrue(Ctor.options.functional)) {
  6247. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6248. }
  6249. // extract listeners, since these needs to be treated as
  6250. // child component listeners instead of DOM listeners
  6251. var listeners = data.on;
  6252. // replace with listeners with .native modifier
  6253. // so it gets processed during parent component patch.
  6254. data.on = data.nativeOn;
  6255. if (isTrue(Ctor.options.abstract)) {
  6256. // abstract components do not keep anything
  6257. // other than props & listeners & slot
  6258. // work around flow
  6259. var slot = data.slot;
  6260. data = {};
  6261. if (slot) {
  6262. data.slot = slot;
  6263. }
  6264. }
  6265. // install component management hooks onto the placeholder node
  6266. installComponentHooks(data);
  6267. // return a placeholder vnode
  6268. var name = Ctor.options.name || tag;
  6269. var vnode = new VNode(
  6270. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6271. data, undefined, undefined, undefined, context,
  6272. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6273. asyncFactory
  6274. );
  6275. return vnode
  6276. }
  6277. function createComponentInstanceForVnode (
  6278. vnode, // we know it's MountedComponentVNode but flow doesn't
  6279. parent // activeInstance in lifecycle state
  6280. ) {
  6281. var options = {
  6282. _isComponent: true,
  6283. _parentVnode: vnode,
  6284. parent: parent
  6285. };
  6286. // check inline-template render functions
  6287. var inlineTemplate = vnode.data.inlineTemplate;
  6288. if (isDef(inlineTemplate)) {
  6289. options.render = inlineTemplate.render;
  6290. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6291. }
  6292. return new vnode.componentOptions.Ctor(options)
  6293. }
  6294. function installComponentHooks (data) {
  6295. var hooks = data.hook || (data.hook = {});
  6296. for (var i = 0; i < hooksToMerge.length; i++) {
  6297. var key = hooksToMerge[i];
  6298. var existing = hooks[key];
  6299. var toMerge = componentVNodeHooks[key];
  6300. if (existing !== toMerge && !(existing && existing._merged)) {
  6301. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6302. }
  6303. }
  6304. }
  6305. function mergeHook$1 (f1, f2) {
  6306. var merged = function (a, b) {
  6307. // flow complains about extra args which is why we use any
  6308. f1(a, b);
  6309. f2(a, b);
  6310. };
  6311. merged._merged = true;
  6312. return merged
  6313. }
  6314. // transform component v-model info (value and callback) into
  6315. // prop and event handler respectively.
  6316. function transformModel (options, data) {
  6317. var prop = (options.model && options.model.prop) || 'value';
  6318. var event = (options.model && options.model.event) || 'input'
  6319. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6320. var on = data.on || (data.on = {});
  6321. var existing = on[event];
  6322. var callback = data.model.callback;
  6323. if (isDef(existing)) {
  6324. if (
  6325. Array.isArray(existing)
  6326. ? existing.indexOf(callback) === -1
  6327. : existing !== callback
  6328. ) {
  6329. on[event] = [callback].concat(existing);
  6330. }
  6331. } else {
  6332. on[event] = callback;
  6333. }
  6334. }
  6335. /* */
  6336. var SIMPLE_NORMALIZE = 1;
  6337. var ALWAYS_NORMALIZE = 2;
  6338. // wrapper function for providing a more flexible interface
  6339. // without getting yelled at by flow
  6340. function createElement (
  6341. context,
  6342. tag,
  6343. data,
  6344. children,
  6345. normalizationType,
  6346. alwaysNormalize
  6347. ) {
  6348. if (Array.isArray(data) || isPrimitive(data)) {
  6349. normalizationType = children;
  6350. children = data;
  6351. data = undefined;
  6352. }
  6353. if (isTrue(alwaysNormalize)) {
  6354. normalizationType = ALWAYS_NORMALIZE;
  6355. }
  6356. return _createElement(context, tag, data, children, normalizationType)
  6357. }
  6358. function _createElement (
  6359. context,
  6360. tag,
  6361. data,
  6362. children,
  6363. normalizationType
  6364. ) {
  6365. if (isDef(data) && isDef((data).__ob__)) {
  6366. true && warn(
  6367. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6368. 'Always create fresh vnode data objects in each render!',
  6369. context
  6370. );
  6371. return createEmptyVNode()
  6372. }
  6373. // object syntax in v-bind
  6374. if (isDef(data) && isDef(data.is)) {
  6375. tag = data.is;
  6376. }
  6377. if (!tag) {
  6378. // in case of component :is set to falsy value
  6379. return createEmptyVNode()
  6380. }
  6381. // warn against non-primitive key
  6382. if ( true &&
  6383. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6384. ) {
  6385. {
  6386. warn(
  6387. 'Avoid using non-primitive value as key, ' +
  6388. 'use string/number value instead.',
  6389. context
  6390. );
  6391. }
  6392. }
  6393. // support single function children as default scoped slot
  6394. if (Array.isArray(children) &&
  6395. typeof children[0] === 'function'
  6396. ) {
  6397. data = data || {};
  6398. data.scopedSlots = { default: children[0] };
  6399. children.length = 0;
  6400. }
  6401. if (normalizationType === ALWAYS_NORMALIZE) {
  6402. children = normalizeChildren(children);
  6403. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6404. children = simpleNormalizeChildren(children);
  6405. }
  6406. var vnode, ns;
  6407. if (typeof tag === 'string') {
  6408. var Ctor;
  6409. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6410. if (config.isReservedTag(tag)) {
  6411. // platform built-in elements
  6412. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6413. warn(
  6414. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6415. context
  6416. );
  6417. }
  6418. vnode = new VNode(
  6419. config.parsePlatformTagName(tag), data, children,
  6420. undefined, undefined, context
  6421. );
  6422. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6423. // component
  6424. vnode = createComponent(Ctor, data, context, children, tag);
  6425. } else {
  6426. // unknown or unlisted namespaced elements
  6427. // check at runtime because it may get assigned a namespace when its
  6428. // parent normalizes children
  6429. vnode = new VNode(
  6430. tag, data, children,
  6431. undefined, undefined, context
  6432. );
  6433. }
  6434. } else {
  6435. // direct component options / constructor
  6436. vnode = createComponent(tag, data, context, children);
  6437. }
  6438. if (Array.isArray(vnode)) {
  6439. return vnode
  6440. } else if (isDef(vnode)) {
  6441. if (isDef(ns)) { applyNS(vnode, ns); }
  6442. if (isDef(data)) { registerDeepBindings(data); }
  6443. return vnode
  6444. } else {
  6445. return createEmptyVNode()
  6446. }
  6447. }
  6448. function applyNS (vnode, ns, force) {
  6449. vnode.ns = ns;
  6450. if (vnode.tag === 'foreignObject') {
  6451. // use default namespace inside foreignObject
  6452. ns = undefined;
  6453. force = true;
  6454. }
  6455. if (isDef(vnode.children)) {
  6456. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6457. var child = vnode.children[i];
  6458. if (isDef(child.tag) && (
  6459. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6460. applyNS(child, ns, force);
  6461. }
  6462. }
  6463. }
  6464. }
  6465. // ref #5318
  6466. // necessary to ensure parent re-render when deep bindings like :style and
  6467. // :class are used on slot nodes
  6468. function registerDeepBindings (data) {
  6469. if (isObject(data.style)) {
  6470. traverse(data.style);
  6471. }
  6472. if (isObject(data.class)) {
  6473. traverse(data.class);
  6474. }
  6475. }
  6476. /* */
  6477. function initRender (vm) {
  6478. vm._vnode = null; // the root of the child tree
  6479. vm._staticTrees = null; // v-once cached trees
  6480. var options = vm.$options;
  6481. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6482. var renderContext = parentVnode && parentVnode.context;
  6483. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6484. vm.$scopedSlots = emptyObject;
  6485. // bind the createElement fn to this instance
  6486. // so that we get proper render context inside it.
  6487. // args order: tag, data, children, normalizationType, alwaysNormalize
  6488. // internal version is used by render functions compiled from templates
  6489. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6490. // normalization is always applied for the public version, used in
  6491. // user-written render functions.
  6492. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6493. // $attrs & $listeners are exposed for easier HOC creation.
  6494. // they need to be reactive so that HOCs using them are always updated
  6495. var parentData = parentVnode && parentVnode.data;
  6496. /* istanbul ignore else */
  6497. if (true) {
  6498. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6499. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6500. }, true);
  6501. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6502. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6503. }, true);
  6504. } else {}
  6505. }
  6506. var currentRenderingInstance = null;
  6507. function renderMixin (Vue) {
  6508. // install runtime convenience helpers
  6509. installRenderHelpers(Vue.prototype);
  6510. Vue.prototype.$nextTick = function (fn) {
  6511. return nextTick(fn, this)
  6512. };
  6513. Vue.prototype._render = function () {
  6514. var vm = this;
  6515. var ref = vm.$options;
  6516. var render = ref.render;
  6517. var _parentVnode = ref._parentVnode;
  6518. if (_parentVnode) {
  6519. vm.$scopedSlots = normalizeScopedSlots(
  6520. _parentVnode.data.scopedSlots,
  6521. vm.$slots,
  6522. vm.$scopedSlots
  6523. );
  6524. }
  6525. // set parent vnode. this allows render functions to have access
  6526. // to the data on the placeholder node.
  6527. vm.$vnode = _parentVnode;
  6528. // render self
  6529. var vnode;
  6530. try {
  6531. // There's no need to maintain a stack because all render fns are called
  6532. // separately from one another. Nested component's render fns are called
  6533. // when parent component is patched.
  6534. currentRenderingInstance = vm;
  6535. vnode = render.call(vm._renderProxy, vm.$createElement);
  6536. } catch (e) {
  6537. handleError(e, vm, "render");
  6538. // return error render result,
  6539. // or previous vnode to prevent render error causing blank component
  6540. /* istanbul ignore else */
  6541. if ( true && vm.$options.renderError) {
  6542. try {
  6543. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6544. } catch (e) {
  6545. handleError(e, vm, "renderError");
  6546. vnode = vm._vnode;
  6547. }
  6548. } else {
  6549. vnode = vm._vnode;
  6550. }
  6551. } finally {
  6552. currentRenderingInstance = null;
  6553. }
  6554. // if the returned array contains only a single node, allow it
  6555. if (Array.isArray(vnode) && vnode.length === 1) {
  6556. vnode = vnode[0];
  6557. }
  6558. // return empty vnode in case the render function errored out
  6559. if (!(vnode instanceof VNode)) {
  6560. if ( true && Array.isArray(vnode)) {
  6561. warn(
  6562. 'Multiple root nodes returned from render function. Render function ' +
  6563. 'should return a single root node.',
  6564. vm
  6565. );
  6566. }
  6567. vnode = createEmptyVNode();
  6568. }
  6569. // set parent
  6570. vnode.parent = _parentVnode;
  6571. return vnode
  6572. };
  6573. }
  6574. /* */
  6575. function ensureCtor (comp, base) {
  6576. if (
  6577. comp.__esModule ||
  6578. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6579. ) {
  6580. comp = comp.default;
  6581. }
  6582. return isObject(comp)
  6583. ? base.extend(comp)
  6584. : comp
  6585. }
  6586. function createAsyncPlaceholder (
  6587. factory,
  6588. data,
  6589. context,
  6590. children,
  6591. tag
  6592. ) {
  6593. var node = createEmptyVNode();
  6594. node.asyncFactory = factory;
  6595. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6596. return node
  6597. }
  6598. function resolveAsyncComponent (
  6599. factory,
  6600. baseCtor
  6601. ) {
  6602. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6603. return factory.errorComp
  6604. }
  6605. if (isDef(factory.resolved)) {
  6606. return factory.resolved
  6607. }
  6608. var owner = currentRenderingInstance;
  6609. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6610. // already pending
  6611. factory.owners.push(owner);
  6612. }
  6613. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6614. return factory.loadingComp
  6615. }
  6616. if (owner && !isDef(factory.owners)) {
  6617. var owners = factory.owners = [owner];
  6618. var sync = true;
  6619. var timerLoading = null;
  6620. var timerTimeout = null
  6621. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6622. var forceRender = function (renderCompleted) {
  6623. for (var i = 0, l = owners.length; i < l; i++) {
  6624. (owners[i]).$forceUpdate();
  6625. }
  6626. if (renderCompleted) {
  6627. owners.length = 0;
  6628. if (timerLoading !== null) {
  6629. clearTimeout(timerLoading);
  6630. timerLoading = null;
  6631. }
  6632. if (timerTimeout !== null) {
  6633. clearTimeout(timerTimeout);
  6634. timerTimeout = null;
  6635. }
  6636. }
  6637. };
  6638. var resolve = once(function (res) {
  6639. // cache resolved
  6640. factory.resolved = ensureCtor(res, baseCtor);
  6641. // invoke callbacks only if this is not a synchronous resolve
  6642. // (async resolves are shimmed as synchronous during SSR)
  6643. if (!sync) {
  6644. forceRender(true);
  6645. } else {
  6646. owners.length = 0;
  6647. }
  6648. });
  6649. var reject = once(function (reason) {
  6650. true && warn(
  6651. "Failed to resolve async component: " + (String(factory)) +
  6652. (reason ? ("\nReason: " + reason) : '')
  6653. );
  6654. if (isDef(factory.errorComp)) {
  6655. factory.error = true;
  6656. forceRender(true);
  6657. }
  6658. });
  6659. var res = factory(resolve, reject);
  6660. if (isObject(res)) {
  6661. if (isPromise(res)) {
  6662. // () => Promise
  6663. if (isUndef(factory.resolved)) {
  6664. res.then(resolve, reject);
  6665. }
  6666. } else if (isPromise(res.component)) {
  6667. res.component.then(resolve, reject);
  6668. if (isDef(res.error)) {
  6669. factory.errorComp = ensureCtor(res.error, baseCtor);
  6670. }
  6671. if (isDef(res.loading)) {
  6672. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6673. if (res.delay === 0) {
  6674. factory.loading = true;
  6675. } else {
  6676. timerLoading = setTimeout(function () {
  6677. timerLoading = null;
  6678. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6679. factory.loading = true;
  6680. forceRender(false);
  6681. }
  6682. }, res.delay || 200);
  6683. }
  6684. }
  6685. if (isDef(res.timeout)) {
  6686. timerTimeout = setTimeout(function () {
  6687. timerTimeout = null;
  6688. if (isUndef(factory.resolved)) {
  6689. reject(
  6690. true
  6691. ? ("timeout (" + (res.timeout) + "ms)")
  6692. : undefined
  6693. );
  6694. }
  6695. }, res.timeout);
  6696. }
  6697. }
  6698. }
  6699. sync = false;
  6700. // return in case resolved synchronously
  6701. return factory.loading
  6702. ? factory.loadingComp
  6703. : factory.resolved
  6704. }
  6705. }
  6706. /* */
  6707. function isAsyncPlaceholder (node) {
  6708. return node.isComment && node.asyncFactory
  6709. }
  6710. /* */
  6711. function getFirstComponentChild (children) {
  6712. if (Array.isArray(children)) {
  6713. for (var i = 0; i < children.length; i++) {
  6714. var c = children[i];
  6715. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6716. return c
  6717. }
  6718. }
  6719. }
  6720. }
  6721. /* */
  6722. /* */
  6723. function initEvents (vm) {
  6724. vm._events = Object.create(null);
  6725. vm._hasHookEvent = false;
  6726. // init parent attached events
  6727. var listeners = vm.$options._parentListeners;
  6728. if (listeners) {
  6729. updateComponentListeners(vm, listeners);
  6730. }
  6731. }
  6732. var target;
  6733. function add (event, fn) {
  6734. target.$on(event, fn);
  6735. }
  6736. function remove$1 (event, fn) {
  6737. target.$off(event, fn);
  6738. }
  6739. function createOnceHandler (event, fn) {
  6740. var _target = target;
  6741. return function onceHandler () {
  6742. var res = fn.apply(null, arguments);
  6743. if (res !== null) {
  6744. _target.$off(event, onceHandler);
  6745. }
  6746. }
  6747. }
  6748. function updateComponentListeners (
  6749. vm,
  6750. listeners,
  6751. oldListeners
  6752. ) {
  6753. target = vm;
  6754. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6755. target = undefined;
  6756. }
  6757. function eventsMixin (Vue) {
  6758. var hookRE = /^hook:/;
  6759. Vue.prototype.$on = function (event, fn) {
  6760. var vm = this;
  6761. if (Array.isArray(event)) {
  6762. for (var i = 0, l = event.length; i < l; i++) {
  6763. vm.$on(event[i], fn);
  6764. }
  6765. } else {
  6766. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6767. // optimize hook:event cost by using a boolean flag marked at registration
  6768. // instead of a hash lookup
  6769. if (hookRE.test(event)) {
  6770. vm._hasHookEvent = true;
  6771. }
  6772. }
  6773. return vm
  6774. };
  6775. Vue.prototype.$once = function (event, fn) {
  6776. var vm = this;
  6777. function on () {
  6778. vm.$off(event, on);
  6779. fn.apply(vm, arguments);
  6780. }
  6781. on.fn = fn;
  6782. vm.$on(event, on);
  6783. return vm
  6784. };
  6785. Vue.prototype.$off = function (event, fn) {
  6786. var vm = this;
  6787. // all
  6788. if (!arguments.length) {
  6789. vm._events = Object.create(null);
  6790. return vm
  6791. }
  6792. // array of events
  6793. if (Array.isArray(event)) {
  6794. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6795. vm.$off(event[i$1], fn);
  6796. }
  6797. return vm
  6798. }
  6799. // specific event
  6800. var cbs = vm._events[event];
  6801. if (!cbs) {
  6802. return vm
  6803. }
  6804. if (!fn) {
  6805. vm._events[event] = null;
  6806. return vm
  6807. }
  6808. // specific handler
  6809. var cb;
  6810. var i = cbs.length;
  6811. while (i--) {
  6812. cb = cbs[i];
  6813. if (cb === fn || cb.fn === fn) {
  6814. cbs.splice(i, 1);
  6815. break
  6816. }
  6817. }
  6818. return vm
  6819. };
  6820. Vue.prototype.$emit = function (event) {
  6821. var vm = this;
  6822. if (true) {
  6823. var lowerCaseEvent = event.toLowerCase();
  6824. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6825. tip(
  6826. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6827. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6828. "Note that HTML attributes are case-insensitive and you cannot use " +
  6829. "v-on to listen to camelCase events when using in-DOM templates. " +
  6830. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6831. );
  6832. }
  6833. }
  6834. var cbs = vm._events[event];
  6835. if (cbs) {
  6836. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6837. var args = toArray(arguments, 1);
  6838. var info = "event handler for \"" + event + "\"";
  6839. for (var i = 0, l = cbs.length; i < l; i++) {
  6840. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6841. }
  6842. }
  6843. return vm
  6844. };
  6845. }
  6846. /* */
  6847. var activeInstance = null;
  6848. var isUpdatingChildComponent = false;
  6849. function setActiveInstance(vm) {
  6850. var prevActiveInstance = activeInstance;
  6851. activeInstance = vm;
  6852. return function () {
  6853. activeInstance = prevActiveInstance;
  6854. }
  6855. }
  6856. function initLifecycle (vm) {
  6857. var options = vm.$options;
  6858. // locate first non-abstract parent
  6859. var parent = options.parent;
  6860. if (parent && !options.abstract) {
  6861. while (parent.$options.abstract && parent.$parent) {
  6862. parent = parent.$parent;
  6863. }
  6864. parent.$children.push(vm);
  6865. }
  6866. vm.$parent = parent;
  6867. vm.$root = parent ? parent.$root : vm;
  6868. vm.$children = [];
  6869. vm.$refs = {};
  6870. vm._watcher = null;
  6871. vm._inactive = null;
  6872. vm._directInactive = false;
  6873. vm._isMounted = false;
  6874. vm._isDestroyed = false;
  6875. vm._isBeingDestroyed = false;
  6876. }
  6877. function lifecycleMixin (Vue) {
  6878. Vue.prototype._update = function (vnode, hydrating) {
  6879. var vm = this;
  6880. var prevEl = vm.$el;
  6881. var prevVnode = vm._vnode;
  6882. var restoreActiveInstance = setActiveInstance(vm);
  6883. vm._vnode = vnode;
  6884. // Vue.prototype.__patch__ is injected in entry points
  6885. // based on the rendering backend used.
  6886. if (!prevVnode) {
  6887. // initial render
  6888. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6889. } else {
  6890. // updates
  6891. vm.$el = vm.__patch__(prevVnode, vnode);
  6892. }
  6893. restoreActiveInstance();
  6894. // update __vue__ reference
  6895. if (prevEl) {
  6896. prevEl.__vue__ = null;
  6897. }
  6898. if (vm.$el) {
  6899. vm.$el.__vue__ = vm;
  6900. }
  6901. // if parent is an HOC, update its $el as well
  6902. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6903. vm.$parent.$el = vm.$el;
  6904. }
  6905. // updated hook is called by the scheduler to ensure that children are
  6906. // updated in a parent's updated hook.
  6907. };
  6908. Vue.prototype.$forceUpdate = function () {
  6909. var vm = this;
  6910. if (vm._watcher) {
  6911. vm._watcher.update();
  6912. }
  6913. };
  6914. Vue.prototype.$destroy = function () {
  6915. var vm = this;
  6916. if (vm._isBeingDestroyed) {
  6917. return
  6918. }
  6919. callHook(vm, 'beforeDestroy');
  6920. vm._isBeingDestroyed = true;
  6921. // remove self from parent
  6922. var parent = vm.$parent;
  6923. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6924. remove(parent.$children, vm);
  6925. }
  6926. // teardown watchers
  6927. if (vm._watcher) {
  6928. vm._watcher.teardown();
  6929. }
  6930. var i = vm._watchers.length;
  6931. while (i--) {
  6932. vm._watchers[i].teardown();
  6933. }
  6934. // remove reference from data ob
  6935. // frozen object may not have observer.
  6936. if (vm._data.__ob__) {
  6937. vm._data.__ob__.vmCount--;
  6938. }
  6939. // call the last hook...
  6940. vm._isDestroyed = true;
  6941. // invoke destroy hooks on current rendered tree
  6942. vm.__patch__(vm._vnode, null);
  6943. // fire destroyed hook
  6944. callHook(vm, 'destroyed');
  6945. // turn off all instance listeners.
  6946. vm.$off();
  6947. // remove __vue__ reference
  6948. if (vm.$el) {
  6949. vm.$el.__vue__ = null;
  6950. }
  6951. // release circular reference (#6759)
  6952. if (vm.$vnode) {
  6953. vm.$vnode.parent = null;
  6954. }
  6955. };
  6956. }
  6957. function updateChildComponent (
  6958. vm,
  6959. propsData,
  6960. listeners,
  6961. parentVnode,
  6962. renderChildren
  6963. ) {
  6964. if (true) {
  6965. isUpdatingChildComponent = true;
  6966. }
  6967. // determine whether component has slot children
  6968. // we need to do this before overwriting $options._renderChildren.
  6969. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6970. // dynamic slot names). Static scoped slots compiled from template has the
  6971. // "$stable" marker.
  6972. var newScopedSlots = parentVnode.data.scopedSlots;
  6973. var oldScopedSlots = vm.$scopedSlots;
  6974. var hasDynamicScopedSlot = !!(
  6975. (newScopedSlots && !newScopedSlots.$stable) ||
  6976. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6977. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6978. );
  6979. // Any static slot children from the parent may have changed during parent's
  6980. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6981. // update is necessary to ensure correctness.
  6982. var needsForceUpdate = !!(
  6983. renderChildren || // has new static slots
  6984. vm.$options._renderChildren || // has old static slots
  6985. hasDynamicScopedSlot
  6986. );
  6987. vm.$options._parentVnode = parentVnode;
  6988. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6989. if (vm._vnode) { // update child tree's parent
  6990. vm._vnode.parent = parentVnode;
  6991. }
  6992. vm.$options._renderChildren = renderChildren;
  6993. // update $attrs and $listeners hash
  6994. // these are also reactive so they may trigger child update if the child
  6995. // used them during render
  6996. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6997. vm.$listeners = listeners || emptyObject;
  6998. // update props
  6999. if (propsData && vm.$options.props) {
  7000. toggleObserving(false);
  7001. var props = vm._props;
  7002. var propKeys = vm.$options._propKeys || [];
  7003. for (var i = 0; i < propKeys.length; i++) {
  7004. var key = propKeys[i];
  7005. var propOptions = vm.$options.props; // wtf flow?
  7006. props[key] = validateProp(key, propOptions, propsData, vm);
  7007. }
  7008. toggleObserving(true);
  7009. // keep a copy of raw propsData
  7010. vm.$options.propsData = propsData;
  7011. }
  7012. // fixed by xxxxxx update properties(mp runtime)
  7013. vm._$updateProperties && vm._$updateProperties(vm);
  7014. // update listeners
  7015. listeners = listeners || emptyObject;
  7016. var oldListeners = vm.$options._parentListeners;
  7017. vm.$options._parentListeners = listeners;
  7018. updateComponentListeners(vm, listeners, oldListeners);
  7019. // resolve slots + force update if has children
  7020. if (needsForceUpdate) {
  7021. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7022. vm.$forceUpdate();
  7023. }
  7024. if (true) {
  7025. isUpdatingChildComponent = false;
  7026. }
  7027. }
  7028. function isInInactiveTree (vm) {
  7029. while (vm && (vm = vm.$parent)) {
  7030. if (vm._inactive) { return true }
  7031. }
  7032. return false
  7033. }
  7034. function activateChildComponent (vm, direct) {
  7035. if (direct) {
  7036. vm._directInactive = false;
  7037. if (isInInactiveTree(vm)) {
  7038. return
  7039. }
  7040. } else if (vm._directInactive) {
  7041. return
  7042. }
  7043. if (vm._inactive || vm._inactive === null) {
  7044. vm._inactive = false;
  7045. for (var i = 0; i < vm.$children.length; i++) {
  7046. activateChildComponent(vm.$children[i]);
  7047. }
  7048. callHook(vm, 'activated');
  7049. }
  7050. }
  7051. function deactivateChildComponent (vm, direct) {
  7052. if (direct) {
  7053. vm._directInactive = true;
  7054. if (isInInactiveTree(vm)) {
  7055. return
  7056. }
  7057. }
  7058. if (!vm._inactive) {
  7059. vm._inactive = true;
  7060. for (var i = 0; i < vm.$children.length; i++) {
  7061. deactivateChildComponent(vm.$children[i]);
  7062. }
  7063. callHook(vm, 'deactivated');
  7064. }
  7065. }
  7066. function callHook (vm, hook) {
  7067. // #7573 disable dep collection when invoking lifecycle hooks
  7068. pushTarget();
  7069. var handlers = vm.$options[hook];
  7070. var info = hook + " hook";
  7071. if (handlers) {
  7072. for (var i = 0, j = handlers.length; i < j; i++) {
  7073. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7074. }
  7075. }
  7076. if (vm._hasHookEvent) {
  7077. vm.$emit('hook:' + hook);
  7078. }
  7079. popTarget();
  7080. }
  7081. /* */
  7082. var MAX_UPDATE_COUNT = 100;
  7083. var queue = [];
  7084. var activatedChildren = [];
  7085. var has = {};
  7086. var circular = {};
  7087. var waiting = false;
  7088. var flushing = false;
  7089. var index = 0;
  7090. /**
  7091. * Reset the scheduler's state.
  7092. */
  7093. function resetSchedulerState () {
  7094. index = queue.length = activatedChildren.length = 0;
  7095. has = {};
  7096. if (true) {
  7097. circular = {};
  7098. }
  7099. waiting = flushing = false;
  7100. }
  7101. // Async edge case #6566 requires saving the timestamp when event listeners are
  7102. // attached. However, calling performance.now() has a perf overhead especially
  7103. // if the page has thousands of event listeners. Instead, we take a timestamp
  7104. // every time the scheduler flushes and use that for all event listeners
  7105. // attached during that flush.
  7106. var currentFlushTimestamp = 0;
  7107. // Async edge case fix requires storing an event listener's attach timestamp.
  7108. var getNow = Date.now;
  7109. // Determine what event timestamp the browser is using. Annoyingly, the
  7110. // timestamp can either be hi-res (relative to page load) or low-res
  7111. // (relative to UNIX epoch), so in order to compare time we have to use the
  7112. // same timestamp type when saving the flush timestamp.
  7113. // All IE versions use low-res event timestamps, and have problematic clock
  7114. // implementations (#9632)
  7115. if (inBrowser && !isIE) {
  7116. var performance = window.performance;
  7117. if (
  7118. performance &&
  7119. typeof performance.now === 'function' &&
  7120. getNow() > document.createEvent('Event').timeStamp
  7121. ) {
  7122. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7123. // smaller than it, it means the event is using a hi-res timestamp,
  7124. // and we need to use the hi-res version for event listener timestamps as
  7125. // well.
  7126. getNow = function () { return performance.now(); };
  7127. }
  7128. }
  7129. /**
  7130. * Flush both queues and run the watchers.
  7131. */
  7132. function flushSchedulerQueue () {
  7133. currentFlushTimestamp = getNow();
  7134. flushing = true;
  7135. var watcher, id;
  7136. // Sort queue before flush.
  7137. // This ensures that:
  7138. // 1. Components are updated from parent to child. (because parent is always
  7139. // created before the child)
  7140. // 2. A component's user watchers are run before its render watcher (because
  7141. // user watchers are created before the render watcher)
  7142. // 3. If a component is destroyed during a parent component's watcher run,
  7143. // its watchers can be skipped.
  7144. queue.sort(function (a, b) { return a.id - b.id; });
  7145. // do not cache length because more watchers might be pushed
  7146. // as we run existing watchers
  7147. for (index = 0; index < queue.length; index++) {
  7148. watcher = queue[index];
  7149. if (watcher.before) {
  7150. watcher.before();
  7151. }
  7152. id = watcher.id;
  7153. has[id] = null;
  7154. watcher.run();
  7155. // in dev build, check and stop circular updates.
  7156. if ( true && has[id] != null) {
  7157. circular[id] = (circular[id] || 0) + 1;
  7158. if (circular[id] > MAX_UPDATE_COUNT) {
  7159. warn(
  7160. 'You may have an infinite update loop ' + (
  7161. watcher.user
  7162. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7163. : "in a component render function."
  7164. ),
  7165. watcher.vm
  7166. );
  7167. break
  7168. }
  7169. }
  7170. }
  7171. // keep copies of post queues before resetting state
  7172. var activatedQueue = activatedChildren.slice();
  7173. var updatedQueue = queue.slice();
  7174. resetSchedulerState();
  7175. // call component updated and activated hooks
  7176. callActivatedHooks(activatedQueue);
  7177. callUpdatedHooks(updatedQueue);
  7178. // devtool hook
  7179. /* istanbul ignore if */
  7180. if (devtools && config.devtools) {
  7181. devtools.emit('flush');
  7182. }
  7183. }
  7184. function callUpdatedHooks (queue) {
  7185. var i = queue.length;
  7186. while (i--) {
  7187. var watcher = queue[i];
  7188. var vm = watcher.vm;
  7189. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7190. callHook(vm, 'updated');
  7191. }
  7192. }
  7193. }
  7194. /**
  7195. * Queue a kept-alive component that was activated during patch.
  7196. * The queue will be processed after the entire tree has been patched.
  7197. */
  7198. function queueActivatedComponent (vm) {
  7199. // setting _inactive to false here so that a render function can
  7200. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7201. vm._inactive = false;
  7202. activatedChildren.push(vm);
  7203. }
  7204. function callActivatedHooks (queue) {
  7205. for (var i = 0; i < queue.length; i++) {
  7206. queue[i]._inactive = true;
  7207. activateChildComponent(queue[i], true /* true */);
  7208. }
  7209. }
  7210. /**
  7211. * Push a watcher into the watcher queue.
  7212. * Jobs with duplicate IDs will be skipped unless it's
  7213. * pushed when the queue is being flushed.
  7214. */
  7215. function queueWatcher (watcher) {
  7216. var id = watcher.id;
  7217. if (has[id] == null) {
  7218. has[id] = true;
  7219. if (!flushing) {
  7220. queue.push(watcher);
  7221. } else {
  7222. // if already flushing, splice the watcher based on its id
  7223. // if already past its id, it will be run next immediately.
  7224. var i = queue.length - 1;
  7225. while (i > index && queue[i].id > watcher.id) {
  7226. i--;
  7227. }
  7228. queue.splice(i + 1, 0, watcher);
  7229. }
  7230. // queue the flush
  7231. if (!waiting) {
  7232. waiting = true;
  7233. if ( true && !config.async) {
  7234. flushSchedulerQueue();
  7235. return
  7236. }
  7237. nextTick(flushSchedulerQueue);
  7238. }
  7239. }
  7240. }
  7241. /* */
  7242. var uid$2 = 0;
  7243. /**
  7244. * A watcher parses an expression, collects dependencies,
  7245. * and fires callback when the expression value changes.
  7246. * This is used for both the $watch() api and directives.
  7247. */
  7248. var Watcher = function Watcher (
  7249. vm,
  7250. expOrFn,
  7251. cb,
  7252. options,
  7253. isRenderWatcher
  7254. ) {
  7255. this.vm = vm;
  7256. if (isRenderWatcher) {
  7257. vm._watcher = this;
  7258. }
  7259. vm._watchers.push(this);
  7260. // options
  7261. if (options) {
  7262. this.deep = !!options.deep;
  7263. this.user = !!options.user;
  7264. this.lazy = !!options.lazy;
  7265. this.sync = !!options.sync;
  7266. this.before = options.before;
  7267. } else {
  7268. this.deep = this.user = this.lazy = this.sync = false;
  7269. }
  7270. this.cb = cb;
  7271. this.id = ++uid$2; // uid for batching
  7272. this.active = true;
  7273. this.dirty = this.lazy; // for lazy watchers
  7274. this.deps = [];
  7275. this.newDeps = [];
  7276. this.depIds = new _Set();
  7277. this.newDepIds = new _Set();
  7278. this.expression = true
  7279. ? expOrFn.toString()
  7280. : undefined;
  7281. // parse expression for getter
  7282. if (typeof expOrFn === 'function') {
  7283. this.getter = expOrFn;
  7284. } else {
  7285. this.getter = parsePath(expOrFn);
  7286. if (!this.getter) {
  7287. this.getter = noop;
  7288. true && warn(
  7289. "Failed watching path: \"" + expOrFn + "\" " +
  7290. 'Watcher only accepts simple dot-delimited paths. ' +
  7291. 'For full control, use a function instead.',
  7292. vm
  7293. );
  7294. }
  7295. }
  7296. this.value = this.lazy
  7297. ? undefined
  7298. : this.get();
  7299. };
  7300. /**
  7301. * Evaluate the getter, and re-collect dependencies.
  7302. */
  7303. Watcher.prototype.get = function get () {
  7304. pushTarget(this);
  7305. var value;
  7306. var vm = this.vm;
  7307. try {
  7308. value = this.getter.call(vm, vm);
  7309. } catch (e) {
  7310. if (this.user) {
  7311. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7312. } else {
  7313. throw e
  7314. }
  7315. } finally {
  7316. // "touch" every property so they are all tracked as
  7317. // dependencies for deep watching
  7318. if (this.deep) {
  7319. traverse(value);
  7320. }
  7321. popTarget();
  7322. this.cleanupDeps();
  7323. }
  7324. return value
  7325. };
  7326. /**
  7327. * Add a dependency to this directive.
  7328. */
  7329. Watcher.prototype.addDep = function addDep (dep) {
  7330. var id = dep.id;
  7331. if (!this.newDepIds.has(id)) {
  7332. this.newDepIds.add(id);
  7333. this.newDeps.push(dep);
  7334. if (!this.depIds.has(id)) {
  7335. dep.addSub(this);
  7336. }
  7337. }
  7338. };
  7339. /**
  7340. * Clean up for dependency collection.
  7341. */
  7342. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7343. var i = this.deps.length;
  7344. while (i--) {
  7345. var dep = this.deps[i];
  7346. if (!this.newDepIds.has(dep.id)) {
  7347. dep.removeSub(this);
  7348. }
  7349. }
  7350. var tmp = this.depIds;
  7351. this.depIds = this.newDepIds;
  7352. this.newDepIds = tmp;
  7353. this.newDepIds.clear();
  7354. tmp = this.deps;
  7355. this.deps = this.newDeps;
  7356. this.newDeps = tmp;
  7357. this.newDeps.length = 0;
  7358. };
  7359. /**
  7360. * Subscriber interface.
  7361. * Will be called when a dependency changes.
  7362. */
  7363. Watcher.prototype.update = function update () {
  7364. /* istanbul ignore else */
  7365. if (this.lazy) {
  7366. this.dirty = true;
  7367. } else if (this.sync) {
  7368. this.run();
  7369. } else {
  7370. queueWatcher(this);
  7371. }
  7372. };
  7373. /**
  7374. * Scheduler job interface.
  7375. * Will be called by the scheduler.
  7376. */
  7377. Watcher.prototype.run = function run () {
  7378. if (this.active) {
  7379. var value = this.get();
  7380. if (
  7381. value !== this.value ||
  7382. // Deep watchers and watchers on Object/Arrays should fire even
  7383. // when the value is the same, because the value may
  7384. // have mutated.
  7385. isObject(value) ||
  7386. this.deep
  7387. ) {
  7388. // set new value
  7389. var oldValue = this.value;
  7390. this.value = value;
  7391. if (this.user) {
  7392. try {
  7393. this.cb.call(this.vm, value, oldValue);
  7394. } catch (e) {
  7395. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7396. }
  7397. } else {
  7398. this.cb.call(this.vm, value, oldValue);
  7399. }
  7400. }
  7401. }
  7402. };
  7403. /**
  7404. * Evaluate the value of the watcher.
  7405. * This only gets called for lazy watchers.
  7406. */
  7407. Watcher.prototype.evaluate = function evaluate () {
  7408. this.value = this.get();
  7409. this.dirty = false;
  7410. };
  7411. /**
  7412. * Depend on all deps collected by this watcher.
  7413. */
  7414. Watcher.prototype.depend = function depend () {
  7415. var i = this.deps.length;
  7416. while (i--) {
  7417. this.deps[i].depend();
  7418. }
  7419. };
  7420. /**
  7421. * Remove self from all dependencies' subscriber list.
  7422. */
  7423. Watcher.prototype.teardown = function teardown () {
  7424. if (this.active) {
  7425. // remove self from vm's watcher list
  7426. // this is a somewhat expensive operation so we skip it
  7427. // if the vm is being destroyed.
  7428. if (!this.vm._isBeingDestroyed) {
  7429. remove(this.vm._watchers, this);
  7430. }
  7431. var i = this.deps.length;
  7432. while (i--) {
  7433. this.deps[i].removeSub(this);
  7434. }
  7435. this.active = false;
  7436. }
  7437. };
  7438. /* */
  7439. var sharedPropertyDefinition = {
  7440. enumerable: true,
  7441. configurable: true,
  7442. get: noop,
  7443. set: noop
  7444. };
  7445. function proxy (target, sourceKey, key) {
  7446. sharedPropertyDefinition.get = function proxyGetter () {
  7447. return this[sourceKey][key]
  7448. };
  7449. sharedPropertyDefinition.set = function proxySetter (val) {
  7450. this[sourceKey][key] = val;
  7451. };
  7452. Object.defineProperty(target, key, sharedPropertyDefinition);
  7453. }
  7454. function initState (vm) {
  7455. vm._watchers = [];
  7456. var opts = vm.$options;
  7457. if (opts.props) { initProps(vm, opts.props); }
  7458. if (opts.methods) { initMethods(vm, opts.methods); }
  7459. if (opts.data) {
  7460. initData(vm);
  7461. } else {
  7462. observe(vm._data = {}, true /* asRootData */);
  7463. }
  7464. if (opts.computed) { initComputed(vm, opts.computed); }
  7465. if (opts.watch && opts.watch !== nativeWatch) {
  7466. initWatch(vm, opts.watch);
  7467. }
  7468. }
  7469. function initProps (vm, propsOptions) {
  7470. var propsData = vm.$options.propsData || {};
  7471. var props = vm._props = {};
  7472. // cache prop keys so that future props updates can iterate using Array
  7473. // instead of dynamic object key enumeration.
  7474. var keys = vm.$options._propKeys = [];
  7475. var isRoot = !vm.$parent;
  7476. // root instance props should be converted
  7477. if (!isRoot) {
  7478. toggleObserving(false);
  7479. }
  7480. var loop = function ( key ) {
  7481. keys.push(key);
  7482. var value = validateProp(key, propsOptions, propsData, vm);
  7483. /* istanbul ignore else */
  7484. if (true) {
  7485. var hyphenatedKey = hyphenate(key);
  7486. if (isReservedAttribute(hyphenatedKey) ||
  7487. config.isReservedAttr(hyphenatedKey)) {
  7488. warn(
  7489. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7490. vm
  7491. );
  7492. }
  7493. defineReactive$$1(props, key, value, function () {
  7494. if (!isRoot && !isUpdatingChildComponent) {
  7495. {
  7496. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7497. return
  7498. }
  7499. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7500. if(
  7501. key === 'value' &&
  7502. Array.isArray(vm.$options.behaviors) &&
  7503. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7504. ){
  7505. return
  7506. }
  7507. if(vm._getFormData){
  7508. return
  7509. }
  7510. var $parent = vm.$parent;
  7511. while($parent){
  7512. if($parent.__next_tick_pending){
  7513. return
  7514. }
  7515. $parent = $parent.$parent;
  7516. }
  7517. }
  7518. warn(
  7519. "Avoid mutating a prop directly since the value will be " +
  7520. "overwritten whenever the parent component re-renders. " +
  7521. "Instead, use a data or computed property based on the prop's " +
  7522. "value. Prop being mutated: \"" + key + "\"",
  7523. vm
  7524. );
  7525. }
  7526. });
  7527. } else {}
  7528. // static props are already proxied on the component's prototype
  7529. // during Vue.extend(). We only need to proxy props defined at
  7530. // instantiation here.
  7531. if (!(key in vm)) {
  7532. proxy(vm, "_props", key);
  7533. }
  7534. };
  7535. for (var key in propsOptions) loop( key );
  7536. toggleObserving(true);
  7537. }
  7538. function initData (vm) {
  7539. var data = vm.$options.data;
  7540. data = vm._data = typeof data === 'function'
  7541. ? getData(data, vm)
  7542. : data || {};
  7543. if (!isPlainObject(data)) {
  7544. data = {};
  7545. true && warn(
  7546. 'data functions should return an object:\n' +
  7547. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7548. vm
  7549. );
  7550. }
  7551. // proxy data on instance
  7552. var keys = Object.keys(data);
  7553. var props = vm.$options.props;
  7554. var methods = vm.$options.methods;
  7555. var i = keys.length;
  7556. while (i--) {
  7557. var key = keys[i];
  7558. if (true) {
  7559. if (methods && hasOwn(methods, key)) {
  7560. warn(
  7561. ("Method \"" + key + "\" has already been defined as a data property."),
  7562. vm
  7563. );
  7564. }
  7565. }
  7566. if (props && hasOwn(props, key)) {
  7567. true && warn(
  7568. "The data property \"" + key + "\" is already declared as a prop. " +
  7569. "Use prop default value instead.",
  7570. vm
  7571. );
  7572. } else if (!isReserved(key)) {
  7573. proxy(vm, "_data", key);
  7574. }
  7575. }
  7576. // observe data
  7577. observe(data, true /* asRootData */);
  7578. }
  7579. function getData (data, vm) {
  7580. // #7573 disable dep collection when invoking data getters
  7581. pushTarget();
  7582. try {
  7583. return data.call(vm, vm)
  7584. } catch (e) {
  7585. handleError(e, vm, "data()");
  7586. return {}
  7587. } finally {
  7588. popTarget();
  7589. }
  7590. }
  7591. var computedWatcherOptions = { lazy: true };
  7592. function initComputed (vm, computed) {
  7593. // $flow-disable-line
  7594. var watchers = vm._computedWatchers = Object.create(null);
  7595. // computed properties are just getters during SSR
  7596. var isSSR = isServerRendering();
  7597. for (var key in computed) {
  7598. var userDef = computed[key];
  7599. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7600. if ( true && getter == null) {
  7601. warn(
  7602. ("Getter is missing for computed property \"" + key + "\"."),
  7603. vm
  7604. );
  7605. }
  7606. if (!isSSR) {
  7607. // create internal watcher for the computed property.
  7608. watchers[key] = new Watcher(
  7609. vm,
  7610. getter || noop,
  7611. noop,
  7612. computedWatcherOptions
  7613. );
  7614. }
  7615. // component-defined computed properties are already defined on the
  7616. // component prototype. We only need to define computed properties defined
  7617. // at instantiation here.
  7618. if (!(key in vm)) {
  7619. defineComputed(vm, key, userDef);
  7620. } else if (true) {
  7621. if (key in vm.$data) {
  7622. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7623. } else if (vm.$options.props && key in vm.$options.props) {
  7624. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7625. }
  7626. }
  7627. }
  7628. }
  7629. function defineComputed (
  7630. target,
  7631. key,
  7632. userDef
  7633. ) {
  7634. var shouldCache = !isServerRendering();
  7635. if (typeof userDef === 'function') {
  7636. sharedPropertyDefinition.get = shouldCache
  7637. ? createComputedGetter(key)
  7638. : createGetterInvoker(userDef);
  7639. sharedPropertyDefinition.set = noop;
  7640. } else {
  7641. sharedPropertyDefinition.get = userDef.get
  7642. ? shouldCache && userDef.cache !== false
  7643. ? createComputedGetter(key)
  7644. : createGetterInvoker(userDef.get)
  7645. : noop;
  7646. sharedPropertyDefinition.set = userDef.set || noop;
  7647. }
  7648. if ( true &&
  7649. sharedPropertyDefinition.set === noop) {
  7650. sharedPropertyDefinition.set = function () {
  7651. warn(
  7652. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7653. this
  7654. );
  7655. };
  7656. }
  7657. Object.defineProperty(target, key, sharedPropertyDefinition);
  7658. }
  7659. function createComputedGetter (key) {
  7660. return function computedGetter () {
  7661. var watcher = this._computedWatchers && this._computedWatchers[key];
  7662. if (watcher) {
  7663. if (watcher.dirty) {
  7664. watcher.evaluate();
  7665. }
  7666. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7667. watcher.depend();
  7668. }
  7669. return watcher.value
  7670. }
  7671. }
  7672. }
  7673. function createGetterInvoker(fn) {
  7674. return function computedGetter () {
  7675. return fn.call(this, this)
  7676. }
  7677. }
  7678. function initMethods (vm, methods) {
  7679. var props = vm.$options.props;
  7680. for (var key in methods) {
  7681. if (true) {
  7682. if (typeof methods[key] !== 'function') {
  7683. warn(
  7684. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7685. "Did you reference the function correctly?",
  7686. vm
  7687. );
  7688. }
  7689. if (props && hasOwn(props, key)) {
  7690. warn(
  7691. ("Method \"" + key + "\" has already been defined as a prop."),
  7692. vm
  7693. );
  7694. }
  7695. if ((key in vm) && isReserved(key)) {
  7696. warn(
  7697. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7698. "Avoid defining component methods that start with _ or $."
  7699. );
  7700. }
  7701. }
  7702. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7703. }
  7704. }
  7705. function initWatch (vm, watch) {
  7706. for (var key in watch) {
  7707. var handler = watch[key];
  7708. if (Array.isArray(handler)) {
  7709. for (var i = 0; i < handler.length; i++) {
  7710. createWatcher(vm, key, handler[i]);
  7711. }
  7712. } else {
  7713. createWatcher(vm, key, handler);
  7714. }
  7715. }
  7716. }
  7717. function createWatcher (
  7718. vm,
  7719. expOrFn,
  7720. handler,
  7721. options
  7722. ) {
  7723. if (isPlainObject(handler)) {
  7724. options = handler;
  7725. handler = handler.handler;
  7726. }
  7727. if (typeof handler === 'string') {
  7728. handler = vm[handler];
  7729. }
  7730. return vm.$watch(expOrFn, handler, options)
  7731. }
  7732. function stateMixin (Vue) {
  7733. // flow somehow has problems with directly declared definition object
  7734. // when using Object.defineProperty, so we have to procedurally build up
  7735. // the object here.
  7736. var dataDef = {};
  7737. dataDef.get = function () { return this._data };
  7738. var propsDef = {};
  7739. propsDef.get = function () { return this._props };
  7740. if (true) {
  7741. dataDef.set = function () {
  7742. warn(
  7743. 'Avoid replacing instance root $data. ' +
  7744. 'Use nested data properties instead.',
  7745. this
  7746. );
  7747. };
  7748. propsDef.set = function () {
  7749. warn("$props is readonly.", this);
  7750. };
  7751. }
  7752. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7753. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7754. Vue.prototype.$set = set;
  7755. Vue.prototype.$delete = del;
  7756. Vue.prototype.$watch = function (
  7757. expOrFn,
  7758. cb,
  7759. options
  7760. ) {
  7761. var vm = this;
  7762. if (isPlainObject(cb)) {
  7763. return createWatcher(vm, expOrFn, cb, options)
  7764. }
  7765. options = options || {};
  7766. options.user = true;
  7767. var watcher = new Watcher(vm, expOrFn, cb, options);
  7768. if (options.immediate) {
  7769. try {
  7770. cb.call(vm, watcher.value);
  7771. } catch (error) {
  7772. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7773. }
  7774. }
  7775. return function unwatchFn () {
  7776. watcher.teardown();
  7777. }
  7778. };
  7779. }
  7780. /* */
  7781. var uid$3 = 0;
  7782. function initMixin (Vue) {
  7783. Vue.prototype._init = function (options) {
  7784. var vm = this;
  7785. // a uid
  7786. vm._uid = uid$3++;
  7787. var startTag, endTag;
  7788. /* istanbul ignore if */
  7789. if ( true && config.performance && mark) {
  7790. startTag = "vue-perf-start:" + (vm._uid);
  7791. endTag = "vue-perf-end:" + (vm._uid);
  7792. mark(startTag);
  7793. }
  7794. // a flag to avoid this being observed
  7795. vm._isVue = true;
  7796. // merge options
  7797. if (options && options._isComponent) {
  7798. // optimize internal component instantiation
  7799. // since dynamic options merging is pretty slow, and none of the
  7800. // internal component options needs special treatment.
  7801. initInternalComponent(vm, options);
  7802. } else {
  7803. vm.$options = mergeOptions(
  7804. resolveConstructorOptions(vm.constructor),
  7805. options || {},
  7806. vm
  7807. );
  7808. }
  7809. /* istanbul ignore else */
  7810. if (true) {
  7811. initProxy(vm);
  7812. } else {}
  7813. // expose real self
  7814. vm._self = vm;
  7815. initLifecycle(vm);
  7816. initEvents(vm);
  7817. initRender(vm);
  7818. callHook(vm, 'beforeCreate');
  7819. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7820. initState(vm);
  7821. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7822. !vm._$fallback && callHook(vm, 'created');
  7823. /* istanbul ignore if */
  7824. if ( true && config.performance && mark) {
  7825. vm._name = formatComponentName(vm, false);
  7826. mark(endTag);
  7827. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7828. }
  7829. if (vm.$options.el) {
  7830. vm.$mount(vm.$options.el);
  7831. }
  7832. };
  7833. }
  7834. function initInternalComponent (vm, options) {
  7835. var opts = vm.$options = Object.create(vm.constructor.options);
  7836. // doing this because it's faster than dynamic enumeration.
  7837. var parentVnode = options._parentVnode;
  7838. opts.parent = options.parent;
  7839. opts._parentVnode = parentVnode;
  7840. var vnodeComponentOptions = parentVnode.componentOptions;
  7841. opts.propsData = vnodeComponentOptions.propsData;
  7842. opts._parentListeners = vnodeComponentOptions.listeners;
  7843. opts._renderChildren = vnodeComponentOptions.children;
  7844. opts._componentTag = vnodeComponentOptions.tag;
  7845. if (options.render) {
  7846. opts.render = options.render;
  7847. opts.staticRenderFns = options.staticRenderFns;
  7848. }
  7849. }
  7850. function resolveConstructorOptions (Ctor) {
  7851. var options = Ctor.options;
  7852. if (Ctor.super) {
  7853. var superOptions = resolveConstructorOptions(Ctor.super);
  7854. var cachedSuperOptions = Ctor.superOptions;
  7855. if (superOptions !== cachedSuperOptions) {
  7856. // super option changed,
  7857. // need to resolve new options.
  7858. Ctor.superOptions = superOptions;
  7859. // check if there are any late-modified/attached options (#4976)
  7860. var modifiedOptions = resolveModifiedOptions(Ctor);
  7861. // update base extend options
  7862. if (modifiedOptions) {
  7863. extend(Ctor.extendOptions, modifiedOptions);
  7864. }
  7865. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7866. if (options.name) {
  7867. options.components[options.name] = Ctor;
  7868. }
  7869. }
  7870. }
  7871. return options
  7872. }
  7873. function resolveModifiedOptions (Ctor) {
  7874. var modified;
  7875. var latest = Ctor.options;
  7876. var sealed = Ctor.sealedOptions;
  7877. for (var key in latest) {
  7878. if (latest[key] !== sealed[key]) {
  7879. if (!modified) { modified = {}; }
  7880. modified[key] = latest[key];
  7881. }
  7882. }
  7883. return modified
  7884. }
  7885. function Vue (options) {
  7886. if ( true &&
  7887. !(this instanceof Vue)
  7888. ) {
  7889. warn('Vue is a constructor and should be called with the `new` keyword');
  7890. }
  7891. this._init(options);
  7892. }
  7893. initMixin(Vue);
  7894. stateMixin(Vue);
  7895. eventsMixin(Vue);
  7896. lifecycleMixin(Vue);
  7897. renderMixin(Vue);
  7898. /* */
  7899. function initUse (Vue) {
  7900. Vue.use = function (plugin) {
  7901. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7902. if (installedPlugins.indexOf(plugin) > -1) {
  7903. return this
  7904. }
  7905. // additional parameters
  7906. var args = toArray(arguments, 1);
  7907. args.unshift(this);
  7908. if (typeof plugin.install === 'function') {
  7909. plugin.install.apply(plugin, args);
  7910. } else if (typeof plugin === 'function') {
  7911. plugin.apply(null, args);
  7912. }
  7913. installedPlugins.push(plugin);
  7914. return this
  7915. };
  7916. }
  7917. /* */
  7918. function initMixin$1 (Vue) {
  7919. Vue.mixin = function (mixin) {
  7920. this.options = mergeOptions(this.options, mixin);
  7921. return this
  7922. };
  7923. }
  7924. /* */
  7925. function initExtend (Vue) {
  7926. /**
  7927. * Each instance constructor, including Vue, has a unique
  7928. * cid. This enables us to create wrapped "child
  7929. * constructors" for prototypal inheritance and cache them.
  7930. */
  7931. Vue.cid = 0;
  7932. var cid = 1;
  7933. /**
  7934. * Class inheritance
  7935. */
  7936. Vue.extend = function (extendOptions) {
  7937. extendOptions = extendOptions || {};
  7938. var Super = this;
  7939. var SuperId = Super.cid;
  7940. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7941. if (cachedCtors[SuperId]) {
  7942. return cachedCtors[SuperId]
  7943. }
  7944. var name = extendOptions.name || Super.options.name;
  7945. if ( true && name) {
  7946. validateComponentName(name);
  7947. }
  7948. var Sub = function VueComponent (options) {
  7949. this._init(options);
  7950. };
  7951. Sub.prototype = Object.create(Super.prototype);
  7952. Sub.prototype.constructor = Sub;
  7953. Sub.cid = cid++;
  7954. Sub.options = mergeOptions(
  7955. Super.options,
  7956. extendOptions
  7957. );
  7958. Sub['super'] = Super;
  7959. // For props and computed properties, we define the proxy getters on
  7960. // the Vue instances at extension time, on the extended prototype. This
  7961. // avoids Object.defineProperty calls for each instance created.
  7962. if (Sub.options.props) {
  7963. initProps$1(Sub);
  7964. }
  7965. if (Sub.options.computed) {
  7966. initComputed$1(Sub);
  7967. }
  7968. // allow further extension/mixin/plugin usage
  7969. Sub.extend = Super.extend;
  7970. Sub.mixin = Super.mixin;
  7971. Sub.use = Super.use;
  7972. // create asset registers, so extended classes
  7973. // can have their private assets too.
  7974. ASSET_TYPES.forEach(function (type) {
  7975. Sub[type] = Super[type];
  7976. });
  7977. // enable recursive self-lookup
  7978. if (name) {
  7979. Sub.options.components[name] = Sub;
  7980. }
  7981. // keep a reference to the super options at extension time.
  7982. // later at instantiation we can check if Super's options have
  7983. // been updated.
  7984. Sub.superOptions = Super.options;
  7985. Sub.extendOptions = extendOptions;
  7986. Sub.sealedOptions = extend({}, Sub.options);
  7987. // cache constructor
  7988. cachedCtors[SuperId] = Sub;
  7989. return Sub
  7990. };
  7991. }
  7992. function initProps$1 (Comp) {
  7993. var props = Comp.options.props;
  7994. for (var key in props) {
  7995. proxy(Comp.prototype, "_props", key);
  7996. }
  7997. }
  7998. function initComputed$1 (Comp) {
  7999. var computed = Comp.options.computed;
  8000. for (var key in computed) {
  8001. defineComputed(Comp.prototype, key, computed[key]);
  8002. }
  8003. }
  8004. /* */
  8005. function initAssetRegisters (Vue) {
  8006. /**
  8007. * Create asset registration methods.
  8008. */
  8009. ASSET_TYPES.forEach(function (type) {
  8010. Vue[type] = function (
  8011. id,
  8012. definition
  8013. ) {
  8014. if (!definition) {
  8015. return this.options[type + 's'][id]
  8016. } else {
  8017. /* istanbul ignore if */
  8018. if ( true && type === 'component') {
  8019. validateComponentName(id);
  8020. }
  8021. if (type === 'component' && isPlainObject(definition)) {
  8022. definition.name = definition.name || id;
  8023. definition = this.options._base.extend(definition);
  8024. }
  8025. if (type === 'directive' && typeof definition === 'function') {
  8026. definition = { bind: definition, update: definition };
  8027. }
  8028. this.options[type + 's'][id] = definition;
  8029. return definition
  8030. }
  8031. };
  8032. });
  8033. }
  8034. /* */
  8035. function getComponentName (opts) {
  8036. return opts && (opts.Ctor.options.name || opts.tag)
  8037. }
  8038. function matches (pattern, name) {
  8039. if (Array.isArray(pattern)) {
  8040. return pattern.indexOf(name) > -1
  8041. } else if (typeof pattern === 'string') {
  8042. return pattern.split(',').indexOf(name) > -1
  8043. } else if (isRegExp(pattern)) {
  8044. return pattern.test(name)
  8045. }
  8046. /* istanbul ignore next */
  8047. return false
  8048. }
  8049. function pruneCache (keepAliveInstance, filter) {
  8050. var cache = keepAliveInstance.cache;
  8051. var keys = keepAliveInstance.keys;
  8052. var _vnode = keepAliveInstance._vnode;
  8053. for (var key in cache) {
  8054. var cachedNode = cache[key];
  8055. if (cachedNode) {
  8056. var name = getComponentName(cachedNode.componentOptions);
  8057. if (name && !filter(name)) {
  8058. pruneCacheEntry(cache, key, keys, _vnode);
  8059. }
  8060. }
  8061. }
  8062. }
  8063. function pruneCacheEntry (
  8064. cache,
  8065. key,
  8066. keys,
  8067. current
  8068. ) {
  8069. var cached$$1 = cache[key];
  8070. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8071. cached$$1.componentInstance.$destroy();
  8072. }
  8073. cache[key] = null;
  8074. remove(keys, key);
  8075. }
  8076. var patternTypes = [String, RegExp, Array];
  8077. var KeepAlive = {
  8078. name: 'keep-alive',
  8079. abstract: true,
  8080. props: {
  8081. include: patternTypes,
  8082. exclude: patternTypes,
  8083. max: [String, Number]
  8084. },
  8085. created: function created () {
  8086. this.cache = Object.create(null);
  8087. this.keys = [];
  8088. },
  8089. destroyed: function destroyed () {
  8090. for (var key in this.cache) {
  8091. pruneCacheEntry(this.cache, key, this.keys);
  8092. }
  8093. },
  8094. mounted: function mounted () {
  8095. var this$1 = this;
  8096. this.$watch('include', function (val) {
  8097. pruneCache(this$1, function (name) { return matches(val, name); });
  8098. });
  8099. this.$watch('exclude', function (val) {
  8100. pruneCache(this$1, function (name) { return !matches(val, name); });
  8101. });
  8102. },
  8103. render: function render () {
  8104. var slot = this.$slots.default;
  8105. var vnode = getFirstComponentChild(slot);
  8106. var componentOptions = vnode && vnode.componentOptions;
  8107. if (componentOptions) {
  8108. // check pattern
  8109. var name = getComponentName(componentOptions);
  8110. var ref = this;
  8111. var include = ref.include;
  8112. var exclude = ref.exclude;
  8113. if (
  8114. // not included
  8115. (include && (!name || !matches(include, name))) ||
  8116. // excluded
  8117. (exclude && name && matches(exclude, name))
  8118. ) {
  8119. return vnode
  8120. }
  8121. var ref$1 = this;
  8122. var cache = ref$1.cache;
  8123. var keys = ref$1.keys;
  8124. var key = vnode.key == null
  8125. // same constructor may get registered as different local components
  8126. // so cid alone is not enough (#3269)
  8127. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8128. : vnode.key;
  8129. if (cache[key]) {
  8130. vnode.componentInstance = cache[key].componentInstance;
  8131. // make current key freshest
  8132. remove(keys, key);
  8133. keys.push(key);
  8134. } else {
  8135. cache[key] = vnode;
  8136. keys.push(key);
  8137. // prune oldest entry
  8138. if (this.max && keys.length > parseInt(this.max)) {
  8139. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8140. }
  8141. }
  8142. vnode.data.keepAlive = true;
  8143. }
  8144. return vnode || (slot && slot[0])
  8145. }
  8146. };
  8147. var builtInComponents = {
  8148. KeepAlive: KeepAlive
  8149. };
  8150. /* */
  8151. function initGlobalAPI (Vue) {
  8152. // config
  8153. var configDef = {};
  8154. configDef.get = function () { return config; };
  8155. if (true) {
  8156. configDef.set = function () {
  8157. warn(
  8158. 'Do not replace the Vue.config object, set individual fields instead.'
  8159. );
  8160. };
  8161. }
  8162. Object.defineProperty(Vue, 'config', configDef);
  8163. // exposed util methods.
  8164. // NOTE: these are not considered part of the public API - avoid relying on
  8165. // them unless you are aware of the risk.
  8166. Vue.util = {
  8167. warn: warn,
  8168. extend: extend,
  8169. mergeOptions: mergeOptions,
  8170. defineReactive: defineReactive$$1
  8171. };
  8172. Vue.set = set;
  8173. Vue.delete = del;
  8174. Vue.nextTick = nextTick;
  8175. // 2.6 explicit observable API
  8176. Vue.observable = function (obj) {
  8177. observe(obj);
  8178. return obj
  8179. };
  8180. Vue.options = Object.create(null);
  8181. ASSET_TYPES.forEach(function (type) {
  8182. Vue.options[type + 's'] = Object.create(null);
  8183. });
  8184. // this is used to identify the "base" constructor to extend all plain-object
  8185. // components with in Weex's multi-instance scenarios.
  8186. Vue.options._base = Vue;
  8187. extend(Vue.options.components, builtInComponents);
  8188. initUse(Vue);
  8189. initMixin$1(Vue);
  8190. initExtend(Vue);
  8191. initAssetRegisters(Vue);
  8192. }
  8193. initGlobalAPI(Vue);
  8194. Object.defineProperty(Vue.prototype, '$isServer', {
  8195. get: isServerRendering
  8196. });
  8197. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8198. get: function get () {
  8199. /* istanbul ignore next */
  8200. return this.$vnode && this.$vnode.ssrContext
  8201. }
  8202. });
  8203. // expose FunctionalRenderContext for ssr runtime helper installation
  8204. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8205. value: FunctionalRenderContext
  8206. });
  8207. Vue.version = '2.6.11';
  8208. /**
  8209. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8210. */
  8211. var ARRAYTYPE = '[object Array]';
  8212. var OBJECTTYPE = '[object Object]';
  8213. var NULLTYPE = '[object Null]';
  8214. var UNDEFINEDTYPE = '[object Undefined]';
  8215. // const FUNCTIONTYPE = '[object Function]'
  8216. function diff(current, pre) {
  8217. var result = {};
  8218. syncKeys(current, pre);
  8219. _diff(current, pre, '', result);
  8220. return result
  8221. }
  8222. function syncKeys(current, pre) {
  8223. if (current === pre) { return }
  8224. var rootCurrentType = type(current);
  8225. var rootPreType = type(pre);
  8226. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8227. if(Object.keys(current).length >= Object.keys(pre).length){
  8228. for (var key in pre) {
  8229. var currentValue = current[key];
  8230. if (currentValue === undefined) {
  8231. current[key] = null;
  8232. } else {
  8233. syncKeys(currentValue, pre[key]);
  8234. }
  8235. }
  8236. }
  8237. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8238. if (current.length >= pre.length) {
  8239. pre.forEach(function (item, index) {
  8240. syncKeys(current[index], item);
  8241. });
  8242. }
  8243. }
  8244. }
  8245. function nullOrUndefined(currentType, preType) {
  8246. if(
  8247. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8248. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8249. ) {
  8250. return false
  8251. }
  8252. return true
  8253. }
  8254. function _diff(current, pre, path, result) {
  8255. if (current === pre) { return }
  8256. var rootCurrentType = type(current);
  8257. var rootPreType = type(pre);
  8258. if (rootCurrentType == OBJECTTYPE) {
  8259. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8260. setResult(result, path, current);
  8261. } else {
  8262. var loop = function ( key ) {
  8263. var currentValue = current[key];
  8264. var preValue = pre[key];
  8265. var currentType = type(currentValue);
  8266. var preType = type(preValue);
  8267. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8268. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8269. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8270. }
  8271. } else if (currentType == ARRAYTYPE) {
  8272. if (preType != ARRAYTYPE) {
  8273. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8274. } else {
  8275. if (currentValue.length < preValue.length) {
  8276. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8277. } else {
  8278. currentValue.forEach(function (item, index) {
  8279. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8280. });
  8281. }
  8282. }
  8283. } else if (currentType == OBJECTTYPE) {
  8284. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8285. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8286. } else {
  8287. for (var subKey in currentValue) {
  8288. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8289. }
  8290. }
  8291. }
  8292. };
  8293. for (var key in current) loop( key );
  8294. }
  8295. } else if (rootCurrentType == ARRAYTYPE) {
  8296. if (rootPreType != ARRAYTYPE) {
  8297. setResult(result, path, current);
  8298. } else {
  8299. if (current.length < pre.length) {
  8300. setResult(result, path, current);
  8301. } else {
  8302. current.forEach(function (item, index) {
  8303. _diff(item, pre[index], path + '[' + index + ']', result);
  8304. });
  8305. }
  8306. }
  8307. } else {
  8308. setResult(result, path, current);
  8309. }
  8310. }
  8311. function setResult(result, k, v) {
  8312. // if (type(v) != FUNCTIONTYPE) {
  8313. result[k] = v;
  8314. // }
  8315. }
  8316. function type(obj) {
  8317. return Object.prototype.toString.call(obj)
  8318. }
  8319. /* */
  8320. function flushCallbacks$1(vm) {
  8321. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8322. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8323. var mpInstance = vm.$scope;
  8324. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8325. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8326. }
  8327. var copies = vm.__next_tick_callbacks.slice(0);
  8328. vm.__next_tick_callbacks.length = 0;
  8329. for (var i = 0; i < copies.length; i++) {
  8330. copies[i]();
  8331. }
  8332. }
  8333. }
  8334. function hasRenderWatcher(vm) {
  8335. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8336. }
  8337. function nextTick$1(vm, cb) {
  8338. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8339. //2.nextTick 之前存在 render watcher
  8340. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8341. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8342. var mpInstance = vm.$scope;
  8343. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8344. ']:nextVueTick');
  8345. }
  8346. return nextTick(cb, vm)
  8347. }else{
  8348. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8349. var mpInstance$1 = vm.$scope;
  8350. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8351. ']:nextMPTick');
  8352. }
  8353. }
  8354. var _resolve;
  8355. if (!vm.__next_tick_callbacks) {
  8356. vm.__next_tick_callbacks = [];
  8357. }
  8358. vm.__next_tick_callbacks.push(function () {
  8359. if (cb) {
  8360. try {
  8361. cb.call(vm);
  8362. } catch (e) {
  8363. handleError(e, vm, 'nextTick');
  8364. }
  8365. } else if (_resolve) {
  8366. _resolve(vm);
  8367. }
  8368. });
  8369. // $flow-disable-line
  8370. if (!cb && typeof Promise !== 'undefined') {
  8371. return new Promise(function (resolve) {
  8372. _resolve = resolve;
  8373. })
  8374. }
  8375. }
  8376. /* */
  8377. function clearInstance(key, value) {
  8378. // 简易去除 Vue 和小程序组件实例
  8379. if (value) {
  8380. if (value._isVue || value.__v_isMPComponent) {
  8381. return {}
  8382. }
  8383. }
  8384. return value
  8385. }
  8386. function cloneWithData(vm) {
  8387. // 确保当前 vm 所有数据被同步
  8388. var ret = Object.create(null);
  8389. var dataKeys = [].concat(
  8390. Object.keys(vm._data || {}),
  8391. Object.keys(vm._computedWatchers || {}));
  8392. dataKeys.reduce(function(ret, key) {
  8393. ret[key] = vm[key];
  8394. return ret
  8395. }, ret);
  8396. // vue-composition-api
  8397. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8398. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8399. if (rawBindings) {
  8400. Object.keys(rawBindings).forEach(function (key) {
  8401. ret[key] = vm[key];
  8402. });
  8403. }
  8404. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8405. Object.assign(ret, vm.$mp.data || {});
  8406. if (
  8407. Array.isArray(vm.$options.behaviors) &&
  8408. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8409. ) { //form-field
  8410. ret['name'] = vm.name;
  8411. ret['value'] = vm.value;
  8412. }
  8413. return JSON.parse(JSON.stringify(ret, clearInstance))
  8414. }
  8415. var patch = function(oldVnode, vnode) {
  8416. var this$1 = this;
  8417. if (vnode === null) { //destroy
  8418. return
  8419. }
  8420. if (this.mpType === 'page' || this.mpType === 'component') {
  8421. var mpInstance = this.$scope;
  8422. var data = Object.create(null);
  8423. try {
  8424. data = cloneWithData(this);
  8425. } catch (err) {
  8426. console.error(err);
  8427. }
  8428. data.__webviewId__ = mpInstance.data.__webviewId__;
  8429. var mpData = Object.create(null);
  8430. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8431. mpData[key] = mpInstance.data[key];
  8432. });
  8433. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8434. if (Object.keys(diffData).length) {
  8435. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8436. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8437. ']差量更新',
  8438. JSON.stringify(diffData));
  8439. }
  8440. this.__next_tick_pending = true;
  8441. mpInstance.setData(diffData, function () {
  8442. this$1.__next_tick_pending = false;
  8443. flushCallbacks$1(this$1);
  8444. });
  8445. } else {
  8446. flushCallbacks$1(this);
  8447. }
  8448. }
  8449. };
  8450. /* */
  8451. function createEmptyRender() {
  8452. }
  8453. function mountComponent$1(
  8454. vm,
  8455. el,
  8456. hydrating
  8457. ) {
  8458. if (!vm.mpType) {//main.js 中的 new Vue
  8459. return vm
  8460. }
  8461. if (vm.mpType === 'app') {
  8462. vm.$options.render = createEmptyRender;
  8463. }
  8464. if (!vm.$options.render) {
  8465. vm.$options.render = createEmptyRender;
  8466. if (true) {
  8467. /* istanbul ignore if */
  8468. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8469. vm.$options.el || el) {
  8470. warn(
  8471. 'You are using the runtime-only build of Vue where the template ' +
  8472. 'compiler is not available. Either pre-compile the templates into ' +
  8473. 'render functions, or use the compiler-included build.',
  8474. vm
  8475. );
  8476. } else {
  8477. warn(
  8478. 'Failed to mount component: template or render function not defined.',
  8479. vm
  8480. );
  8481. }
  8482. }
  8483. }
  8484. !vm._$fallback && callHook(vm, 'beforeMount');
  8485. var updateComponent = function () {
  8486. vm._update(vm._render(), hydrating);
  8487. };
  8488. // we set this to vm._watcher inside the watcher's constructor
  8489. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8490. // component's mounted hook), which relies on vm._watcher being already defined
  8491. new Watcher(vm, updateComponent, noop, {
  8492. before: function before() {
  8493. if (vm._isMounted && !vm._isDestroyed) {
  8494. callHook(vm, 'beforeUpdate');
  8495. }
  8496. }
  8497. }, true /* isRenderWatcher */);
  8498. hydrating = false;
  8499. return vm
  8500. }
  8501. /* */
  8502. function renderClass (
  8503. staticClass,
  8504. dynamicClass
  8505. ) {
  8506. if (isDef(staticClass) || isDef(dynamicClass)) {
  8507. return concat(staticClass, stringifyClass(dynamicClass))
  8508. }
  8509. /* istanbul ignore next */
  8510. return ''
  8511. }
  8512. function concat (a, b) {
  8513. return a ? b ? (a + ' ' + b) : a : (b || '')
  8514. }
  8515. function stringifyClass (value) {
  8516. if (Array.isArray(value)) {
  8517. return stringifyArray(value)
  8518. }
  8519. if (isObject(value)) {
  8520. return stringifyObject(value)
  8521. }
  8522. if (typeof value === 'string') {
  8523. return value
  8524. }
  8525. /* istanbul ignore next */
  8526. return ''
  8527. }
  8528. function stringifyArray (value) {
  8529. var res = '';
  8530. var stringified;
  8531. for (var i = 0, l = value.length; i < l; i++) {
  8532. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8533. if (res) { res += ' '; }
  8534. res += stringified;
  8535. }
  8536. }
  8537. return res
  8538. }
  8539. function stringifyObject (value) {
  8540. var res = '';
  8541. for (var key in value) {
  8542. if (value[key]) {
  8543. if (res) { res += ' '; }
  8544. res += key;
  8545. }
  8546. }
  8547. return res
  8548. }
  8549. /* */
  8550. var parseStyleText = cached(function (cssText) {
  8551. var res = {};
  8552. var listDelimiter = /;(?![^(]*\))/g;
  8553. var propertyDelimiter = /:(.+)/;
  8554. cssText.split(listDelimiter).forEach(function (item) {
  8555. if (item) {
  8556. var tmp = item.split(propertyDelimiter);
  8557. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8558. }
  8559. });
  8560. return res
  8561. });
  8562. // normalize possible array / string values into Object
  8563. function normalizeStyleBinding (bindingStyle) {
  8564. if (Array.isArray(bindingStyle)) {
  8565. return toObject(bindingStyle)
  8566. }
  8567. if (typeof bindingStyle === 'string') {
  8568. return parseStyleText(bindingStyle)
  8569. }
  8570. return bindingStyle
  8571. }
  8572. /* */
  8573. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8574. function getTarget(obj, path) {
  8575. var parts = path.split('.');
  8576. var key = parts[0];
  8577. if (key.indexOf('__$n') === 0) { //number index
  8578. key = parseInt(key.replace('__$n', ''));
  8579. }
  8580. if (parts.length === 1) {
  8581. return obj[key]
  8582. }
  8583. return getTarget(obj[key], parts.slice(1).join('.'))
  8584. }
  8585. function internalMixin(Vue) {
  8586. Vue.config.errorHandler = function(err, vm, info) {
  8587. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8588. console.error(err);
  8589. /* eslint-disable no-undef */
  8590. var app = typeof getApp === 'function' && getApp();
  8591. if (app && app.onError) {
  8592. app.onError(err);
  8593. }
  8594. };
  8595. var oldEmit = Vue.prototype.$emit;
  8596. Vue.prototype.$emit = function(event) {
  8597. if (this.$scope && event) {
  8598. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8599. if (triggerEvent) {
  8600. try {
  8601. triggerEvent.call(this.$scope, event, {
  8602. __args__: toArray(arguments, 1)
  8603. });
  8604. } catch (error) {
  8605. }
  8606. }
  8607. }
  8608. return oldEmit.apply(this, arguments)
  8609. };
  8610. Vue.prototype.$nextTick = function(fn) {
  8611. return nextTick$1(this, fn)
  8612. };
  8613. MP_METHODS.forEach(function (method) {
  8614. Vue.prototype[method] = function(args) {
  8615. if (this.$scope && this.$scope[method]) {
  8616. return this.$scope[method](args)
  8617. }
  8618. // mp-alipay
  8619. if (typeof my === 'undefined') {
  8620. return
  8621. }
  8622. if (method === 'createSelectorQuery') {
  8623. /* eslint-disable no-undef */
  8624. return my.createSelectorQuery(args)
  8625. } else if (method === 'createIntersectionObserver') {
  8626. /* eslint-disable no-undef */
  8627. return my.createIntersectionObserver(args)
  8628. }
  8629. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8630. };
  8631. });
  8632. Vue.prototype.__init_provide = initProvide;
  8633. Vue.prototype.__init_injections = initInjections;
  8634. Vue.prototype.__call_hook = function(hook, args) {
  8635. var vm = this;
  8636. // #7573 disable dep collection when invoking lifecycle hooks
  8637. pushTarget();
  8638. var handlers = vm.$options[hook];
  8639. var info = hook + " hook";
  8640. var ret;
  8641. if (handlers) {
  8642. for (var i = 0, j = handlers.length; i < j; i++) {
  8643. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8644. }
  8645. }
  8646. if (vm._hasHookEvent) {
  8647. vm.$emit('hook:' + hook, args);
  8648. }
  8649. popTarget();
  8650. return ret
  8651. };
  8652. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8653. if (Array.isArray(modifiers)) {
  8654. if (modifiers.indexOf('trim') !== -1) {
  8655. value = value.trim();
  8656. }
  8657. if (modifiers.indexOf('number') !== -1) {
  8658. value = this._n(value);
  8659. }
  8660. }
  8661. if (!target) {
  8662. target = this;
  8663. }
  8664. // 解决动态属性添加
  8665. Vue.set(target, key, value);
  8666. };
  8667. Vue.prototype.__set_sync = function(target, key, value) {
  8668. if (!target) {
  8669. target = this;
  8670. }
  8671. // 解决动态属性添加
  8672. Vue.set(target, key, value);
  8673. };
  8674. Vue.prototype.__get_orig = function(item) {
  8675. if (isPlainObject(item)) {
  8676. return item['$orig'] || item
  8677. }
  8678. return item
  8679. };
  8680. Vue.prototype.__get_value = function(dataPath, target) {
  8681. return getTarget(target || this, dataPath)
  8682. };
  8683. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8684. return renderClass(staticClass, dynamicClass)
  8685. };
  8686. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8687. if (!dynamicStyle && !staticStyle) {
  8688. return ''
  8689. }
  8690. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8691. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8692. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8693. };
  8694. Vue.prototype.__map = function(val, iteratee) {
  8695. //TODO 暂不考虑 string
  8696. var ret, i, l, keys, key;
  8697. if (Array.isArray(val)) {
  8698. ret = new Array(val.length);
  8699. for (i = 0, l = val.length; i < l; i++) {
  8700. ret[i] = iteratee(val[i], i);
  8701. }
  8702. return ret
  8703. } else if (isObject(val)) {
  8704. keys = Object.keys(val);
  8705. ret = Object.create(null);
  8706. for (i = 0, l = keys.length; i < l; i++) {
  8707. key = keys[i];
  8708. ret[key] = iteratee(val[key], key, i);
  8709. }
  8710. return ret
  8711. } else if (typeof val === 'number') {
  8712. ret = new Array(val);
  8713. for (i = 0, l = val; i < l; i++) {
  8714. // 第一个参数暂时仍和小程序一致
  8715. ret[i] = iteratee(i, i);
  8716. }
  8717. return ret
  8718. }
  8719. return []
  8720. };
  8721. }
  8722. /* */
  8723. var LIFECYCLE_HOOKS$1 = [
  8724. //App
  8725. 'onLaunch',
  8726. 'onShow',
  8727. 'onHide',
  8728. 'onUniNViewMessage',
  8729. 'onPageNotFound',
  8730. 'onThemeChange',
  8731. 'onError',
  8732. 'onUnhandledRejection',
  8733. //Page
  8734. 'onInit',
  8735. 'onLoad',
  8736. // 'onShow',
  8737. 'onReady',
  8738. // 'onHide',
  8739. 'onUnload',
  8740. 'onPullDownRefresh',
  8741. 'onReachBottom',
  8742. 'onTabItemTap',
  8743. 'onAddToFavorites',
  8744. 'onShareTimeline',
  8745. 'onShareAppMessage',
  8746. 'onResize',
  8747. 'onPageScroll',
  8748. 'onNavigationBarButtonTap',
  8749. 'onBackPress',
  8750. 'onNavigationBarSearchInputChanged',
  8751. 'onNavigationBarSearchInputConfirmed',
  8752. 'onNavigationBarSearchInputClicked',
  8753. 'onUploadDouyinVideo',
  8754. 'onNFCReadMessage',
  8755. //Component
  8756. // 'onReady', // 兼容旧版本,应该移除该事件
  8757. 'onPageShow',
  8758. 'onPageHide',
  8759. 'onPageResize'
  8760. ];
  8761. function lifecycleMixin$1(Vue) {
  8762. //fixed vue-class-component
  8763. var oldExtend = Vue.extend;
  8764. Vue.extend = function(extendOptions) {
  8765. extendOptions = extendOptions || {};
  8766. var methods = extendOptions.methods;
  8767. if (methods) {
  8768. Object.keys(methods).forEach(function (methodName) {
  8769. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8770. extendOptions[methodName] = methods[methodName];
  8771. delete methods[methodName];
  8772. }
  8773. });
  8774. }
  8775. return oldExtend.call(this, extendOptions)
  8776. };
  8777. var strategies = Vue.config.optionMergeStrategies;
  8778. var mergeHook = strategies.created;
  8779. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8780. strategies[hook] = mergeHook;
  8781. });
  8782. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8783. }
  8784. /* */
  8785. // install platform patch function
  8786. Vue.prototype.__patch__ = patch;
  8787. // public mount method
  8788. Vue.prototype.$mount = function(
  8789. el ,
  8790. hydrating
  8791. ) {
  8792. return mountComponent$1(this, el, hydrating)
  8793. };
  8794. lifecycleMixin$1(Vue);
  8795. internalMixin(Vue);
  8796. /* */
  8797. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8798. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8799. /***/ }),
  8800. /* 26 */
  8801. /*!*****************************************************************************!*\
  8802. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/pages.json ***!
  8803. \*****************************************************************************/
  8804. /*! no static exports found */
  8805. /***/ (function(module, exports) {
  8806. /***/ }),
  8807. /* 27 */,
  8808. /* 28 */,
  8809. /* 29 */,
  8810. /* 30 */
  8811. /*!***************************************************************************************!*\
  8812. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/login.js ***!
  8813. \***************************************************************************************/
  8814. /*! no static exports found */
  8815. /***/ (function(module, exports, __webpack_require__) {
  8816. "use strict";
  8817. Object.defineProperty(exports, "__esModule", {
  8818. value: true
  8819. });
  8820. exports.getImgCode = getImgCode;
  8821. exports.getUserInfo = getUserInfo;
  8822. exports.login = login;
  8823. exports.sendPhoneCode = sendPhoneCode;
  8824. var _request = __webpack_require__(/*! @/request/request.js */ 31);
  8825. /*
  8826. * 登录
  8827. *
  8828. */
  8829. function login(data) {
  8830. return (0, _request.request)({
  8831. url: "/manager/login",
  8832. method: 'post',
  8833. data: data
  8834. });
  8835. }
  8836. /*
  8837. * 获取图片验证码
  8838. *
  8839. */
  8840. function getImgCode() {
  8841. return (0, _request.request)({
  8842. url: "/manager/pCode",
  8843. method: 'get'
  8844. });
  8845. }
  8846. /*
  8847. * 发送手机验证码
  8848. *
  8849. */
  8850. function sendPhoneCode(phone, vCode) {
  8851. return (0, _request.request)({
  8852. url: "/manager/send/".concat(phone, "/").concat(vCode),
  8853. method: 'get'
  8854. });
  8855. }
  8856. /*
  8857. * 获取当前登录者信息
  8858. * @param null
  8859. *
  8860. */
  8861. function getUserInfo(data) {
  8862. return (0, _request.request)({
  8863. url: "/manager/userContext",
  8864. method: 'get'
  8865. });
  8866. }
  8867. /***/ }),
  8868. /* 31 */
  8869. /*!*************************************************************************************!*\
  8870. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/request.js ***!
  8871. \*************************************************************************************/
  8872. /*! no static exports found */
  8873. /***/ (function(module, exports, __webpack_require__) {
  8874. "use strict";
  8875. /* WEBPACK VAR INJECTION */(function(uni) {
  8876. Object.defineProperty(exports, "__esModule", {
  8877. value: true
  8878. });
  8879. exports.request = request;
  8880. var BASE_URL = 'https://www.waywish.com';
  8881. function request(options) {
  8882. return new Promise(function (resolve, reject) {
  8883. var header = options.header || {
  8884. 'Content-Type': 'application/json'
  8885. };
  8886. if (uni.getStorageSync('token')) header['token'] = uni.getStorageSync('token');
  8887. uni.request({
  8888. url: BASE_URL + options.url,
  8889. // 服务器url
  8890. method: options.method || 'GET',
  8891. // 请求方法,默认为GET
  8892. data: options.data || {},
  8893. // 请求参数
  8894. header: header,
  8895. // 设置请求的 header
  8896. success: function success(res) {
  8897. // 请求成功
  8898. console.log(res);
  8899. if (res.statusCode === 200) {
  8900. resolve(res.data);
  8901. } else {
  8902. // 可以根据项目要求修改错误处理
  8903. reject(res.data);
  8904. uni.hideLoading();
  8905. }
  8906. },
  8907. fail: function fail(err) {
  8908. // 请求失败处理
  8909. uni.showToast({
  8910. title: '出错了,请联系管理员~',
  8911. icon: 'none'
  8912. });
  8913. reject(err);
  8914. uni.hideLoading();
  8915. }
  8916. });
  8917. });
  8918. }
  8919. ;
  8920. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  8921. /***/ }),
  8922. /* 32 */,
  8923. /* 33 */,
  8924. /* 34 */
  8925. /*!**********************************************************************************************************!*\
  8926. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8927. \**********************************************************************************************************/
  8928. /*! exports provided: default */
  8929. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8930. "use strict";
  8931. __webpack_require__.r(__webpack_exports__);
  8932. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8933. /* globals __VUE_SSR_CONTEXT__ */
  8934. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8935. // This module is a runtime utility for cleaner component module output and will
  8936. // be included in the final webpack user bundle.
  8937. function normalizeComponent (
  8938. scriptExports,
  8939. render,
  8940. staticRenderFns,
  8941. functionalTemplate,
  8942. injectStyles,
  8943. scopeId,
  8944. moduleIdentifier, /* server only */
  8945. shadowMode, /* vue-cli only */
  8946. components, // fixed by xxxxxx auto components
  8947. renderjs // fixed by xxxxxx renderjs
  8948. ) {
  8949. // Vue.extend constructor export interop
  8950. var options = typeof scriptExports === 'function'
  8951. ? scriptExports.options
  8952. : scriptExports
  8953. // fixed by xxxxxx auto components
  8954. if (components) {
  8955. if (!options.components) {
  8956. options.components = {}
  8957. }
  8958. var hasOwn = Object.prototype.hasOwnProperty
  8959. for (var name in components) {
  8960. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8961. options.components[name] = components[name]
  8962. }
  8963. }
  8964. }
  8965. // fixed by xxxxxx renderjs
  8966. if (renderjs) {
  8967. if(typeof renderjs.beforeCreate === 'function'){
  8968. renderjs.beforeCreate = [renderjs.beforeCreate]
  8969. }
  8970. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8971. this[renderjs.__module] = this
  8972. });
  8973. (options.mixins || (options.mixins = [])).push(renderjs)
  8974. }
  8975. // render functions
  8976. if (render) {
  8977. options.render = render
  8978. options.staticRenderFns = staticRenderFns
  8979. options._compiled = true
  8980. }
  8981. // functional template
  8982. if (functionalTemplate) {
  8983. options.functional = true
  8984. }
  8985. // scopedId
  8986. if (scopeId) {
  8987. options._scopeId = 'data-v-' + scopeId
  8988. }
  8989. var hook
  8990. if (moduleIdentifier) { // server build
  8991. hook = function (context) {
  8992. // 2.3 injection
  8993. context =
  8994. context || // cached call
  8995. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8996. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8997. // 2.2 with runInNewContext: true
  8998. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8999. context = __VUE_SSR_CONTEXT__
  9000. }
  9001. // inject component styles
  9002. if (injectStyles) {
  9003. injectStyles.call(this, context)
  9004. }
  9005. // register component module identifier for async chunk inferrence
  9006. if (context && context._registeredComponents) {
  9007. context._registeredComponents.add(moduleIdentifier)
  9008. }
  9009. }
  9010. // used by ssr in case component is cached and beforeCreate
  9011. // never gets called
  9012. options._ssrRegister = hook
  9013. } else if (injectStyles) {
  9014. hook = shadowMode
  9015. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9016. : injectStyles
  9017. }
  9018. if (hook) {
  9019. if (options.functional) {
  9020. // for template-only hot-reload because in that case the render fn doesn't
  9021. // go through the normalizer
  9022. options._injectStyles = hook
  9023. // register for functioal component in vue file
  9024. var originalRender = options.render
  9025. options.render = function renderWithStyleInjection (h, context) {
  9026. hook.call(context)
  9027. return originalRender(h, context)
  9028. }
  9029. } else {
  9030. // inject component registration as beforeCreate hook
  9031. var existing = options.beforeCreate
  9032. options.beforeCreate = existing
  9033. ? [].concat(existing, hook)
  9034. : [hook]
  9035. }
  9036. }
  9037. return {
  9038. exports: scriptExports,
  9039. options: options
  9040. }
  9041. }
  9042. /***/ }),
  9043. /* 35 */
  9044. /*!*********************************************************************************!*\
  9045. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/index.js ***!
  9046. \*********************************************************************************/
  9047. /*! no static exports found */
  9048. /***/ (function(module, exports, __webpack_require__) {
  9049. "use strict";
  9050. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9051. Object.defineProperty(exports, "__esModule", {
  9052. value: true
  9053. });
  9054. exports.default = void 0;
  9055. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  9056. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 36));
  9057. var _getters = _interopRequireDefault(__webpack_require__(/*! ./getters */ 37));
  9058. _vue.default.use(_vuex.default);
  9059. var modulesFiles = __webpack_require__(38);
  9060. var modules = modulesFiles.keys().reduce(function (modules, modulePath) {
  9061. var moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1');
  9062. var value = modulesFiles(modulePath);
  9063. modules[moduleName] = value.default;
  9064. return modules;
  9065. }, {});
  9066. var store = new _vuex.default.Store({
  9067. modules: modules,
  9068. getters: _getters.default
  9069. });
  9070. var _default = store;
  9071. exports.default = _default;
  9072. /***/ }),
  9073. /* 36 */
  9074. /*!**************************************************************************************!*\
  9075. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  9076. \**************************************************************************************/
  9077. /*! no static exports found */
  9078. /***/ (function(module, exports, __webpack_require__) {
  9079. "use strict";
  9080. /* WEBPACK VAR INJECTION */(function(global) {/*!
  9081. * vuex v3.6.2
  9082. * (c) 2021 Evan You
  9083. * @license MIT
  9084. */
  9085. function applyMixin (Vue) {
  9086. var version = Number(Vue.version.split('.')[0]);
  9087. if (version >= 2) {
  9088. Vue.mixin({ beforeCreate: vuexInit });
  9089. } else {
  9090. // override init and inject vuex init procedure
  9091. // for 1.x backwards compatibility.
  9092. var _init = Vue.prototype._init;
  9093. Vue.prototype._init = function (options) {
  9094. if ( options === void 0 ) options = {};
  9095. options.init = options.init
  9096. ? [vuexInit].concat(options.init)
  9097. : vuexInit;
  9098. _init.call(this, options);
  9099. };
  9100. }
  9101. /**
  9102. * Vuex init hook, injected into each instances init hooks list.
  9103. */
  9104. function vuexInit () {
  9105. var options = this.$options;
  9106. // store injection
  9107. if (options.store) {
  9108. this.$store = typeof options.store === 'function'
  9109. ? options.store()
  9110. : options.store;
  9111. } else if (options.parent && options.parent.$store) {
  9112. this.$store = options.parent.$store;
  9113. }
  9114. }
  9115. }
  9116. var target = typeof window !== 'undefined'
  9117. ? window
  9118. : typeof global !== 'undefined'
  9119. ? global
  9120. : {};
  9121. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  9122. function devtoolPlugin (store) {
  9123. if (!devtoolHook) { return }
  9124. store._devtoolHook = devtoolHook;
  9125. devtoolHook.emit('vuex:init', store);
  9126. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  9127. store.replaceState(targetState);
  9128. });
  9129. store.subscribe(function (mutation, state) {
  9130. devtoolHook.emit('vuex:mutation', mutation, state);
  9131. }, { prepend: true });
  9132. store.subscribeAction(function (action, state) {
  9133. devtoolHook.emit('vuex:action', action, state);
  9134. }, { prepend: true });
  9135. }
  9136. /**
  9137. * Get the first item that pass the test
  9138. * by second argument function
  9139. *
  9140. * @param {Array} list
  9141. * @param {Function} f
  9142. * @return {*}
  9143. */
  9144. function find (list, f) {
  9145. return list.filter(f)[0]
  9146. }
  9147. /**
  9148. * Deep copy the given object considering circular structure.
  9149. * This function caches all nested objects and its copies.
  9150. * If it detects circular structure, use cached copy to avoid infinite loop.
  9151. *
  9152. * @param {*} obj
  9153. * @param {Array<Object>} cache
  9154. * @return {*}
  9155. */
  9156. function deepCopy (obj, cache) {
  9157. if ( cache === void 0 ) cache = [];
  9158. // just return if obj is immutable value
  9159. if (obj === null || typeof obj !== 'object') {
  9160. return obj
  9161. }
  9162. // if obj is hit, it is in circular structure
  9163. var hit = find(cache, function (c) { return c.original === obj; });
  9164. if (hit) {
  9165. return hit.copy
  9166. }
  9167. var copy = Array.isArray(obj) ? [] : {};
  9168. // put the copy into cache at first
  9169. // because we want to refer it in recursive deepCopy
  9170. cache.push({
  9171. original: obj,
  9172. copy: copy
  9173. });
  9174. Object.keys(obj).forEach(function (key) {
  9175. copy[key] = deepCopy(obj[key], cache);
  9176. });
  9177. return copy
  9178. }
  9179. /**
  9180. * forEach for object
  9181. */
  9182. function forEachValue (obj, fn) {
  9183. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  9184. }
  9185. function isObject (obj) {
  9186. return obj !== null && typeof obj === 'object'
  9187. }
  9188. function isPromise (val) {
  9189. return val && typeof val.then === 'function'
  9190. }
  9191. function assert (condition, msg) {
  9192. if (!condition) { throw new Error(("[vuex] " + msg)) }
  9193. }
  9194. function partial (fn, arg) {
  9195. return function () {
  9196. return fn(arg)
  9197. }
  9198. }
  9199. // Base data struct for store's module, package with some attribute and method
  9200. var Module = function Module (rawModule, runtime) {
  9201. this.runtime = runtime;
  9202. // Store some children item
  9203. this._children = Object.create(null);
  9204. // Store the origin module object which passed by programmer
  9205. this._rawModule = rawModule;
  9206. var rawState = rawModule.state;
  9207. // Store the origin module's state
  9208. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  9209. };
  9210. var prototypeAccessors = { namespaced: { configurable: true } };
  9211. prototypeAccessors.namespaced.get = function () {
  9212. return !!this._rawModule.namespaced
  9213. };
  9214. Module.prototype.addChild = function addChild (key, module) {
  9215. this._children[key] = module;
  9216. };
  9217. Module.prototype.removeChild = function removeChild (key) {
  9218. delete this._children[key];
  9219. };
  9220. Module.prototype.getChild = function getChild (key) {
  9221. return this._children[key]
  9222. };
  9223. Module.prototype.hasChild = function hasChild (key) {
  9224. return key in this._children
  9225. };
  9226. Module.prototype.update = function update (rawModule) {
  9227. this._rawModule.namespaced = rawModule.namespaced;
  9228. if (rawModule.actions) {
  9229. this._rawModule.actions = rawModule.actions;
  9230. }
  9231. if (rawModule.mutations) {
  9232. this._rawModule.mutations = rawModule.mutations;
  9233. }
  9234. if (rawModule.getters) {
  9235. this._rawModule.getters = rawModule.getters;
  9236. }
  9237. };
  9238. Module.prototype.forEachChild = function forEachChild (fn) {
  9239. forEachValue(this._children, fn);
  9240. };
  9241. Module.prototype.forEachGetter = function forEachGetter (fn) {
  9242. if (this._rawModule.getters) {
  9243. forEachValue(this._rawModule.getters, fn);
  9244. }
  9245. };
  9246. Module.prototype.forEachAction = function forEachAction (fn) {
  9247. if (this._rawModule.actions) {
  9248. forEachValue(this._rawModule.actions, fn);
  9249. }
  9250. };
  9251. Module.prototype.forEachMutation = function forEachMutation (fn) {
  9252. if (this._rawModule.mutations) {
  9253. forEachValue(this._rawModule.mutations, fn);
  9254. }
  9255. };
  9256. Object.defineProperties( Module.prototype, prototypeAccessors );
  9257. var ModuleCollection = function ModuleCollection (rawRootModule) {
  9258. // register root module (Vuex.Store options)
  9259. this.register([], rawRootModule, false);
  9260. };
  9261. ModuleCollection.prototype.get = function get (path) {
  9262. return path.reduce(function (module, key) {
  9263. return module.getChild(key)
  9264. }, this.root)
  9265. };
  9266. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  9267. var module = this.root;
  9268. return path.reduce(function (namespace, key) {
  9269. module = module.getChild(key);
  9270. return namespace + (module.namespaced ? key + '/' : '')
  9271. }, '')
  9272. };
  9273. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  9274. update([], this.root, rawRootModule);
  9275. };
  9276. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  9277. var this$1 = this;
  9278. if ( runtime === void 0 ) runtime = true;
  9279. if ((true)) {
  9280. assertRawModule(path, rawModule);
  9281. }
  9282. var newModule = new Module(rawModule, runtime);
  9283. if (path.length === 0) {
  9284. this.root = newModule;
  9285. } else {
  9286. var parent = this.get(path.slice(0, -1));
  9287. parent.addChild(path[path.length - 1], newModule);
  9288. }
  9289. // register nested modules
  9290. if (rawModule.modules) {
  9291. forEachValue(rawModule.modules, function (rawChildModule, key) {
  9292. this$1.register(path.concat(key), rawChildModule, runtime);
  9293. });
  9294. }
  9295. };
  9296. ModuleCollection.prototype.unregister = function unregister (path) {
  9297. var parent = this.get(path.slice(0, -1));
  9298. var key = path[path.length - 1];
  9299. var child = parent.getChild(key);
  9300. if (!child) {
  9301. if ((true)) {
  9302. console.warn(
  9303. "[vuex] trying to unregister module '" + key + "', which is " +
  9304. "not registered"
  9305. );
  9306. }
  9307. return
  9308. }
  9309. if (!child.runtime) {
  9310. return
  9311. }
  9312. parent.removeChild(key);
  9313. };
  9314. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  9315. var parent = this.get(path.slice(0, -1));
  9316. var key = path[path.length - 1];
  9317. if (parent) {
  9318. return parent.hasChild(key)
  9319. }
  9320. return false
  9321. };
  9322. function update (path, targetModule, newModule) {
  9323. if ((true)) {
  9324. assertRawModule(path, newModule);
  9325. }
  9326. // update target module
  9327. targetModule.update(newModule);
  9328. // update nested modules
  9329. if (newModule.modules) {
  9330. for (var key in newModule.modules) {
  9331. if (!targetModule.getChild(key)) {
  9332. if ((true)) {
  9333. console.warn(
  9334. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  9335. 'manual reload is needed'
  9336. );
  9337. }
  9338. return
  9339. }
  9340. update(
  9341. path.concat(key),
  9342. targetModule.getChild(key),
  9343. newModule.modules[key]
  9344. );
  9345. }
  9346. }
  9347. }
  9348. var functionAssert = {
  9349. assert: function (value) { return typeof value === 'function'; },
  9350. expected: 'function'
  9351. };
  9352. var objectAssert = {
  9353. assert: function (value) { return typeof value === 'function' ||
  9354. (typeof value === 'object' && typeof value.handler === 'function'); },
  9355. expected: 'function or object with "handler" function'
  9356. };
  9357. var assertTypes = {
  9358. getters: functionAssert,
  9359. mutations: functionAssert,
  9360. actions: objectAssert
  9361. };
  9362. function assertRawModule (path, rawModule) {
  9363. Object.keys(assertTypes).forEach(function (key) {
  9364. if (!rawModule[key]) { return }
  9365. var assertOptions = assertTypes[key];
  9366. forEachValue(rawModule[key], function (value, type) {
  9367. assert(
  9368. assertOptions.assert(value),
  9369. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  9370. );
  9371. });
  9372. });
  9373. }
  9374. function makeAssertionMessage (path, key, type, value, expected) {
  9375. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  9376. if (path.length > 0) {
  9377. buf += " in module \"" + (path.join('.')) + "\"";
  9378. }
  9379. buf += " is " + (JSON.stringify(value)) + ".";
  9380. return buf
  9381. }
  9382. var Vue; // bind on install
  9383. var Store = function Store (options) {
  9384. var this$1 = this;
  9385. if ( options === void 0 ) options = {};
  9386. // Auto install if it is not done yet and `window` has `Vue`.
  9387. // To allow users to avoid auto-installation in some cases,
  9388. // this code should be placed here. See #731
  9389. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  9390. install(window.Vue);
  9391. }
  9392. if ((true)) {
  9393. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  9394. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  9395. assert(this instanceof Store, "store must be called with the new operator.");
  9396. }
  9397. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  9398. var strict = options.strict; if ( strict === void 0 ) strict = false;
  9399. // store internal state
  9400. this._committing = false;
  9401. this._actions = Object.create(null);
  9402. this._actionSubscribers = [];
  9403. this._mutations = Object.create(null);
  9404. this._wrappedGetters = Object.create(null);
  9405. this._modules = new ModuleCollection(options);
  9406. this._modulesNamespaceMap = Object.create(null);
  9407. this._subscribers = [];
  9408. this._watcherVM = new Vue();
  9409. this._makeLocalGettersCache = Object.create(null);
  9410. // bind commit and dispatch to self
  9411. var store = this;
  9412. var ref = this;
  9413. var dispatch = ref.dispatch;
  9414. var commit = ref.commit;
  9415. this.dispatch = function boundDispatch (type, payload) {
  9416. return dispatch.call(store, type, payload)
  9417. };
  9418. this.commit = function boundCommit (type, payload, options) {
  9419. return commit.call(store, type, payload, options)
  9420. };
  9421. // strict mode
  9422. this.strict = strict;
  9423. var state = this._modules.root.state;
  9424. // init root module.
  9425. // this also recursively registers all sub-modules
  9426. // and collects all module getters inside this._wrappedGetters
  9427. installModule(this, state, [], this._modules.root);
  9428. // initialize the store vm, which is responsible for the reactivity
  9429. // (also registers _wrappedGetters as computed properties)
  9430. resetStoreVM(this, state);
  9431. // apply plugins
  9432. plugins.forEach(function (plugin) { return plugin(this$1); });
  9433. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  9434. if (useDevtools) {
  9435. devtoolPlugin(this);
  9436. }
  9437. };
  9438. var prototypeAccessors$1 = { state: { configurable: true } };
  9439. prototypeAccessors$1.state.get = function () {
  9440. return this._vm._data.$$state
  9441. };
  9442. prototypeAccessors$1.state.set = function (v) {
  9443. if ((true)) {
  9444. assert(false, "use store.replaceState() to explicit replace store state.");
  9445. }
  9446. };
  9447. Store.prototype.commit = function commit (_type, _payload, _options) {
  9448. var this$1 = this;
  9449. // check object-style commit
  9450. var ref = unifyObjectStyle(_type, _payload, _options);
  9451. var type = ref.type;
  9452. var payload = ref.payload;
  9453. var options = ref.options;
  9454. var mutation = { type: type, payload: payload };
  9455. var entry = this._mutations[type];
  9456. if (!entry) {
  9457. if ((true)) {
  9458. console.error(("[vuex] unknown mutation type: " + type));
  9459. }
  9460. return
  9461. }
  9462. this._withCommit(function () {
  9463. entry.forEach(function commitIterator (handler) {
  9464. handler(payload);
  9465. });
  9466. });
  9467. this._subscribers
  9468. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  9469. .forEach(function (sub) { return sub(mutation, this$1.state); });
  9470. if (
  9471. ( true) &&
  9472. options && options.silent
  9473. ) {
  9474. console.warn(
  9475. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  9476. 'Use the filter functionality in the vue-devtools'
  9477. );
  9478. }
  9479. };
  9480. Store.prototype.dispatch = function dispatch (_type, _payload) {
  9481. var this$1 = this;
  9482. // check object-style dispatch
  9483. var ref = unifyObjectStyle(_type, _payload);
  9484. var type = ref.type;
  9485. var payload = ref.payload;
  9486. var action = { type: type, payload: payload };
  9487. var entry = this._actions[type];
  9488. if (!entry) {
  9489. if ((true)) {
  9490. console.error(("[vuex] unknown action type: " + type));
  9491. }
  9492. return
  9493. }
  9494. try {
  9495. this._actionSubscribers
  9496. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  9497. .filter(function (sub) { return sub.before; })
  9498. .forEach(function (sub) { return sub.before(action, this$1.state); });
  9499. } catch (e) {
  9500. if ((true)) {
  9501. console.warn("[vuex] error in before action subscribers: ");
  9502. console.error(e);
  9503. }
  9504. }
  9505. var result = entry.length > 1
  9506. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  9507. : entry[0](payload);
  9508. return new Promise(function (resolve, reject) {
  9509. result.then(function (res) {
  9510. try {
  9511. this$1._actionSubscribers
  9512. .filter(function (sub) { return sub.after; })
  9513. .forEach(function (sub) { return sub.after(action, this$1.state); });
  9514. } catch (e) {
  9515. if ((true)) {
  9516. console.warn("[vuex] error in after action subscribers: ");
  9517. console.error(e);
  9518. }
  9519. }
  9520. resolve(res);
  9521. }, function (error) {
  9522. try {
  9523. this$1._actionSubscribers
  9524. .filter(function (sub) { return sub.error; })
  9525. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  9526. } catch (e) {
  9527. if ((true)) {
  9528. console.warn("[vuex] error in error action subscribers: ");
  9529. console.error(e);
  9530. }
  9531. }
  9532. reject(error);
  9533. });
  9534. })
  9535. };
  9536. Store.prototype.subscribe = function subscribe (fn, options) {
  9537. return genericSubscribe(fn, this._subscribers, options)
  9538. };
  9539. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  9540. var subs = typeof fn === 'function' ? { before: fn } : fn;
  9541. return genericSubscribe(subs, this._actionSubscribers, options)
  9542. };
  9543. Store.prototype.watch = function watch (getter, cb, options) {
  9544. var this$1 = this;
  9545. if ((true)) {
  9546. assert(typeof getter === 'function', "store.watch only accepts a function.");
  9547. }
  9548. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  9549. };
  9550. Store.prototype.replaceState = function replaceState (state) {
  9551. var this$1 = this;
  9552. this._withCommit(function () {
  9553. this$1._vm._data.$$state = state;
  9554. });
  9555. };
  9556. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  9557. if ( options === void 0 ) options = {};
  9558. if (typeof path === 'string') { path = [path]; }
  9559. if ((true)) {
  9560. assert(Array.isArray(path), "module path must be a string or an Array.");
  9561. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  9562. }
  9563. this._modules.register(path, rawModule);
  9564. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  9565. // reset store to update getters...
  9566. resetStoreVM(this, this.state);
  9567. };
  9568. Store.prototype.unregisterModule = function unregisterModule (path) {
  9569. var this$1 = this;
  9570. if (typeof path === 'string') { path = [path]; }
  9571. if ((true)) {
  9572. assert(Array.isArray(path), "module path must be a string or an Array.");
  9573. }
  9574. this._modules.unregister(path);
  9575. this._withCommit(function () {
  9576. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  9577. Vue.delete(parentState, path[path.length - 1]);
  9578. });
  9579. resetStore(this);
  9580. };
  9581. Store.prototype.hasModule = function hasModule (path) {
  9582. if (typeof path === 'string') { path = [path]; }
  9583. if ((true)) {
  9584. assert(Array.isArray(path), "module path must be a string or an Array.");
  9585. }
  9586. return this._modules.isRegistered(path)
  9587. };
  9588. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  9589. this._modules.update(newOptions);
  9590. resetStore(this, true);
  9591. };
  9592. Store.prototype._withCommit = function _withCommit (fn) {
  9593. var committing = this._committing;
  9594. this._committing = true;
  9595. fn();
  9596. this._committing = committing;
  9597. };
  9598. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  9599. function genericSubscribe (fn, subs, options) {
  9600. if (subs.indexOf(fn) < 0) {
  9601. options && options.prepend
  9602. ? subs.unshift(fn)
  9603. : subs.push(fn);
  9604. }
  9605. return function () {
  9606. var i = subs.indexOf(fn);
  9607. if (i > -1) {
  9608. subs.splice(i, 1);
  9609. }
  9610. }
  9611. }
  9612. function resetStore (store, hot) {
  9613. store._actions = Object.create(null);
  9614. store._mutations = Object.create(null);
  9615. store._wrappedGetters = Object.create(null);
  9616. store._modulesNamespaceMap = Object.create(null);
  9617. var state = store.state;
  9618. // init all modules
  9619. installModule(store, state, [], store._modules.root, true);
  9620. // reset vm
  9621. resetStoreVM(store, state, hot);
  9622. }
  9623. function resetStoreVM (store, state, hot) {
  9624. var oldVm = store._vm;
  9625. // bind store public getters
  9626. store.getters = {};
  9627. // reset local getters cache
  9628. store._makeLocalGettersCache = Object.create(null);
  9629. var wrappedGetters = store._wrappedGetters;
  9630. var computed = {};
  9631. forEachValue(wrappedGetters, function (fn, key) {
  9632. // use computed to leverage its lazy-caching mechanism
  9633. // direct inline function use will lead to closure preserving oldVm.
  9634. // using partial to return function with only arguments preserved in closure environment.
  9635. computed[key] = partial(fn, store);
  9636. Object.defineProperty(store.getters, key, {
  9637. get: function () { return store._vm[key]; },
  9638. enumerable: true // for local getters
  9639. });
  9640. });
  9641. // use a Vue instance to store the state tree
  9642. // suppress warnings just in case the user has added
  9643. // some funky global mixins
  9644. var silent = Vue.config.silent;
  9645. Vue.config.silent = true;
  9646. store._vm = new Vue({
  9647. data: {
  9648. $$state: state
  9649. },
  9650. computed: computed
  9651. });
  9652. Vue.config.silent = silent;
  9653. // enable strict mode for new vm
  9654. if (store.strict) {
  9655. enableStrictMode(store);
  9656. }
  9657. if (oldVm) {
  9658. if (hot) {
  9659. // dispatch changes in all subscribed watchers
  9660. // to force getter re-evaluation for hot reloading.
  9661. store._withCommit(function () {
  9662. oldVm._data.$$state = null;
  9663. });
  9664. }
  9665. Vue.nextTick(function () { return oldVm.$destroy(); });
  9666. }
  9667. }
  9668. function installModule (store, rootState, path, module, hot) {
  9669. var isRoot = !path.length;
  9670. var namespace = store._modules.getNamespace(path);
  9671. // register in namespace map
  9672. if (module.namespaced) {
  9673. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  9674. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  9675. }
  9676. store._modulesNamespaceMap[namespace] = module;
  9677. }
  9678. // set state
  9679. if (!isRoot && !hot) {
  9680. var parentState = getNestedState(rootState, path.slice(0, -1));
  9681. var moduleName = path[path.length - 1];
  9682. store._withCommit(function () {
  9683. if ((true)) {
  9684. if (moduleName in parentState) {
  9685. console.warn(
  9686. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  9687. );
  9688. }
  9689. }
  9690. Vue.set(parentState, moduleName, module.state);
  9691. });
  9692. }
  9693. var local = module.context = makeLocalContext(store, namespace, path);
  9694. module.forEachMutation(function (mutation, key) {
  9695. var namespacedType = namespace + key;
  9696. registerMutation(store, namespacedType, mutation, local);
  9697. });
  9698. module.forEachAction(function (action, key) {
  9699. var type = action.root ? key : namespace + key;
  9700. var handler = action.handler || action;
  9701. registerAction(store, type, handler, local);
  9702. });
  9703. module.forEachGetter(function (getter, key) {
  9704. var namespacedType = namespace + key;
  9705. registerGetter(store, namespacedType, getter, local);
  9706. });
  9707. module.forEachChild(function (child, key) {
  9708. installModule(store, rootState, path.concat(key), child, hot);
  9709. });
  9710. }
  9711. /**
  9712. * make localized dispatch, commit, getters and state
  9713. * if there is no namespace, just use root ones
  9714. */
  9715. function makeLocalContext (store, namespace, path) {
  9716. var noNamespace = namespace === '';
  9717. var local = {
  9718. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  9719. var args = unifyObjectStyle(_type, _payload, _options);
  9720. var payload = args.payload;
  9721. var options = args.options;
  9722. var type = args.type;
  9723. if (!options || !options.root) {
  9724. type = namespace + type;
  9725. if (( true) && !store._actions[type]) {
  9726. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  9727. return
  9728. }
  9729. }
  9730. return store.dispatch(type, payload)
  9731. },
  9732. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  9733. var args = unifyObjectStyle(_type, _payload, _options);
  9734. var payload = args.payload;
  9735. var options = args.options;
  9736. var type = args.type;
  9737. if (!options || !options.root) {
  9738. type = namespace + type;
  9739. if (( true) && !store._mutations[type]) {
  9740. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  9741. return
  9742. }
  9743. }
  9744. store.commit(type, payload, options);
  9745. }
  9746. };
  9747. // getters and state object must be gotten lazily
  9748. // because they will be changed by vm update
  9749. Object.defineProperties(local, {
  9750. getters: {
  9751. get: noNamespace
  9752. ? function () { return store.getters; }
  9753. : function () { return makeLocalGetters(store, namespace); }
  9754. },
  9755. state: {
  9756. get: function () { return getNestedState(store.state, path); }
  9757. }
  9758. });
  9759. return local
  9760. }
  9761. function makeLocalGetters (store, namespace) {
  9762. if (!store._makeLocalGettersCache[namespace]) {
  9763. var gettersProxy = {};
  9764. var splitPos = namespace.length;
  9765. Object.keys(store.getters).forEach(function (type) {
  9766. // skip if the target getter is not match this namespace
  9767. if (type.slice(0, splitPos) !== namespace) { return }
  9768. // extract local getter type
  9769. var localType = type.slice(splitPos);
  9770. // Add a port to the getters proxy.
  9771. // Define as getter property because
  9772. // we do not want to evaluate the getters in this time.
  9773. Object.defineProperty(gettersProxy, localType, {
  9774. get: function () { return store.getters[type]; },
  9775. enumerable: true
  9776. });
  9777. });
  9778. store._makeLocalGettersCache[namespace] = gettersProxy;
  9779. }
  9780. return store._makeLocalGettersCache[namespace]
  9781. }
  9782. function registerMutation (store, type, handler, local) {
  9783. var entry = store._mutations[type] || (store._mutations[type] = []);
  9784. entry.push(function wrappedMutationHandler (payload) {
  9785. handler.call(store, local.state, payload);
  9786. });
  9787. }
  9788. function registerAction (store, type, handler, local) {
  9789. var entry = store._actions[type] || (store._actions[type] = []);
  9790. entry.push(function wrappedActionHandler (payload) {
  9791. var res = handler.call(store, {
  9792. dispatch: local.dispatch,
  9793. commit: local.commit,
  9794. getters: local.getters,
  9795. state: local.state,
  9796. rootGetters: store.getters,
  9797. rootState: store.state
  9798. }, payload);
  9799. if (!isPromise(res)) {
  9800. res = Promise.resolve(res);
  9801. }
  9802. if (store._devtoolHook) {
  9803. return res.catch(function (err) {
  9804. store._devtoolHook.emit('vuex:error', err);
  9805. throw err
  9806. })
  9807. } else {
  9808. return res
  9809. }
  9810. });
  9811. }
  9812. function registerGetter (store, type, rawGetter, local) {
  9813. if (store._wrappedGetters[type]) {
  9814. if ((true)) {
  9815. console.error(("[vuex] duplicate getter key: " + type));
  9816. }
  9817. return
  9818. }
  9819. store._wrappedGetters[type] = function wrappedGetter (store) {
  9820. return rawGetter(
  9821. local.state, // local state
  9822. local.getters, // local getters
  9823. store.state, // root state
  9824. store.getters // root getters
  9825. )
  9826. };
  9827. }
  9828. function enableStrictMode (store) {
  9829. store._vm.$watch(function () { return this._data.$$state }, function () {
  9830. if ((true)) {
  9831. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  9832. }
  9833. }, { deep: true, sync: true });
  9834. }
  9835. function getNestedState (state, path) {
  9836. return path.reduce(function (state, key) { return state[key]; }, state)
  9837. }
  9838. function unifyObjectStyle (type, payload, options) {
  9839. if (isObject(type) && type.type) {
  9840. options = payload;
  9841. payload = type;
  9842. type = type.type;
  9843. }
  9844. if ((true)) {
  9845. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  9846. }
  9847. return { type: type, payload: payload, options: options }
  9848. }
  9849. function install (_Vue) {
  9850. if (Vue && _Vue === Vue) {
  9851. if ((true)) {
  9852. console.error(
  9853. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  9854. );
  9855. }
  9856. return
  9857. }
  9858. Vue = _Vue;
  9859. applyMixin(Vue);
  9860. }
  9861. /**
  9862. * Reduce the code which written in Vue.js for getting the state.
  9863. * @param {String} [namespace] - Module's namespace
  9864. * @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.
  9865. * @param {Object}
  9866. */
  9867. var mapState = normalizeNamespace(function (namespace, states) {
  9868. var res = {};
  9869. if (( true) && !isValidMap(states)) {
  9870. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  9871. }
  9872. normalizeMap(states).forEach(function (ref) {
  9873. var key = ref.key;
  9874. var val = ref.val;
  9875. res[key] = function mappedState () {
  9876. var state = this.$store.state;
  9877. var getters = this.$store.getters;
  9878. if (namespace) {
  9879. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  9880. if (!module) {
  9881. return
  9882. }
  9883. state = module.context.state;
  9884. getters = module.context.getters;
  9885. }
  9886. return typeof val === 'function'
  9887. ? val.call(this, state, getters)
  9888. : state[val]
  9889. };
  9890. // mark vuex getter for devtools
  9891. res[key].vuex = true;
  9892. });
  9893. return res
  9894. });
  9895. /**
  9896. * Reduce the code which written in Vue.js for committing the mutation
  9897. * @param {String} [namespace] - Module's namespace
  9898. * @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.
  9899. * @return {Object}
  9900. */
  9901. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  9902. var res = {};
  9903. if (( true) && !isValidMap(mutations)) {
  9904. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  9905. }
  9906. normalizeMap(mutations).forEach(function (ref) {
  9907. var key = ref.key;
  9908. var val = ref.val;
  9909. res[key] = function mappedMutation () {
  9910. var args = [], len = arguments.length;
  9911. while ( len-- ) args[ len ] = arguments[ len ];
  9912. // Get the commit method from store
  9913. var commit = this.$store.commit;
  9914. if (namespace) {
  9915. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  9916. if (!module) {
  9917. return
  9918. }
  9919. commit = module.context.commit;
  9920. }
  9921. return typeof val === 'function'
  9922. ? val.apply(this, [commit].concat(args))
  9923. : commit.apply(this.$store, [val].concat(args))
  9924. };
  9925. });
  9926. return res
  9927. });
  9928. /**
  9929. * Reduce the code which written in Vue.js for getting the getters
  9930. * @param {String} [namespace] - Module's namespace
  9931. * @param {Object|Array} getters
  9932. * @return {Object}
  9933. */
  9934. var mapGetters = normalizeNamespace(function (namespace, getters) {
  9935. var res = {};
  9936. if (( true) && !isValidMap(getters)) {
  9937. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  9938. }
  9939. normalizeMap(getters).forEach(function (ref) {
  9940. var key = ref.key;
  9941. var val = ref.val;
  9942. // The namespace has been mutated by normalizeNamespace
  9943. val = namespace + val;
  9944. res[key] = function mappedGetter () {
  9945. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  9946. return
  9947. }
  9948. if (( true) && !(val in this.$store.getters)) {
  9949. console.error(("[vuex] unknown getter: " + val));
  9950. return
  9951. }
  9952. return this.$store.getters[val]
  9953. };
  9954. // mark vuex getter for devtools
  9955. res[key].vuex = true;
  9956. });
  9957. return res
  9958. });
  9959. /**
  9960. * Reduce the code which written in Vue.js for dispatch the action
  9961. * @param {String} [namespace] - Module's namespace
  9962. * @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.
  9963. * @return {Object}
  9964. */
  9965. var mapActions = normalizeNamespace(function (namespace, actions) {
  9966. var res = {};
  9967. if (( true) && !isValidMap(actions)) {
  9968. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  9969. }
  9970. normalizeMap(actions).forEach(function (ref) {
  9971. var key = ref.key;
  9972. var val = ref.val;
  9973. res[key] = function mappedAction () {
  9974. var args = [], len = arguments.length;
  9975. while ( len-- ) args[ len ] = arguments[ len ];
  9976. // get dispatch function from store
  9977. var dispatch = this.$store.dispatch;
  9978. if (namespace) {
  9979. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  9980. if (!module) {
  9981. return
  9982. }
  9983. dispatch = module.context.dispatch;
  9984. }
  9985. return typeof val === 'function'
  9986. ? val.apply(this, [dispatch].concat(args))
  9987. : dispatch.apply(this.$store, [val].concat(args))
  9988. };
  9989. });
  9990. return res
  9991. });
  9992. /**
  9993. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  9994. * @param {String} namespace
  9995. * @return {Object}
  9996. */
  9997. var createNamespacedHelpers = function (namespace) { return ({
  9998. mapState: mapState.bind(null, namespace),
  9999. mapGetters: mapGetters.bind(null, namespace),
  10000. mapMutations: mapMutations.bind(null, namespace),
  10001. mapActions: mapActions.bind(null, namespace)
  10002. }); };
  10003. /**
  10004. * Normalize the map
  10005. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  10006. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  10007. * @param {Array|Object} map
  10008. * @return {Object}
  10009. */
  10010. function normalizeMap (map) {
  10011. if (!isValidMap(map)) {
  10012. return []
  10013. }
  10014. return Array.isArray(map)
  10015. ? map.map(function (key) { return ({ key: key, val: key }); })
  10016. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  10017. }
  10018. /**
  10019. * Validate whether given map is valid or not
  10020. * @param {*} map
  10021. * @return {Boolean}
  10022. */
  10023. function isValidMap (map) {
  10024. return Array.isArray(map) || isObject(map)
  10025. }
  10026. /**
  10027. * 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.
  10028. * @param {Function} fn
  10029. * @return {Function}
  10030. */
  10031. function normalizeNamespace (fn) {
  10032. return function (namespace, map) {
  10033. if (typeof namespace !== 'string') {
  10034. map = namespace;
  10035. namespace = '';
  10036. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  10037. namespace += '/';
  10038. }
  10039. return fn(namespace, map)
  10040. }
  10041. }
  10042. /**
  10043. * Search a special module from store by namespace. if module not exist, print error message.
  10044. * @param {Object} store
  10045. * @param {String} helper
  10046. * @param {String} namespace
  10047. * @return {Object}
  10048. */
  10049. function getModuleByNamespace (store, helper, namespace) {
  10050. var module = store._modulesNamespaceMap[namespace];
  10051. if (( true) && !module) {
  10052. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  10053. }
  10054. return module
  10055. }
  10056. // Credits: borrowed code from fcomb/redux-logger
  10057. function createLogger (ref) {
  10058. if ( ref === void 0 ) ref = {};
  10059. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  10060. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  10061. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  10062. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  10063. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  10064. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  10065. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  10066. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  10067. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  10068. return function (store) {
  10069. var prevState = deepCopy(store.state);
  10070. if (typeof logger === 'undefined') {
  10071. return
  10072. }
  10073. if (logMutations) {
  10074. store.subscribe(function (mutation, state) {
  10075. var nextState = deepCopy(state);
  10076. if (filter(mutation, prevState, nextState)) {
  10077. var formattedTime = getFormattedTime();
  10078. var formattedMutation = mutationTransformer(mutation);
  10079. var message = "mutation " + (mutation.type) + formattedTime;
  10080. startMessage(logger, message, collapsed);
  10081. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  10082. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  10083. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  10084. endMessage(logger);
  10085. }
  10086. prevState = nextState;
  10087. });
  10088. }
  10089. if (logActions) {
  10090. store.subscribeAction(function (action, state) {
  10091. if (actionFilter(action, state)) {
  10092. var formattedTime = getFormattedTime();
  10093. var formattedAction = actionTransformer(action);
  10094. var message = "action " + (action.type) + formattedTime;
  10095. startMessage(logger, message, collapsed);
  10096. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  10097. endMessage(logger);
  10098. }
  10099. });
  10100. }
  10101. }
  10102. }
  10103. function startMessage (logger, message, collapsed) {
  10104. var startMessage = collapsed
  10105. ? logger.groupCollapsed
  10106. : logger.group;
  10107. // render
  10108. try {
  10109. startMessage.call(logger, message);
  10110. } catch (e) {
  10111. logger.log(message);
  10112. }
  10113. }
  10114. function endMessage (logger) {
  10115. try {
  10116. logger.groupEnd();
  10117. } catch (e) {
  10118. logger.log('—— log end ——');
  10119. }
  10120. }
  10121. function getFormattedTime () {
  10122. var time = new Date();
  10123. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  10124. }
  10125. function repeat (str, times) {
  10126. return (new Array(times + 1)).join(str)
  10127. }
  10128. function pad (num, maxLength) {
  10129. return repeat('0', maxLength - num.toString().length) + num
  10130. }
  10131. var index_cjs = {
  10132. Store: Store,
  10133. install: install,
  10134. version: '3.6.2',
  10135. mapState: mapState,
  10136. mapMutations: mapMutations,
  10137. mapGetters: mapGetters,
  10138. mapActions: mapActions,
  10139. createNamespacedHelpers: createNamespacedHelpers,
  10140. createLogger: createLogger
  10141. };
  10142. module.exports = index_cjs;
  10143. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10144. /***/ }),
  10145. /* 37 */
  10146. /*!***********************************************************************************!*\
  10147. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/getters.js ***!
  10148. \***********************************************************************************/
  10149. /*! no static exports found */
  10150. /***/ (function(module, exports, __webpack_require__) {
  10151. "use strict";
  10152. Object.defineProperty(exports, "__esModule", {
  10153. value: true
  10154. });
  10155. exports.default = void 0;
  10156. var getters = {
  10157. codeNumber: function codeNumber(state) {
  10158. return state.app.codeNumber;
  10159. },
  10160. //获取验证码倒计时-防止刷新页面重置倒计时
  10161. user: function user(state) {
  10162. return state.app.user;
  10163. },
  10164. //用户基本信息
  10165. organization: function organization(state) {
  10166. return state.app.organization;
  10167. },
  10168. //所属组织信息
  10169. project: function project(state) {
  10170. return state.app.project;
  10171. } //项目
  10172. };
  10173. var _default = getters;
  10174. exports.default = _default;
  10175. /***/ }),
  10176. /* 38 */
  10177. /*!*******************************************************************************************!*\
  10178. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/modules sync \.js$ ***!
  10179. \*******************************************************************************************/
  10180. /*! no static exports found */
  10181. /***/ (function(module, exports, __webpack_require__) {
  10182. var map = {
  10183. "./app.js": 39
  10184. };
  10185. function webpackContext(req) {
  10186. var id = webpackContextResolve(req);
  10187. return __webpack_require__(id);
  10188. }
  10189. function webpackContextResolve(req) {
  10190. if(!__webpack_require__.o(map, req)) {
  10191. var e = new Error("Cannot find module '" + req + "'");
  10192. e.code = 'MODULE_NOT_FOUND';
  10193. throw e;
  10194. }
  10195. return map[req];
  10196. }
  10197. webpackContext.keys = function webpackContextKeys() {
  10198. return Object.keys(map);
  10199. };
  10200. webpackContext.resolve = webpackContextResolve;
  10201. module.exports = webpackContext;
  10202. webpackContext.id = 38;
  10203. /***/ }),
  10204. /* 39 */
  10205. /*!***************************************************************************************!*\
  10206. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/modules/app.js ***!
  10207. \***************************************************************************************/
  10208. /*! no static exports found */
  10209. /***/ (function(module, exports, __webpack_require__) {
  10210. "use strict";
  10211. Object.defineProperty(exports, "__esModule", {
  10212. value: true
  10213. });
  10214. exports.default = void 0;
  10215. /*
  10216. * app基本信息
  10217. *
  10218. */
  10219. var state = {
  10220. user: {},
  10221. organization: {},
  10222. project: {},
  10223. codeNumber: 60
  10224. };
  10225. var mutations = {
  10226. CHANGE_USER: function CHANGE_USER(state, user) {
  10227. state.user = user;
  10228. },
  10229. CHANGE_ORGANIZATION: function CHANGE_ORGANIZATION(state, organization) {
  10230. state.organization = organization;
  10231. },
  10232. CHANGE_PROJECT: function CHANGE_PROJECT(state, project) {
  10233. state.project = project;
  10234. },
  10235. CHANGE_CODENUMBER: function CHANGE_CODENUMBER(state, num) {
  10236. state.codeNumber = num;
  10237. }
  10238. };
  10239. var actions = {
  10240. changeUser: function changeUser(_ref, user) {
  10241. var commit = _ref.commit;
  10242. commit('CHANGE_USER', user);
  10243. },
  10244. changeOrganization: function changeOrganization(_ref2, organization) {
  10245. var commit = _ref2.commit;
  10246. commit('CHANGE_ORGANIZATION', organization);
  10247. },
  10248. changeProject: function changeProject(_ref3, project) {
  10249. var commit = _ref3.commit;
  10250. commit('CHANGE_PROJECT', project);
  10251. },
  10252. changeCodeNumber: function changeCodeNumber(_ref4, num) {
  10253. var commit = _ref4.commit;
  10254. commit('CHANGE_CODENUMBER', num < 0 ? 60 : num);
  10255. }
  10256. };
  10257. var _default = {
  10258. namespaced: true,
  10259. state: state,
  10260. mutations: mutations,
  10261. actions: actions
  10262. };
  10263. exports.default = _default;
  10264. /***/ }),
  10265. /* 40 */
  10266. /*!****************************************************************************************************************!*\
  10267. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/iRainna-dayjs/js_sdk/dayjs.min.js ***!
  10268. \****************************************************************************************************************/
  10269. /*! no static exports found */
  10270. /***/ (function(module, exports, __webpack_require__) {
  10271. "use strict";
  10272. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10273. Object.defineProperty(exports, "__esModule", {
  10274. value: true
  10275. });
  10276. exports.dayjs = void 0;
  10277. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10278. var fn = function fn() {
  10279. "use strict";
  10280. var t = 1e3,
  10281. e = 6e4,
  10282. n = 36e5,
  10283. r = "millisecond",
  10284. i = "second",
  10285. s = "minute",
  10286. u = "hour",
  10287. a = "day",
  10288. o = "week",
  10289. c = "month",
  10290. f = "quarter",
  10291. h = "year",
  10292. d = "date",
  10293. l = "Invalid Date",
  10294. $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
  10295. y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
  10296. M = {
  10297. name: "en",
  10298. weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  10299. months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  10300. ordinal: function ordinal(t) {
  10301. var e = ["th", "st", "nd", "rd"],
  10302. n = t % 100;
  10303. return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
  10304. }
  10305. },
  10306. m = function m(t, e, n) {
  10307. var r = String(t);
  10308. return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
  10309. },
  10310. v = {
  10311. s: m,
  10312. z: function z(t) {
  10313. var e = -t.utcOffset(),
  10314. n = Math.abs(e),
  10315. r = Math.floor(n / 60),
  10316. i = n % 60;
  10317. return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
  10318. },
  10319. m: function t(e, n) {
  10320. if (e.date() < n.date()) return -t(n, e);
  10321. var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
  10322. i = e.clone().add(r, c),
  10323. s = n - i < 0,
  10324. u = e.clone().add(r + (s ? -1 : 1), c);
  10325. return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
  10326. },
  10327. a: function a(t) {
  10328. return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
  10329. },
  10330. p: function p(t) {
  10331. return {
  10332. M: c,
  10333. y: h,
  10334. w: o,
  10335. d: a,
  10336. D: d,
  10337. h: u,
  10338. m: s,
  10339. s: i,
  10340. ms: r,
  10341. Q: f
  10342. }[t] || String(t || "").toLowerCase().replace(/s$/, "");
  10343. },
  10344. u: function u(t) {
  10345. return void 0 === t;
  10346. }
  10347. },
  10348. g = "en",
  10349. D = {};
  10350. D[g] = M;
  10351. var p = function p(t) {
  10352. return t instanceof b;
  10353. },
  10354. S = function t(e, n, r) {
  10355. var i;
  10356. if (!e) return g;
  10357. if ("string" == typeof e) {
  10358. var s = e.toLowerCase();
  10359. D[s] && (i = s), n && (D[s] = n, i = s);
  10360. var u = e.split("-");
  10361. if (!i && u.length > 1) return t(u[0]);
  10362. } else {
  10363. var a = e.name;
  10364. D[a] = e, i = a;
  10365. }
  10366. return !r && i && (g = i), i || !r && g;
  10367. },
  10368. w = function w(t, e) {
  10369. if (p(t)) return t.clone();
  10370. var n = "object" == (0, _typeof2.default)(e) ? e : {};
  10371. return n.date = t, n.args = arguments, new b(n);
  10372. },
  10373. O = v;
  10374. O.l = S, O.i = p, O.w = function (t, e) {
  10375. return w(t, {
  10376. locale: e.$L,
  10377. utc: e.$u,
  10378. x: e.$x,
  10379. $offset: e.$offset
  10380. });
  10381. };
  10382. var b = function () {
  10383. function M(t) {
  10384. this.$L = S(t.locale, null, !0), this.parse(t);
  10385. }
  10386. var m = M.prototype;
  10387. return m.parse = function (t) {
  10388. this.$d = function (t) {
  10389. var e = t.date,
  10390. n = t.utc;
  10391. if (null === e) return new Date(NaN);
  10392. if (O.u(e)) return new Date();
  10393. if (e instanceof Date) return new Date(e);
  10394. if ("string" == typeof e && !/Z$/i.test(e)) {
  10395. var r = e.match($);
  10396. if (r) {
  10397. var i = r[2] - 1 || 0,
  10398. s = (r[7] || "0").substring(0, 3);
  10399. return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
  10400. }
  10401. }
  10402. return new Date(e);
  10403. }(t), this.$x = t.x || {}, this.init();
  10404. }, m.init = function () {
  10405. var t = this.$d;
  10406. this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
  10407. }, m.$utils = function () {
  10408. return O;
  10409. }, m.isValid = function () {
  10410. return !(this.$d.toString() === l);
  10411. }, m.isSame = function (t, e) {
  10412. var n = w(t);
  10413. return this.startOf(e) <= n && n <= this.endOf(e);
  10414. }, m.isAfter = function (t, e) {
  10415. return w(t) < this.startOf(e);
  10416. }, m.isBefore = function (t, e) {
  10417. return this.endOf(e) < w(t);
  10418. }, m.$g = function (t, e, n) {
  10419. return O.u(t) ? this[e] : this.set(n, t);
  10420. }, m.unix = function () {
  10421. return Math.floor(this.valueOf() / 1e3);
  10422. }, m.valueOf = function () {
  10423. return this.$d.getTime();
  10424. }, m.startOf = function (t, e) {
  10425. var n = this,
  10426. r = !!O.u(e) || e,
  10427. f = O.p(t),
  10428. l = function l(t, e) {
  10429. var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
  10430. return r ? i : i.endOf(a);
  10431. },
  10432. $ = function $(t, e) {
  10433. return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);
  10434. },
  10435. y = this.$W,
  10436. M = this.$M,
  10437. m = this.$D,
  10438. v = "set" + (this.$u ? "UTC" : "");
  10439. switch (f) {
  10440. case h:
  10441. return r ? l(1, 0) : l(31, 11);
  10442. case c:
  10443. return r ? l(1, M) : l(0, M + 1);
  10444. case o:
  10445. var g = this.$locale().weekStart || 0,
  10446. D = (y < g ? y + 7 : y) - g;
  10447. return l(r ? m - D : m + (6 - D), M);
  10448. case a:
  10449. case d:
  10450. return $(v + "Hours", 0);
  10451. case u:
  10452. return $(v + "Minutes", 1);
  10453. case s:
  10454. return $(v + "Seconds", 2);
  10455. case i:
  10456. return $(v + "Milliseconds", 3);
  10457. default:
  10458. return this.clone();
  10459. }
  10460. }, m.endOf = function (t) {
  10461. return this.startOf(t, !1);
  10462. }, m.$set = function (t, e) {
  10463. var n,
  10464. o = O.p(t),
  10465. f = "set" + (this.$u ? "UTC" : ""),
  10466. l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o],
  10467. $ = o === a ? this.$D + (e - this.$W) : e;
  10468. if (o === c || o === h) {
  10469. var y = this.clone().set(d, 1);
  10470. y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
  10471. } else l && this.$d[l]($);
  10472. return this.init(), this;
  10473. }, m.set = function (t, e) {
  10474. return this.clone().$set(t, e);
  10475. }, m.get = function (t) {
  10476. return this[O.p(t)]();
  10477. }, m.add = function (r, f) {
  10478. var d,
  10479. l = this;
  10480. r = Number(r);
  10481. var $ = O.p(f),
  10482. y = function y(t) {
  10483. var e = w(l);
  10484. return O.w(e.date(e.date() + Math.round(t * r)), l);
  10485. };
  10486. if ($ === c) return this.set(c, this.$M + r);
  10487. if ($ === h) return this.set(h, this.$y + r);
  10488. if ($ === a) return y(1);
  10489. if ($ === o) return y(7);
  10490. var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1,
  10491. m = this.$d.getTime() + r * M;
  10492. return O.w(m, this);
  10493. }, m.subtract = function (t, e) {
  10494. return this.add(-1 * t, e);
  10495. }, m.format = function (t) {
  10496. var e = this,
  10497. n = this.$locale();
  10498. if (!this.isValid()) return n.invalidDate || l;
  10499. var r = t || "YYYY-MM-DDTHH:mm:ssZ",
  10500. i = O.z(this),
  10501. s = this.$H,
  10502. u = this.$m,
  10503. a = this.$M,
  10504. o = n.weekdays,
  10505. c = n.months,
  10506. f = n.meridiem,
  10507. h = function h(t, n, i, s) {
  10508. return t && (t[n] || t(e, r)) || i[n].slice(0, s);
  10509. },
  10510. d = function d(t) {
  10511. return O.s(s % 12 || 12, t, "0");
  10512. },
  10513. $ = f || function (t, e, n) {
  10514. var r = t < 12 ? "AM" : "PM";
  10515. return n ? r.toLowerCase() : r;
  10516. };
  10517. return r.replace(y, function (t, r) {
  10518. return r || function (t) {
  10519. switch (t) {
  10520. case "YY":
  10521. return String(e.$y).slice(-2);
  10522. case "YYYY":
  10523. return O.s(e.$y, 4, "0");
  10524. case "M":
  10525. return a + 1;
  10526. case "MM":
  10527. return O.s(a + 1, 2, "0");
  10528. case "MMM":
  10529. return h(n.monthsShort, a, c, 3);
  10530. case "MMMM":
  10531. return h(c, a);
  10532. case "D":
  10533. return e.$D;
  10534. case "DD":
  10535. return O.s(e.$D, 2, "0");
  10536. case "d":
  10537. return String(e.$W);
  10538. case "dd":
  10539. return h(n.weekdaysMin, e.$W, o, 2);
  10540. case "ddd":
  10541. return h(n.weekdaysShort, e.$W, o, 3);
  10542. case "dddd":
  10543. return o[e.$W];
  10544. case "H":
  10545. return String(s);
  10546. case "HH":
  10547. return O.s(s, 2, "0");
  10548. case "h":
  10549. return d(1);
  10550. case "hh":
  10551. return d(2);
  10552. case "a":
  10553. return $(s, u, !0);
  10554. case "A":
  10555. return $(s, u, !1);
  10556. case "m":
  10557. return String(u);
  10558. case "mm":
  10559. return O.s(u, 2, "0");
  10560. case "s":
  10561. return String(e.$s);
  10562. case "ss":
  10563. return O.s(e.$s, 2, "0");
  10564. case "SSS":
  10565. return O.s(e.$ms, 3, "0");
  10566. case "Z":
  10567. return i;
  10568. }
  10569. return null;
  10570. }(t) || i.replace(":", "");
  10571. });
  10572. }, m.utcOffset = function () {
  10573. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  10574. }, m.diff = function (r, d, l) {
  10575. var $,
  10576. y = this,
  10577. M = O.p(d),
  10578. m = w(r),
  10579. v = (m.utcOffset() - this.utcOffset()) * e,
  10580. g = this - m,
  10581. D = function D() {
  10582. return O.m(y, m);
  10583. };
  10584. switch (M) {
  10585. case h:
  10586. $ = D() / 12;
  10587. break;
  10588. case c:
  10589. $ = D();
  10590. break;
  10591. case f:
  10592. $ = D() / 3;
  10593. break;
  10594. case o:
  10595. $ = (g - v) / 6048e5;
  10596. break;
  10597. case a:
  10598. $ = (g - v) / 864e5;
  10599. break;
  10600. case u:
  10601. $ = g / n;
  10602. break;
  10603. case s:
  10604. $ = g / e;
  10605. break;
  10606. case i:
  10607. $ = g / t;
  10608. break;
  10609. default:
  10610. $ = g;
  10611. }
  10612. return l ? $ : O.a($);
  10613. }, m.daysInMonth = function () {
  10614. return this.endOf(c).$D;
  10615. }, m.$locale = function () {
  10616. return D[this.$L];
  10617. }, m.locale = function (t, e) {
  10618. if (!t) return this.$L;
  10619. var n = this.clone(),
  10620. r = S(t, e, !0);
  10621. return r && (n.$L = r), n;
  10622. }, m.clone = function () {
  10623. return O.w(this.$d, this);
  10624. }, m.toDate = function () {
  10625. return new Date(this.valueOf());
  10626. }, m.toJSON = function () {
  10627. return this.isValid() ? this.toISOString() : null;
  10628. }, m.toISOString = function () {
  10629. return this.$d.toISOString();
  10630. }, m.toString = function () {
  10631. return this.$d.toUTCString();
  10632. }, M;
  10633. }(),
  10634. _ = b.prototype;
  10635. return w.prototype = _, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function (t) {
  10636. _[t[1]] = function (e) {
  10637. return this.$g(e, t[0], t[1]);
  10638. };
  10639. }), w.extend = function (t, e) {
  10640. return t.$i || (t(e, b, w), t.$i = !0), w;
  10641. }, w.locale = S, w.isDayjs = p, w.unix = function (t) {
  10642. return w(1e3 * t);
  10643. }, w.en = D[g], w.Ls = D, w.p = {}, w;
  10644. };
  10645. var dayjs = fn();
  10646. exports.dayjs = dayjs;
  10647. /***/ }),
  10648. /* 41 */
  10649. /*!**********************************************************************************!*\
  10650. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/config/field.js ***!
  10651. \**********************************************************************************/
  10652. /*! no static exports found */
  10653. /***/ (function(module, exports, __webpack_require__) {
  10654. "use strict";
  10655. Object.defineProperty(exports, "__esModule", {
  10656. value: true
  10657. });
  10658. exports.default = void 0;
  10659. var houseType = [{
  10660. id: 1,
  10661. name: '纯写字楼'
  10662. }, {
  10663. id: 2,
  10664. name: '商住两用'
  10665. }, {
  10666. id: 3,
  10667. name: '商业裙楼'
  10668. }, {
  10669. id: 4,
  10670. name: '厂房改造'
  10671. }];
  10672. var payWay = [{
  10673. id: 1,
  10674. name: '公对公转账'
  10675. }, {
  10676. id: 2,
  10677. name: '微信小程序支付'
  10678. }];
  10679. var findItem = function findItem(type, id) {
  10680. if (type === 'houseType') {
  10681. return houseType.find(function (node) {
  10682. return node.id === id;
  10683. }) || {
  10684. id: 0,
  10685. name: '-'
  10686. };
  10687. } else if (type === 'payWay') {
  10688. return payWay.find(function (node) {
  10689. return node.id === id;
  10690. }) || {
  10691. id: 0,
  10692. name: '-'
  10693. };
  10694. }
  10695. };
  10696. var _default = {
  10697. field: {
  10698. houseType: houseType,
  10699. payWay: payWay
  10700. },
  10701. findHouseTypeName: function findHouseTypeName(id) {
  10702. return findItem('houseType', id).name;
  10703. },
  10704. findPayWayName: function findPayWayName(id) {
  10705. return findItem('payWay', id).name;
  10706. }
  10707. };
  10708. exports.default = _default;
  10709. /***/ }),
  10710. /* 42 */,
  10711. /* 43 */,
  10712. /* 44 */,
  10713. /* 45 */,
  10714. /* 46 */,
  10715. /* 47 */,
  10716. /* 48 */
  10717. /*!***************************************************************************************!*\
  10718. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/house.js ***!
  10719. \***************************************************************************************/
  10720. /*! no static exports found */
  10721. /***/ (function(module, exports, __webpack_require__) {
  10722. "use strict";
  10723. Object.defineProperty(exports, "__esModule", {
  10724. value: true
  10725. });
  10726. exports.getHouseDetailById = getHouseDetailById;
  10727. exports.getHouseListByPage = getHouseListByPage;
  10728. var _request = __webpack_require__(/*! @/request/request.js */ 31);
  10729. /*
  10730. * 获取房源列表
  10731. *
  10732. *
  10733. */
  10734. function getHouseListByPage(data) {
  10735. return (0, _request.request)({
  10736. url: "/api/projectItemTargetRoom/".concat(data.currPage, "/").concat(data.pageSize),
  10737. method: 'post',
  10738. data: data
  10739. });
  10740. }
  10741. /*
  10742. * 获取房源详情
  10743. *
  10744. *
  10745. */
  10746. function getHouseDetailById(id) {
  10747. return (0, _request.request)({
  10748. url: "/api/projectItemTargetRoom/".concat(id),
  10749. method: 'get'
  10750. });
  10751. }
  10752. /***/ }),
  10753. /* 49 */
  10754. /*!*****************************************************************************************!*\
  10755. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/project.js ***!
  10756. \*****************************************************************************************/
  10757. /*! no static exports found */
  10758. /***/ (function(module, exports, __webpack_require__) {
  10759. "use strict";
  10760. Object.defineProperty(exports, "__esModule", {
  10761. value: true
  10762. });
  10763. exports.getProjectList = getProjectList;
  10764. var _request = __webpack_require__(/*! @/request/request.js */ 31);
  10765. /*
  10766. * 获取项目列表
  10767. *
  10768. *
  10769. */
  10770. function getProjectList() {}
  10771. /***/ }),
  10772. /* 50 */,
  10773. /* 51 */,
  10774. /* 52 */,
  10775. /* 53 */,
  10776. /* 54 */,
  10777. /* 55 */,
  10778. /* 56 */,
  10779. /* 57 */,
  10780. /* 58 */
  10781. /*!************************************************************************************!*\
  10782. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uitls/validate.js ***!
  10783. \************************************************************************************/
  10784. /*! no static exports found */
  10785. /***/ (function(module, exports, __webpack_require__) {
  10786. "use strict";
  10787. Object.defineProperty(exports, "__esModule", {
  10788. value: true
  10789. });
  10790. exports.isArray = isArray;
  10791. exports.isExternal = isExternal;
  10792. exports.isString = isString;
  10793. exports.isTel = isTel;
  10794. exports.validAlphabets = validAlphabets;
  10795. exports.validEmail = validEmail;
  10796. exports.validLowerCase = validLowerCase;
  10797. exports.validURL = validURL;
  10798. exports.validUpperCase = validUpperCase;
  10799. exports.validUsername = validUsername;
  10800. /**
  10801. * @param {string} path
  10802. * @returns {Boolean}
  10803. */
  10804. function isExternal(path) {
  10805. return /^(https?:|mailto:|tel:)/.test(path);
  10806. }
  10807. /**
  10808. * @param {string} str
  10809. * @returns {Boolean}
  10810. */
  10811. function validUsername(str) {
  10812. var valid_map = ['admin', 'editor'];
  10813. return valid_map.indexOf(str.trim()) >= 0;
  10814. }
  10815. /**
  10816. * @param {string} url
  10817. * @returns {Boolean}
  10818. */
  10819. function validURL(url) {
  10820. var reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
  10821. return reg.test(url);
  10822. }
  10823. /**
  10824. * @param {string} str
  10825. * @returns {Boolean}
  10826. */
  10827. function validLowerCase(str) {
  10828. var reg = /^[a-z]+$/;
  10829. return reg.test(str);
  10830. }
  10831. /**
  10832. * @param {string} str
  10833. * @returns {Boolean}
  10834. */
  10835. function validUpperCase(str) {
  10836. var reg = /^[A-Z]+$/;
  10837. return reg.test(str);
  10838. }
  10839. /**
  10840. * @param {string} str
  10841. * @returns {Boolean}
  10842. */
  10843. function validAlphabets(str) {
  10844. var reg = /^[A-Za-z]+$/;
  10845. return reg.test(str);
  10846. }
  10847. /**
  10848. * @param {string} email
  10849. * @returns {Boolean}
  10850. */
  10851. function validEmail(email) {
  10852. var reg = /^(([^<>()\[\]\\.,;:\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,}))$/;
  10853. return reg.test(email);
  10854. }
  10855. /**
  10856. * @param {string} str
  10857. * @returns {Boolean}
  10858. */
  10859. function isString(str) {
  10860. if (typeof str === 'string' || str instanceof String) {
  10861. return true;
  10862. }
  10863. return false;
  10864. }
  10865. /**
  10866. * @param {Array} arg
  10867. * @returns {Boolean}
  10868. */
  10869. function isArray(arg) {
  10870. if (typeof Array.isArray === 'undefined') {
  10871. return Object.prototype.toString.call(arg) === '[object Array]';
  10872. }
  10873. return Array.isArray(arg);
  10874. }
  10875. /**
  10876. * @param {Number} phone
  10877. * @returns {Boolean}
  10878. */
  10879. function isTel(phone) {
  10880. var reg = /^1[1-9]\d{9}$/;
  10881. return reg.test(phone);
  10882. }
  10883. /***/ }),
  10884. /* 59 */
  10885. /*!**********************************************************************************************!*\
  10886. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/static/image/login/logo.png ***!
  10887. \**********************************************************************************************/
  10888. /*! no static exports found */
  10889. /***/ (function(module, exports, __webpack_require__) {
  10890. module.exports = __webpack_require__.p + "static/image/login/logo.png";
  10891. /***/ }),
  10892. /* 60 */,
  10893. /* 61 */,
  10894. /* 62 */,
  10895. /* 63 */,
  10896. /* 64 */,
  10897. /* 65 */,
  10898. /* 66 */,
  10899. /* 67 */,
  10900. /* 68 */,
  10901. /* 69 */,
  10902. /* 70 */,
  10903. /* 71 */,
  10904. /* 72 */,
  10905. /* 73 */,
  10906. /* 74 */,
  10907. /* 75 */,
  10908. /* 76 */
  10909. /*!*********************************************************************************************!*\
  10910. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/static/image/my/banner.png ***!
  10911. \*********************************************************************************************/
  10912. /*! no static exports found */
  10913. /***/ (function(module, exports, __webpack_require__) {
  10914. module.exports = __webpack_require__.p + "static/image/my/banner.png";
  10915. /***/ }),
  10916. /* 77 */,
  10917. /* 78 */,
  10918. /* 79 */,
  10919. /* 80 */,
  10920. /* 81 */,
  10921. /* 82 */,
  10922. /* 83 */,
  10923. /* 84 */,
  10924. /* 85 */
  10925. /*!*****************************************************************************************!*\
  10926. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/message.js ***!
  10927. \*****************************************************************************************/
  10928. /*! no static exports found */
  10929. /***/ (function(module, exports, __webpack_require__) {
  10930. "use strict";
  10931. Object.defineProperty(exports, "__esModule", {
  10932. value: true
  10933. });
  10934. exports.bindProject = bindProject;
  10935. exports.getAgentDetailById = getAgentDetailById;
  10936. exports.getCustomerDetailById = getCustomerDetailById;
  10937. exports.getMessageDetailById = getMessageDetailById;
  10938. exports.getMessageList = getMessageList;
  10939. exports.getMessageTest = getMessageTest;
  10940. exports.setMessageViewed = setMessageViewed;
  10941. exports.updateAgent = updateAgent;
  10942. exports.updateCustomer = updateCustomer;
  10943. var _request = __webpack_require__(/*! @/request/request.js */ 31);
  10944. /*
  10945. * 按照类型获取未读消息统计
  10946. *
  10947. */
  10948. function getMessageTest(userId) {
  10949. return (0, _request.request)({
  10950. url: "/manager/message/countUnread/messageType/".concat(userId),
  10951. method: 'get'
  10952. });
  10953. }
  10954. /*
  10955. * 获取消息列表
  10956. *
  10957. */
  10958. function getMessageList(userId, messageType) {
  10959. return (0, _request.request)({
  10960. url: "/manager/message/messageType/".concat(userId, "/").concat(messageType),
  10961. method: 'get'
  10962. });
  10963. }
  10964. /*
  10965. * 设置消息已读
  10966. *
  10967. */
  10968. function setMessageViewed(id) {
  10969. return (0, _request.request)({
  10970. url: "/manager/message/".concat(id),
  10971. method: 'put'
  10972. });
  10973. }
  10974. /*
  10975. * 通过id获取消息详情
  10976. *
  10977. */
  10978. function getMessageDetailById(id) {
  10979. return (0, _request.request)({
  10980. url: "/manager/message/get/".concat(id),
  10981. method: 'get'
  10982. });
  10983. }
  10984. /*
  10985. * 获取客户详情
  10986. *
  10987. *
  10988. */
  10989. function getCustomerDetailById(id) {
  10990. return (0, _request.request)({
  10991. url: "/manager/client/".concat(id),
  10992. method: 'get'
  10993. });
  10994. }
  10995. /*
  10996. * 编辑客户
  10997. *
  10998. *
  10999. */
  11000. function updateCustomer(data) {
  11001. return (0, _request.request)({
  11002. url: "/manager/client/update",
  11003. method: 'put',
  11004. data: data
  11005. });
  11006. }
  11007. /*
  11008. * 编辑经纪人
  11009. *
  11010. *
  11011. */
  11012. function updateAgent(data) {
  11013. return (0, _request.request)({
  11014. url: "/manager/agent/update",
  11015. method: 'put',
  11016. data: data
  11017. });
  11018. }
  11019. /*
  11020. * 获取经纪人详情
  11021. *
  11022. *
  11023. */
  11024. function getAgentDetailById(id) {
  11025. return (0, _request.request)({
  11026. url: "/manager/agent/".concat(id),
  11027. method: 'get'
  11028. });
  11029. }
  11030. /*
  11031. * 绑定客户/经纪人/组织至组织项目
  11032. *
  11033. *
  11034. */
  11035. function bindProject(data) {
  11036. return (0, _request.request)({
  11037. url: "/manager/bindProject",
  11038. method: 'post',
  11039. data: data
  11040. });
  11041. }
  11042. /***/ }),
  11043. /* 86 */,
  11044. /* 87 */,
  11045. /* 88 */,
  11046. /* 89 */,
  11047. /* 90 */,
  11048. /* 91 */,
  11049. /* 92 */,
  11050. /* 93 */,
  11051. /* 94 */,
  11052. /* 95 */,
  11053. /* 96 */,
  11054. /* 97 */,
  11055. /* 98 */,
  11056. /* 99 */,
  11057. /* 100 */,
  11058. /* 101 */,
  11059. /* 102 */,
  11060. /* 103 */,
  11061. /* 104 */,
  11062. /* 105 */,
  11063. /* 106 */,
  11064. /* 107 */,
  11065. /* 108 */,
  11066. /* 109 */,
  11067. /* 110 */,
  11068. /* 111 */,
  11069. /* 112 */,
  11070. /* 113 */,
  11071. /* 114 */,
  11072. /* 115 */,
  11073. /* 116 */,
  11074. /* 117 */,
  11075. /* 118 */,
  11076. /* 119 */,
  11077. /* 120 */,
  11078. /* 121 */,
  11079. /* 122 */,
  11080. /* 123 */,
  11081. /* 124 */,
  11082. /* 125 */,
  11083. /* 126 */,
  11084. /* 127 */,
  11085. /* 128 */,
  11086. /* 129 */,
  11087. /* 130 */,
  11088. /* 131 */,
  11089. /* 132 */,
  11090. /* 133 */
  11091. /*!**********************************************************************************************************************!*\
  11092. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  11093. \**********************************************************************************************************************/
  11094. /*! no static exports found */
  11095. /***/ (function(module, exports, __webpack_require__) {
  11096. "use strict";
  11097. Object.defineProperty(exports, "__esModule", {
  11098. value: true
  11099. });
  11100. exports.default = void 0;
  11101. var _default = {
  11102. "id": "2852637",
  11103. "name": "uniui图标库",
  11104. "font_family": "uniicons",
  11105. "css_prefix_text": "uniui-",
  11106. "description": "",
  11107. "glyphs": [{
  11108. "icon_id": "25027049",
  11109. "name": "yanse",
  11110. "font_class": "color",
  11111. "unicode": "e6cf",
  11112. "unicode_decimal": 59087
  11113. }, {
  11114. "icon_id": "25027048",
  11115. "name": "wallet",
  11116. "font_class": "wallet",
  11117. "unicode": "e6b1",
  11118. "unicode_decimal": 59057
  11119. }, {
  11120. "icon_id": "25015720",
  11121. "name": "settings-filled",
  11122. "font_class": "settings-filled",
  11123. "unicode": "e6ce",
  11124. "unicode_decimal": 59086
  11125. }, {
  11126. "icon_id": "25015434",
  11127. "name": "shimingrenzheng-filled",
  11128. "font_class": "auth-filled",
  11129. "unicode": "e6cc",
  11130. "unicode_decimal": 59084
  11131. }, {
  11132. "icon_id": "24934246",
  11133. "name": "shop-filled",
  11134. "font_class": "shop-filled",
  11135. "unicode": "e6cd",
  11136. "unicode_decimal": 59085
  11137. }, {
  11138. "icon_id": "24934159",
  11139. "name": "staff-filled-01",
  11140. "font_class": "staff-filled",
  11141. "unicode": "e6cb",
  11142. "unicode_decimal": 59083
  11143. }, {
  11144. "icon_id": "24932461",
  11145. "name": "VIP-filled",
  11146. "font_class": "vip-filled",
  11147. "unicode": "e6c6",
  11148. "unicode_decimal": 59078
  11149. }, {
  11150. "icon_id": "24932462",
  11151. "name": "plus_circle_fill",
  11152. "font_class": "plus-filled",
  11153. "unicode": "e6c7",
  11154. "unicode_decimal": 59079
  11155. }, {
  11156. "icon_id": "24932463",
  11157. "name": "folder_add-filled",
  11158. "font_class": "folder-add-filled",
  11159. "unicode": "e6c8",
  11160. "unicode_decimal": 59080
  11161. }, {
  11162. "icon_id": "24932464",
  11163. "name": "yanse-filled",
  11164. "font_class": "color-filled",
  11165. "unicode": "e6c9",
  11166. "unicode_decimal": 59081
  11167. }, {
  11168. "icon_id": "24932465",
  11169. "name": "tune-filled",
  11170. "font_class": "tune-filled",
  11171. "unicode": "e6ca",
  11172. "unicode_decimal": 59082
  11173. }, {
  11174. "icon_id": "24932455",
  11175. "name": "a-rilidaka-filled",
  11176. "font_class": "calendar-filled",
  11177. "unicode": "e6c0",
  11178. "unicode_decimal": 59072
  11179. }, {
  11180. "icon_id": "24932456",
  11181. "name": "notification-filled",
  11182. "font_class": "notification-filled",
  11183. "unicode": "e6c1",
  11184. "unicode_decimal": 59073
  11185. }, {
  11186. "icon_id": "24932457",
  11187. "name": "wallet-filled",
  11188. "font_class": "wallet-filled",
  11189. "unicode": "e6c2",
  11190. "unicode_decimal": 59074
  11191. }, {
  11192. "icon_id": "24932458",
  11193. "name": "paihangbang-filled",
  11194. "font_class": "medal-filled",
  11195. "unicode": "e6c3",
  11196. "unicode_decimal": 59075
  11197. }, {
  11198. "icon_id": "24932459",
  11199. "name": "gift-filled",
  11200. "font_class": "gift-filled",
  11201. "unicode": "e6c4",
  11202. "unicode_decimal": 59076
  11203. }, {
  11204. "icon_id": "24932460",
  11205. "name": "fire-filled",
  11206. "font_class": "fire-filled",
  11207. "unicode": "e6c5",
  11208. "unicode_decimal": 59077
  11209. }, {
  11210. "icon_id": "24928001",
  11211. "name": "refreshempty",
  11212. "font_class": "refreshempty",
  11213. "unicode": "e6bf",
  11214. "unicode_decimal": 59071
  11215. }, {
  11216. "icon_id": "24926853",
  11217. "name": "location-ellipse",
  11218. "font_class": "location-filled",
  11219. "unicode": "e6af",
  11220. "unicode_decimal": 59055
  11221. }, {
  11222. "icon_id": "24926735",
  11223. "name": "person-filled",
  11224. "font_class": "person-filled",
  11225. "unicode": "e69d",
  11226. "unicode_decimal": 59037
  11227. }, {
  11228. "icon_id": "24926703",
  11229. "name": "personadd-filled",
  11230. "font_class": "personadd-filled",
  11231. "unicode": "e698",
  11232. "unicode_decimal": 59032
  11233. }, {
  11234. "icon_id": "24923351",
  11235. "name": "back",
  11236. "font_class": "back",
  11237. "unicode": "e6b9",
  11238. "unicode_decimal": 59065
  11239. }, {
  11240. "icon_id": "24923352",
  11241. "name": "forward",
  11242. "font_class": "forward",
  11243. "unicode": "e6ba",
  11244. "unicode_decimal": 59066
  11245. }, {
  11246. "icon_id": "24923353",
  11247. "name": "arrowthinright",
  11248. "font_class": "arrow-right",
  11249. "unicode": "e6bb",
  11250. "unicode_decimal": 59067
  11251. }, {
  11252. "icon_id": "24923353",
  11253. "name": "arrowthinright",
  11254. "font_class": "arrowthinright",
  11255. "unicode": "e6bb",
  11256. "unicode_decimal": 59067
  11257. }, {
  11258. "icon_id": "24923354",
  11259. "name": "arrowthinleft",
  11260. "font_class": "arrow-left",
  11261. "unicode": "e6bc",
  11262. "unicode_decimal": 59068
  11263. }, {
  11264. "icon_id": "24923354",
  11265. "name": "arrowthinleft",
  11266. "font_class": "arrowthinleft",
  11267. "unicode": "e6bc",
  11268. "unicode_decimal": 59068
  11269. }, {
  11270. "icon_id": "24923355",
  11271. "name": "arrowthinup",
  11272. "font_class": "arrow-up",
  11273. "unicode": "e6bd",
  11274. "unicode_decimal": 59069
  11275. }, {
  11276. "icon_id": "24923355",
  11277. "name": "arrowthinup",
  11278. "font_class": "arrowthinup",
  11279. "unicode": "e6bd",
  11280. "unicode_decimal": 59069
  11281. }, {
  11282. "icon_id": "24923356",
  11283. "name": "arrowthindown",
  11284. "font_class": "arrow-down",
  11285. "unicode": "e6be",
  11286. "unicode_decimal": 59070
  11287. }, {
  11288. "icon_id": "24923356",
  11289. "name": "arrowthindown",
  11290. "font_class": "arrowthindown",
  11291. "unicode": "e6be",
  11292. "unicode_decimal": 59070
  11293. }, {
  11294. "icon_id": "24923349",
  11295. "name": "arrowdown",
  11296. "font_class": "bottom",
  11297. "unicode": "e6b8",
  11298. "unicode_decimal": 59064
  11299. }, {
  11300. "icon_id": "24923349",
  11301. "name": "arrowdown",
  11302. "font_class": "arrowdown",
  11303. "unicode": "e6b8",
  11304. "unicode_decimal": 59064
  11305. }, {
  11306. "icon_id": "24923346",
  11307. "name": "arrowright",
  11308. "font_class": "right",
  11309. "unicode": "e6b5",
  11310. "unicode_decimal": 59061
  11311. }, {
  11312. "icon_id": "24923346",
  11313. "name": "arrowright",
  11314. "font_class": "arrowright",
  11315. "unicode": "e6b5",
  11316. "unicode_decimal": 59061
  11317. }, {
  11318. "icon_id": "24923347",
  11319. "name": "arrowup",
  11320. "font_class": "top",
  11321. "unicode": "e6b6",
  11322. "unicode_decimal": 59062
  11323. }, {
  11324. "icon_id": "24923347",
  11325. "name": "arrowup",
  11326. "font_class": "arrowup",
  11327. "unicode": "e6b6",
  11328. "unicode_decimal": 59062
  11329. }, {
  11330. "icon_id": "24923348",
  11331. "name": "arrowleft",
  11332. "font_class": "left",
  11333. "unicode": "e6b7",
  11334. "unicode_decimal": 59063
  11335. }, {
  11336. "icon_id": "24923348",
  11337. "name": "arrowleft",
  11338. "font_class": "arrowleft",
  11339. "unicode": "e6b7",
  11340. "unicode_decimal": 59063
  11341. }, {
  11342. "icon_id": "24923334",
  11343. "name": "eye",
  11344. "font_class": "eye",
  11345. "unicode": "e651",
  11346. "unicode_decimal": 58961
  11347. }, {
  11348. "icon_id": "24923335",
  11349. "name": "eye-filled",
  11350. "font_class": "eye-filled",
  11351. "unicode": "e66a",
  11352. "unicode_decimal": 58986
  11353. }, {
  11354. "icon_id": "24923336",
  11355. "name": "eye-slash",
  11356. "font_class": "eye-slash",
  11357. "unicode": "e6b3",
  11358. "unicode_decimal": 59059
  11359. }, {
  11360. "icon_id": "24923337",
  11361. "name": "eye-slash-filled",
  11362. "font_class": "eye-slash-filled",
  11363. "unicode": "e6b4",
  11364. "unicode_decimal": 59060
  11365. }, {
  11366. "icon_id": "24923305",
  11367. "name": "info-filled",
  11368. "font_class": "info-filled",
  11369. "unicode": "e649",
  11370. "unicode_decimal": 58953
  11371. }, {
  11372. "icon_id": "24923299",
  11373. "name": "reload-01",
  11374. "font_class": "reload",
  11375. "unicode": "e6b2",
  11376. "unicode_decimal": 59058
  11377. }, {
  11378. "icon_id": "24923195",
  11379. "name": "mic_slash_fill",
  11380. "font_class": "micoff-filled",
  11381. "unicode": "e6b0",
  11382. "unicode_decimal": 59056
  11383. }, {
  11384. "icon_id": "24923165",
  11385. "name": "map-pin-ellipse",
  11386. "font_class": "map-pin-ellipse",
  11387. "unicode": "e6ac",
  11388. "unicode_decimal": 59052
  11389. }, {
  11390. "icon_id": "24923166",
  11391. "name": "map-pin",
  11392. "font_class": "map-pin",
  11393. "unicode": "e6ad",
  11394. "unicode_decimal": 59053
  11395. }, {
  11396. "icon_id": "24923167",
  11397. "name": "location",
  11398. "font_class": "location",
  11399. "unicode": "e6ae",
  11400. "unicode_decimal": 59054
  11401. }, {
  11402. "icon_id": "24923064",
  11403. "name": "starhalf",
  11404. "font_class": "starhalf",
  11405. "unicode": "e683",
  11406. "unicode_decimal": 59011
  11407. }, {
  11408. "icon_id": "24923065",
  11409. "name": "star",
  11410. "font_class": "star",
  11411. "unicode": "e688",
  11412. "unicode_decimal": 59016
  11413. }, {
  11414. "icon_id": "24923066",
  11415. "name": "star-filled",
  11416. "font_class": "star-filled",
  11417. "unicode": "e68f",
  11418. "unicode_decimal": 59023
  11419. }, {
  11420. "icon_id": "24899646",
  11421. "name": "a-rilidaka",
  11422. "font_class": "calendar",
  11423. "unicode": "e6a0",
  11424. "unicode_decimal": 59040
  11425. }, {
  11426. "icon_id": "24899647",
  11427. "name": "fire",
  11428. "font_class": "fire",
  11429. "unicode": "e6a1",
  11430. "unicode_decimal": 59041
  11431. }, {
  11432. "icon_id": "24899648",
  11433. "name": "paihangbang",
  11434. "font_class": "medal",
  11435. "unicode": "e6a2",
  11436. "unicode_decimal": 59042
  11437. }, {
  11438. "icon_id": "24899649",
  11439. "name": "font",
  11440. "font_class": "font",
  11441. "unicode": "e6a3",
  11442. "unicode_decimal": 59043
  11443. }, {
  11444. "icon_id": "24899650",
  11445. "name": "gift",
  11446. "font_class": "gift",
  11447. "unicode": "e6a4",
  11448. "unicode_decimal": 59044
  11449. }, {
  11450. "icon_id": "24899651",
  11451. "name": "link",
  11452. "font_class": "link",
  11453. "unicode": "e6a5",
  11454. "unicode_decimal": 59045
  11455. }, {
  11456. "icon_id": "24899652",
  11457. "name": "notification",
  11458. "font_class": "notification",
  11459. "unicode": "e6a6",
  11460. "unicode_decimal": 59046
  11461. }, {
  11462. "icon_id": "24899653",
  11463. "name": "staff",
  11464. "font_class": "staff",
  11465. "unicode": "e6a7",
  11466. "unicode_decimal": 59047
  11467. }, {
  11468. "icon_id": "24899654",
  11469. "name": "VIP",
  11470. "font_class": "vip",
  11471. "unicode": "e6a8",
  11472. "unicode_decimal": 59048
  11473. }, {
  11474. "icon_id": "24899655",
  11475. "name": "folder_add",
  11476. "font_class": "folder-add",
  11477. "unicode": "e6a9",
  11478. "unicode_decimal": 59049
  11479. }, {
  11480. "icon_id": "24899656",
  11481. "name": "tune",
  11482. "font_class": "tune",
  11483. "unicode": "e6aa",
  11484. "unicode_decimal": 59050
  11485. }, {
  11486. "icon_id": "24899657",
  11487. "name": "shimingrenzheng",
  11488. "font_class": "auth",
  11489. "unicode": "e6ab",
  11490. "unicode_decimal": 59051
  11491. }, {
  11492. "icon_id": "24899565",
  11493. "name": "person",
  11494. "font_class": "person",
  11495. "unicode": "e699",
  11496. "unicode_decimal": 59033
  11497. }, {
  11498. "icon_id": "24899566",
  11499. "name": "email-filled",
  11500. "font_class": "email-filled",
  11501. "unicode": "e69a",
  11502. "unicode_decimal": 59034
  11503. }, {
  11504. "icon_id": "24899567",
  11505. "name": "phone-filled",
  11506. "font_class": "phone-filled",
  11507. "unicode": "e69b",
  11508. "unicode_decimal": 59035
  11509. }, {
  11510. "icon_id": "24899568",
  11511. "name": "phone",
  11512. "font_class": "phone",
  11513. "unicode": "e69c",
  11514. "unicode_decimal": 59036
  11515. }, {
  11516. "icon_id": "24899570",
  11517. "name": "email",
  11518. "font_class": "email",
  11519. "unicode": "e69e",
  11520. "unicode_decimal": 59038
  11521. }, {
  11522. "icon_id": "24899571",
  11523. "name": "personadd",
  11524. "font_class": "personadd",
  11525. "unicode": "e69f",
  11526. "unicode_decimal": 59039
  11527. }, {
  11528. "icon_id": "24899558",
  11529. "name": "chatboxes-filled",
  11530. "font_class": "chatboxes-filled",
  11531. "unicode": "e692",
  11532. "unicode_decimal": 59026
  11533. }, {
  11534. "icon_id": "24899559",
  11535. "name": "contact",
  11536. "font_class": "contact",
  11537. "unicode": "e693",
  11538. "unicode_decimal": 59027
  11539. }, {
  11540. "icon_id": "24899560",
  11541. "name": "chatbubble-filled",
  11542. "font_class": "chatbubble-filled",
  11543. "unicode": "e694",
  11544. "unicode_decimal": 59028
  11545. }, {
  11546. "icon_id": "24899561",
  11547. "name": "contact-filled",
  11548. "font_class": "contact-filled",
  11549. "unicode": "e695",
  11550. "unicode_decimal": 59029
  11551. }, {
  11552. "icon_id": "24899562",
  11553. "name": "chatboxes",
  11554. "font_class": "chatboxes",
  11555. "unicode": "e696",
  11556. "unicode_decimal": 59030
  11557. }, {
  11558. "icon_id": "24899563",
  11559. "name": "chatbubble",
  11560. "font_class": "chatbubble",
  11561. "unicode": "e697",
  11562. "unicode_decimal": 59031
  11563. }, {
  11564. "icon_id": "24881290",
  11565. "name": "upload-filled",
  11566. "font_class": "upload-filled",
  11567. "unicode": "e68e",
  11568. "unicode_decimal": 59022
  11569. }, {
  11570. "icon_id": "24881292",
  11571. "name": "upload",
  11572. "font_class": "upload",
  11573. "unicode": "e690",
  11574. "unicode_decimal": 59024
  11575. }, {
  11576. "icon_id": "24881293",
  11577. "name": "weixin",
  11578. "font_class": "weixin",
  11579. "unicode": "e691",
  11580. "unicode_decimal": 59025
  11581. }, {
  11582. "icon_id": "24881274",
  11583. "name": "compose",
  11584. "font_class": "compose",
  11585. "unicode": "e67f",
  11586. "unicode_decimal": 59007
  11587. }, {
  11588. "icon_id": "24881275",
  11589. "name": "qq",
  11590. "font_class": "qq",
  11591. "unicode": "e680",
  11592. "unicode_decimal": 59008
  11593. }, {
  11594. "icon_id": "24881276",
  11595. "name": "download-filled",
  11596. "font_class": "download-filled",
  11597. "unicode": "e681",
  11598. "unicode_decimal": 59009
  11599. }, {
  11600. "icon_id": "24881277",
  11601. "name": "pengyouquan",
  11602. "font_class": "pyq",
  11603. "unicode": "e682",
  11604. "unicode_decimal": 59010
  11605. }, {
  11606. "icon_id": "24881279",
  11607. "name": "sound",
  11608. "font_class": "sound",
  11609. "unicode": "e684",
  11610. "unicode_decimal": 59012
  11611. }, {
  11612. "icon_id": "24881280",
  11613. "name": "trash-filled",
  11614. "font_class": "trash-filled",
  11615. "unicode": "e685",
  11616. "unicode_decimal": 59013
  11617. }, {
  11618. "icon_id": "24881281",
  11619. "name": "sound-filled",
  11620. "font_class": "sound-filled",
  11621. "unicode": "e686",
  11622. "unicode_decimal": 59014
  11623. }, {
  11624. "icon_id": "24881282",
  11625. "name": "trash",
  11626. "font_class": "trash",
  11627. "unicode": "e687",
  11628. "unicode_decimal": 59015
  11629. }, {
  11630. "icon_id": "24881284",
  11631. "name": "videocam-filled",
  11632. "font_class": "videocam-filled",
  11633. "unicode": "e689",
  11634. "unicode_decimal": 59017
  11635. }, {
  11636. "icon_id": "24881285",
  11637. "name": "spinner-cycle",
  11638. "font_class": "spinner-cycle",
  11639. "unicode": "e68a",
  11640. "unicode_decimal": 59018
  11641. }, {
  11642. "icon_id": "24881286",
  11643. "name": "weibo",
  11644. "font_class": "weibo",
  11645. "unicode": "e68b",
  11646. "unicode_decimal": 59019
  11647. }, {
  11648. "icon_id": "24881288",
  11649. "name": "videocam",
  11650. "font_class": "videocam",
  11651. "unicode": "e68c",
  11652. "unicode_decimal": 59020
  11653. }, {
  11654. "icon_id": "24881289",
  11655. "name": "download",
  11656. "font_class": "download",
  11657. "unicode": "e68d",
  11658. "unicode_decimal": 59021
  11659. }, {
  11660. "icon_id": "24879601",
  11661. "name": "help",
  11662. "font_class": "help",
  11663. "unicode": "e679",
  11664. "unicode_decimal": 59001
  11665. }, {
  11666. "icon_id": "24879602",
  11667. "name": "navigate-filled",
  11668. "font_class": "navigate-filled",
  11669. "unicode": "e67a",
  11670. "unicode_decimal": 59002
  11671. }, {
  11672. "icon_id": "24879603",
  11673. "name": "plusempty",
  11674. "font_class": "plusempty",
  11675. "unicode": "e67b",
  11676. "unicode_decimal": 59003
  11677. }, {
  11678. "icon_id": "24879604",
  11679. "name": "smallcircle",
  11680. "font_class": "smallcircle",
  11681. "unicode": "e67c",
  11682. "unicode_decimal": 59004
  11683. }, {
  11684. "icon_id": "24879605",
  11685. "name": "minus-filled",
  11686. "font_class": "minus-filled",
  11687. "unicode": "e67d",
  11688. "unicode_decimal": 59005
  11689. }, {
  11690. "icon_id": "24879606",
  11691. "name": "micoff",
  11692. "font_class": "micoff",
  11693. "unicode": "e67e",
  11694. "unicode_decimal": 59006
  11695. }, {
  11696. "icon_id": "24879588",
  11697. "name": "closeempty",
  11698. "font_class": "closeempty",
  11699. "unicode": "e66c",
  11700. "unicode_decimal": 58988
  11701. }, {
  11702. "icon_id": "24879589",
  11703. "name": "clear",
  11704. "font_class": "clear",
  11705. "unicode": "e66d",
  11706. "unicode_decimal": 58989
  11707. }, {
  11708. "icon_id": "24879590",
  11709. "name": "navigate",
  11710. "font_class": "navigate",
  11711. "unicode": "e66e",
  11712. "unicode_decimal": 58990
  11713. }, {
  11714. "icon_id": "24879591",
  11715. "name": "minus",
  11716. "font_class": "minus",
  11717. "unicode": "e66f",
  11718. "unicode_decimal": 58991
  11719. }, {
  11720. "icon_id": "24879592",
  11721. "name": "image",
  11722. "font_class": "image",
  11723. "unicode": "e670",
  11724. "unicode_decimal": 58992
  11725. }, {
  11726. "icon_id": "24879593",
  11727. "name": "mic",
  11728. "font_class": "mic",
  11729. "unicode": "e671",
  11730. "unicode_decimal": 58993
  11731. }, {
  11732. "icon_id": "24879594",
  11733. "name": "paperplane",
  11734. "font_class": "paperplane",
  11735. "unicode": "e672",
  11736. "unicode_decimal": 58994
  11737. }, {
  11738. "icon_id": "24879595",
  11739. "name": "close",
  11740. "font_class": "close",
  11741. "unicode": "e673",
  11742. "unicode_decimal": 58995
  11743. }, {
  11744. "icon_id": "24879596",
  11745. "name": "help-filled",
  11746. "font_class": "help-filled",
  11747. "unicode": "e674",
  11748. "unicode_decimal": 58996
  11749. }, {
  11750. "icon_id": "24879597",
  11751. "name": "plus-filled",
  11752. "font_class": "paperplane-filled",
  11753. "unicode": "e675",
  11754. "unicode_decimal": 58997
  11755. }, {
  11756. "icon_id": "24879598",
  11757. "name": "plus",
  11758. "font_class": "plus",
  11759. "unicode": "e676",
  11760. "unicode_decimal": 58998
  11761. }, {
  11762. "icon_id": "24879599",
  11763. "name": "mic-filled",
  11764. "font_class": "mic-filled",
  11765. "unicode": "e677",
  11766. "unicode_decimal": 58999
  11767. }, {
  11768. "icon_id": "24879600",
  11769. "name": "image-filled",
  11770. "font_class": "image-filled",
  11771. "unicode": "e678",
  11772. "unicode_decimal": 59000
  11773. }, {
  11774. "icon_id": "24855900",
  11775. "name": "locked-filled",
  11776. "font_class": "locked-filled",
  11777. "unicode": "e668",
  11778. "unicode_decimal": 58984
  11779. }, {
  11780. "icon_id": "24855901",
  11781. "name": "info",
  11782. "font_class": "info",
  11783. "unicode": "e669",
  11784. "unicode_decimal": 58985
  11785. }, {
  11786. "icon_id": "24855903",
  11787. "name": "locked",
  11788. "font_class": "locked",
  11789. "unicode": "e66b",
  11790. "unicode_decimal": 58987
  11791. }, {
  11792. "icon_id": "24855884",
  11793. "name": "camera-filled",
  11794. "font_class": "camera-filled",
  11795. "unicode": "e658",
  11796. "unicode_decimal": 58968
  11797. }, {
  11798. "icon_id": "24855885",
  11799. "name": "chat-filled",
  11800. "font_class": "chat-filled",
  11801. "unicode": "e659",
  11802. "unicode_decimal": 58969
  11803. }, {
  11804. "icon_id": "24855886",
  11805. "name": "camera",
  11806. "font_class": "camera",
  11807. "unicode": "e65a",
  11808. "unicode_decimal": 58970
  11809. }, {
  11810. "icon_id": "24855887",
  11811. "name": "circle",
  11812. "font_class": "circle",
  11813. "unicode": "e65b",
  11814. "unicode_decimal": 58971
  11815. }, {
  11816. "icon_id": "24855888",
  11817. "name": "checkmarkempty",
  11818. "font_class": "checkmarkempty",
  11819. "unicode": "e65c",
  11820. "unicode_decimal": 58972
  11821. }, {
  11822. "icon_id": "24855889",
  11823. "name": "chat",
  11824. "font_class": "chat",
  11825. "unicode": "e65d",
  11826. "unicode_decimal": 58973
  11827. }, {
  11828. "icon_id": "24855890",
  11829. "name": "circle-filled",
  11830. "font_class": "circle-filled",
  11831. "unicode": "e65e",
  11832. "unicode_decimal": 58974
  11833. }, {
  11834. "icon_id": "24855891",
  11835. "name": "flag",
  11836. "font_class": "flag",
  11837. "unicode": "e65f",
  11838. "unicode_decimal": 58975
  11839. }, {
  11840. "icon_id": "24855892",
  11841. "name": "flag-filled",
  11842. "font_class": "flag-filled",
  11843. "unicode": "e660",
  11844. "unicode_decimal": 58976
  11845. }, {
  11846. "icon_id": "24855893",
  11847. "name": "gear-filled",
  11848. "font_class": "gear-filled",
  11849. "unicode": "e661",
  11850. "unicode_decimal": 58977
  11851. }, {
  11852. "icon_id": "24855894",
  11853. "name": "home",
  11854. "font_class": "home",
  11855. "unicode": "e662",
  11856. "unicode_decimal": 58978
  11857. }, {
  11858. "icon_id": "24855895",
  11859. "name": "home-filled",
  11860. "font_class": "home-filled",
  11861. "unicode": "e663",
  11862. "unicode_decimal": 58979
  11863. }, {
  11864. "icon_id": "24855896",
  11865. "name": "gear",
  11866. "font_class": "gear",
  11867. "unicode": "e664",
  11868. "unicode_decimal": 58980
  11869. }, {
  11870. "icon_id": "24855897",
  11871. "name": "smallcircle-filled",
  11872. "font_class": "smallcircle-filled",
  11873. "unicode": "e665",
  11874. "unicode_decimal": 58981
  11875. }, {
  11876. "icon_id": "24855898",
  11877. "name": "map-filled",
  11878. "font_class": "map-filled",
  11879. "unicode": "e666",
  11880. "unicode_decimal": 58982
  11881. }, {
  11882. "icon_id": "24855899",
  11883. "name": "map",
  11884. "font_class": "map",
  11885. "unicode": "e667",
  11886. "unicode_decimal": 58983
  11887. }, {
  11888. "icon_id": "24855825",
  11889. "name": "refresh-filled",
  11890. "font_class": "refresh-filled",
  11891. "unicode": "e656",
  11892. "unicode_decimal": 58966
  11893. }, {
  11894. "icon_id": "24855826",
  11895. "name": "refresh",
  11896. "font_class": "refresh",
  11897. "unicode": "e657",
  11898. "unicode_decimal": 58967
  11899. }, {
  11900. "icon_id": "24855808",
  11901. "name": "cloud-upload",
  11902. "font_class": "cloud-upload",
  11903. "unicode": "e645",
  11904. "unicode_decimal": 58949
  11905. }, {
  11906. "icon_id": "24855809",
  11907. "name": "cloud-download-filled",
  11908. "font_class": "cloud-download-filled",
  11909. "unicode": "e646",
  11910. "unicode_decimal": 58950
  11911. }, {
  11912. "icon_id": "24855810",
  11913. "name": "cloud-download",
  11914. "font_class": "cloud-download",
  11915. "unicode": "e647",
  11916. "unicode_decimal": 58951
  11917. }, {
  11918. "icon_id": "24855811",
  11919. "name": "cloud-upload-filled",
  11920. "font_class": "cloud-upload-filled",
  11921. "unicode": "e648",
  11922. "unicode_decimal": 58952
  11923. }, {
  11924. "icon_id": "24855813",
  11925. "name": "redo",
  11926. "font_class": "redo",
  11927. "unicode": "e64a",
  11928. "unicode_decimal": 58954
  11929. }, {
  11930. "icon_id": "24855814",
  11931. "name": "images-filled",
  11932. "font_class": "images-filled",
  11933. "unicode": "e64b",
  11934. "unicode_decimal": 58955
  11935. }, {
  11936. "icon_id": "24855815",
  11937. "name": "undo-filled",
  11938. "font_class": "undo-filled",
  11939. "unicode": "e64c",
  11940. "unicode_decimal": 58956
  11941. }, {
  11942. "icon_id": "24855816",
  11943. "name": "more",
  11944. "font_class": "more",
  11945. "unicode": "e64d",
  11946. "unicode_decimal": 58957
  11947. }, {
  11948. "icon_id": "24855817",
  11949. "name": "more-filled",
  11950. "font_class": "more-filled",
  11951. "unicode": "e64e",
  11952. "unicode_decimal": 58958
  11953. }, {
  11954. "icon_id": "24855818",
  11955. "name": "undo",
  11956. "font_class": "undo",
  11957. "unicode": "e64f",
  11958. "unicode_decimal": 58959
  11959. }, {
  11960. "icon_id": "24855819",
  11961. "name": "images",
  11962. "font_class": "images",
  11963. "unicode": "e650",
  11964. "unicode_decimal": 58960
  11965. }, {
  11966. "icon_id": "24855821",
  11967. "name": "paperclip",
  11968. "font_class": "paperclip",
  11969. "unicode": "e652",
  11970. "unicode_decimal": 58962
  11971. }, {
  11972. "icon_id": "24855822",
  11973. "name": "settings",
  11974. "font_class": "settings",
  11975. "unicode": "e653",
  11976. "unicode_decimal": 58963
  11977. }, {
  11978. "icon_id": "24855823",
  11979. "name": "search",
  11980. "font_class": "search",
  11981. "unicode": "e654",
  11982. "unicode_decimal": 58964
  11983. }, {
  11984. "icon_id": "24855824",
  11985. "name": "redo-filled",
  11986. "font_class": "redo-filled",
  11987. "unicode": "e655",
  11988. "unicode_decimal": 58965
  11989. }, {
  11990. "icon_id": "24841702",
  11991. "name": "list",
  11992. "font_class": "list",
  11993. "unicode": "e644",
  11994. "unicode_decimal": 58948
  11995. }, {
  11996. "icon_id": "24841489",
  11997. "name": "mail-open-filled",
  11998. "font_class": "mail-open-filled",
  11999. "unicode": "e63a",
  12000. "unicode_decimal": 58938
  12001. }, {
  12002. "icon_id": "24841491",
  12003. "name": "hand-thumbsdown-filled",
  12004. "font_class": "hand-down-filled",
  12005. "unicode": "e63c",
  12006. "unicode_decimal": 58940
  12007. }, {
  12008. "icon_id": "24841492",
  12009. "name": "hand-thumbsdown",
  12010. "font_class": "hand-down",
  12011. "unicode": "e63d",
  12012. "unicode_decimal": 58941
  12013. }, {
  12014. "icon_id": "24841493",
  12015. "name": "hand-thumbsup-filled",
  12016. "font_class": "hand-up-filled",
  12017. "unicode": "e63e",
  12018. "unicode_decimal": 58942
  12019. }, {
  12020. "icon_id": "24841494",
  12021. "name": "hand-thumbsup",
  12022. "font_class": "hand-up",
  12023. "unicode": "e63f",
  12024. "unicode_decimal": 58943
  12025. }, {
  12026. "icon_id": "24841496",
  12027. "name": "heart-filled",
  12028. "font_class": "heart-filled",
  12029. "unicode": "e641",
  12030. "unicode_decimal": 58945
  12031. }, {
  12032. "icon_id": "24841498",
  12033. "name": "mail-open",
  12034. "font_class": "mail-open",
  12035. "unicode": "e643",
  12036. "unicode_decimal": 58947
  12037. }, {
  12038. "icon_id": "24841488",
  12039. "name": "heart",
  12040. "font_class": "heart",
  12041. "unicode": "e639",
  12042. "unicode_decimal": 58937
  12043. }, {
  12044. "icon_id": "24839963",
  12045. "name": "loop",
  12046. "font_class": "loop",
  12047. "unicode": "e633",
  12048. "unicode_decimal": 58931
  12049. }, {
  12050. "icon_id": "24839866",
  12051. "name": "pulldown",
  12052. "font_class": "pulldown",
  12053. "unicode": "e632",
  12054. "unicode_decimal": 58930
  12055. }, {
  12056. "icon_id": "24813798",
  12057. "name": "scan",
  12058. "font_class": "scan",
  12059. "unicode": "e62a",
  12060. "unicode_decimal": 58922
  12061. }, {
  12062. "icon_id": "24813786",
  12063. "name": "bars",
  12064. "font_class": "bars",
  12065. "unicode": "e627",
  12066. "unicode_decimal": 58919
  12067. }, {
  12068. "icon_id": "24813788",
  12069. "name": "cart-filled",
  12070. "font_class": "cart-filled",
  12071. "unicode": "e629",
  12072. "unicode_decimal": 58921
  12073. }, {
  12074. "icon_id": "24813790",
  12075. "name": "checkbox",
  12076. "font_class": "checkbox",
  12077. "unicode": "e62b",
  12078. "unicode_decimal": 58923
  12079. }, {
  12080. "icon_id": "24813791",
  12081. "name": "checkbox-filled",
  12082. "font_class": "checkbox-filled",
  12083. "unicode": "e62c",
  12084. "unicode_decimal": 58924
  12085. }, {
  12086. "icon_id": "24813794",
  12087. "name": "shop",
  12088. "font_class": "shop",
  12089. "unicode": "e62f",
  12090. "unicode_decimal": 58927
  12091. }, {
  12092. "icon_id": "24813795",
  12093. "name": "headphones",
  12094. "font_class": "headphones",
  12095. "unicode": "e630",
  12096. "unicode_decimal": 58928
  12097. }, {
  12098. "icon_id": "24813796",
  12099. "name": "cart",
  12100. "font_class": "cart",
  12101. "unicode": "e631",
  12102. "unicode_decimal": 58929
  12103. }]
  12104. };
  12105. exports.default = _default;
  12106. /***/ }),
  12107. /* 134 */,
  12108. /* 135 */,
  12109. /* 136 */,
  12110. /* 137 */,
  12111. /* 138 */,
  12112. /* 139 */,
  12113. /* 140 */,
  12114. /* 141 */,
  12115. /* 142 */,
  12116. /* 143 */,
  12117. /* 144 */,
  12118. /* 145 */,
  12119. /* 146 */,
  12120. /* 147 */,
  12121. /* 148 */,
  12122. /* 149 */,
  12123. /* 150 */,
  12124. /* 151 */,
  12125. /* 152 */,
  12126. /* 153 */,
  12127. /* 154 */,
  12128. /* 155 */,
  12129. /* 156 */,
  12130. /* 157 */,
  12131. /* 158 */,
  12132. /* 159 */,
  12133. /* 160 */,
  12134. /* 161 */,
  12135. /* 162 */,
  12136. /* 163 */,
  12137. /* 164 */,
  12138. /* 165 */,
  12139. /* 166 */,
  12140. /* 167 */,
  12141. /* 168 */,
  12142. /* 169 */,
  12143. /* 170 */,
  12144. /* 171 */,
  12145. /* 172 */,
  12146. /* 173 */,
  12147. /* 174 */,
  12148. /* 175 */,
  12149. /* 176 */,
  12150. /* 177 */,
  12151. /* 178 */,
  12152. /* 179 */,
  12153. /* 180 */,
  12154. /* 181 */,
  12155. /* 182 */,
  12156. /* 183 */
  12157. /*!************************************************************************************!*\
  12158. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  12159. \************************************************************************************/
  12160. /*! no static exports found */
  12161. /***/ (function(module, exports, __webpack_require__) {
  12162. "use strict";
  12163. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  12164. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12165. Object.defineProperty(exports, "__esModule", {
  12166. value: true
  12167. });
  12168. exports.default = void 0;
  12169. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 184));
  12170. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 186));
  12171. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  12172. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12173. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  12174. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 187));
  12175. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  12176. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 188));
  12177. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 189));
  12178. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 190));
  12179. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 191));
  12180. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  12181. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  12182. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 193));
  12183. function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e34) { throw _e34; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e35) { didErr = true; err = _e35; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  12184. 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); }
  12185. 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; }
  12186. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  12187. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  12188. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  12189. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12190. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  12191. function t(e) {
  12192. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  12193. }
  12194. function n(e, t, n) {
  12195. return e(n = {
  12196. path: t,
  12197. exports: {},
  12198. require: function require(e, t) {
  12199. return function () {
  12200. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  12201. }(null == t && n.path);
  12202. }
  12203. }, n.exports), n.exports;
  12204. }
  12205. var s = n(function (e, t) {
  12206. var n;
  12207. e.exports = (n = n || function (e, t) {
  12208. var n = Object.create || function () {
  12209. function e() {}
  12210. return function (t) {
  12211. var n;
  12212. return e.prototype = t, n = new e(), e.prototype = null, n;
  12213. };
  12214. }(),
  12215. s = {},
  12216. r = s.lib = {},
  12217. i = r.Base = {
  12218. extend: function extend(e) {
  12219. var t = n(this);
  12220. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  12221. t.$super.init.apply(this, arguments);
  12222. }), t.init.prototype = t, t.$super = this, t;
  12223. },
  12224. create: function create() {
  12225. var e = this.extend();
  12226. return e.init.apply(e, arguments), e;
  12227. },
  12228. init: function init() {},
  12229. mixIn: function mixIn(e) {
  12230. for (var t in e) {
  12231. e.hasOwnProperty(t) && (this[t] = e[t]);
  12232. }
  12233. e.hasOwnProperty("toString") && (this.toString = e.toString);
  12234. },
  12235. clone: function clone() {
  12236. return this.init.prototype.extend(this);
  12237. }
  12238. },
  12239. o = r.WordArray = i.extend({
  12240. init: function init(e, n) {
  12241. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  12242. },
  12243. toString: function toString(e) {
  12244. return (e || c).stringify(this);
  12245. },
  12246. concat: function concat(e) {
  12247. var t = this.words,
  12248. n = e.words,
  12249. s = this.sigBytes,
  12250. r = e.sigBytes;
  12251. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  12252. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  12253. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  12254. } else for (i = 0; i < r; i += 4) {
  12255. t[s + i >>> 2] = n[i >>> 2];
  12256. }
  12257. return this.sigBytes += r, this;
  12258. },
  12259. clamp: function clamp() {
  12260. var t = this.words,
  12261. n = this.sigBytes;
  12262. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  12263. },
  12264. clone: function clone() {
  12265. var e = i.clone.call(this);
  12266. return e.words = this.words.slice(0), e;
  12267. },
  12268. random: function random(t) {
  12269. for (var n, s = [], r = function r(t) {
  12270. t = t;
  12271. var n = 987654321,
  12272. s = 4294967295;
  12273. return function () {
  12274. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  12275. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  12276. };
  12277. }, i = 0; i < t; i += 4) {
  12278. var a = r(4294967296 * (n || e.random()));
  12279. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  12280. }
  12281. return new o.init(s, t);
  12282. }
  12283. }),
  12284. a = s.enc = {},
  12285. c = a.Hex = {
  12286. stringify: function stringify(e) {
  12287. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12288. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12289. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  12290. }
  12291. return s.join("");
  12292. },
  12293. parse: function parse(e) {
  12294. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  12295. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  12296. }
  12297. return new o.init(n, t / 2);
  12298. }
  12299. },
  12300. u = a.Latin1 = {
  12301. stringify: function stringify(e) {
  12302. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12303. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12304. s.push(String.fromCharCode(i));
  12305. }
  12306. return s.join("");
  12307. },
  12308. parse: function parse(e) {
  12309. for (var t = e.length, n = [], s = 0; s < t; s++) {
  12310. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  12311. }
  12312. return new o.init(n, t);
  12313. }
  12314. },
  12315. h = a.Utf8 = {
  12316. stringify: function stringify(e) {
  12317. try {
  12318. return decodeURIComponent(escape(u.stringify(e)));
  12319. } catch (e) {
  12320. throw new Error("Malformed UTF-8 data");
  12321. }
  12322. },
  12323. parse: function parse(e) {
  12324. return u.parse(unescape(encodeURIComponent(e)));
  12325. }
  12326. },
  12327. l = r.BufferedBlockAlgorithm = i.extend({
  12328. reset: function reset() {
  12329. this._data = new o.init(), this._nDataBytes = 0;
  12330. },
  12331. _append: function _append(e) {
  12332. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  12333. },
  12334. _process: function _process(t) {
  12335. var n = this._data,
  12336. s = n.words,
  12337. r = n.sigBytes,
  12338. i = this.blockSize,
  12339. a = r / (4 * i),
  12340. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  12341. u = e.min(4 * c, r);
  12342. if (c) {
  12343. for (var h = 0; h < c; h += i) {
  12344. this._doProcessBlock(s, h);
  12345. }
  12346. var l = s.splice(0, c);
  12347. n.sigBytes -= u;
  12348. }
  12349. return new o.init(l, u);
  12350. },
  12351. clone: function clone() {
  12352. var e = i.clone.call(this);
  12353. return e._data = this._data.clone(), e;
  12354. },
  12355. _minBufferSize: 0
  12356. });
  12357. r.Hasher = l.extend({
  12358. cfg: i.extend(),
  12359. init: function init(e) {
  12360. this.cfg = this.cfg.extend(e), this.reset();
  12361. },
  12362. reset: function reset() {
  12363. l.reset.call(this), this._doReset();
  12364. },
  12365. update: function update(e) {
  12366. return this._append(e), this._process(), this;
  12367. },
  12368. finalize: function finalize(e) {
  12369. return e && this._append(e), this._doFinalize();
  12370. },
  12371. blockSize: 16,
  12372. _createHelper: function _createHelper(e) {
  12373. return function (t, n) {
  12374. return new e.init(n).finalize(t);
  12375. };
  12376. },
  12377. _createHmacHelper: function _createHmacHelper(e) {
  12378. return function (t, n) {
  12379. return new d.HMAC.init(e, n).finalize(t);
  12380. };
  12381. }
  12382. });
  12383. var d = s.algo = {};
  12384. return s;
  12385. }(Math), n);
  12386. }),
  12387. r = s,
  12388. i = (n(function (e, t) {
  12389. var n;
  12390. e.exports = (n = r, function (e) {
  12391. var t = n,
  12392. s = t.lib,
  12393. r = s.WordArray,
  12394. i = s.Hasher,
  12395. o = t.algo,
  12396. a = [];
  12397. !function () {
  12398. for (var t = 0; t < 64; t++) {
  12399. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  12400. }
  12401. }();
  12402. var c = o.MD5 = i.extend({
  12403. _doReset: function _doReset() {
  12404. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  12405. },
  12406. _doProcessBlock: function _doProcessBlock(e, t) {
  12407. for (var n = 0; n < 16; n++) {
  12408. var s = t + n,
  12409. r = e[s];
  12410. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  12411. }
  12412. var i = this._hash.words,
  12413. o = e[t + 0],
  12414. c = e[t + 1],
  12415. p = e[t + 2],
  12416. f = e[t + 3],
  12417. g = e[t + 4],
  12418. m = e[t + 5],
  12419. y = e[t + 6],
  12420. _ = e[t + 7],
  12421. w = e[t + 8],
  12422. v = e[t + 9],
  12423. I = e[t + 10],
  12424. S = e[t + 11],
  12425. b = e[t + 12],
  12426. k = e[t + 13],
  12427. A = e[t + 14],
  12428. P = e[t + 15],
  12429. T = i[0],
  12430. C = i[1],
  12431. x = i[2],
  12432. O = i[3];
  12433. T = u(T, C, x, O, o, 7, a[0]), O = u(O, T, C, x, c, 12, a[1]), x = u(x, O, T, C, p, 17, a[2]), C = u(C, x, O, T, f, 22, a[3]), T = u(T, C, x, O, g, 7, a[4]), O = u(O, T, C, x, m, 12, a[5]), x = u(x, O, T, C, y, 17, a[6]), C = u(C, x, O, T, _, 22, a[7]), T = u(T, C, x, O, w, 7, a[8]), O = u(O, T, C, x, v, 12, a[9]), x = u(x, O, T, C, I, 17, a[10]), C = u(C, x, O, T, S, 22, a[11]), T = u(T, C, x, O, b, 7, a[12]), O = u(O, T, C, x, k, 12, a[13]), x = u(x, O, T, C, A, 17, a[14]), T = h(T, C = u(C, x, O, T, P, 22, a[15]), x, O, c, 5, a[16]), O = h(O, T, C, x, y, 9, a[17]), x = h(x, O, T, C, S, 14, a[18]), C = h(C, x, O, T, o, 20, a[19]), T = h(T, C, x, O, m, 5, a[20]), O = h(O, T, C, x, I, 9, a[21]), x = h(x, O, T, C, P, 14, a[22]), C = h(C, x, O, T, g, 20, a[23]), T = h(T, C, x, O, v, 5, a[24]), O = h(O, T, C, x, A, 9, a[25]), x = h(x, O, T, C, f, 14, a[26]), C = h(C, x, O, T, w, 20, a[27]), T = h(T, C, x, O, k, 5, a[28]), O = h(O, T, C, x, p, 9, a[29]), x = h(x, O, T, C, _, 14, a[30]), T = l(T, C = h(C, x, O, T, b, 20, a[31]), x, O, m, 4, a[32]), O = l(O, T, C, x, w, 11, a[33]), x = l(x, O, T, C, S, 16, a[34]), C = l(C, x, O, T, A, 23, a[35]), T = l(T, C, x, O, c, 4, a[36]), O = l(O, T, C, x, g, 11, a[37]), x = l(x, O, T, C, _, 16, a[38]), C = l(C, x, O, T, I, 23, a[39]), T = l(T, C, x, O, k, 4, a[40]), O = l(O, T, C, x, o, 11, a[41]), x = l(x, O, T, C, f, 16, a[42]), C = l(C, x, O, T, y, 23, a[43]), T = l(T, C, x, O, v, 4, a[44]), O = l(O, T, C, x, b, 11, a[45]), x = l(x, O, T, C, P, 16, a[46]), T = d(T, C = l(C, x, O, T, p, 23, a[47]), x, O, o, 6, a[48]), O = d(O, T, C, x, _, 10, a[49]), x = d(x, O, T, C, A, 15, a[50]), C = d(C, x, O, T, m, 21, a[51]), T = d(T, C, x, O, b, 6, a[52]), O = d(O, T, C, x, f, 10, a[53]), x = d(x, O, T, C, I, 15, a[54]), C = d(C, x, O, T, c, 21, a[55]), T = d(T, C, x, O, w, 6, a[56]), O = d(O, T, C, x, P, 10, a[57]), x = d(x, O, T, C, y, 15, a[58]), C = d(C, x, O, T, k, 21, a[59]), T = d(T, C, x, O, g, 6, a[60]), O = d(O, T, C, x, S, 10, a[61]), x = d(x, O, T, C, p, 15, a[62]), C = d(C, x, O, T, v, 21, a[63]), i[0] = i[0] + T | 0, i[1] = i[1] + C | 0, i[2] = i[2] + x | 0, i[3] = i[3] + O | 0;
  12434. },
  12435. _doFinalize: function _doFinalize() {
  12436. var t = this._data,
  12437. n = t.words,
  12438. s = 8 * this._nDataBytes,
  12439. r = 8 * t.sigBytes;
  12440. n[r >>> 5] |= 128 << 24 - r % 32;
  12441. var i = e.floor(s / 4294967296),
  12442. o = s;
  12443. n[15 + (r + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), n[14 + (r + 64 >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();
  12444. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  12445. var h = c[u];
  12446. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  12447. }
  12448. return a;
  12449. },
  12450. clone: function clone() {
  12451. var e = i.clone.call(this);
  12452. return e._hash = this._hash.clone(), e;
  12453. }
  12454. });
  12455. function u(e, t, n, s, r, i, o) {
  12456. var a = e + (t & n | ~t & s) + r + o;
  12457. return (a << i | a >>> 32 - i) + t;
  12458. }
  12459. function h(e, t, n, s, r, i, o) {
  12460. var a = e + (t & s | n & ~s) + r + o;
  12461. return (a << i | a >>> 32 - i) + t;
  12462. }
  12463. function l(e, t, n, s, r, i, o) {
  12464. var a = e + (t ^ n ^ s) + r + o;
  12465. return (a << i | a >>> 32 - i) + t;
  12466. }
  12467. function d(e, t, n, s, r, i, o) {
  12468. var a = e + (n ^ (t | ~s)) + r + o;
  12469. return (a << i | a >>> 32 - i) + t;
  12470. }
  12471. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  12472. }(Math), n.MD5);
  12473. }), n(function (e, t) {
  12474. var n;
  12475. e.exports = (n = r, void function () {
  12476. var e = n,
  12477. t = e.lib.Base,
  12478. s = e.enc.Utf8;
  12479. e.algo.HMAC = t.extend({
  12480. init: function init(e, t) {
  12481. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  12482. var n = e.blockSize,
  12483. r = 4 * n;
  12484. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  12485. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  12486. a[u] ^= 1549556828, c[u] ^= 909522486;
  12487. }
  12488. i.sigBytes = o.sigBytes = r, this.reset();
  12489. },
  12490. reset: function reset() {
  12491. var e = this._hasher;
  12492. e.reset(), e.update(this._iKey);
  12493. },
  12494. update: function update(e) {
  12495. return this._hasher.update(e), this;
  12496. },
  12497. finalize: function finalize(e) {
  12498. var t = this._hasher,
  12499. n = t.finalize(e);
  12500. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  12501. }
  12502. });
  12503. }());
  12504. }), n(function (e, t) {
  12505. e.exports = r.HmacMD5;
  12506. })),
  12507. o = n(function (e, t) {
  12508. e.exports = r.enc.Utf8;
  12509. }),
  12510. a = n(function (e, t) {
  12511. var n;
  12512. e.exports = (n = r, function () {
  12513. var e = n,
  12514. t = e.lib.WordArray;
  12515. function s(e, n, s) {
  12516. for (var r = [], i = 0, o = 0; o < n; o++) {
  12517. if (o % 4) {
  12518. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  12519. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  12520. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  12521. }
  12522. }
  12523. return t.create(r, i);
  12524. }
  12525. e.enc.Base64 = {
  12526. stringify: function stringify(e) {
  12527. var t = e.words,
  12528. n = e.sigBytes,
  12529. s = this._map;
  12530. e.clamp();
  12531. for (var r = [], i = 0; i < n; i += 3) {
  12532. for (var o = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, a = 0; a < 4 && i + .75 * a < n; a++) {
  12533. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  12534. }
  12535. }
  12536. var c = s.charAt(64);
  12537. if (c) for (; r.length % 4;) {
  12538. r.push(c);
  12539. }
  12540. return r.join("");
  12541. },
  12542. parse: function parse(e) {
  12543. var t = e.length,
  12544. n = this._map,
  12545. r = this._reverseMap;
  12546. if (!r) {
  12547. r = this._reverseMap = [];
  12548. for (var i = 0; i < n.length; i++) {
  12549. r[n.charCodeAt(i)] = i;
  12550. }
  12551. }
  12552. var o = n.charAt(64);
  12553. if (o) {
  12554. var a = e.indexOf(o);
  12555. -1 !== a && (t = a);
  12556. }
  12557. return s(e, t, r);
  12558. },
  12559. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  12560. };
  12561. }(), n.enc.Base64);
  12562. });
  12563. var c = "FUNCTION",
  12564. u = "OBJECT",
  12565. h = "CLIENT_DB",
  12566. l = "pending",
  12567. d = "fulfilled",
  12568. p = "rejected";
  12569. function f(e) {
  12570. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  12571. }
  12572. function g(e) {
  12573. return "object" === f(e);
  12574. }
  12575. function m(e) {
  12576. return "function" == typeof e;
  12577. }
  12578. function y(e) {
  12579. return function () {
  12580. try {
  12581. return e.apply(e, arguments);
  12582. } catch (e) {
  12583. console.error(e);
  12584. }
  12585. };
  12586. }
  12587. var _ = "REJECTED",
  12588. w = "NOT_PENDING";
  12589. var v = /*#__PURE__*/function () {
  12590. function v() {
  12591. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12592. e = _ref.createPromise,
  12593. _ref$retryRule = _ref.retryRule,
  12594. t = _ref$retryRule === void 0 ? _ : _ref$retryRule;
  12595. (0, _classCallCheck2.default)(this, v);
  12596. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  12597. }
  12598. (0, _createClass2.default)(v, [{
  12599. key: "needRetry",
  12600. get: function get() {
  12601. if (!this.status) return !0;
  12602. switch (this.retryRule) {
  12603. case _:
  12604. return this.status === p;
  12605. case w:
  12606. return this.status !== l;
  12607. }
  12608. }
  12609. }, {
  12610. key: "exec",
  12611. value: function exec() {
  12612. var _this = this;
  12613. return this.needRetry ? (this.status = l, this.promise = this.createPromise().then(function (e) {
  12614. return _this.status = d, Promise.resolve(e);
  12615. }, function (e) {
  12616. return _this.status = p, Promise.reject(e);
  12617. }), this.promise) : this.promise;
  12618. }
  12619. }]);
  12620. return v;
  12621. }();
  12622. function I(e) {
  12623. return e && "string" == typeof e ? JSON.parse(e) : e;
  12624. }
  12625. var S = "development" === "development",
  12626. b = "mp-weixin",
  12627. k = "true" === undefined || !0 === undefined,
  12628. A = I([]),
  12629. P = "h5" === b ? "web" : "app-plus" === b ? "app" : b,
  12630. T = I(undefined),
  12631. C = I([]) || [],
  12632. x = true;
  12633. var O = "";
  12634. try {
  12635. O = (__webpack_require__(/*! uni-stat-config */ 194).default || __webpack_require__(/*! uni-stat-config */ 194)).appid;
  12636. } catch (e) {}
  12637. var E = {};
  12638. function L(e) {
  12639. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12640. var n, s;
  12641. return n = E, s = e, Object.prototype.hasOwnProperty.call(n, s) || (E[e] = t), E[e];
  12642. }
  12643. "app" === P && (E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  12644. var R = ["invoke", "success", "fail", "complete"],
  12645. U = L("_globalUniCloudInterceptor");
  12646. function N(e, t) {
  12647. U[e] || (U[e] = {}), g(t) && Object.keys(t).forEach(function (n) {
  12648. R.indexOf(n) > -1 && function (e, t, n) {
  12649. var s = U[e][t];
  12650. s || (s = U[e][t] = []), -1 === s.indexOf(n) && m(n) && s.push(n);
  12651. }(e, n, t[n]);
  12652. });
  12653. }
  12654. function D(e, t) {
  12655. U[e] || (U[e] = {}), g(t) ? Object.keys(t).forEach(function (n) {
  12656. R.indexOf(n) > -1 && function (e, t, n) {
  12657. var s = U[e][t];
  12658. if (!s) return;
  12659. var r = s.indexOf(n);
  12660. r > -1 && s.splice(r, 1);
  12661. }(e, n, t[n]);
  12662. }) : delete U[e];
  12663. }
  12664. function M(e, t) {
  12665. return e && 0 !== e.length ? e.reduce(function (e, n) {
  12666. return e.then(function () {
  12667. return n(t);
  12668. });
  12669. }, Promise.resolve()) : Promise.resolve();
  12670. }
  12671. function q(e, t) {
  12672. return U[e] && U[e][t] || [];
  12673. }
  12674. function F(e) {
  12675. N("callObject", e);
  12676. }
  12677. var K = L("_globalUniCloudListener"),
  12678. j = "response",
  12679. $ = "needLogin",
  12680. B = "refreshToken",
  12681. W = "clientdb",
  12682. H = "cloudfunction",
  12683. z = "cloudobject";
  12684. function J(e) {
  12685. return K[e] || (K[e] = []), K[e];
  12686. }
  12687. function G(e, t) {
  12688. var n = J(e);
  12689. n.includes(t) || n.push(t);
  12690. }
  12691. function V(e, t) {
  12692. var n = J(e),
  12693. s = n.indexOf(t);
  12694. -1 !== s && n.splice(s, 1);
  12695. }
  12696. function Y(e, t) {
  12697. var n = J(e);
  12698. for (var _e2 = 0; _e2 < n.length; _e2++) {
  12699. (0, n[_e2])(t);
  12700. }
  12701. }
  12702. var Q,
  12703. X = !1;
  12704. function Z() {
  12705. return Q || (Q = new Promise(function (e) {
  12706. X && e(), function t() {
  12707. if ("function" == typeof getCurrentPages) {
  12708. var _t2 = getCurrentPages();
  12709. _t2 && _t2[0] && (X = !0, e());
  12710. }
  12711. X || setTimeout(function () {
  12712. t();
  12713. }, 30);
  12714. }();
  12715. }), Q);
  12716. }
  12717. function ee(e) {
  12718. var t = {};
  12719. for (var _n2 in e) {
  12720. var _s2 = e[_n2];
  12721. m(_s2) && (t[_n2] = y(_s2));
  12722. }
  12723. return t;
  12724. }
  12725. var te = /*#__PURE__*/function (_Error) {
  12726. (0, _inherits2.default)(te, _Error);
  12727. var _super = _createSuper(te);
  12728. function te(e) {
  12729. var _this2;
  12730. (0, _classCallCheck2.default)(this, te);
  12731. _this2 = _super.call(this, e.message), _this2.errMsg = e.message || e.errMsg || "unknown system error", _this2.code = _this2.errCode = e.code || e.errCode || "SYSTEM_ERROR", _this2.errSubject = _this2.subject = e.subject || e.errSubject, _this2.cause = e.cause, _this2.requestId = e.requestId;
  12732. return _this2;
  12733. }
  12734. (0, _createClass2.default)(te, [{
  12735. key: "toJson",
  12736. value: function toJson() {
  12737. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  12738. if (!(e >= 10)) return e++, {
  12739. errCode: this.errCode,
  12740. errMsg: this.errMsg,
  12741. errSubject: this.errSubject,
  12742. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  12743. };
  12744. }
  12745. }]);
  12746. return te;
  12747. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  12748. var ne = {
  12749. request: function request(e) {
  12750. return uni.request(e);
  12751. },
  12752. uploadFile: function uploadFile(e) {
  12753. return uni.uploadFile(e);
  12754. },
  12755. setStorageSync: function setStorageSync(e, t) {
  12756. return uni.setStorageSync(e, t);
  12757. },
  12758. getStorageSync: function getStorageSync(e) {
  12759. return uni.getStorageSync(e);
  12760. },
  12761. removeStorageSync: function removeStorageSync(e) {
  12762. return uni.removeStorageSync(e);
  12763. },
  12764. clearStorageSync: function clearStorageSync() {
  12765. return uni.clearStorageSync();
  12766. }
  12767. };
  12768. function se() {
  12769. return {
  12770. token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"),
  12771. tokenExpired: ne.getStorageSync("uni_id_token_expired")
  12772. };
  12773. }
  12774. function re() {
  12775. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12776. e = _ref2.token,
  12777. t = _ref2.tokenExpired;
  12778. e && ne.setStorageSync("uni_id_token", e), t && ne.setStorageSync("uni_id_token_expired", t);
  12779. }
  12780. var ie, oe;
  12781. function ae() {
  12782. return ie || (ie = uni.getSystemInfoSync()), ie;
  12783. }
  12784. function ce() {
  12785. var e, t;
  12786. try {
  12787. if (uni.getLaunchOptionsSync) {
  12788. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  12789. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  12790. _n3 = _uni$getLaunchOptions.scene,
  12791. _s3 = _uni$getLaunchOptions.channel;
  12792. e = _s3, t = _n3;
  12793. }
  12794. } catch (e) {}
  12795. return {
  12796. channel: e,
  12797. scene: t
  12798. };
  12799. }
  12800. function ue() {
  12801. var e = uni.getLocale && uni.getLocale() || "en";
  12802. if (oe) return _objectSpread(_objectSpread({}, oe), {}, {
  12803. locale: e,
  12804. LOCALE: e
  12805. });
  12806. var t = ae(),
  12807. n = t.deviceId,
  12808. s = t.osName,
  12809. r = t.uniPlatform,
  12810. i = t.appId,
  12811. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  12812. for (var _e3 = 0; _e3 < o.length; _e3++) {
  12813. delete t[o[_e3]];
  12814. }
  12815. return oe = _objectSpread(_objectSpread({
  12816. PLATFORM: r,
  12817. OS: s,
  12818. APPID: i,
  12819. DEVICEID: n
  12820. }, ce()), t), _objectSpread(_objectSpread({}, oe), {}, {
  12821. locale: e,
  12822. LOCALE: e
  12823. });
  12824. }
  12825. var he = {
  12826. sign: function sign(e, t) {
  12827. var n = "";
  12828. return Object.keys(e).sort().forEach(function (t) {
  12829. e[t] && (n = n + "&" + t + "=" + e[t]);
  12830. }), n = n.slice(1), i(n, t).toString();
  12831. },
  12832. wrappedRequest: function wrappedRequest(e, t) {
  12833. return new Promise(function (n, s) {
  12834. t(Object.assign(e, {
  12835. complete: function complete(e) {
  12836. e || (e = {}), S && "web" === P && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  12837. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  12838. if (!e.statusCode || e.statusCode >= 400) {
  12839. var _n4 = e.data && e.data.error && e.data.error.code || "SYS_ERR",
  12840. _r = e.data && e.data.error && e.data.error.message || e.errMsg || "request:fail";
  12841. return s(new te({
  12842. code: _n4,
  12843. message: _r,
  12844. requestId: t
  12845. }));
  12846. }
  12847. var r = e.data;
  12848. if (r.error) return s(new te({
  12849. code: r.error.code,
  12850. message: r.error.message,
  12851. requestId: t
  12852. }));
  12853. r.result = r.data, r.requestId = t, delete r.data, n(r);
  12854. }
  12855. }));
  12856. });
  12857. },
  12858. toBase64: function toBase64(e) {
  12859. return a.stringify(o.parse(e));
  12860. }
  12861. };
  12862. var le = /*#__PURE__*/function () {
  12863. function le(e) {
  12864. var _this3 = this;
  12865. (0, _classCallCheck2.default)(this, le);
  12866. ["spaceId", "clientSecret"].forEach(function (t) {
  12867. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  12868. }), this.config = Object.assign({}, {
  12869. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  12870. }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({
  12871. createPromise: function createPromise() {
  12872. return _this3.requestAuth(_this3.setupRequest({
  12873. method: "serverless.auth.user.anonymousAuthorize",
  12874. params: "{}"
  12875. }, "auth")).then(function (e) {
  12876. if (!e.result || !e.result.accessToken) throw new te({
  12877. code: "AUTH_FAILED",
  12878. message: "获取accessToken失败"
  12879. });
  12880. _this3.setAccessToken(e.result.accessToken);
  12881. });
  12882. },
  12883. retryRule: w
  12884. });
  12885. }
  12886. (0, _createClass2.default)(le, [{
  12887. key: "hasAccessToken",
  12888. get: function get() {
  12889. return !!this.accessToken;
  12890. }
  12891. }, {
  12892. key: "setAccessToken",
  12893. value: function setAccessToken(e) {
  12894. this.accessToken = e;
  12895. }
  12896. }, {
  12897. key: "requestWrapped",
  12898. value: function requestWrapped(e) {
  12899. return he.wrappedRequest(e, this.adapter.request);
  12900. }
  12901. }, {
  12902. key: "requestAuth",
  12903. value: function requestAuth(e) {
  12904. return this.requestWrapped(e);
  12905. }
  12906. }, {
  12907. key: "request",
  12908. value: function request(e, t) {
  12909. var _this4 = this;
  12910. return Promise.resolve().then(function () {
  12911. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  12912. return new Promise(function (e, n) {
  12913. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  12914. }).then(function () {
  12915. return _this4.getAccessToken();
  12916. }).then(function () {
  12917. var t = _this4.rebuildRequest(e);
  12918. return _this4.request(t, !0);
  12919. });
  12920. }) : _this4.getAccessToken().then(function () {
  12921. var t = _this4.rebuildRequest(e);
  12922. return _this4.request(t, !0);
  12923. });
  12924. });
  12925. }
  12926. }, {
  12927. key: "rebuildRequest",
  12928. value: function rebuildRequest(e) {
  12929. var t = Object.assign({}, e);
  12930. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = he.sign(t.data, this.config.clientSecret), t;
  12931. }
  12932. }, {
  12933. key: "setupRequest",
  12934. value: function setupRequest(e, t) {
  12935. var n = Object.assign({}, e, {
  12936. spaceId: this.config.spaceId,
  12937. timestamp: Date.now()
  12938. }),
  12939. s = {
  12940. "Content-Type": "application/json"
  12941. };
  12942. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret), {
  12943. url: this.config.requestUrl,
  12944. method: "POST",
  12945. data: n,
  12946. dataType: "json",
  12947. header: s
  12948. };
  12949. }
  12950. }, {
  12951. key: "getAccessToken",
  12952. value: function getAccessToken() {
  12953. return this._getAccessTokenPromiseHub.exec();
  12954. }
  12955. }, {
  12956. key: "authorize",
  12957. value: function () {
  12958. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  12959. return _regenerator.default.wrap(function _callee$(_context) {
  12960. while (1) {
  12961. switch (_context.prev = _context.next) {
  12962. case 0:
  12963. _context.next = 2;
  12964. return this.getAccessToken();
  12965. case 2:
  12966. case "end":
  12967. return _context.stop();
  12968. }
  12969. }
  12970. }, _callee, this);
  12971. }));
  12972. function authorize() {
  12973. return _authorize.apply(this, arguments);
  12974. }
  12975. return authorize;
  12976. }()
  12977. }, {
  12978. key: "callFunction",
  12979. value: function callFunction(e) {
  12980. var t = {
  12981. method: "serverless.function.runtime.invoke",
  12982. params: JSON.stringify({
  12983. functionTarget: e.name,
  12984. functionArgs: e.data || {}
  12985. })
  12986. };
  12987. return this.request(this.setupRequest(t));
  12988. }
  12989. }, {
  12990. key: "getOSSUploadOptionsFromPath",
  12991. value: function getOSSUploadOptionsFromPath(e) {
  12992. var t = {
  12993. method: "serverless.file.resource.generateProximalSign",
  12994. params: JSON.stringify(e)
  12995. };
  12996. return this.request(this.setupRequest(t));
  12997. }
  12998. }, {
  12999. key: "uploadFileToOSS",
  13000. value: function uploadFileToOSS(_ref3) {
  13001. var _this5 = this;
  13002. var e = _ref3.url,
  13003. t = _ref3.formData,
  13004. n = _ref3.name,
  13005. s = _ref3.filePath,
  13006. r = _ref3.fileType,
  13007. i = _ref3.onUploadProgress;
  13008. return new Promise(function (o, a) {
  13009. var c = _this5.adapter.uploadFile({
  13010. url: e,
  13011. formData: t,
  13012. name: n,
  13013. filePath: s,
  13014. fileType: r,
  13015. header: {
  13016. "X-OSS-server-side-encrpytion": "AES256"
  13017. },
  13018. success: function success(e) {
  13019. e && e.statusCode < 400 ? o(e) : a(new te({
  13020. code: "UPLOAD_FAILED",
  13021. message: "文件上传失败"
  13022. }));
  13023. },
  13024. fail: function fail(e) {
  13025. a(new te({
  13026. code: e.code || "UPLOAD_FAILED",
  13027. message: e.message || e.errMsg || "文件上传失败"
  13028. }));
  13029. }
  13030. });
  13031. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  13032. i({
  13033. loaded: e.totalBytesSent,
  13034. total: e.totalBytesExpectedToSend
  13035. });
  13036. });
  13037. });
  13038. }
  13039. }, {
  13040. key: "reportOSSUpload",
  13041. value: function reportOSSUpload(e) {
  13042. var t = {
  13043. method: "serverless.file.resource.report",
  13044. params: JSON.stringify(e)
  13045. };
  13046. return this.request(this.setupRequest(t));
  13047. }
  13048. }, {
  13049. key: "uploadFile",
  13050. value: function () {
  13051. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  13052. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, g, m, y, _, _e4, w;
  13053. return _regenerator.default.wrap(function _callee2$(_context2) {
  13054. while (1) {
  13055. switch (_context2.prev = _context2.next) {
  13056. case 0:
  13057. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, _ref4$cloudPathAsReal = _ref4.cloudPathAsRealPath, s = _ref4$cloudPathAsReal === void 0 ? !1 : _ref4$cloudPathAsReal, r = _ref4.onUploadProgress, i = _ref4.config;
  13058. if (!("string" !== f(t))) {
  13059. _context2.next = 3;
  13060. break;
  13061. }
  13062. throw new te({
  13063. code: "INVALID_PARAM",
  13064. message: "cloudPath必须为字符串类型"
  13065. });
  13066. case 3:
  13067. if (t = t.trim()) {
  13068. _context2.next = 5;
  13069. break;
  13070. }
  13071. throw new te({
  13072. code: "INVALID_PARAM",
  13073. message: "cloudPath不可为空"
  13074. });
  13075. case 5:
  13076. if (!/:\/\//.test(t)) {
  13077. _context2.next = 7;
  13078. break;
  13079. }
  13080. throw new te({
  13081. code: "INVALID_PARAM",
  13082. message: "cloudPath不合法"
  13083. });
  13084. case 7:
  13085. o = i && i.envType || this.config.envType;
  13086. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  13087. _context2.next = 10;
  13088. break;
  13089. }
  13090. throw new te({
  13091. code: "INVALID_PARAM",
  13092. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  13093. });
  13094. case 10:
  13095. _context2.next = 12;
  13096. return this.getOSSUploadOptionsFromPath({
  13097. env: o,
  13098. filename: s ? t.split("/").pop() : t,
  13099. fileId: s ? t : void 0
  13100. });
  13101. case 12:
  13102. a = _context2.sent.result;
  13103. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  13104. u = a.securityToken;
  13105. h = a.accessKeyId;
  13106. l = a.signature;
  13107. d = a.host;
  13108. p = a.ossPath;
  13109. g = a.id;
  13110. m = a.policy;
  13111. y = a.ossCallbackUrl;
  13112. _ = {
  13113. "Cache-Control": "max-age=2592000",
  13114. "Content-Disposition": "attachment",
  13115. OSSAccessKeyId: h,
  13116. Signature: l,
  13117. host: d,
  13118. id: g,
  13119. key: p,
  13120. policy: m,
  13121. success_action_status: 200
  13122. };
  13123. if (u && (_["x-oss-security-token"] = u), y) {
  13124. _e4 = JSON.stringify({
  13125. callbackUrl: y,
  13126. callbackBody: JSON.stringify({
  13127. fileId: g,
  13128. spaceId: this.config.spaceId
  13129. }),
  13130. callbackBodyType: "application/json"
  13131. });
  13132. _.callback = he.toBase64(_e4);
  13133. }
  13134. w = {
  13135. url: "https://" + a.host,
  13136. formData: _,
  13137. fileName: "file",
  13138. name: "file",
  13139. filePath: e,
  13140. fileType: n
  13141. };
  13142. _context2.next = 27;
  13143. return this.uploadFileToOSS(Object.assign({}, w, {
  13144. onUploadProgress: r
  13145. }));
  13146. case 27:
  13147. if (!y) {
  13148. _context2.next = 29;
  13149. break;
  13150. }
  13151. return _context2.abrupt("return", {
  13152. success: !0,
  13153. filePath: e,
  13154. fileID: c
  13155. });
  13156. case 29:
  13157. _context2.next = 31;
  13158. return this.reportOSSUpload({
  13159. id: g
  13160. });
  13161. case 31:
  13162. if (!_context2.sent.success) {
  13163. _context2.next = 33;
  13164. break;
  13165. }
  13166. return _context2.abrupt("return", {
  13167. success: !0,
  13168. filePath: e,
  13169. fileID: c
  13170. });
  13171. case 33:
  13172. throw new te({
  13173. code: "UPLOAD_FAILED",
  13174. message: "文件上传失败"
  13175. });
  13176. case 34:
  13177. case "end":
  13178. return _context2.stop();
  13179. }
  13180. }
  13181. }, _callee2, this);
  13182. }));
  13183. function uploadFile(_x) {
  13184. return _uploadFile.apply(this, arguments);
  13185. }
  13186. return uploadFile;
  13187. }()
  13188. }, {
  13189. key: "getTempFileURL",
  13190. value: function getTempFileURL() {
  13191. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13192. e = _ref5.fileList;
  13193. return new Promise(function (t, n) {
  13194. Array.isArray(e) && 0 !== e.length || n(new te({
  13195. code: "INVALID_PARAM",
  13196. message: "fileList的元素必须是非空的字符串"
  13197. })), t({
  13198. fileList: e.map(function (e) {
  13199. return {
  13200. fileID: e,
  13201. tempFileURL: e
  13202. };
  13203. })
  13204. });
  13205. });
  13206. }
  13207. }, {
  13208. key: "getFileInfo",
  13209. value: function () {
  13210. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  13211. var _ref6,
  13212. e,
  13213. t,
  13214. _args3 = arguments;
  13215. return _regenerator.default.wrap(function _callee3$(_context3) {
  13216. while (1) {
  13217. switch (_context3.prev = _context3.next) {
  13218. case 0:
  13219. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  13220. if (!(!Array.isArray(e) || 0 === e.length)) {
  13221. _context3.next = 3;
  13222. break;
  13223. }
  13224. throw new te({
  13225. code: "INVALID_PARAM",
  13226. message: "fileList的元素必须是非空的字符串"
  13227. });
  13228. case 3:
  13229. t = {
  13230. method: "serverless.file.resource.info",
  13231. params: JSON.stringify({
  13232. id: e.map(function (e) {
  13233. return e.split("?")[0];
  13234. }).join(",")
  13235. })
  13236. };
  13237. _context3.next = 6;
  13238. return this.request(this.setupRequest(t));
  13239. case 6:
  13240. _context3.t0 = _context3.sent.result;
  13241. return _context3.abrupt("return", {
  13242. fileList: _context3.t0
  13243. });
  13244. case 8:
  13245. case "end":
  13246. return _context3.stop();
  13247. }
  13248. }
  13249. }, _callee3, this);
  13250. }));
  13251. function getFileInfo() {
  13252. return _getFileInfo.apply(this, arguments);
  13253. }
  13254. return getFileInfo;
  13255. }()
  13256. }]);
  13257. return le;
  13258. }();
  13259. var de = {
  13260. init: function init(e) {
  13261. var t = new le(e),
  13262. n = {
  13263. signInAnonymously: function signInAnonymously() {
  13264. return t.authorize();
  13265. },
  13266. getLoginState: function getLoginState() {
  13267. return Promise.resolve(!1);
  13268. }
  13269. };
  13270. return t.auth = function () {
  13271. return n;
  13272. }, t.customAuth = t.auth, t;
  13273. }
  13274. };
  13275. var pe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  13276. var fe;
  13277. !function (e) {
  13278. e.local = "local", e.none = "none", e.session = "session";
  13279. }(fe || (fe = {}));
  13280. var ge = function ge() {},
  13281. me = n(function (e, t) {
  13282. var n;
  13283. e.exports = (n = r, function (e) {
  13284. var t = n,
  13285. s = t.lib,
  13286. r = s.WordArray,
  13287. i = s.Hasher,
  13288. o = t.algo,
  13289. a = [],
  13290. c = [];
  13291. !function () {
  13292. function t(t) {
  13293. for (var n = e.sqrt(t), s = 2; s <= n; s++) {
  13294. if (!(t % s)) return !1;
  13295. }
  13296. return !0;
  13297. }
  13298. function n(e) {
  13299. return 4294967296 * (e - (0 | e)) | 0;
  13300. }
  13301. for (var s = 2, r = 0; r < 64;) {
  13302. t(s) && (r < 8 && (a[r] = n(e.pow(s, .5))), c[r] = n(e.pow(s, 1 / 3)), r++), s++;
  13303. }
  13304. }();
  13305. var u = [],
  13306. h = o.SHA256 = i.extend({
  13307. _doReset: function _doReset() {
  13308. this._hash = new r.init(a.slice(0));
  13309. },
  13310. _doProcessBlock: function _doProcessBlock(e, t) {
  13311. for (var n = this._hash.words, s = n[0], r = n[1], i = n[2], o = n[3], a = n[4], h = n[5], l = n[6], d = n[7], p = 0; p < 64; p++) {
  13312. if (p < 16) u[p] = 0 | e[t + p];else {
  13313. var f = u[p - 15],
  13314. g = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3,
  13315. m = u[p - 2],
  13316. y = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
  13317. u[p] = g + u[p - 7] + y + u[p - 16];
  13318. }
  13319. var _ = s & r ^ s & i ^ r & i,
  13320. w = (s << 30 | s >>> 2) ^ (s << 19 | s >>> 13) ^ (s << 10 | s >>> 22),
  13321. v = d + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & h ^ ~a & l) + c[p] + u[p];
  13322. d = l, l = h, h = a, a = o + v | 0, o = i, i = r, r = s, s = v + (w + _) | 0;
  13323. }
  13324. n[0] = n[0] + s | 0, n[1] = n[1] + r | 0, n[2] = n[2] + i | 0, n[3] = n[3] + o | 0, n[4] = n[4] + a | 0, n[5] = n[5] + h | 0, n[6] = n[6] + l | 0, n[7] = n[7] + d | 0;
  13325. },
  13326. _doFinalize: function _doFinalize() {
  13327. var t = this._data,
  13328. n = t.words,
  13329. s = 8 * this._nDataBytes,
  13330. r = 8 * t.sigBytes;
  13331. return n[r >>> 5] |= 128 << 24 - r % 32, n[14 + (r + 64 >>> 9 << 4)] = e.floor(s / 4294967296), n[15 + (r + 64 >>> 9 << 4)] = s, t.sigBytes = 4 * n.length, this._process(), this._hash;
  13332. },
  13333. clone: function clone() {
  13334. var e = i.clone.call(this);
  13335. return e._hash = this._hash.clone(), e;
  13336. }
  13337. });
  13338. t.SHA256 = i._createHelper(h), t.HmacSHA256 = i._createHmacHelper(h);
  13339. }(Math), n.SHA256);
  13340. }),
  13341. ye = me,
  13342. _e = n(function (e, t) {
  13343. e.exports = r.HmacSHA256;
  13344. });
  13345. var we = function we() {
  13346. var e;
  13347. if (!Promise) {
  13348. e = function e() {}, e.promise = {};
  13349. var _t3 = function _t3() {
  13350. throw new te({
  13351. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  13352. });
  13353. };
  13354. return Object.defineProperty(e.promise, "then", {
  13355. get: _t3
  13356. }), Object.defineProperty(e.promise, "catch", {
  13357. get: _t3
  13358. }), e;
  13359. }
  13360. var t = new Promise(function (t, n) {
  13361. e = function e(_e5, s) {
  13362. return _e5 ? n(_e5) : t(s);
  13363. };
  13364. });
  13365. return e.promise = t, e;
  13366. };
  13367. function ve(e) {
  13368. return void 0 === e;
  13369. }
  13370. function Ie(e) {
  13371. return "[object Null]" === Object.prototype.toString.call(e);
  13372. }
  13373. var Se;
  13374. function be(e) {
  13375. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  13376. var n;
  13377. var _iterator = _createForOfIteratorHelper(t),
  13378. _step;
  13379. try {
  13380. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13381. var _e6 = _step.value;
  13382. var _t4 = _e6.isMatch,
  13383. _n5 = _e6.genAdapter,
  13384. _s4 = _e6.runtime;
  13385. if (_t4()) return {
  13386. adapter: _n5(),
  13387. runtime: _s4
  13388. };
  13389. }
  13390. } catch (err) {
  13391. _iterator.e(err);
  13392. } finally {
  13393. _iterator.f();
  13394. }
  13395. }
  13396. !function (e) {
  13397. e.WEB = "web", e.WX_MP = "wx_mp";
  13398. }(Se || (Se = {}));
  13399. var ke = {
  13400. adapter: null,
  13401. runtime: void 0
  13402. },
  13403. Ae = ["anonymousUuidKey"];
  13404. var Pe = /*#__PURE__*/function (_ge) {
  13405. (0, _inherits2.default)(Pe, _ge);
  13406. var _super2 = _createSuper(Pe);
  13407. function Pe() {
  13408. var _this6;
  13409. (0, _classCallCheck2.default)(this, Pe);
  13410. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  13411. return _this6;
  13412. }
  13413. (0, _createClass2.default)(Pe, [{
  13414. key: "setItem",
  13415. value: function setItem(e, t) {
  13416. ke.adapter.root.tcbObject[e] = t;
  13417. }
  13418. }, {
  13419. key: "getItem",
  13420. value: function getItem(e) {
  13421. return ke.adapter.root.tcbObject[e];
  13422. }
  13423. }, {
  13424. key: "removeItem",
  13425. value: function removeItem(e) {
  13426. delete ke.adapter.root.tcbObject[e];
  13427. }
  13428. }, {
  13429. key: "clear",
  13430. value: function clear() {
  13431. delete ke.adapter.root.tcbObject;
  13432. }
  13433. }]);
  13434. return Pe;
  13435. }(ge);
  13436. function Te(e, t) {
  13437. switch (e) {
  13438. case "local":
  13439. return t.localStorage || new Pe();
  13440. case "none":
  13441. return new Pe();
  13442. default:
  13443. return t.sessionStorage || new Pe();
  13444. }
  13445. }
  13446. var Ce = /*#__PURE__*/function () {
  13447. function Ce(e) {
  13448. (0, _classCallCheck2.default)(this, Ce);
  13449. if (!this._storage) {
  13450. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Te(this._persistence, ke.adapter);
  13451. var _t5 = "access_token_".concat(e.env),
  13452. _n6 = "access_token_expire_".concat(e.env),
  13453. _s5 = "refresh_token_".concat(e.env),
  13454. _r2 = "anonymous_uuid_".concat(e.env),
  13455. _i = "login_type_".concat(e.env),
  13456. _o = "user_info_".concat(e.env);
  13457. this.keys = {
  13458. accessTokenKey: _t5,
  13459. accessTokenExpireKey: _n6,
  13460. refreshTokenKey: _s5,
  13461. anonymousUuidKey: _r2,
  13462. loginTypeKey: _i,
  13463. userInfoKey: _o
  13464. };
  13465. }
  13466. }
  13467. (0, _createClass2.default)(Ce, [{
  13468. key: "updatePersistence",
  13469. value: function updatePersistence(e) {
  13470. if (e === this._persistence) return;
  13471. var t = "local" === this._persistence;
  13472. this._persistence = e;
  13473. var n = Te(e, ke.adapter);
  13474. for (var _e7 in this.keys) {
  13475. var _s6 = this.keys[_e7];
  13476. if (t && Ae.includes(_e7)) continue;
  13477. var _r3 = this._storage.getItem(_s6);
  13478. ve(_r3) || Ie(_r3) || (n.setItem(_s6, _r3), this._storage.removeItem(_s6));
  13479. }
  13480. this._storage = n;
  13481. }
  13482. }, {
  13483. key: "setStore",
  13484. value: function setStore(e, t, n) {
  13485. if (!this._storage) return;
  13486. var s = {
  13487. version: n || "localCachev1",
  13488. content: t
  13489. },
  13490. r = JSON.stringify(s);
  13491. try {
  13492. this._storage.setItem(e, r);
  13493. } catch (e) {
  13494. throw e;
  13495. }
  13496. }
  13497. }, {
  13498. key: "getStore",
  13499. value: function getStore(e, t) {
  13500. try {
  13501. if (!this._storage) return;
  13502. } catch (e) {
  13503. return "";
  13504. }
  13505. t = t || "localCachev1";
  13506. var n = this._storage.getItem(e);
  13507. if (!n) return "";
  13508. if (n.indexOf(t) >= 0) {
  13509. return JSON.parse(n).content;
  13510. }
  13511. return "";
  13512. }
  13513. }, {
  13514. key: "removeStore",
  13515. value: function removeStore(e) {
  13516. this._storage.removeItem(e);
  13517. }
  13518. }]);
  13519. return Ce;
  13520. }();
  13521. var xe = {},
  13522. Oe = {};
  13523. function Ee(e) {
  13524. return xe[e];
  13525. }
  13526. var Le = /*#__PURE__*/(0, _createClass2.default)(function Le(e, t) {
  13527. (0, _classCallCheck2.default)(this, Le);
  13528. this.data = t || null, this.name = e;
  13529. });
  13530. var Re = /*#__PURE__*/function (_Le) {
  13531. (0, _inherits2.default)(Re, _Le);
  13532. var _super3 = _createSuper(Re);
  13533. function Re(e, t) {
  13534. var _this7;
  13535. (0, _classCallCheck2.default)(this, Re);
  13536. _this7 = _super3.call(this, "error", {
  13537. error: e,
  13538. data: t
  13539. }), _this7.error = e;
  13540. return _this7;
  13541. }
  13542. return (0, _createClass2.default)(Re);
  13543. }(Le);
  13544. var Ue = new ( /*#__PURE__*/function () {
  13545. function _class() {
  13546. (0, _classCallCheck2.default)(this, _class);
  13547. this._listeners = {};
  13548. }
  13549. (0, _createClass2.default)(_class, [{
  13550. key: "on",
  13551. value: function on(e, t) {
  13552. return function (e, t, n) {
  13553. n[e] = n[e] || [], n[e].push(t);
  13554. }(e, t, this._listeners), this;
  13555. }
  13556. }, {
  13557. key: "off",
  13558. value: function off(e, t) {
  13559. return function (e, t, n) {
  13560. if (n && n[e]) {
  13561. var _s7 = n[e].indexOf(t);
  13562. -1 !== _s7 && n[e].splice(_s7, 1);
  13563. }
  13564. }(e, t, this._listeners), this;
  13565. }
  13566. }, {
  13567. key: "fire",
  13568. value: function fire(e, t) {
  13569. if (e instanceof Re) return console.error(e.error), this;
  13570. var n = "string" == typeof e ? new Le(e, t || {}) : e;
  13571. var s = n.name;
  13572. if (this._listens(s)) {
  13573. n.target = this;
  13574. var _e8 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  13575. var _iterator2 = _createForOfIteratorHelper(_e8),
  13576. _step2;
  13577. try {
  13578. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  13579. var _t6 = _step2.value;
  13580. _t6.call(this, n);
  13581. }
  13582. } catch (err) {
  13583. _iterator2.e(err);
  13584. } finally {
  13585. _iterator2.f();
  13586. }
  13587. }
  13588. return this;
  13589. }
  13590. }, {
  13591. key: "_listens",
  13592. value: function _listens(e) {
  13593. return this._listeners[e] && this._listeners[e].length > 0;
  13594. }
  13595. }]);
  13596. return _class;
  13597. }())();
  13598. function Ne(e, t) {
  13599. Ue.on(e, t);
  13600. }
  13601. function De(e) {
  13602. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13603. Ue.fire(e, t);
  13604. }
  13605. function Me(e, t) {
  13606. Ue.off(e, t);
  13607. }
  13608. var qe = "loginStateChanged",
  13609. Fe = "loginStateExpire",
  13610. Ke = "loginTypeChanged",
  13611. je = "anonymousConverted",
  13612. $e = "refreshAccessToken";
  13613. var Be;
  13614. !function (e) {
  13615. e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL";
  13616. }(Be || (Be = {}));
  13617. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  13618. He = {
  13619. "X-SDK-Version": "1.3.5"
  13620. };
  13621. function ze(e, t, n) {
  13622. var s = e[t];
  13623. e[t] = function (t) {
  13624. var r = {},
  13625. i = {};
  13626. n.forEach(function (n) {
  13627. var _n$call = n.call(e, t),
  13628. s = _n$call.data,
  13629. o = _n$call.headers;
  13630. Object.assign(r, s), Object.assign(i, o);
  13631. });
  13632. var o = t.data;
  13633. return o && function () {
  13634. var e;
  13635. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e9 in r) {
  13636. o.append(_e9, r[_e9]);
  13637. }
  13638. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  13639. };
  13640. }
  13641. function Je() {
  13642. var e = Math.random().toString(16).slice(2);
  13643. return {
  13644. data: {
  13645. seqId: e
  13646. },
  13647. headers: _objectSpread(_objectSpread({}, He), {}, {
  13648. "x-seqid": e
  13649. })
  13650. };
  13651. }
  13652. var Ge = /*#__PURE__*/function () {
  13653. function Ge() {
  13654. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13655. (0, _classCallCheck2.default)(this, Ge);
  13656. var t;
  13657. this.config = e, this._reqClass = new ke.adapter.reqClass({
  13658. timeout: this.config.timeout,
  13659. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  13660. restrictedMethods: ["post"]
  13661. }), this._cache = Ee(this.config.env), this._localCache = (t = this.config.env, Oe[t]), ze(this._reqClass, "post", [Je]), ze(this._reqClass, "upload", [Je]), ze(this._reqClass, "download", [Je]);
  13662. }
  13663. (0, _createClass2.default)(Ge, [{
  13664. key: "post",
  13665. value: function () {
  13666. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  13667. return _regenerator.default.wrap(function _callee4$(_context4) {
  13668. while (1) {
  13669. switch (_context4.prev = _context4.next) {
  13670. case 0:
  13671. _context4.next = 2;
  13672. return this._reqClass.post(e);
  13673. case 2:
  13674. return _context4.abrupt("return", _context4.sent);
  13675. case 3:
  13676. case "end":
  13677. return _context4.stop();
  13678. }
  13679. }
  13680. }, _callee4, this);
  13681. }));
  13682. function post(_x2) {
  13683. return _post.apply(this, arguments);
  13684. }
  13685. return post;
  13686. }()
  13687. }, {
  13688. key: "upload",
  13689. value: function () {
  13690. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  13691. return _regenerator.default.wrap(function _callee5$(_context5) {
  13692. while (1) {
  13693. switch (_context5.prev = _context5.next) {
  13694. case 0:
  13695. _context5.next = 2;
  13696. return this._reqClass.upload(e);
  13697. case 2:
  13698. return _context5.abrupt("return", _context5.sent);
  13699. case 3:
  13700. case "end":
  13701. return _context5.stop();
  13702. }
  13703. }
  13704. }, _callee5, this);
  13705. }));
  13706. function upload(_x3) {
  13707. return _upload.apply(this, arguments);
  13708. }
  13709. return upload;
  13710. }()
  13711. }, {
  13712. key: "download",
  13713. value: function () {
  13714. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  13715. return _regenerator.default.wrap(function _callee6$(_context6) {
  13716. while (1) {
  13717. switch (_context6.prev = _context6.next) {
  13718. case 0:
  13719. _context6.next = 2;
  13720. return this._reqClass.download(e);
  13721. case 2:
  13722. return _context6.abrupt("return", _context6.sent);
  13723. case 3:
  13724. case "end":
  13725. return _context6.stop();
  13726. }
  13727. }
  13728. }, _callee6, this);
  13729. }));
  13730. function download(_x4) {
  13731. return _download.apply(this, arguments);
  13732. }
  13733. return download;
  13734. }()
  13735. }, {
  13736. key: "refreshAccessToken",
  13737. value: function () {
  13738. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  13739. var e, t;
  13740. return _regenerator.default.wrap(function _callee7$(_context7) {
  13741. while (1) {
  13742. switch (_context7.prev = _context7.next) {
  13743. case 0:
  13744. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  13745. _context7.prev = 1;
  13746. _context7.next = 4;
  13747. return this._refreshAccessTokenPromise;
  13748. case 4:
  13749. e = _context7.sent;
  13750. _context7.next = 10;
  13751. break;
  13752. case 7:
  13753. _context7.prev = 7;
  13754. _context7.t0 = _context7["catch"](1);
  13755. t = _context7.t0;
  13756. case 10:
  13757. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  13758. _context7.next = 12;
  13759. break;
  13760. }
  13761. throw t;
  13762. case 12:
  13763. return _context7.abrupt("return", e);
  13764. case 13:
  13765. case "end":
  13766. return _context7.stop();
  13767. }
  13768. }
  13769. }, _callee7, this, [[1, 7]]);
  13770. }));
  13771. function refreshAccessToken() {
  13772. return _refreshAccessToken2.apply(this, arguments);
  13773. }
  13774. return refreshAccessToken;
  13775. }()
  13776. }, {
  13777. key: "_refreshAccessToken",
  13778. value: function () {
  13779. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  13780. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e10, _e11, _t7, _s8;
  13781. return _regenerator.default.wrap(function _callee8$(_context8) {
  13782. while (1) {
  13783. switch (_context8.prev = _context8.next) {
  13784. case 0:
  13785. _this$_cache$keys = this._cache.keys, e = _this$_cache$keys.accessTokenKey, t = _this$_cache$keys.accessTokenExpireKey, n = _this$_cache$keys.refreshTokenKey, s = _this$_cache$keys.loginTypeKey, r = _this$_cache$keys.anonymousUuidKey;
  13786. this._cache.removeStore(e), this._cache.removeStore(t);
  13787. i = this._cache.getStore(n);
  13788. if (i) {
  13789. _context8.next = 5;
  13790. break;
  13791. }
  13792. throw new te({
  13793. message: "未登录CloudBase"
  13794. });
  13795. case 5:
  13796. o = {
  13797. refresh_token: i
  13798. };
  13799. _context8.next = 8;
  13800. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  13801. case 8:
  13802. a = _context8.sent;
  13803. if (!a.data.code) {
  13804. _context8.next = 21;
  13805. break;
  13806. }
  13807. _e10 = a.data.code;
  13808. if (!("SIGN_PARAM_INVALID" === _e10 || "REFRESH_TOKEN_EXPIRED" === _e10 || "INVALID_REFRESH_TOKEN" === _e10)) {
  13809. _context8.next = 20;
  13810. break;
  13811. }
  13812. if (!(this._cache.getStore(s) === Be.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e10)) {
  13813. _context8.next = 19;
  13814. break;
  13815. }
  13816. _e11 = this._cache.getStore(r);
  13817. _t7 = this._cache.getStore(n);
  13818. _context8.next = 17;
  13819. return this.send("auth.signInAnonymously", {
  13820. anonymous_uuid: _e11,
  13821. refresh_token: _t7
  13822. });
  13823. case 17:
  13824. _s8 = _context8.sent;
  13825. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  13826. case 19:
  13827. De(Fe), this._cache.removeStore(n);
  13828. case 20:
  13829. throw new te({
  13830. code: a.data.code,
  13831. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  13832. });
  13833. case 21:
  13834. if (!a.data.access_token) {
  13835. _context8.next = 23;
  13836. break;
  13837. }
  13838. return _context8.abrupt("return", (De($e), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  13839. accessToken: a.data.access_token,
  13840. accessTokenExpire: a.data.access_token_expire
  13841. }));
  13842. case 23:
  13843. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  13844. case 24:
  13845. case "end":
  13846. return _context8.stop();
  13847. }
  13848. }
  13849. }, _callee8, this);
  13850. }));
  13851. function _refreshAccessToken() {
  13852. return _refreshAccessToken3.apply(this, arguments);
  13853. }
  13854. return _refreshAccessToken;
  13855. }()
  13856. }, {
  13857. key: "getAccessToken",
  13858. value: function () {
  13859. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  13860. var _this$_cache$keys2, e, t, n, s, r, i;
  13861. return _regenerator.default.wrap(function _callee9$(_context9) {
  13862. while (1) {
  13863. switch (_context9.prev = _context9.next) {
  13864. case 0:
  13865. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  13866. if (this._cache.getStore(n)) {
  13867. _context9.next = 3;
  13868. break;
  13869. }
  13870. throw new te({
  13871. message: "refresh token不存在,登录状态异常"
  13872. });
  13873. case 3:
  13874. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  13875. _context9.t0 = this._shouldRefreshAccessTokenHook;
  13876. if (!_context9.t0) {
  13877. _context9.next = 9;
  13878. break;
  13879. }
  13880. _context9.next = 8;
  13881. return this._shouldRefreshAccessTokenHook(s, r);
  13882. case 8:
  13883. _context9.t0 = !_context9.sent;
  13884. case 9:
  13885. _context9.t1 = _context9.t0;
  13886. if (!_context9.t1) {
  13887. _context9.next = 12;
  13888. break;
  13889. }
  13890. i = !1;
  13891. case 12:
  13892. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  13893. accessToken: s,
  13894. accessTokenExpire: r
  13895. });
  13896. case 13:
  13897. case "end":
  13898. return _context9.stop();
  13899. }
  13900. }
  13901. }, _callee9, this);
  13902. }));
  13903. function getAccessToken() {
  13904. return _getAccessToken.apply(this, arguments);
  13905. }
  13906. return getAccessToken;
  13907. }()
  13908. }, {
  13909. key: "request",
  13910. value: function () {
  13911. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  13912. var s, r, i, _e12, o, _e13, _e14, a, c, u, h, l, d, p, f, g;
  13913. return _regenerator.default.wrap(function _callee10$(_context10) {
  13914. while (1) {
  13915. switch (_context10.prev = _context10.next) {
  13916. case 0:
  13917. s = "x-tcb-trace_".concat(this.config.env);
  13918. r = "application/x-www-form-urlencoded";
  13919. i = _objectSpread({
  13920. action: e,
  13921. env: this.config.env,
  13922. dataVersion: "2019-08-16"
  13923. }, t);
  13924. if (!(-1 === We.indexOf(e))) {
  13925. _context10.next = 10;
  13926. break;
  13927. }
  13928. _e12 = this._cache.keys.refreshTokenKey;
  13929. _context10.t0 = this._cache.getStore(_e12);
  13930. if (!_context10.t0) {
  13931. _context10.next = 10;
  13932. break;
  13933. }
  13934. _context10.next = 9;
  13935. return this.getAccessToken();
  13936. case 9:
  13937. i.access_token = _context10.sent.accessToken;
  13938. case 10:
  13939. if ("storage.uploadFile" === e) {
  13940. o = new FormData();
  13941. for (_e13 in o) {
  13942. o.hasOwnProperty(_e13) && void 0 !== o[_e13] && o.append(_e13, i[_e13]);
  13943. }
  13944. r = "multipart/form-data";
  13945. } else {
  13946. r = "application/json", o = {};
  13947. for (_e14 in i) {
  13948. void 0 !== i[_e14] && (o[_e14] = i[_e14]);
  13949. }
  13950. }
  13951. a = {
  13952. headers: {
  13953. "content-type": r
  13954. }
  13955. };
  13956. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  13957. c = this._localCache.getStore(s);
  13958. c && (a.headers["X-TCB-Trace"] = c);
  13959. u = t.parse, h = t.inQuery, l = t.search;
  13960. d = {
  13961. env: this.config.env
  13962. };
  13963. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  13964. p = function (e, t) {
  13965. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  13966. var s = /\?/.test(t);
  13967. var r = "";
  13968. for (var _e15 in n) {
  13969. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e15, "=").concat(encodeURIComponent(n[_e15]));
  13970. }
  13971. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  13972. }(pe, "//tcb-api.tencentcloudapi.com/web", d);
  13973. l && (p += l);
  13974. _context10.next = 22;
  13975. return this.post(_objectSpread({
  13976. url: p,
  13977. data: o
  13978. }, a));
  13979. case 22:
  13980. f = _context10.sent;
  13981. g = f.header && f.header["x-tcb-trace"];
  13982. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  13983. _context10.next = 26;
  13984. break;
  13985. }
  13986. throw new te({
  13987. code: "NETWORK_ERROR",
  13988. message: "network request error"
  13989. });
  13990. case 26:
  13991. return _context10.abrupt("return", f);
  13992. case 27:
  13993. case "end":
  13994. return _context10.stop();
  13995. }
  13996. }
  13997. }, _callee10, this);
  13998. }));
  13999. function request(_x5, _x6, _x7) {
  14000. return _request.apply(this, arguments);
  14001. }
  14002. return request;
  14003. }()
  14004. }, {
  14005. key: "send",
  14006. value: function () {
  14007. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  14008. var t,
  14009. n,
  14010. _n7,
  14011. _args11 = arguments;
  14012. return _regenerator.default.wrap(function _callee11$(_context11) {
  14013. while (1) {
  14014. switch (_context11.prev = _context11.next) {
  14015. case 0:
  14016. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  14017. _context11.next = 3;
  14018. return this.request(e, t, {
  14019. onUploadProgress: t.onUploadProgress
  14020. });
  14021. case 3:
  14022. n = _context11.sent;
  14023. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  14024. _context11.next = 13;
  14025. break;
  14026. }
  14027. _context11.next = 7;
  14028. return this.refreshAccessToken();
  14029. case 7:
  14030. _context11.next = 9;
  14031. return this.request(e, t, {
  14032. onUploadProgress: t.onUploadProgress
  14033. });
  14034. case 9:
  14035. _n7 = _context11.sent;
  14036. if (!_n7.data.code) {
  14037. _context11.next = 12;
  14038. break;
  14039. }
  14040. throw new te({
  14041. code: _n7.data.code,
  14042. message: _n7.data.message
  14043. });
  14044. case 12:
  14045. return _context11.abrupt("return", _n7.data);
  14046. case 13:
  14047. if (!n.data.code) {
  14048. _context11.next = 15;
  14049. break;
  14050. }
  14051. throw new te({
  14052. code: n.data.code,
  14053. message: n.data.message
  14054. });
  14055. case 15:
  14056. return _context11.abrupt("return", n.data);
  14057. case 16:
  14058. case "end":
  14059. return _context11.stop();
  14060. }
  14061. }
  14062. }, _callee11, this);
  14063. }));
  14064. function send(_x8) {
  14065. return _send.apply(this, arguments);
  14066. }
  14067. return send;
  14068. }()
  14069. }, {
  14070. key: "setRefreshToken",
  14071. value: function setRefreshToken(e) {
  14072. var _this$_cache$keys3 = this._cache.keys,
  14073. t = _this$_cache$keys3.accessTokenKey,
  14074. n = _this$_cache$keys3.accessTokenExpireKey,
  14075. s = _this$_cache$keys3.refreshTokenKey;
  14076. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14077. }
  14078. }]);
  14079. return Ge;
  14080. }();
  14081. var Ve = {};
  14082. function Ye(e) {
  14083. return Ve[e];
  14084. }
  14085. var Qe = /*#__PURE__*/function () {
  14086. function Qe(e) {
  14087. (0, _classCallCheck2.default)(this, Qe);
  14088. this.config = e, this._cache = Ee(e.env), this._request = Ye(e.env);
  14089. }
  14090. (0, _createClass2.default)(Qe, [{
  14091. key: "setRefreshToken",
  14092. value: function setRefreshToken(e) {
  14093. var _this$_cache$keys4 = this._cache.keys,
  14094. t = _this$_cache$keys4.accessTokenKey,
  14095. n = _this$_cache$keys4.accessTokenExpireKey,
  14096. s = _this$_cache$keys4.refreshTokenKey;
  14097. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14098. }
  14099. }, {
  14100. key: "setAccessToken",
  14101. value: function setAccessToken(e, t) {
  14102. var _this$_cache$keys5 = this._cache.keys,
  14103. n = _this$_cache$keys5.accessTokenKey,
  14104. s = _this$_cache$keys5.accessTokenExpireKey;
  14105. this._cache.setStore(n, e), this._cache.setStore(s, t);
  14106. }
  14107. }, {
  14108. key: "refreshUserInfo",
  14109. value: function () {
  14110. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  14111. var _yield$this$_request$, e;
  14112. return _regenerator.default.wrap(function _callee12$(_context12) {
  14113. while (1) {
  14114. switch (_context12.prev = _context12.next) {
  14115. case 0:
  14116. _context12.next = 2;
  14117. return this._request.send("auth.getUserInfo", {});
  14118. case 2:
  14119. _yield$this$_request$ = _context12.sent;
  14120. e = _yield$this$_request$.data;
  14121. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  14122. case 5:
  14123. case "end":
  14124. return _context12.stop();
  14125. }
  14126. }
  14127. }, _callee12, this);
  14128. }));
  14129. function refreshUserInfo() {
  14130. return _refreshUserInfo.apply(this, arguments);
  14131. }
  14132. return refreshUserInfo;
  14133. }()
  14134. }, {
  14135. key: "setLocalUserInfo",
  14136. value: function setLocalUserInfo(e) {
  14137. var t = this._cache.keys.userInfoKey;
  14138. this._cache.setStore(t, e);
  14139. }
  14140. }]);
  14141. return Qe;
  14142. }();
  14143. var Xe = /*#__PURE__*/function () {
  14144. function Xe(e) {
  14145. (0, _classCallCheck2.default)(this, Xe);
  14146. if (!e) throw new te({
  14147. code: "PARAM_ERROR",
  14148. message: "envId is not defined"
  14149. });
  14150. this._envId = e, this._cache = Ee(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  14151. }
  14152. (0, _createClass2.default)(Xe, [{
  14153. key: "linkWithTicket",
  14154. value: function linkWithTicket(e) {
  14155. if ("string" != typeof e) throw new te({
  14156. code: "PARAM_ERROR",
  14157. message: "ticket must be string"
  14158. });
  14159. return this._request.send("auth.linkWithTicket", {
  14160. ticket: e
  14161. });
  14162. }
  14163. }, {
  14164. key: "linkWithRedirect",
  14165. value: function linkWithRedirect(e) {
  14166. e.signInWithRedirect();
  14167. }
  14168. }, {
  14169. key: "updatePassword",
  14170. value: function updatePassword(e, t) {
  14171. return this._request.send("auth.updatePassword", {
  14172. oldPassword: t,
  14173. newPassword: e
  14174. });
  14175. }
  14176. }, {
  14177. key: "updateEmail",
  14178. value: function updateEmail(e) {
  14179. return this._request.send("auth.updateEmail", {
  14180. newEmail: e
  14181. });
  14182. }
  14183. }, {
  14184. key: "updateUsername",
  14185. value: function updateUsername(e) {
  14186. if ("string" != typeof e) throw new te({
  14187. code: "PARAM_ERROR",
  14188. message: "username must be a string"
  14189. });
  14190. return this._request.send("auth.updateUsername", {
  14191. username: e
  14192. });
  14193. }
  14194. }, {
  14195. key: "getLinkedUidList",
  14196. value: function () {
  14197. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  14198. var _yield$this$_request$2, e, t, n;
  14199. return _regenerator.default.wrap(function _callee13$(_context13) {
  14200. while (1) {
  14201. switch (_context13.prev = _context13.next) {
  14202. case 0:
  14203. _context13.next = 2;
  14204. return this._request.send("auth.getLinkedUidList", {});
  14205. case 2:
  14206. _yield$this$_request$2 = _context13.sent;
  14207. e = _yield$this$_request$2.data;
  14208. t = !1;
  14209. n = e.users;
  14210. return _context13.abrupt("return", (n.forEach(function (e) {
  14211. e.wxOpenId && e.wxPublicId && (t = !0);
  14212. }), {
  14213. users: n,
  14214. hasPrimaryUid: t
  14215. }));
  14216. case 7:
  14217. case "end":
  14218. return _context13.stop();
  14219. }
  14220. }
  14221. }, _callee13, this);
  14222. }));
  14223. function getLinkedUidList() {
  14224. return _getLinkedUidList.apply(this, arguments);
  14225. }
  14226. return getLinkedUidList;
  14227. }()
  14228. }, {
  14229. key: "setPrimaryUid",
  14230. value: function setPrimaryUid(e) {
  14231. return this._request.send("auth.setPrimaryUid", {
  14232. uid: e
  14233. });
  14234. }
  14235. }, {
  14236. key: "unlink",
  14237. value: function unlink(e) {
  14238. return this._request.send("auth.unlink", {
  14239. platform: e
  14240. });
  14241. }
  14242. }, {
  14243. key: "update",
  14244. value: function () {
  14245. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  14246. var t, n, s, r, i, o, _yield$this$_request$3, a;
  14247. return _regenerator.default.wrap(function _callee14$(_context14) {
  14248. while (1) {
  14249. switch (_context14.prev = _context14.next) {
  14250. case 0:
  14251. t = e.nickName;
  14252. n = e.gender;
  14253. s = e.avatarUrl;
  14254. r = e.province;
  14255. i = e.country;
  14256. o = e.city;
  14257. _context14.next = 8;
  14258. return this._request.send("auth.updateUserInfo", {
  14259. nickName: t,
  14260. gender: n,
  14261. avatarUrl: s,
  14262. province: r,
  14263. country: i,
  14264. city: o
  14265. });
  14266. case 8:
  14267. _yield$this$_request$3 = _context14.sent;
  14268. a = _yield$this$_request$3.data;
  14269. this.setLocalUserInfo(a);
  14270. case 11:
  14271. case "end":
  14272. return _context14.stop();
  14273. }
  14274. }
  14275. }, _callee14, this);
  14276. }));
  14277. function update(_x9) {
  14278. return _update.apply(this, arguments);
  14279. }
  14280. return update;
  14281. }()
  14282. }, {
  14283. key: "refresh",
  14284. value: function () {
  14285. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  14286. var _yield$this$_request$4, e;
  14287. return _regenerator.default.wrap(function _callee15$(_context15) {
  14288. while (1) {
  14289. switch (_context15.prev = _context15.next) {
  14290. case 0:
  14291. _context15.next = 2;
  14292. return this._request.send("auth.getUserInfo", {});
  14293. case 2:
  14294. _yield$this$_request$4 = _context15.sent;
  14295. e = _yield$this$_request$4.data;
  14296. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  14297. case 5:
  14298. case "end":
  14299. return _context15.stop();
  14300. }
  14301. }
  14302. }, _callee15, this);
  14303. }));
  14304. function refresh() {
  14305. return _refresh.apply(this, arguments);
  14306. }
  14307. return refresh;
  14308. }()
  14309. }, {
  14310. key: "setUserInfo",
  14311. value: function setUserInfo() {
  14312. var _this8 = this;
  14313. var e = this._cache.keys.userInfoKey,
  14314. t = this._cache.getStore(e);
  14315. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  14316. _this8[e] = t[e];
  14317. }), this.location = {
  14318. country: t.country,
  14319. province: t.province,
  14320. city: t.city
  14321. };
  14322. }
  14323. }, {
  14324. key: "setLocalUserInfo",
  14325. value: function setLocalUserInfo(e) {
  14326. var t = this._cache.keys.userInfoKey;
  14327. this._cache.setStore(t, e), this.setUserInfo();
  14328. }
  14329. }]);
  14330. return Xe;
  14331. }();
  14332. var Ze = /*#__PURE__*/function () {
  14333. function Ze(e) {
  14334. (0, _classCallCheck2.default)(this, Ze);
  14335. if (!e) throw new te({
  14336. code: "PARAM_ERROR",
  14337. message: "envId is not defined"
  14338. });
  14339. this._cache = Ee(e);
  14340. var _this$_cache$keys6 = this._cache.keys,
  14341. t = _this$_cache$keys6.refreshTokenKey,
  14342. n = _this$_cache$keys6.accessTokenKey,
  14343. s = _this$_cache$keys6.accessTokenExpireKey,
  14344. r = this._cache.getStore(t),
  14345. i = this._cache.getStore(n),
  14346. o = this._cache.getStore(s);
  14347. this.credential = {
  14348. refreshToken: r,
  14349. accessToken: i,
  14350. accessTokenExpire: o
  14351. }, this.user = new Xe(e);
  14352. }
  14353. (0, _createClass2.default)(Ze, [{
  14354. key: "isAnonymousAuth",
  14355. get: function get() {
  14356. return this.loginType === Be.ANONYMOUS;
  14357. }
  14358. }, {
  14359. key: "isCustomAuth",
  14360. get: function get() {
  14361. return this.loginType === Be.CUSTOM;
  14362. }
  14363. }, {
  14364. key: "isWeixinAuth",
  14365. get: function get() {
  14366. return this.loginType === Be.WECHAT || this.loginType === Be.WECHAT_OPEN || this.loginType === Be.WECHAT_PUBLIC;
  14367. }
  14368. }, {
  14369. key: "loginType",
  14370. get: function get() {
  14371. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14372. }
  14373. }]);
  14374. return Ze;
  14375. }();
  14376. var et = /*#__PURE__*/function (_Qe) {
  14377. (0, _inherits2.default)(et, _Qe);
  14378. var _super4 = _createSuper(et);
  14379. function et() {
  14380. (0, _classCallCheck2.default)(this, et);
  14381. return _super4.apply(this, arguments);
  14382. }
  14383. (0, _createClass2.default)(et, [{
  14384. key: "signIn",
  14385. value: function () {
  14386. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  14387. var _this$_cache$keys7, e, t, n, s, r, _e16;
  14388. return _regenerator.default.wrap(function _callee16$(_context16) {
  14389. while (1) {
  14390. switch (_context16.prev = _context16.next) {
  14391. case 0:
  14392. this._cache.updatePersistence("local");
  14393. _this$_cache$keys7 = this._cache.keys;
  14394. e = _this$_cache$keys7.anonymousUuidKey;
  14395. t = _this$_cache$keys7.refreshTokenKey;
  14396. n = this._cache.getStore(e) || void 0;
  14397. s = this._cache.getStore(t) || void 0;
  14398. _context16.next = 8;
  14399. return this._request.send("auth.signInAnonymously", {
  14400. anonymous_uuid: n,
  14401. refresh_token: s
  14402. });
  14403. case 8:
  14404. r = _context16.sent;
  14405. if (!(r.uuid && r.refresh_token)) {
  14406. _context16.next = 20;
  14407. break;
  14408. }
  14409. this._setAnonymousUUID(r.uuid);
  14410. this.setRefreshToken(r.refresh_token);
  14411. _context16.next = 14;
  14412. return this._request.refreshAccessToken();
  14413. case 14:
  14414. De(qe);
  14415. De(Ke, {
  14416. env: this.config.env,
  14417. loginType: Be.ANONYMOUS,
  14418. persistence: "local"
  14419. });
  14420. _e16 = new Ze(this.config.env);
  14421. _context16.next = 19;
  14422. return _e16.user.refresh();
  14423. case 19:
  14424. return _context16.abrupt("return", _e16);
  14425. case 20:
  14426. throw new te({
  14427. message: "匿名登录失败"
  14428. });
  14429. case 21:
  14430. case "end":
  14431. return _context16.stop();
  14432. }
  14433. }
  14434. }, _callee16, this);
  14435. }));
  14436. function signIn() {
  14437. return _signIn.apply(this, arguments);
  14438. }
  14439. return signIn;
  14440. }()
  14441. }, {
  14442. key: "linkAndRetrieveDataWithTicket",
  14443. value: function () {
  14444. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  14445. var _this$_cache$keys8, t, n, s, r, i;
  14446. return _regenerator.default.wrap(function _callee17$(_context17) {
  14447. while (1) {
  14448. switch (_context17.prev = _context17.next) {
  14449. case 0:
  14450. _this$_cache$keys8 = this._cache.keys;
  14451. t = _this$_cache$keys8.anonymousUuidKey;
  14452. n = _this$_cache$keys8.refreshTokenKey;
  14453. s = this._cache.getStore(t);
  14454. r = this._cache.getStore(n);
  14455. _context17.next = 7;
  14456. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  14457. anonymous_uuid: s,
  14458. refresh_token: r,
  14459. ticket: e
  14460. });
  14461. case 7:
  14462. i = _context17.sent;
  14463. if (!i.refresh_token) {
  14464. _context17.next = 16;
  14465. break;
  14466. }
  14467. this._clearAnonymousUUID();
  14468. this.setRefreshToken(i.refresh_token);
  14469. _context17.next = 13;
  14470. return this._request.refreshAccessToken();
  14471. case 13:
  14472. De(je, {
  14473. env: this.config.env
  14474. });
  14475. De(Ke, {
  14476. loginType: Be.CUSTOM,
  14477. persistence: "local"
  14478. });
  14479. return _context17.abrupt("return", {
  14480. credential: {
  14481. refreshToken: i.refresh_token
  14482. }
  14483. });
  14484. case 16:
  14485. throw new te({
  14486. message: "匿名转化失败"
  14487. });
  14488. case 17:
  14489. case "end":
  14490. return _context17.stop();
  14491. }
  14492. }
  14493. }, _callee17, this);
  14494. }));
  14495. function linkAndRetrieveDataWithTicket(_x10) {
  14496. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  14497. }
  14498. return linkAndRetrieveDataWithTicket;
  14499. }()
  14500. }, {
  14501. key: "_setAnonymousUUID",
  14502. value: function _setAnonymousUUID(e) {
  14503. var _this$_cache$keys9 = this._cache.keys,
  14504. t = _this$_cache$keys9.anonymousUuidKey,
  14505. n = _this$_cache$keys9.loginTypeKey;
  14506. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, Be.ANONYMOUS);
  14507. }
  14508. }, {
  14509. key: "_clearAnonymousUUID",
  14510. value: function _clearAnonymousUUID() {
  14511. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  14512. }
  14513. }]);
  14514. return et;
  14515. }(Qe);
  14516. var tt = /*#__PURE__*/function (_Qe2) {
  14517. (0, _inherits2.default)(tt, _Qe2);
  14518. var _super5 = _createSuper(tt);
  14519. function tt() {
  14520. (0, _classCallCheck2.default)(this, tt);
  14521. return _super5.apply(this, arguments);
  14522. }
  14523. (0, _createClass2.default)(tt, [{
  14524. key: "signIn",
  14525. value: function () {
  14526. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  14527. var t, n;
  14528. return _regenerator.default.wrap(function _callee18$(_context18) {
  14529. while (1) {
  14530. switch (_context18.prev = _context18.next) {
  14531. case 0:
  14532. if (!("string" != typeof e)) {
  14533. _context18.next = 2;
  14534. break;
  14535. }
  14536. throw new te({
  14537. code: "PARAM_ERROR",
  14538. message: "ticket must be a string"
  14539. });
  14540. case 2:
  14541. t = this._cache.keys.refreshTokenKey;
  14542. _context18.next = 5;
  14543. return this._request.send("auth.signInWithTicket", {
  14544. ticket: e,
  14545. refresh_token: this._cache.getStore(t) || ""
  14546. });
  14547. case 5:
  14548. n = _context18.sent;
  14549. if (!n.refresh_token) {
  14550. _context18.next = 15;
  14551. break;
  14552. }
  14553. this.setRefreshToken(n.refresh_token);
  14554. _context18.next = 10;
  14555. return this._request.refreshAccessToken();
  14556. case 10:
  14557. De(qe);
  14558. De(Ke, {
  14559. env: this.config.env,
  14560. loginType: Be.CUSTOM,
  14561. persistence: this.config.persistence
  14562. });
  14563. _context18.next = 14;
  14564. return this.refreshUserInfo();
  14565. case 14:
  14566. return _context18.abrupt("return", new Ze(this.config.env));
  14567. case 15:
  14568. throw new te({
  14569. message: "自定义登录失败"
  14570. });
  14571. case 16:
  14572. case "end":
  14573. return _context18.stop();
  14574. }
  14575. }
  14576. }, _callee18, this);
  14577. }));
  14578. function signIn(_x11) {
  14579. return _signIn2.apply(this, arguments);
  14580. }
  14581. return signIn;
  14582. }()
  14583. }]);
  14584. return tt;
  14585. }(Qe);
  14586. var nt = /*#__PURE__*/function (_Qe3) {
  14587. (0, _inherits2.default)(nt, _Qe3);
  14588. var _super6 = _createSuper(nt);
  14589. function nt() {
  14590. (0, _classCallCheck2.default)(this, nt);
  14591. return _super6.apply(this, arguments);
  14592. }
  14593. (0, _createClass2.default)(nt, [{
  14594. key: "signIn",
  14595. value: function () {
  14596. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  14597. var n, s, r, i, o;
  14598. return _regenerator.default.wrap(function _callee19$(_context19) {
  14599. while (1) {
  14600. switch (_context19.prev = _context19.next) {
  14601. case 0:
  14602. if (!("string" != typeof e)) {
  14603. _context19.next = 2;
  14604. break;
  14605. }
  14606. throw new te({
  14607. code: "PARAM_ERROR",
  14608. message: "email must be a string"
  14609. });
  14610. case 2:
  14611. n = this._cache.keys.refreshTokenKey;
  14612. _context19.next = 5;
  14613. return this._request.send("auth.signIn", {
  14614. loginType: "EMAIL",
  14615. email: e,
  14616. password: t,
  14617. refresh_token: this._cache.getStore(n) || ""
  14618. });
  14619. case 5:
  14620. s = _context19.sent;
  14621. r = s.refresh_token;
  14622. i = s.access_token;
  14623. o = s.access_token_expire;
  14624. if (!r) {
  14625. _context19.next = 22;
  14626. break;
  14627. }
  14628. this.setRefreshToken(r);
  14629. if (!(i && o)) {
  14630. _context19.next = 15;
  14631. break;
  14632. }
  14633. this.setAccessToken(i, o);
  14634. _context19.next = 17;
  14635. break;
  14636. case 15:
  14637. _context19.next = 17;
  14638. return this._request.refreshAccessToken();
  14639. case 17:
  14640. _context19.next = 19;
  14641. return this.refreshUserInfo();
  14642. case 19:
  14643. De(qe);
  14644. De(Ke, {
  14645. env: this.config.env,
  14646. loginType: Be.EMAIL,
  14647. persistence: this.config.persistence
  14648. });
  14649. return _context19.abrupt("return", new Ze(this.config.env));
  14650. case 22:
  14651. throw s.code ? new te({
  14652. code: s.code,
  14653. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14654. }) : new te({
  14655. message: "邮箱登录失败"
  14656. });
  14657. case 23:
  14658. case "end":
  14659. return _context19.stop();
  14660. }
  14661. }
  14662. }, _callee19, this);
  14663. }));
  14664. function signIn(_x12, _x13) {
  14665. return _signIn3.apply(this, arguments);
  14666. }
  14667. return signIn;
  14668. }()
  14669. }, {
  14670. key: "activate",
  14671. value: function () {
  14672. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  14673. return _regenerator.default.wrap(function _callee20$(_context20) {
  14674. while (1) {
  14675. switch (_context20.prev = _context20.next) {
  14676. case 0:
  14677. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  14678. token: e
  14679. }));
  14680. case 1:
  14681. case "end":
  14682. return _context20.stop();
  14683. }
  14684. }
  14685. }, _callee20, this);
  14686. }));
  14687. function activate(_x14) {
  14688. return _activate.apply(this, arguments);
  14689. }
  14690. return activate;
  14691. }()
  14692. }, {
  14693. key: "resetPasswordWithToken",
  14694. value: function () {
  14695. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  14696. return _regenerator.default.wrap(function _callee21$(_context21) {
  14697. while (1) {
  14698. switch (_context21.prev = _context21.next) {
  14699. case 0:
  14700. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  14701. token: e,
  14702. newPassword: t
  14703. }));
  14704. case 1:
  14705. case "end":
  14706. return _context21.stop();
  14707. }
  14708. }
  14709. }, _callee21, this);
  14710. }));
  14711. function resetPasswordWithToken(_x15, _x16) {
  14712. return _resetPasswordWithToken.apply(this, arguments);
  14713. }
  14714. return resetPasswordWithToken;
  14715. }()
  14716. }]);
  14717. return nt;
  14718. }(Qe);
  14719. var st = /*#__PURE__*/function (_Qe4) {
  14720. (0, _inherits2.default)(st, _Qe4);
  14721. var _super7 = _createSuper(st);
  14722. function st() {
  14723. (0, _classCallCheck2.default)(this, st);
  14724. return _super7.apply(this, arguments);
  14725. }
  14726. (0, _createClass2.default)(st, [{
  14727. key: "signIn",
  14728. value: function () {
  14729. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  14730. var n, s, r, i, o;
  14731. return _regenerator.default.wrap(function _callee22$(_context22) {
  14732. while (1) {
  14733. switch (_context22.prev = _context22.next) {
  14734. case 0:
  14735. if (!("string" != typeof e)) {
  14736. _context22.next = 2;
  14737. break;
  14738. }
  14739. throw new te({
  14740. code: "PARAM_ERROR",
  14741. message: "username must be a string"
  14742. });
  14743. case 2:
  14744. "string" != typeof t && (t = "", console.warn("password is empty"));
  14745. n = this._cache.keys.refreshTokenKey;
  14746. _context22.next = 6;
  14747. return this._request.send("auth.signIn", {
  14748. loginType: Be.USERNAME,
  14749. username: e,
  14750. password: t,
  14751. refresh_token: this._cache.getStore(n) || ""
  14752. });
  14753. case 6:
  14754. s = _context22.sent;
  14755. r = s.refresh_token;
  14756. i = s.access_token_expire;
  14757. o = s.access_token;
  14758. if (!r) {
  14759. _context22.next = 23;
  14760. break;
  14761. }
  14762. this.setRefreshToken(r);
  14763. if (!(o && i)) {
  14764. _context22.next = 16;
  14765. break;
  14766. }
  14767. this.setAccessToken(o, i);
  14768. _context22.next = 18;
  14769. break;
  14770. case 16:
  14771. _context22.next = 18;
  14772. return this._request.refreshAccessToken();
  14773. case 18:
  14774. _context22.next = 20;
  14775. return this.refreshUserInfo();
  14776. case 20:
  14777. De(qe);
  14778. De(Ke, {
  14779. env: this.config.env,
  14780. loginType: Be.USERNAME,
  14781. persistence: this.config.persistence
  14782. });
  14783. return _context22.abrupt("return", new Ze(this.config.env));
  14784. case 23:
  14785. throw s.code ? new te({
  14786. code: s.code,
  14787. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14788. }) : new te({
  14789. message: "用户名密码登录失败"
  14790. });
  14791. case 24:
  14792. case "end":
  14793. return _context22.stop();
  14794. }
  14795. }
  14796. }, _callee22, this);
  14797. }));
  14798. function signIn(_x17, _x18) {
  14799. return _signIn4.apply(this, arguments);
  14800. }
  14801. return signIn;
  14802. }()
  14803. }]);
  14804. return st;
  14805. }(Qe);
  14806. var rt = /*#__PURE__*/function () {
  14807. function rt(e) {
  14808. (0, _classCallCheck2.default)(this, rt);
  14809. this.config = e, this._cache = Ee(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Ne(Ke, this._onLoginTypeChanged);
  14810. }
  14811. (0, _createClass2.default)(rt, [{
  14812. key: "currentUser",
  14813. get: function get() {
  14814. var e = this.hasLoginState();
  14815. return e && e.user || null;
  14816. }
  14817. }, {
  14818. key: "loginType",
  14819. get: function get() {
  14820. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14821. }
  14822. }, {
  14823. key: "anonymousAuthProvider",
  14824. value: function anonymousAuthProvider() {
  14825. return new et(this.config);
  14826. }
  14827. }, {
  14828. key: "customAuthProvider",
  14829. value: function customAuthProvider() {
  14830. return new tt(this.config);
  14831. }
  14832. }, {
  14833. key: "emailAuthProvider",
  14834. value: function emailAuthProvider() {
  14835. return new nt(this.config);
  14836. }
  14837. }, {
  14838. key: "usernameAuthProvider",
  14839. value: function usernameAuthProvider() {
  14840. return new st(this.config);
  14841. }
  14842. }, {
  14843. key: "signInAnonymously",
  14844. value: function () {
  14845. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  14846. return _regenerator.default.wrap(function _callee23$(_context23) {
  14847. while (1) {
  14848. switch (_context23.prev = _context23.next) {
  14849. case 0:
  14850. return _context23.abrupt("return", new et(this.config).signIn());
  14851. case 1:
  14852. case "end":
  14853. return _context23.stop();
  14854. }
  14855. }
  14856. }, _callee23, this);
  14857. }));
  14858. function signInAnonymously() {
  14859. return _signInAnonymously.apply(this, arguments);
  14860. }
  14861. return signInAnonymously;
  14862. }()
  14863. }, {
  14864. key: "signInWithEmailAndPassword",
  14865. value: function () {
  14866. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  14867. return _regenerator.default.wrap(function _callee24$(_context24) {
  14868. while (1) {
  14869. switch (_context24.prev = _context24.next) {
  14870. case 0:
  14871. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  14872. case 1:
  14873. case "end":
  14874. return _context24.stop();
  14875. }
  14876. }
  14877. }, _callee24, this);
  14878. }));
  14879. function signInWithEmailAndPassword(_x19, _x20) {
  14880. return _signInWithEmailAndPassword.apply(this, arguments);
  14881. }
  14882. return signInWithEmailAndPassword;
  14883. }()
  14884. }, {
  14885. key: "signInWithUsernameAndPassword",
  14886. value: function signInWithUsernameAndPassword(e, t) {
  14887. return new st(this.config).signIn(e, t);
  14888. }
  14889. }, {
  14890. key: "linkAndRetrieveDataWithTicket",
  14891. value: function () {
  14892. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  14893. return _regenerator.default.wrap(function _callee25$(_context25) {
  14894. while (1) {
  14895. switch (_context25.prev = _context25.next) {
  14896. case 0:
  14897. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  14898. _context25.next = 3;
  14899. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  14900. case 3:
  14901. return _context25.abrupt("return", _context25.sent);
  14902. case 4:
  14903. case "end":
  14904. return _context25.stop();
  14905. }
  14906. }
  14907. }, _callee25, this);
  14908. }));
  14909. function linkAndRetrieveDataWithTicket(_x21) {
  14910. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  14911. }
  14912. return linkAndRetrieveDataWithTicket;
  14913. }()
  14914. }, {
  14915. key: "signOut",
  14916. value: function () {
  14917. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  14918. var _this$_cache$keys10, e, t, n, s, r;
  14919. return _regenerator.default.wrap(function _callee26$(_context26) {
  14920. while (1) {
  14921. switch (_context26.prev = _context26.next) {
  14922. case 0:
  14923. if (!(this.loginType === Be.ANONYMOUS)) {
  14924. _context26.next = 2;
  14925. break;
  14926. }
  14927. throw new te({
  14928. message: "匿名用户不支持登出操作"
  14929. });
  14930. case 2:
  14931. _this$_cache$keys10 = this._cache.keys, e = _this$_cache$keys10.refreshTokenKey, t = _this$_cache$keys10.accessTokenKey, n = _this$_cache$keys10.accessTokenExpireKey, s = this._cache.getStore(e);
  14932. if (s) {
  14933. _context26.next = 5;
  14934. break;
  14935. }
  14936. return _context26.abrupt("return");
  14937. case 5:
  14938. _context26.next = 7;
  14939. return this._request.send("auth.logout", {
  14940. refresh_token: s
  14941. });
  14942. case 7:
  14943. r = _context26.sent;
  14944. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  14945. env: this.config.env,
  14946. loginType: Be.NULL,
  14947. persistence: this.config.persistence
  14948. }), r));
  14949. case 9:
  14950. case "end":
  14951. return _context26.stop();
  14952. }
  14953. }
  14954. }, _callee26, this);
  14955. }));
  14956. function signOut() {
  14957. return _signOut.apply(this, arguments);
  14958. }
  14959. return signOut;
  14960. }()
  14961. }, {
  14962. key: "signUpWithEmailAndPassword",
  14963. value: function () {
  14964. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  14965. return _regenerator.default.wrap(function _callee27$(_context27) {
  14966. while (1) {
  14967. switch (_context27.prev = _context27.next) {
  14968. case 0:
  14969. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  14970. email: e,
  14971. password: t
  14972. }));
  14973. case 1:
  14974. case "end":
  14975. return _context27.stop();
  14976. }
  14977. }
  14978. }, _callee27, this);
  14979. }));
  14980. function signUpWithEmailAndPassword(_x22, _x23) {
  14981. return _signUpWithEmailAndPassword.apply(this, arguments);
  14982. }
  14983. return signUpWithEmailAndPassword;
  14984. }()
  14985. }, {
  14986. key: "sendPasswordResetEmail",
  14987. value: function () {
  14988. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  14989. return _regenerator.default.wrap(function _callee28$(_context28) {
  14990. while (1) {
  14991. switch (_context28.prev = _context28.next) {
  14992. case 0:
  14993. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  14994. email: e
  14995. }));
  14996. case 1:
  14997. case "end":
  14998. return _context28.stop();
  14999. }
  15000. }
  15001. }, _callee28, this);
  15002. }));
  15003. function sendPasswordResetEmail(_x24) {
  15004. return _sendPasswordResetEmail.apply(this, arguments);
  15005. }
  15006. return sendPasswordResetEmail;
  15007. }()
  15008. }, {
  15009. key: "onLoginStateChanged",
  15010. value: function onLoginStateChanged(e) {
  15011. var _this9 = this;
  15012. Ne(qe, function () {
  15013. var t = _this9.hasLoginState();
  15014. e.call(_this9, t);
  15015. });
  15016. var t = this.hasLoginState();
  15017. e.call(this, t);
  15018. }
  15019. }, {
  15020. key: "onLoginStateExpired",
  15021. value: function onLoginStateExpired(e) {
  15022. Ne(Fe, e.bind(this));
  15023. }
  15024. }, {
  15025. key: "onAccessTokenRefreshed",
  15026. value: function onAccessTokenRefreshed(e) {
  15027. Ne($e, e.bind(this));
  15028. }
  15029. }, {
  15030. key: "onAnonymousConverted",
  15031. value: function onAnonymousConverted(e) {
  15032. Ne(je, e.bind(this));
  15033. }
  15034. }, {
  15035. key: "onLoginTypeChanged",
  15036. value: function onLoginTypeChanged(e) {
  15037. var _this10 = this;
  15038. Ne(Ke, function () {
  15039. var t = _this10.hasLoginState();
  15040. e.call(_this10, t);
  15041. });
  15042. }
  15043. }, {
  15044. key: "getAccessToken",
  15045. value: function () {
  15046. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  15047. return _regenerator.default.wrap(function _callee29$(_context29) {
  15048. while (1) {
  15049. switch (_context29.prev = _context29.next) {
  15050. case 0:
  15051. _context29.next = 2;
  15052. return this._request.getAccessToken();
  15053. case 2:
  15054. _context29.t0 = _context29.sent.accessToken;
  15055. _context29.t1 = this.config.env;
  15056. return _context29.abrupt("return", {
  15057. accessToken: _context29.t0,
  15058. env: _context29.t1
  15059. });
  15060. case 5:
  15061. case "end":
  15062. return _context29.stop();
  15063. }
  15064. }
  15065. }, _callee29, this);
  15066. }));
  15067. function getAccessToken() {
  15068. return _getAccessToken2.apply(this, arguments);
  15069. }
  15070. return getAccessToken;
  15071. }()
  15072. }, {
  15073. key: "hasLoginState",
  15074. value: function hasLoginState() {
  15075. var e = this._cache.keys.refreshTokenKey;
  15076. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  15077. }
  15078. }, {
  15079. key: "isUsernameRegistered",
  15080. value: function () {
  15081. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  15082. var _yield$this$_request$5, t;
  15083. return _regenerator.default.wrap(function _callee30$(_context30) {
  15084. while (1) {
  15085. switch (_context30.prev = _context30.next) {
  15086. case 0:
  15087. if (!("string" != typeof e)) {
  15088. _context30.next = 2;
  15089. break;
  15090. }
  15091. throw new te({
  15092. code: "PARAM_ERROR",
  15093. message: "username must be a string"
  15094. });
  15095. case 2:
  15096. _context30.next = 4;
  15097. return this._request.send("auth.isUsernameRegistered", {
  15098. username: e
  15099. });
  15100. case 4:
  15101. _yield$this$_request$5 = _context30.sent;
  15102. t = _yield$this$_request$5.data;
  15103. return _context30.abrupt("return", t && t.isRegistered);
  15104. case 7:
  15105. case "end":
  15106. return _context30.stop();
  15107. }
  15108. }
  15109. }, _callee30, this);
  15110. }));
  15111. function isUsernameRegistered(_x25) {
  15112. return _isUsernameRegistered.apply(this, arguments);
  15113. }
  15114. return isUsernameRegistered;
  15115. }()
  15116. }, {
  15117. key: "getLoginState",
  15118. value: function getLoginState() {
  15119. return Promise.resolve(this.hasLoginState());
  15120. }
  15121. }, {
  15122. key: "signInWithTicket",
  15123. value: function () {
  15124. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  15125. return _regenerator.default.wrap(function _callee31$(_context31) {
  15126. while (1) {
  15127. switch (_context31.prev = _context31.next) {
  15128. case 0:
  15129. return _context31.abrupt("return", new tt(this.config).signIn(e));
  15130. case 1:
  15131. case "end":
  15132. return _context31.stop();
  15133. }
  15134. }
  15135. }, _callee31, this);
  15136. }));
  15137. function signInWithTicket(_x26) {
  15138. return _signInWithTicket.apply(this, arguments);
  15139. }
  15140. return signInWithTicket;
  15141. }()
  15142. }, {
  15143. key: "shouldRefreshAccessToken",
  15144. value: function shouldRefreshAccessToken(e) {
  15145. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  15146. }
  15147. }, {
  15148. key: "getUserInfo",
  15149. value: function getUserInfo() {
  15150. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  15151. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  15152. requestId: e.seqId
  15153. });
  15154. });
  15155. }
  15156. }, {
  15157. key: "getAuthHeader",
  15158. value: function getAuthHeader() {
  15159. var _this$_cache$keys11 = this._cache.keys,
  15160. e = _this$_cache$keys11.refreshTokenKey,
  15161. t = _this$_cache$keys11.accessTokenKey,
  15162. n = this._cache.getStore(e);
  15163. return {
  15164. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  15165. };
  15166. }
  15167. }, {
  15168. key: "_onAnonymousConverted",
  15169. value: function _onAnonymousConverted(e) {
  15170. var t = e.data.env;
  15171. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  15172. }
  15173. }, {
  15174. key: "_onLoginTypeChanged",
  15175. value: function _onLoginTypeChanged(e) {
  15176. var _e$data = e.data,
  15177. t = _e$data.loginType,
  15178. n = _e$data.persistence,
  15179. s = _e$data.env;
  15180. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  15181. }
  15182. }]);
  15183. return rt;
  15184. }();
  15185. var it = function it(e, t) {
  15186. t = t || we();
  15187. var n = Ye(this.config.env),
  15188. s = e.cloudPath,
  15189. r = e.filePath,
  15190. i = e.onUploadProgress,
  15191. _e$fileType = e.fileType,
  15192. o = _e$fileType === void 0 ? "image" : _e$fileType;
  15193. return n.send("storage.getUploadMetadata", {
  15194. path: s
  15195. }).then(function (e) {
  15196. var _e$data2 = e.data,
  15197. a = _e$data2.url,
  15198. c = _e$data2.authorization,
  15199. u = _e$data2.token,
  15200. h = _e$data2.fileId,
  15201. l = _e$data2.cosFileId,
  15202. d = e.requestId,
  15203. p = {
  15204. key: s,
  15205. signature: c,
  15206. "x-cos-meta-fileid": l,
  15207. success_action_status: "201",
  15208. "x-cos-security-token": u
  15209. };
  15210. n.upload({
  15211. url: a,
  15212. data: p,
  15213. file: r,
  15214. name: s,
  15215. fileType: o,
  15216. onUploadProgress: i
  15217. }).then(function (e) {
  15218. 201 === e.statusCode ? t(null, {
  15219. fileID: h,
  15220. requestId: d
  15221. }) : t(new te({
  15222. code: "STORAGE_REQUEST_FAIL",
  15223. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  15224. }));
  15225. }).catch(function (e) {
  15226. t(e);
  15227. });
  15228. }).catch(function (e) {
  15229. t(e);
  15230. }), t.promise;
  15231. },
  15232. ot = function ot(e, t) {
  15233. t = t || we();
  15234. var n = Ye(this.config.env),
  15235. s = e.cloudPath;
  15236. return n.send("storage.getUploadMetadata", {
  15237. path: s
  15238. }).then(function (e) {
  15239. t(null, e);
  15240. }).catch(function (e) {
  15241. t(e);
  15242. }), t.promise;
  15243. },
  15244. at = function at(_ref7, t) {
  15245. var e = _ref7.fileList;
  15246. if (t = t || we(), !e || !Array.isArray(e)) return {
  15247. code: "INVALID_PARAM",
  15248. message: "fileList必须是非空的数组"
  15249. };
  15250. var _iterator3 = _createForOfIteratorHelper(e),
  15251. _step3;
  15252. try {
  15253. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  15254. var _t8 = _step3.value;
  15255. if (!_t8 || "string" != typeof _t8) return {
  15256. code: "INVALID_PARAM",
  15257. message: "fileList的元素必须是非空的字符串"
  15258. };
  15259. }
  15260. } catch (err) {
  15261. _iterator3.e(err);
  15262. } finally {
  15263. _iterator3.f();
  15264. }
  15265. var n = {
  15266. fileid_list: e
  15267. };
  15268. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  15269. e.code ? t(null, e) : t(null, {
  15270. fileList: e.data.delete_list,
  15271. requestId: e.requestId
  15272. });
  15273. }).catch(function (e) {
  15274. t(e);
  15275. }), t.promise;
  15276. },
  15277. ct = function ct(_ref8, t) {
  15278. var e = _ref8.fileList;
  15279. t = t || we(), e && Array.isArray(e) || t(null, {
  15280. code: "INVALID_PARAM",
  15281. message: "fileList必须是非空的数组"
  15282. });
  15283. var n = [];
  15284. var _iterator4 = _createForOfIteratorHelper(e),
  15285. _step4;
  15286. try {
  15287. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  15288. var _s9 = _step4.value;
  15289. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  15290. code: "INVALID_PARAM",
  15291. message: "fileList的元素必须是包含fileID和maxAge的对象"
  15292. }), n.push({
  15293. fileid: _s9.fileID,
  15294. max_age: _s9.maxAge
  15295. })) : "string" == typeof _s9 ? n.push({
  15296. fileid: _s9
  15297. }) : t(null, {
  15298. code: "INVALID_PARAM",
  15299. message: "fileList的元素必须是字符串"
  15300. });
  15301. }
  15302. } catch (err) {
  15303. _iterator4.e(err);
  15304. } finally {
  15305. _iterator4.f();
  15306. }
  15307. var s = {
  15308. file_list: n
  15309. };
  15310. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  15311. e.code ? t(null, e) : t(null, {
  15312. fileList: e.data.download_list,
  15313. requestId: e.requestId
  15314. });
  15315. }).catch(function (e) {
  15316. t(e);
  15317. }), t.promise;
  15318. },
  15319. ut = /*#__PURE__*/function () {
  15320. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  15321. var e, n, s, r;
  15322. return _regenerator.default.wrap(function _callee32$(_context32) {
  15323. while (1) {
  15324. switch (_context32.prev = _context32.next) {
  15325. case 0:
  15326. e = _ref9.fileID;
  15327. _context32.next = 3;
  15328. return ct.call(this, {
  15329. fileList: [{
  15330. fileID: e,
  15331. maxAge: 600
  15332. }]
  15333. });
  15334. case 3:
  15335. n = _context32.sent.fileList[0];
  15336. if (!("SUCCESS" !== n.code)) {
  15337. _context32.next = 6;
  15338. break;
  15339. }
  15340. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  15341. e(n);
  15342. }));
  15343. case 6:
  15344. s = Ye(this.config.env);
  15345. r = n.download_url;
  15346. if (!(r = encodeURI(r), !t)) {
  15347. _context32.next = 10;
  15348. break;
  15349. }
  15350. return _context32.abrupt("return", s.download({
  15351. url: r
  15352. }));
  15353. case 10:
  15354. _context32.t0 = t;
  15355. _context32.next = 13;
  15356. return s.download({
  15357. url: r
  15358. });
  15359. case 13:
  15360. _context32.t1 = _context32.sent;
  15361. (0, _context32.t0)(_context32.t1);
  15362. case 15:
  15363. case "end":
  15364. return _context32.stop();
  15365. }
  15366. }
  15367. }, _callee32, this);
  15368. }));
  15369. return function ut(_x27, _x28) {
  15370. return _ref10.apply(this, arguments);
  15371. };
  15372. }(),
  15373. ht = function ht(_ref11, i) {
  15374. var e = _ref11.name,
  15375. t = _ref11.data,
  15376. n = _ref11.query,
  15377. s = _ref11.parse,
  15378. r = _ref11.search;
  15379. var o = i || we();
  15380. var a;
  15381. try {
  15382. a = t ? JSON.stringify(t) : "";
  15383. } catch (e) {
  15384. return Promise.reject(e);
  15385. }
  15386. if (!e) return Promise.reject(new te({
  15387. code: "PARAM_ERROR",
  15388. message: "函数名不能为空"
  15389. }));
  15390. var c = {
  15391. inQuery: n,
  15392. parse: s,
  15393. search: r,
  15394. function_name: e,
  15395. request_data: a
  15396. };
  15397. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  15398. if (e.code) o(null, e);else {
  15399. var _t9 = e.data.response_data;
  15400. if (s) o(null, {
  15401. result: _t9,
  15402. requestId: e.requestId
  15403. });else try {
  15404. _t9 = JSON.parse(e.data.response_data), o(null, {
  15405. result: _t9,
  15406. requestId: e.requestId
  15407. });
  15408. } catch (e) {
  15409. o(new te({
  15410. message: "response data must be json"
  15411. }));
  15412. }
  15413. }
  15414. return o.promise;
  15415. }).catch(function (e) {
  15416. o(e);
  15417. }), o.promise;
  15418. },
  15419. lt = {
  15420. timeout: 15e3,
  15421. persistence: "session"
  15422. },
  15423. dt = {};
  15424. var pt = /*#__PURE__*/function () {
  15425. function pt(e) {
  15426. (0, _classCallCheck2.default)(this, pt);
  15427. this.config = e || this.config, this.authObj = void 0;
  15428. }
  15429. (0, _createClass2.default)(pt, [{
  15430. key: "init",
  15431. value: function init(e) {
  15432. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  15433. timeout: e.timeout || 5e3,
  15434. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  15435. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  15436. case this.config.timeout > 6e5:
  15437. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  15438. break;
  15439. case this.config.timeout < 100:
  15440. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  15441. }
  15442. return new pt(this.config);
  15443. }
  15444. }, {
  15445. key: "auth",
  15446. value: function auth() {
  15447. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15448. e = _ref12.persistence;
  15449. if (this.authObj) return this.authObj;
  15450. var t = e || ke.adapter.primaryStorage || lt.persistence;
  15451. var n;
  15452. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  15453. var t = e.env;
  15454. xe[t] = new Ce(e), Oe[t] = new Ce(_objectSpread(_objectSpread({}, e), {}, {
  15455. persistence: "local"
  15456. }));
  15457. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  15458. }
  15459. }, {
  15460. key: "on",
  15461. value: function on(e, t) {
  15462. return Ne.apply(this, [e, t]);
  15463. }
  15464. }, {
  15465. key: "off",
  15466. value: function off(e, t) {
  15467. return Me.apply(this, [e, t]);
  15468. }
  15469. }, {
  15470. key: "callFunction",
  15471. value: function callFunction(e, t) {
  15472. return ht.apply(this, [e, t]);
  15473. }
  15474. }, {
  15475. key: "deleteFile",
  15476. value: function deleteFile(e, t) {
  15477. return at.apply(this, [e, t]);
  15478. }
  15479. }, {
  15480. key: "getTempFileURL",
  15481. value: function getTempFileURL(e, t) {
  15482. return ct.apply(this, [e, t]);
  15483. }
  15484. }, {
  15485. key: "downloadFile",
  15486. value: function downloadFile(e, t) {
  15487. return ut.apply(this, [e, t]);
  15488. }
  15489. }, {
  15490. key: "uploadFile",
  15491. value: function uploadFile(e, t) {
  15492. return it.apply(this, [e, t]);
  15493. }
  15494. }, {
  15495. key: "getUploadMetadata",
  15496. value: function getUploadMetadata(e, t) {
  15497. return ot.apply(this, [e, t]);
  15498. }
  15499. }, {
  15500. key: "registerExtension",
  15501. value: function registerExtension(e) {
  15502. dt[e.name] = e;
  15503. }
  15504. }, {
  15505. key: "invokeExtension",
  15506. value: function () {
  15507. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  15508. var n;
  15509. return _regenerator.default.wrap(function _callee33$(_context33) {
  15510. while (1) {
  15511. switch (_context33.prev = _context33.next) {
  15512. case 0:
  15513. n = dt[e];
  15514. if (n) {
  15515. _context33.next = 3;
  15516. break;
  15517. }
  15518. throw new te({
  15519. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  15520. });
  15521. case 3:
  15522. _context33.next = 5;
  15523. return n.invoke(t, this);
  15524. case 5:
  15525. return _context33.abrupt("return", _context33.sent);
  15526. case 6:
  15527. case "end":
  15528. return _context33.stop();
  15529. }
  15530. }
  15531. }, _callee33, this);
  15532. }));
  15533. function invokeExtension(_x29, _x30) {
  15534. return _invokeExtension.apply(this, arguments);
  15535. }
  15536. return invokeExtension;
  15537. }()
  15538. }, {
  15539. key: "useAdapters",
  15540. value: function useAdapters(e) {
  15541. var _ref13 = be(e) || {},
  15542. t = _ref13.adapter,
  15543. n = _ref13.runtime;
  15544. t && (ke.adapter = t), n && (ke.runtime = n);
  15545. }
  15546. }]);
  15547. return pt;
  15548. }();
  15549. var ft = new pt();
  15550. function gt(e, t, n) {
  15551. void 0 === n && (n = {});
  15552. var s = /\?/.test(t),
  15553. r = "";
  15554. for (var i in n) {
  15555. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  15556. }
  15557. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  15558. }
  15559. var mt = /*#__PURE__*/function () {
  15560. function mt() {
  15561. (0, _classCallCheck2.default)(this, mt);
  15562. }
  15563. (0, _createClass2.default)(mt, [{
  15564. key: "post",
  15565. value: function post(e) {
  15566. var t = e.url,
  15567. n = e.data,
  15568. s = e.headers;
  15569. return new Promise(function (e, r) {
  15570. ne.request({
  15571. url: gt("https:", t),
  15572. data: n,
  15573. method: "POST",
  15574. header: s,
  15575. success: function success(t) {
  15576. e(t);
  15577. },
  15578. fail: function fail(e) {
  15579. r(e);
  15580. }
  15581. });
  15582. });
  15583. }
  15584. }, {
  15585. key: "upload",
  15586. value: function upload(e) {
  15587. return new Promise(function (t, n) {
  15588. var s = e.url,
  15589. r = e.file,
  15590. i = e.data,
  15591. o = e.headers,
  15592. a = e.fileType,
  15593. c = ne.uploadFile({
  15594. url: gt("https:", s),
  15595. name: "file",
  15596. formData: Object.assign({}, i),
  15597. filePath: r,
  15598. fileType: a,
  15599. header: o,
  15600. success: function success(e) {
  15601. var n = {
  15602. statusCode: e.statusCode,
  15603. data: e.data || {}
  15604. };
  15605. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  15606. },
  15607. fail: function fail(e) {
  15608. n(new Error(e.errMsg || "uploadFile:fail"));
  15609. }
  15610. });
  15611. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  15612. e.onUploadProgress({
  15613. loaded: t.totalBytesSent,
  15614. total: t.totalBytesExpectedToSend
  15615. });
  15616. });
  15617. });
  15618. }
  15619. }]);
  15620. return mt;
  15621. }();
  15622. var yt = {
  15623. setItem: function setItem(e, t) {
  15624. ne.setStorageSync(e, t);
  15625. },
  15626. getItem: function getItem(e) {
  15627. return ne.getStorageSync(e);
  15628. },
  15629. removeItem: function removeItem(e) {
  15630. ne.removeStorageSync(e);
  15631. },
  15632. clear: function clear() {
  15633. ne.clearStorageSync();
  15634. }
  15635. };
  15636. var _t = {
  15637. genAdapter: function genAdapter() {
  15638. return {
  15639. root: {},
  15640. reqClass: mt,
  15641. localStorage: yt,
  15642. primaryStorage: "local"
  15643. };
  15644. },
  15645. isMatch: function isMatch() {
  15646. return !0;
  15647. },
  15648. runtime: "uni_app"
  15649. };
  15650. ft.useAdapters(_t);
  15651. var wt = ft,
  15652. vt = wt.init;
  15653. wt.init = function (e) {
  15654. e.env = e.spaceId;
  15655. var t = vt.call(this, e);
  15656. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  15657. var n = t.auth;
  15658. return t.auth = function (e) {
  15659. var t = n.call(this, e);
  15660. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  15661. var n;
  15662. t[e] = (n = t[e], function (e) {
  15663. e = e || {};
  15664. var _ee = ee(e),
  15665. t = _ee.success,
  15666. s = _ee.fail,
  15667. r = _ee.complete;
  15668. if (!(t || s || r)) return n.call(this, e);
  15669. n.call(this, e).then(function (e) {
  15670. t && t(e), r && r(e);
  15671. }, function (e) {
  15672. s && s(e), r && r(e);
  15673. });
  15674. }).bind(t);
  15675. }), t;
  15676. }, t.customAuth = t.auth, t;
  15677. };
  15678. var It = wt;
  15679. var St = /*#__PURE__*/function (_le) {
  15680. (0, _inherits2.default)(St, _le);
  15681. var _super8 = _createSuper(St);
  15682. function St() {
  15683. (0, _classCallCheck2.default)(this, St);
  15684. return _super8.apply(this, arguments);
  15685. }
  15686. (0, _createClass2.default)(St, [{
  15687. key: "getAccessToken",
  15688. value: function getAccessToken() {
  15689. var _this11 = this;
  15690. return new Promise(function (e, t) {
  15691. var n = "Anonymous_Access_token";
  15692. _this11.setAccessToken(n), e(n);
  15693. });
  15694. }
  15695. }, {
  15696. key: "setupRequest",
  15697. value: function setupRequest(e, t) {
  15698. var n = Object.assign({}, e, {
  15699. spaceId: this.config.spaceId,
  15700. timestamp: Date.now()
  15701. }),
  15702. s = {
  15703. "Content-Type": "application/json"
  15704. };
  15705. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret);
  15706. var r = ue();
  15707. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  15708. var _se = se(),
  15709. i = _se.token;
  15710. return s["x-client-token"] = i, {
  15711. url: this.config.requestUrl,
  15712. method: "POST",
  15713. data: n,
  15714. dataType: "json",
  15715. header: JSON.parse(JSON.stringify(s))
  15716. };
  15717. }
  15718. }, {
  15719. key: "uploadFileToOSS",
  15720. value: function uploadFileToOSS(_ref14) {
  15721. var _this12 = this;
  15722. var e = _ref14.url,
  15723. t = _ref14.formData,
  15724. n = _ref14.name,
  15725. s = _ref14.filePath,
  15726. r = _ref14.fileType,
  15727. i = _ref14.onUploadProgress;
  15728. return new Promise(function (o, a) {
  15729. var c = _this12.adapter.uploadFile({
  15730. url: e,
  15731. formData: t,
  15732. name: n,
  15733. filePath: s,
  15734. fileType: r,
  15735. success: function success(e) {
  15736. e && e.statusCode < 400 ? o(e) : a(new te({
  15737. code: "UPLOAD_FAILED",
  15738. message: "文件上传失败"
  15739. }));
  15740. },
  15741. fail: function fail(e) {
  15742. a(new te({
  15743. code: e.code || "UPLOAD_FAILED",
  15744. message: e.message || e.errMsg || "文件上传失败"
  15745. }));
  15746. }
  15747. });
  15748. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  15749. i({
  15750. loaded: e.totalBytesSent,
  15751. total: e.totalBytesExpectedToSend
  15752. });
  15753. });
  15754. });
  15755. }
  15756. }, {
  15757. key: "uploadFile",
  15758. value: function uploadFile(_ref15) {
  15759. var _this13 = this;
  15760. var e = _ref15.filePath,
  15761. t = _ref15.cloudPath,
  15762. _ref15$fileType = _ref15.fileType,
  15763. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  15764. s = _ref15.onUploadProgress;
  15765. if (!t) throw new te({
  15766. code: "CLOUDPATH_REQUIRED",
  15767. message: "cloudPath不可为空"
  15768. });
  15769. var r;
  15770. return this.getOSSUploadOptionsFromPath({
  15771. cloudPath: t
  15772. }).then(function (t) {
  15773. var _t$result = t.result,
  15774. i = _t$result.url,
  15775. o = _t$result.formData,
  15776. a = _t$result.name;
  15777. r = t.result.fileUrl;
  15778. var c = {
  15779. url: i,
  15780. formData: o,
  15781. name: a,
  15782. filePath: e,
  15783. fileType: n
  15784. };
  15785. return _this13.uploadFileToOSS(Object.assign({}, c, {
  15786. onUploadProgress: s
  15787. }));
  15788. }).then(function () {
  15789. return _this13.reportOSSUpload({
  15790. cloudPath: t
  15791. });
  15792. }).then(function (t) {
  15793. return new Promise(function (n, s) {
  15794. t.success ? n({
  15795. success: !0,
  15796. filePath: e,
  15797. fileID: r
  15798. }) : s(new te({
  15799. code: "UPLOAD_FAILED",
  15800. message: "文件上传失败"
  15801. }));
  15802. });
  15803. });
  15804. }
  15805. }, {
  15806. key: "deleteFile",
  15807. value: function deleteFile(_ref16) {
  15808. var e = _ref16.fileList;
  15809. var t = {
  15810. method: "serverless.file.resource.delete",
  15811. params: JSON.stringify({
  15812. fileList: e
  15813. })
  15814. };
  15815. return this.request(this.setupRequest(t)).then(function (e) {
  15816. if (e.success) return e.result;
  15817. throw new te({
  15818. code: "DELETE_FILE_FAILED",
  15819. message: "删除文件失败"
  15820. });
  15821. });
  15822. }
  15823. }, {
  15824. key: "getTempFileURL",
  15825. value: function getTempFileURL() {
  15826. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15827. e = _ref17.fileList,
  15828. t = _ref17.maxAge;
  15829. if (!Array.isArray(e) || 0 === e.length) throw new te({
  15830. code: "INVALID_PARAM",
  15831. message: "fileList的元素必须是非空的字符串"
  15832. });
  15833. var n = {
  15834. method: "serverless.file.resource.getTempFileURL",
  15835. params: JSON.stringify({
  15836. fileList: e,
  15837. maxAge: t
  15838. })
  15839. };
  15840. return this.request(this.setupRequest(n)).then(function (e) {
  15841. if (e.success) return {
  15842. fileList: e.result.fileList.map(function (e) {
  15843. return {
  15844. fileID: e.fileID,
  15845. tempFileURL: e.tempFileURL
  15846. };
  15847. })
  15848. };
  15849. throw new te({
  15850. code: "GET_TEMP_FILE_URL_FAILED",
  15851. message: "获取临时文件链接失败"
  15852. });
  15853. });
  15854. }
  15855. }]);
  15856. return St;
  15857. }(le);
  15858. var bt = {
  15859. init: function init(e) {
  15860. var t = new St(e),
  15861. n = {
  15862. signInAnonymously: function signInAnonymously() {
  15863. return t.authorize();
  15864. },
  15865. getLoginState: function getLoginState() {
  15866. return Promise.resolve(!1);
  15867. }
  15868. };
  15869. return t.auth = function () {
  15870. return n;
  15871. }, t.customAuth = t.auth, t;
  15872. }
  15873. },
  15874. kt = n(function (e, t) {
  15875. e.exports = r.enc.Hex;
  15876. });
  15877. function At() {
  15878. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  15879. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15880. var n = t.data,
  15881. s = t.functionName,
  15882. r = t.method,
  15883. i = t.headers,
  15884. _t$signHeaderKeys = t.signHeaderKeys,
  15885. o = _t$signHeaderKeys === void 0 ? [] : _t$signHeaderKeys,
  15886. a = t.config,
  15887. c = Date.now(),
  15888. u = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
  15889. var t = 16 * Math.random() | 0;
  15890. return ("x" === e ? t : 3 & t | 8).toString(16);
  15891. }),
  15892. h = Object.assign({}, i, {
  15893. "x-from-app-id": a.spaceAppId,
  15894. "x-from-env-id": a.spaceId,
  15895. "x-to-env-id": a.spaceId,
  15896. "x-from-instance-id": c,
  15897. "x-from-function-name": s,
  15898. "x-client-timestamp": c,
  15899. "x-alipay-source": "client",
  15900. "x-request-id": u,
  15901. "x-alipay-callid": u,
  15902. "x-trace-id": u
  15903. }),
  15904. l = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o),
  15905. _ref18 = e.split("?") || [],
  15906. _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
  15907. _ref19$ = _ref19[0],
  15908. d = _ref19$ === void 0 ? "" : _ref19$,
  15909. _ref19$2 = _ref19[1],
  15910. p = _ref19$2 === void 0 ? "" : _ref19$2,
  15911. f = function (e) {
  15912. var t = e.signedHeaders.join(";"),
  15913. n = e.signedHeaders.map(function (t) {
  15914. return "".concat(t.toLowerCase(), ":").concat(e.headers[t], "\n");
  15915. }).join(""),
  15916. s = ye(e.body).toString(kt),
  15917. r = "".concat(e.method.toUpperCase(), "\n").concat(e.path, "\n").concat(e.query, "\n").concat(n, "\n").concat(t, "\n").concat(s, "\n"),
  15918. i = ye(r).toString(kt),
  15919. o = "HMAC-SHA256\n".concat(e.timestamp, "\n").concat(i, "\n"),
  15920. a = _e(o, e.secretKey).toString(kt);
  15921. return "HMAC-SHA256 Credential=".concat(e.secretId, ", SignedHeaders=").concat(t, ", Signature=").concat(a);
  15922. }({
  15923. path: d,
  15924. query: p,
  15925. method: r,
  15926. headers: h,
  15927. timestamp: c,
  15928. body: JSON.stringify(n),
  15929. secretId: a.accessKey,
  15930. secretKey: a.secretKey,
  15931. signedHeaders: l.sort()
  15932. });
  15933. return {
  15934. url: "".concat(a.endpoint).concat(e),
  15935. headers: Object.assign({}, h, {
  15936. Authorization: f
  15937. })
  15938. };
  15939. }
  15940. function Pt(_ref20) {
  15941. var e = _ref20.url,
  15942. t = _ref20.data,
  15943. _ref20$method = _ref20.method,
  15944. n = _ref20$method === void 0 ? "POST" : _ref20$method,
  15945. _ref20$headers = _ref20.headers,
  15946. s = _ref20$headers === void 0 ? {} : _ref20$headers;
  15947. return new Promise(function (r, i) {
  15948. ne.request({
  15949. url: e,
  15950. method: n,
  15951. data: t,
  15952. header: s,
  15953. dataType: "json",
  15954. complete: function complete() {
  15955. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15956. var t = s["x-trace-id"] || "";
  15957. if (!e.statusCode || e.statusCode >= 400) {
  15958. var _ref21 = e.data || {},
  15959. _n8 = _ref21.message,
  15960. _s10 = _ref21.errMsg,
  15961. _r4 = _ref21.trace_id;
  15962. return i(new te({
  15963. code: "SYS_ERR",
  15964. message: _n8 || _s10 || "request:fail",
  15965. requestId: _r4 || t
  15966. }));
  15967. }
  15968. r({
  15969. status: e.statusCode,
  15970. data: e.data,
  15971. headers: e.header,
  15972. requestId: t
  15973. });
  15974. }
  15975. });
  15976. });
  15977. }
  15978. function Tt(e, t) {
  15979. var n = e.path,
  15980. s = e.data,
  15981. _e$method = e.method,
  15982. r = _e$method === void 0 ? "GET" : _e$method,
  15983. _At = At(n, {
  15984. functionName: "",
  15985. data: s,
  15986. method: r,
  15987. headers: {
  15988. "x-alipay-cloud-mode": "oss",
  15989. "x-data-api-type": "oss",
  15990. "x-expire-timestamp": Date.now() + 6e4
  15991. },
  15992. signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"],
  15993. config: t
  15994. }),
  15995. i = _At.url,
  15996. o = _At.headers;
  15997. return Pt({
  15998. url: i,
  15999. data: s,
  16000. method: r,
  16001. headers: o
  16002. }).then(function (e) {
  16003. var t = e.data || {};
  16004. if (!t.success) throw new te({
  16005. code: e.errCode,
  16006. message: e.errMsg,
  16007. requestId: e.requestId
  16008. });
  16009. return t.data || {};
  16010. }).catch(function (e) {
  16011. throw new te({
  16012. code: e.errCode,
  16013. message: e.errMsg,
  16014. requestId: e.requestId
  16015. });
  16016. });
  16017. }
  16018. function Ct() {
  16019. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16020. var t = e.trim().replace(/^cloud:\/\//, ""),
  16021. n = t.indexOf("/");
  16022. if (n <= 0) throw new te({
  16023. code: "INVALID_PARAM",
  16024. message: "fileID不合法"
  16025. });
  16026. var s = t.substring(0, n),
  16027. r = t.substring(n + 1);
  16028. return s !== this.config.spaceId && console.warn("file ".concat(e, " does not belong to env ").concat(this.config.spaceId)), r;
  16029. }
  16030. function xt() {
  16031. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16032. return "cloud://".concat(this.config.spaceId, "/").concat(e.replace(/^\/+/, ""));
  16033. }
  16034. var Ot = /*#__PURE__*/function () {
  16035. function Ot(e) {
  16036. (0, _classCallCheck2.default)(this, Ot);
  16037. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach(function (t) {
  16038. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  16039. }), e.endpoint) {
  16040. if ("string" != typeof e.endpoint) throw new Error("endpoint must be string");
  16041. if (!/^https:\/\//.test(e.endpoint)) throw new Error("endpoint must start with https://");
  16042. e.endpoint = e.endpoint.replace(/\/$/, "");
  16043. }
  16044. this.config = Object.assign({}, e, {
  16045. endpoint: e.endpoint || "https://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn")
  16046. });
  16047. }
  16048. (0, _createClass2.default)(Ot, [{
  16049. key: "callFunction",
  16050. value: function callFunction(e) {
  16051. return function (e, t) {
  16052. var n = e.name,
  16053. s = e.data,
  16054. r = "POST",
  16055. _At2 = At("/functions/invokeFunction", {
  16056. functionName: n,
  16057. data: s,
  16058. method: r,
  16059. headers: {
  16060. "x-to-function-name": n
  16061. },
  16062. signHeaderKeys: ["x-to-function-name"],
  16063. config: t
  16064. }),
  16065. i = _At2.url,
  16066. o = _At2.headers;
  16067. return Pt({
  16068. url: i,
  16069. data: s,
  16070. method: r,
  16071. headers: o
  16072. }).then(function (e) {
  16073. return {
  16074. errCode: 0,
  16075. success: !0,
  16076. requestId: e.requestId,
  16077. result: e.data
  16078. };
  16079. }).catch(function (e) {
  16080. throw new te({
  16081. code: e.errCode,
  16082. message: e.errMsg,
  16083. requestId: e.requestId
  16084. });
  16085. });
  16086. }(e, this.config);
  16087. }
  16088. }, {
  16089. key: "uploadFileToOSS",
  16090. value: function uploadFileToOSS(_ref22) {
  16091. var e = _ref22.url,
  16092. t = _ref22.filePath,
  16093. n = _ref22.fileType,
  16094. s = _ref22.formData,
  16095. r = _ref22.onUploadProgress;
  16096. return new Promise(function (i, o) {
  16097. var a = ne.uploadFile({
  16098. url: e,
  16099. filePath: t,
  16100. fileType: n,
  16101. formData: s,
  16102. name: "file",
  16103. success: function success(e) {
  16104. e && e.statusCode < 400 ? i(e) : o(new te({
  16105. code: "UPLOAD_FAILED",
  16106. message: "文件上传失败"
  16107. }));
  16108. },
  16109. fail: function fail(e) {
  16110. o(new te({
  16111. code: e.code || "UPLOAD_FAILED",
  16112. message: e.message || e.errMsg || "文件上传失败"
  16113. }));
  16114. }
  16115. });
  16116. "function" == typeof r && a && "function" == typeof a.onProgressUpdate && a.onProgressUpdate(function (e) {
  16117. r({
  16118. loaded: e.totalBytesSent,
  16119. total: e.totalBytesExpectedToSend
  16120. });
  16121. });
  16122. });
  16123. }
  16124. }, {
  16125. key: "uploadFile",
  16126. value: function () {
  16127. var _uploadFile2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(_ref23) {
  16128. var e, _ref23$cloudPath, t, _ref23$fileType, n, s, r, i, o, a, c;
  16129. return _regenerator.default.wrap(function _callee34$(_context34) {
  16130. while (1) {
  16131. switch (_context34.prev = _context34.next) {
  16132. case 0:
  16133. e = _ref23.filePath, _ref23$cloudPath = _ref23.cloudPath, t = _ref23$cloudPath === void 0 ? "" : _ref23$cloudPath, _ref23$fileType = _ref23.fileType, n = _ref23$fileType === void 0 ? "image" : _ref23$fileType, s = _ref23.onUploadProgress;
  16134. if (!("string" !== f(t))) {
  16135. _context34.next = 3;
  16136. break;
  16137. }
  16138. throw new te({
  16139. code: "INVALID_PARAM",
  16140. message: "cloudPath必须为字符串类型"
  16141. });
  16142. case 3:
  16143. if (t = t.trim()) {
  16144. _context34.next = 5;
  16145. break;
  16146. }
  16147. throw new te({
  16148. code: "INVALID_PARAM",
  16149. message: "cloudPath不可为空"
  16150. });
  16151. case 5:
  16152. if (!/:\/\//.test(t)) {
  16153. _context34.next = 7;
  16154. break;
  16155. }
  16156. throw new te({
  16157. code: "INVALID_PARAM",
  16158. message: "cloudPath不合法"
  16159. });
  16160. case 7:
  16161. _context34.next = 9;
  16162. return Tt({
  16163. path: "/".concat(t.replace(/^\//, ""), "?post_url")
  16164. }, this.config);
  16165. case 9:
  16166. r = _context34.sent;
  16167. i = r.file_id;
  16168. o = r.upload_url;
  16169. a = r.form_data;
  16170. c = a && a.reduce(function (e, t) {
  16171. return e[t.key] = t.value, e;
  16172. }, {});
  16173. return _context34.abrupt("return", this.uploadFileToOSS({
  16174. url: o,
  16175. filePath: e,
  16176. fileType: n,
  16177. formData: c,
  16178. onUploadProgress: s
  16179. }).then(function () {
  16180. return {
  16181. fileID: i
  16182. };
  16183. }));
  16184. case 15:
  16185. case "end":
  16186. return _context34.stop();
  16187. }
  16188. }
  16189. }, _callee34, this);
  16190. }));
  16191. function uploadFile(_x31) {
  16192. return _uploadFile2.apply(this, arguments);
  16193. }
  16194. return uploadFile;
  16195. }()
  16196. }, {
  16197. key: "getTempFileURL",
  16198. value: function () {
  16199. var _getTempFileURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(_ref24) {
  16200. var _this14 = this;
  16201. var e;
  16202. return _regenerator.default.wrap(function _callee35$(_context35) {
  16203. while (1) {
  16204. switch (_context35.prev = _context35.next) {
  16205. case 0:
  16206. e = _ref24.fileList;
  16207. return _context35.abrupt("return", new Promise(function (t, n) {
  16208. (!e || e.length < 0) && n(new te({
  16209. errCode: "INVALID_PARAM",
  16210. errMsg: "fileList不能为空数组"
  16211. })), e.length > 50 && n(new te({
  16212. errCode: "INVALID_PARAM",
  16213. errMsg: "fileList数组长度不能超过50"
  16214. }));
  16215. var s = [];
  16216. var _iterator5 = _createForOfIteratorHelper(e),
  16217. _step5;
  16218. try {
  16219. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  16220. var _t10 = _step5.value;
  16221. "string" !== f(_t10) && n(new te({
  16222. errCode: "INVALID_PARAM",
  16223. errMsg: "fileList的元素必须是非空的字符串"
  16224. }));
  16225. var _e17 = Ct.call(_this14, _t10);
  16226. s.push({
  16227. file_id: _e17,
  16228. expire: 600
  16229. });
  16230. }
  16231. } catch (err) {
  16232. _iterator5.e(err);
  16233. } finally {
  16234. _iterator5.f();
  16235. }
  16236. Tt({
  16237. path: "/?download_url",
  16238. data: {
  16239. file_list: s
  16240. },
  16241. method: "POST"
  16242. }, _this14.config).then(function (e) {
  16243. var _e$file_list = e.file_list,
  16244. n = _e$file_list === void 0 ? [] : _e$file_list;
  16245. t({
  16246. fileList: n.map(function (e) {
  16247. return {
  16248. fileID: xt.call(_this14, e.file_id),
  16249. tempFileURL: e.download_url
  16250. };
  16251. })
  16252. });
  16253. }).catch(function (e) {
  16254. return n(e);
  16255. });
  16256. }));
  16257. case 2:
  16258. case "end":
  16259. return _context35.stop();
  16260. }
  16261. }
  16262. }, _callee35);
  16263. }));
  16264. function getTempFileURL(_x32) {
  16265. return _getTempFileURL.apply(this, arguments);
  16266. }
  16267. return getTempFileURL;
  16268. }()
  16269. }]);
  16270. return Ot;
  16271. }();
  16272. var Et = {
  16273. init: function init(e) {
  16274. e.provider = "alipay";
  16275. var t = new Ot(e);
  16276. return t.auth = function () {
  16277. return {
  16278. signInAnonymously: function signInAnonymously() {
  16279. return Promise.resolve();
  16280. },
  16281. getLoginState: function getLoginState() {
  16282. return Promise.resolve(!0);
  16283. }
  16284. };
  16285. }, t;
  16286. }
  16287. };
  16288. function Lt(_ref25) {
  16289. var e = _ref25.data;
  16290. var t;
  16291. t = ue();
  16292. var n = JSON.parse(JSON.stringify(e || {}));
  16293. if (Object.assign(n, {
  16294. clientInfo: t
  16295. }), !n.uniIdToken) {
  16296. var _se2 = se(),
  16297. _e18 = _se2.token;
  16298. _e18 && (n.uniIdToken = _e18);
  16299. }
  16300. return n;
  16301. }
  16302. function Rt() {
  16303. return _Rt.apply(this, arguments);
  16304. }
  16305. function _Rt() {
  16306. _Rt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
  16307. var _this27 = this;
  16308. var _ref67,
  16309. e,
  16310. t,
  16311. _this$__dev__,
  16312. n,
  16313. s,
  16314. r,
  16315. i,
  16316. o,
  16317. a,
  16318. _args6 = arguments;
  16319. return _regenerator.default.wrap(function _callee56$(_context56) {
  16320. while (1) {
  16321. switch (_context56.prev = _context56.next) {
  16322. case 0:
  16323. _ref67 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref67.name, t = _ref67.data;
  16324. _context56.next = 3;
  16325. return this.__dev__.initLocalNetwork();
  16326. case 3:
  16327. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  16328. aliyun: "aliyun",
  16329. tencent: "tcb",
  16330. alipay: "alipay"
  16331. }[this.config.provider], i = this.config.spaceId, o = "http://".concat(n, ":").concat(s, "/system/check-function"), a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);
  16332. return _context56.abrupt("return", new Promise(function (t, n) {
  16333. ne.request({
  16334. method: "POST",
  16335. url: o,
  16336. data: {
  16337. name: e,
  16338. platform: P,
  16339. provider: r,
  16340. spaceId: i
  16341. },
  16342. timeout: 3e3,
  16343. success: function success(e) {
  16344. t(e);
  16345. },
  16346. fail: function fail() {
  16347. t({
  16348. data: {
  16349. code: "NETWORK_ERROR",
  16350. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  16351. }
  16352. });
  16353. }
  16354. });
  16355. }).then(function () {
  16356. var _ref68 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16357. e = _ref68.data;
  16358. var _ref69 = e || {},
  16359. t = _ref69.code,
  16360. n = _ref69.message;
  16361. return {
  16362. code: 0 === t ? 0 : t || "SYS_ERR",
  16363. message: n || "SYS_ERR"
  16364. };
  16365. }).then(function (_ref70) {
  16366. var n = _ref70.code,
  16367. s = _ref70.message;
  16368. if (0 !== n) {
  16369. switch (n) {
  16370. case "MODULE_ENCRYPTED":
  16371. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  16372. break;
  16373. case "FUNCTION_ENCRYPTED":
  16374. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  16375. break;
  16376. case "ACTION_ENCRYPTED":
  16377. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  16378. break;
  16379. case "NETWORK_ERROR":
  16380. {
  16381. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  16382. throw console.error(_e30), new Error(_e30);
  16383. }
  16384. case "SWITCH_TO_CLOUD":
  16385. break;
  16386. default:
  16387. {
  16388. var _e31 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  16389. throw console.error(_e31), new Error(_e31);
  16390. }
  16391. }
  16392. return _this27._callCloudFunction({
  16393. name: e,
  16394. data: t
  16395. });
  16396. }
  16397. return new Promise(function (e, n) {
  16398. var s = Lt.call(_this27, {
  16399. data: t
  16400. });
  16401. ne.request({
  16402. method: "POST",
  16403. url: a,
  16404. data: {
  16405. provider: r,
  16406. platform: P,
  16407. param: s
  16408. },
  16409. success: function success() {
  16410. var _ref71 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16411. t = _ref71.statusCode,
  16412. s = _ref71.data;
  16413. return !t || t >= 400 ? n(new te({
  16414. code: s.code || "SYS_ERR",
  16415. message: s.message || "request:fail"
  16416. })) : e({
  16417. result: s
  16418. });
  16419. },
  16420. fail: function fail(e) {
  16421. n(new te({
  16422. code: e.code || e.errCode || "SYS_ERR",
  16423. message: e.message || e.errMsg || "request:fail"
  16424. }));
  16425. }
  16426. });
  16427. });
  16428. }));
  16429. case 5:
  16430. case "end":
  16431. return _context56.stop();
  16432. }
  16433. }
  16434. }, _callee56, this);
  16435. }));
  16436. return _Rt.apply(this, arguments);
  16437. }
  16438. var Ut = [{
  16439. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  16440. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  16441. mode: "append"
  16442. }];
  16443. var Nt = /[\\^$.*+?()[\]{}|]/g,
  16444. Dt = RegExp(Nt.source);
  16445. function Mt(e, t, n) {
  16446. return e.replace(new RegExp((s = t) && Dt.test(s) ? s.replace(Nt, "\\$&") : s, "g"), n);
  16447. var s;
  16448. }
  16449. var qt = "none",
  16450. Ft = "request",
  16451. Kt = "response",
  16452. jt = "both";
  16453. var $t = /*#__PURE__*/function () {
  16454. function $t() {
  16455. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16456. e = _ref26.secretType,
  16457. t = _ref26.uniCloudIns;
  16458. (0, _classCallCheck2.default)(this, $t);
  16459. this.clientType = "", this.secretType = e || qt, this.uniCloudIns = t;
  16460. var _this$uniCloudIns$con = this.uniCloudIns.config,
  16461. n = _this$uniCloudIns$con.provider,
  16462. s = _this$uniCloudIns$con.spaceId;
  16463. var r;
  16464. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  16465. }
  16466. (0, _createClass2.default)($t, [{
  16467. key: "getSystemInfo",
  16468. value: function getSystemInfo() {
  16469. return this._systemInfo || (this._systemInfo = ae()), this._systemInfo;
  16470. }
  16471. }, {
  16472. key: "appId",
  16473. get: function get() {
  16474. return this.getSystemInfo().appId;
  16475. }
  16476. }, {
  16477. key: "deviceId",
  16478. get: function get() {
  16479. return this.getSystemInfo().deviceId;
  16480. }
  16481. }, {
  16482. key: "encryptData",
  16483. value: function () {
  16484. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(e) {
  16485. return _regenerator.default.wrap(function _callee36$(_context36) {
  16486. while (1) {
  16487. switch (_context36.prev = _context36.next) {
  16488. case 0:
  16489. return _context36.abrupt("return", this.secretType === qt ? e : this.platformEncryptData(e));
  16490. case 1:
  16491. case "end":
  16492. return _context36.stop();
  16493. }
  16494. }
  16495. }, _callee36, this);
  16496. }));
  16497. function encryptData(_x33) {
  16498. return _encryptData.apply(this, arguments);
  16499. }
  16500. return encryptData;
  16501. }()
  16502. }, {
  16503. key: "decryptResult",
  16504. value: function () {
  16505. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(e) {
  16506. var _ref27, t, n;
  16507. return _regenerator.default.wrap(function _callee37$(_context37) {
  16508. while (1) {
  16509. switch (_context37.prev = _context37.next) {
  16510. case 0:
  16511. if (!(this.secretType === qt)) {
  16512. _context37.next = 2;
  16513. break;
  16514. }
  16515. return _context37.abrupt("return", e);
  16516. case 2:
  16517. _ref27 = e || {}, t = _ref27.errCode, n = _ref27.content;
  16518. return _context37.abrupt("return", t || !n ? e : this.secretType === Ft ? n : this.platformDecryptResult(e));
  16519. case 4:
  16520. case "end":
  16521. return _context37.stop();
  16522. }
  16523. }
  16524. }, _callee37, this);
  16525. }));
  16526. function decryptResult(_x34) {
  16527. return _decryptResult.apply(this, arguments);
  16528. }
  16529. return decryptResult;
  16530. }()
  16531. }, {
  16532. key: "wrapVerifyClientCallFunction",
  16533. value: function wrapVerifyClientCallFunction(e) {
  16534. var t = this;
  16535. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  16536. var _ref29,
  16537. n,
  16538. _ref29$data,
  16539. s,
  16540. r,
  16541. _args38 = arguments;
  16542. return _regenerator.default.wrap(function _callee38$(_context38) {
  16543. while (1) {
  16544. switch (_context38.prev = _context38.next) {
  16545. case 0:
  16546. _ref29 = _args38.length > 0 && _args38[0] !== undefined ? _args38[0] : {}, n = _ref29.name, _ref29$data = _ref29.data, s = _ref29$data === void 0 ? {} : _ref29$data;
  16547. _context38.next = 3;
  16548. return t.prepare();
  16549. case 3:
  16550. _context38.next = 5;
  16551. return t.platformGetSignOption();
  16552. case 5:
  16553. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context38.sent;
  16554. _context38.next = 8;
  16555. return e({
  16556. name: n,
  16557. data: s
  16558. });
  16559. case 8:
  16560. r = _context38.sent;
  16561. _context38.t0 = t.isClientKeyNotFound(r);
  16562. if (!_context38.t0) {
  16563. _context38.next = 19;
  16564. break;
  16565. }
  16566. _context38.next = 13;
  16567. return t.prepare({
  16568. forceUpdate: !0
  16569. });
  16570. case 13:
  16571. _context38.next = 15;
  16572. return t.platformGetSignOption();
  16573. case 15:
  16574. s._uniCloudOptions = _context38.sent;
  16575. _context38.next = 18;
  16576. return e({
  16577. name: n,
  16578. data: s
  16579. });
  16580. case 18:
  16581. r = _context38.sent;
  16582. case 19:
  16583. return _context38.abrupt("return", r);
  16584. case 20:
  16585. case "end":
  16586. return _context38.stop();
  16587. }
  16588. }
  16589. }, _callee38);
  16590. }));
  16591. }
  16592. }, {
  16593. key: "wrapEncryptDataCallFunction",
  16594. value: function wrapEncryptDataCallFunction(e) {
  16595. var t = this;
  16596. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  16597. var _ref31,
  16598. n,
  16599. _ref31$data,
  16600. s,
  16601. r,
  16602. i,
  16603. _r5,
  16604. _args39 = arguments;
  16605. return _regenerator.default.wrap(function _callee39$(_context39) {
  16606. while (1) {
  16607. switch (_context39.prev = _context39.next) {
  16608. case 0:
  16609. _ref31 = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : {}, n = _ref31.name, _ref31$data = _ref31.data, s = _ref31$data === void 0 ? {} : _ref31$data;
  16610. _context39.next = 3;
  16611. return t.prepare();
  16612. case 3:
  16613. _context39.next = 5;
  16614. return t.encryptData(s);
  16615. case 5:
  16616. r = _context39.sent;
  16617. _context39.next = 8;
  16618. return e({
  16619. name: n,
  16620. data: r
  16621. });
  16622. case 8:
  16623. i = _context39.sent;
  16624. if (!t.isClientKeyNotFound(i)) {
  16625. _context39.next = 21;
  16626. break;
  16627. }
  16628. _context39.next = 12;
  16629. return t.prepare({
  16630. forceUpdate: !0
  16631. });
  16632. case 12:
  16633. _context39.next = 14;
  16634. return t.encryptData(s);
  16635. case 14:
  16636. _r5 = _context39.sent;
  16637. _context39.next = 17;
  16638. return t.platformGetSignOption();
  16639. case 17:
  16640. s._uniCloudOptions = _context39.sent;
  16641. _context39.next = 20;
  16642. return e({
  16643. name: n,
  16644. data: _r5
  16645. });
  16646. case 20:
  16647. i = _context39.sent;
  16648. case 21:
  16649. _context39.next = 23;
  16650. return t.decryptResult(i.result);
  16651. case 23:
  16652. i.result = _context39.sent;
  16653. return _context39.abrupt("return", i);
  16654. case 25:
  16655. case "end":
  16656. return _context39.stop();
  16657. }
  16658. }
  16659. }, _callee39);
  16660. }));
  16661. }
  16662. }]);
  16663. return $t;
  16664. }();
  16665. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  16666. function Bt(e) {
  16667. return parseInt(e) === e;
  16668. }
  16669. function Wt(e) {
  16670. if (!Bt(e.length)) return !1;
  16671. for (var t = 0; t < e.length; t++) {
  16672. if (!Bt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  16673. }
  16674. return !0;
  16675. }
  16676. function Ht(e, t) {
  16677. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  16678. if (Array.isArray(e)) {
  16679. if (!Wt(e)) throw new Error("Array contains invalid value: " + e);
  16680. return new Uint8Array(e);
  16681. }
  16682. if (Bt(e.length) && Wt(e)) return new Uint8Array(e);
  16683. throw new Error("unsupported array-like object");
  16684. }
  16685. function zt(e) {
  16686. return new Uint8Array(e);
  16687. }
  16688. function Jt(e, t, n, s, r) {
  16689. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  16690. }
  16691. var Gt,
  16692. Vt = {
  16693. toBytes: function toBytes(e) {
  16694. var t = [],
  16695. n = 0;
  16696. for (e = encodeURI(e); n < e.length;) {
  16697. var s = e.charCodeAt(n++);
  16698. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  16699. }
  16700. return Ht(t);
  16701. },
  16702. fromBytes: function fromBytes(e) {
  16703. for (var t = [], n = 0; n < e.length;) {
  16704. var s = e[n];
  16705. s < 128 ? (t.push(String.fromCharCode(s)), n++) : s > 191 && s < 224 ? (t.push(String.fromCharCode((31 & s) << 6 | 63 & e[n + 1])), n += 2) : (t.push(String.fromCharCode((15 & s) << 12 | (63 & e[n + 1]) << 6 | 63 & e[n + 2])), n += 3);
  16706. }
  16707. return t.join("");
  16708. }
  16709. },
  16710. Yt = (Gt = "0123456789abcdef", {
  16711. toBytes: function toBytes(e) {
  16712. for (var t = [], n = 0; n < e.length; n += 2) {
  16713. t.push(parseInt(e.substr(n, 2), 16));
  16714. }
  16715. return t;
  16716. },
  16717. fromBytes: function fromBytes(e) {
  16718. for (var t = [], n = 0; n < e.length; n++) {
  16719. var s = e[n];
  16720. t.push(Gt[(240 & s) >> 4] + Gt[15 & s]);
  16721. }
  16722. return t.join("");
  16723. }
  16724. }),
  16725. Qt = {
  16726. 16: 10,
  16727. 24: 12,
  16728. 32: 14
  16729. },
  16730. Xt = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145],
  16731. Zt = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22],
  16732. en = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125],
  16733. tn = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986],
  16734. nn = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766],
  16735. sn = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126],
  16736. rn = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436],
  16737. on = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890],
  16738. an = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935],
  16739. cn = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600],
  16740. un = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480],
  16741. hn = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795],
  16742. ln = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855],
  16743. dn = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150],
  16744. pn = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];
  16745. function fn(e) {
  16746. for (var t = [], n = 0; n < e.length; n += 4) {
  16747. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  16748. }
  16749. return t;
  16750. }
  16751. var gn = /*#__PURE__*/function () {
  16752. function gn(e) {
  16753. (0, _classCallCheck2.default)(this, gn);
  16754. if (!(this instanceof gn)) throw Error("AES must be instanitated with `new`");
  16755. Object.defineProperty(this, "key", {
  16756. value: Ht(e, !0)
  16757. }), this._prepare();
  16758. }
  16759. (0, _createClass2.default)(gn, [{
  16760. key: "_prepare",
  16761. value: function _prepare() {
  16762. var e = Qt[this.key.length];
  16763. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  16764. this._Ke = [], this._Kd = [];
  16765. for (var t = 0; t <= e; t++) {
  16766. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  16767. }
  16768. var n,
  16769. s = 4 * (e + 1),
  16770. r = this.key.length / 4,
  16771. i = fn(this.key);
  16772. for (t = 0; t < r; t++) {
  16773. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  16774. }
  16775. for (var o, a = 0, c = r; c < s;) {
  16776. if (o = i[r - 1], i[0] ^= Zt[o >> 16 & 255] << 24 ^ Zt[o >> 8 & 255] << 16 ^ Zt[255 & o] << 8 ^ Zt[o >> 24 & 255] ^ Xt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  16777. i[t] ^= i[t - 1];
  16778. } else {
  16779. for (t = 1; t < r / 2; t++) {
  16780. i[t] ^= i[t - 1];
  16781. }
  16782. o = i[r / 2 - 1], i[r / 2] ^= Zt[255 & o] ^ Zt[o >> 8 & 255] << 8 ^ Zt[o >> 16 & 255] << 16 ^ Zt[o >> 24 & 255] << 24;
  16783. for (t = r / 2 + 1; t < r; t++) {
  16784. i[t] ^= i[t - 1];
  16785. }
  16786. }
  16787. for (t = 0; t < r && c < s;) {
  16788. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  16789. }
  16790. }
  16791. for (var u = 1; u < e; u++) {
  16792. for (var h = 0; h < 4; h++) {
  16793. o = this._Kd[u][h], this._Kd[u][h] = hn[o >> 24 & 255] ^ ln[o >> 16 & 255] ^ dn[o >> 8 & 255] ^ pn[255 & o];
  16794. }
  16795. }
  16796. }
  16797. }, {
  16798. key: "encrypt",
  16799. value: function encrypt(e) {
  16800. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  16801. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = fn(e), r = 0; r < 4; r++) {
  16802. s[r] ^= this._Ke[0][r];
  16803. }
  16804. for (var i = 1; i < t; i++) {
  16805. for (r = 0; r < 4; r++) {
  16806. n[r] = tn[s[r] >> 24 & 255] ^ nn[s[(r + 1) % 4] >> 16 & 255] ^ sn[s[(r + 2) % 4] >> 8 & 255] ^ rn[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  16807. }
  16808. s = n.slice();
  16809. }
  16810. var o,
  16811. a = zt(16);
  16812. for (r = 0; r < 4; r++) {
  16813. o = this._Ke[t][r], a[4 * r] = 255 & (Zt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Zt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Zt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Zt[255 & s[(r + 3) % 4]] ^ o);
  16814. }
  16815. return a;
  16816. }
  16817. }, {
  16818. key: "decrypt",
  16819. value: function decrypt(e) {
  16820. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  16821. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = fn(e), r = 0; r < 4; r++) {
  16822. s[r] ^= this._Kd[0][r];
  16823. }
  16824. for (var i = 1; i < t; i++) {
  16825. for (r = 0; r < 4; r++) {
  16826. n[r] = on[s[r] >> 24 & 255] ^ an[s[(r + 3) % 4] >> 16 & 255] ^ cn[s[(r + 2) % 4] >> 8 & 255] ^ un[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  16827. }
  16828. s = n.slice();
  16829. }
  16830. var o,
  16831. a = zt(16);
  16832. for (r = 0; r < 4; r++) {
  16833. o = this._Kd[t][r], a[4 * r] = 255 & (en[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (en[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (en[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (en[255 & s[(r + 1) % 4]] ^ o);
  16834. }
  16835. return a;
  16836. }
  16837. }]);
  16838. return gn;
  16839. }();
  16840. var mn = /*#__PURE__*/function () {
  16841. function mn(e) {
  16842. (0, _classCallCheck2.default)(this, mn);
  16843. if (!(this instanceof mn)) throw Error("AES must be instanitated with `new`");
  16844. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new gn(e);
  16845. }
  16846. (0, _createClass2.default)(mn, [{
  16847. key: "encrypt",
  16848. value: function encrypt(e) {
  16849. if ((e = Ht(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16850. for (var t = zt(e.length), n = zt(16), s = 0; s < e.length; s += 16) {
  16851. Jt(e, n, 0, s, s + 16), Jt(n = this._aes.encrypt(n), t, s);
  16852. }
  16853. return t;
  16854. }
  16855. }, {
  16856. key: "decrypt",
  16857. value: function decrypt(e) {
  16858. if ((e = Ht(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16859. for (var t = zt(e.length), n = zt(16), s = 0; s < e.length; s += 16) {
  16860. Jt(e, n, 0, s, s + 16), Jt(n = this._aes.decrypt(n), t, s);
  16861. }
  16862. return t;
  16863. }
  16864. }]);
  16865. return mn;
  16866. }();
  16867. var yn = /*#__PURE__*/function () {
  16868. function yn(e, t) {
  16869. (0, _classCallCheck2.default)(this, yn);
  16870. if (!(this instanceof yn)) throw Error("AES must be instanitated with `new`");
  16871. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  16872. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16873. } else t = zt(16);
  16874. this._lastCipherblock = Ht(t, !0), this._aes = new gn(e);
  16875. }
  16876. (0, _createClass2.default)(yn, [{
  16877. key: "encrypt",
  16878. value: function encrypt(e) {
  16879. if ((e = Ht(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16880. for (var t = zt(e.length), n = zt(16), s = 0; s < e.length; s += 16) {
  16881. Jt(e, n, 0, s, s + 16);
  16882. for (var r = 0; r < 16; r++) {
  16883. n[r] ^= this._lastCipherblock[r];
  16884. }
  16885. this._lastCipherblock = this._aes.encrypt(n), Jt(this._lastCipherblock, t, s);
  16886. }
  16887. return t;
  16888. }
  16889. }, {
  16890. key: "decrypt",
  16891. value: function decrypt(e) {
  16892. if ((e = Ht(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16893. for (var t = zt(e.length), n = zt(16), s = 0; s < e.length; s += 16) {
  16894. Jt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  16895. for (var r = 0; r < 16; r++) {
  16896. t[s + r] = n[r] ^ this._lastCipherblock[r];
  16897. }
  16898. Jt(e, this._lastCipherblock, 0, s, s + 16);
  16899. }
  16900. return t;
  16901. }
  16902. }]);
  16903. return yn;
  16904. }();
  16905. var _n = /*#__PURE__*/function () {
  16906. function _n(e, t, n) {
  16907. (0, _classCallCheck2.default)(this, _n);
  16908. if (!(this instanceof _n)) throw Error("AES must be instanitated with `new`");
  16909. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  16910. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  16911. } else t = zt(16);
  16912. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ht(t, !0), this._aes = new gn(e);
  16913. }
  16914. (0, _createClass2.default)(_n, [{
  16915. key: "encrypt",
  16916. value: function encrypt(e) {
  16917. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  16918. for (var t, n = Ht(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16919. t = this._aes.encrypt(this._shiftRegister);
  16920. for (var r = 0; r < this.segmentSize; r++) {
  16921. n[s + r] ^= t[r];
  16922. }
  16923. Jt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Jt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16924. }
  16925. return n;
  16926. }
  16927. }, {
  16928. key: "decrypt",
  16929. value: function decrypt(e) {
  16930. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  16931. for (var t, n = Ht(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16932. t = this._aes.encrypt(this._shiftRegister);
  16933. for (var r = 0; r < this.segmentSize; r++) {
  16934. n[s + r] ^= t[r];
  16935. }
  16936. Jt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Jt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16937. }
  16938. return n;
  16939. }
  16940. }]);
  16941. return _n;
  16942. }();
  16943. var wn = /*#__PURE__*/function () {
  16944. function wn(e, t) {
  16945. (0, _classCallCheck2.default)(this, wn);
  16946. if (!(this instanceof wn)) throw Error("AES must be instanitated with `new`");
  16947. if (this.description = "Output Feedback", this.name = "ofb", t) {
  16948. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16949. } else t = zt(16);
  16950. this._lastPrecipher = Ht(t, !0), this._lastPrecipherIndex = 16, this._aes = new gn(e);
  16951. }
  16952. (0, _createClass2.default)(wn, [{
  16953. key: "encrypt",
  16954. value: function encrypt(e) {
  16955. for (var t = Ht(e, !0), n = 0; n < t.length; n++) {
  16956. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  16957. }
  16958. return t;
  16959. }
  16960. }, {
  16961. key: "decrypt",
  16962. value: function decrypt(e) {
  16963. return this.encrypt(e);
  16964. }
  16965. }]);
  16966. return wn;
  16967. }();
  16968. var vn = /*#__PURE__*/function () {
  16969. function vn(e) {
  16970. (0, _classCallCheck2.default)(this, vn);
  16971. if (!(this instanceof vn)) throw Error("Counter must be instanitated with `new`");
  16972. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = zt(16), this.setValue(e)) : this.setBytes(e);
  16973. }
  16974. (0, _createClass2.default)(vn, [{
  16975. key: "setValue",
  16976. value: function setValue(e) {
  16977. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  16978. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  16979. for (var t = 15; t >= 0; --t) {
  16980. this._counter[t] = e % 256, e = parseInt(e / 256);
  16981. }
  16982. }
  16983. }, {
  16984. key: "setBytes",
  16985. value: function setBytes(e) {
  16986. if (16 != (e = Ht(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  16987. this._counter = e;
  16988. }
  16989. }, {
  16990. key: "increment",
  16991. value: function increment() {
  16992. for (var e = 15; e >= 0; e--) {
  16993. if (255 !== this._counter[e]) {
  16994. this._counter[e]++;
  16995. break;
  16996. }
  16997. this._counter[e] = 0;
  16998. }
  16999. }
  17000. }]);
  17001. return vn;
  17002. }();
  17003. var In = /*#__PURE__*/function () {
  17004. function In(e, t) {
  17005. (0, _classCallCheck2.default)(this, In);
  17006. if (!(this instanceof In)) throw Error("AES must be instanitated with `new`");
  17007. this.description = "Counter", this.name = "ctr", t instanceof vn || (t = new vn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new gn(e);
  17008. }
  17009. (0, _createClass2.default)(In, [{
  17010. key: "encrypt",
  17011. value: function encrypt(e) {
  17012. for (var t = Ht(e, !0), n = 0; n < t.length; n++) {
  17013. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  17014. }
  17015. return t;
  17016. }
  17017. }, {
  17018. key: "decrypt",
  17019. value: function decrypt(e) {
  17020. return this.encrypt(e);
  17021. }
  17022. }]);
  17023. return In;
  17024. }();
  17025. var Sn = {
  17026. AES: gn,
  17027. Counter: vn,
  17028. ModeOfOperation: {
  17029. ecb: mn,
  17030. cbc: yn,
  17031. cfb: _n,
  17032. ofb: wn,
  17033. ctr: In
  17034. },
  17035. utils: {
  17036. hex: Yt,
  17037. utf8: Vt
  17038. },
  17039. padding: {
  17040. pkcs7: {
  17041. pad: function pad(e) {
  17042. var t = 16 - (e = Ht(e, !0)).length % 16,
  17043. n = zt(e.length + t);
  17044. Jt(e, n);
  17045. for (var s = e.length; s < n.length; s++) {
  17046. n[s] = t;
  17047. }
  17048. return n;
  17049. },
  17050. strip: function strip(e) {
  17051. if ((e = Ht(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  17052. var t = e[e.length - 1];
  17053. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  17054. for (var n = e.length - t, s = 0; s < t; s++) {
  17055. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  17056. }
  17057. var r = zt(n);
  17058. return Jt(e, r, 0, 0, n), r;
  17059. }
  17060. }
  17061. },
  17062. _arrayTest: {
  17063. coerceArray: Ht,
  17064. createArray: zt,
  17065. copyArray: Jt
  17066. }
  17067. };
  17068. function bn(e, t, n) {
  17069. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  17070. r = Sn.utils.utf8.toBytes(n),
  17071. i = Sn.utils.utf8.toBytes(e),
  17072. o = new Sn.ModeOfOperation.cbc(s, r),
  17073. a = Sn.padding.pkcs7.pad(i),
  17074. c = o.encrypt(a);
  17075. return uni.arrayBufferToBase64(c);
  17076. }
  17077. var kn = {
  17078. code: 2e4,
  17079. message: "System error"
  17080. },
  17081. An = {
  17082. code: 20101,
  17083. message: "Invalid client"
  17084. },
  17085. Pn = {
  17086. code: 20102,
  17087. message: "Get encrypt key failed"
  17088. },
  17089. Tn = {
  17090. 10001: "Secure network is not supported on current playground or unimpsdk",
  17091. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  17092. 10009: "Encrypt payload failed",
  17093. 10010: "Decrypt response failed"
  17094. };
  17095. function Cn(e) {
  17096. var _ref32 = e || {},
  17097. t = _ref32.errSubject,
  17098. n = _ref32.subject,
  17099. s = _ref32.errCode,
  17100. r = _ref32.errMsg,
  17101. i = _ref32.code,
  17102. o = _ref32.message,
  17103. a = _ref32.cause;
  17104. return new te({
  17105. subject: t || n || "uni-secure-network",
  17106. code: s || i || kn.code,
  17107. message: r || o,
  17108. cause: a
  17109. });
  17110. }
  17111. var xn,
  17112. On,
  17113. En = null;
  17114. var Ln = /*#__PURE__*/function (_$t) {
  17115. (0, _inherits2.default)(Ln, _$t);
  17116. var _super9 = _createSuper(Ln);
  17117. function Ln(e) {
  17118. var _this15;
  17119. (0, _classCallCheck2.default)(this, Ln);
  17120. _this15 = _super9.call(this, e), _this15.clientType = "mp-weixin", _this15.userEncryptKey = null;
  17121. return _this15;
  17122. }
  17123. (0, _createClass2.default)(Ln, [{
  17124. key: "isLogin",
  17125. value: function isLogin() {
  17126. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  17127. }
  17128. }, {
  17129. key: "prepare",
  17130. value: function () {
  17131. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  17132. return _regenerator.default.wrap(function _callee40$(_context40) {
  17133. while (1) {
  17134. switch (_context40.prev = _context40.next) {
  17135. case 0:
  17136. if (this.isLogin()) {
  17137. _context40.next = 7;
  17138. break;
  17139. }
  17140. if (this.scopedGlobalCache.initPromise) {
  17141. _context40.next = 3;
  17142. break;
  17143. }
  17144. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  17145. case 3:
  17146. _context40.next = 5;
  17147. return this.scopedGlobalCache.initPromise;
  17148. case 5:
  17149. if (this.isLogin()) {
  17150. _context40.next = 7;
  17151. break;
  17152. }
  17153. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  17154. case 7:
  17155. case "end":
  17156. return _context40.stop();
  17157. }
  17158. }
  17159. }, _callee40, this);
  17160. }));
  17161. function prepare() {
  17162. return _prepare2.apply(this, arguments);
  17163. }
  17164. return prepare;
  17165. }()
  17166. }, {
  17167. key: "getUserEncryptKey",
  17168. value: function () {
  17169. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  17170. var _this16 = this;
  17171. var e;
  17172. return _regenerator.default.wrap(function _callee41$(_context41) {
  17173. while (1) {
  17174. switch (_context41.prev = _context41.next) {
  17175. case 0:
  17176. if (!this.userEncryptKey) {
  17177. _context41.next = 2;
  17178. break;
  17179. }
  17180. return _context41.abrupt("return", this.userEncryptKey);
  17181. case 2:
  17182. if (!(En && En.expireTime)) {
  17183. _context41.next = 6;
  17184. break;
  17185. }
  17186. e = Date.now();
  17187. if (!(En.expireTime - e > 0)) {
  17188. _context41.next = 6;
  17189. break;
  17190. }
  17191. return _context41.abrupt("return", (this.userEncryptKey = En, this.userEncryptKey));
  17192. case 6:
  17193. return _context41.abrupt("return", new Promise(function (e, t) {
  17194. uni.getUserCryptoManager().getLatestUserKey({
  17195. success: function success(t) {
  17196. En = t, _this16.userEncryptKey = t, e(_this16.userEncryptKey);
  17197. },
  17198. fail: function fail(e) {
  17199. t(Cn(_objectSpread(_objectSpread({}, Pn), {}, {
  17200. cause: e
  17201. })));
  17202. }
  17203. });
  17204. }));
  17205. case 7:
  17206. case "end":
  17207. return _context41.stop();
  17208. }
  17209. }
  17210. }, _callee41, this);
  17211. }));
  17212. function getUserEncryptKey() {
  17213. return _getUserEncryptKey.apply(this, arguments);
  17214. }
  17215. return getUserEncryptKey;
  17216. }()
  17217. }, {
  17218. key: "getWxAppId",
  17219. value: function getWxAppId() {
  17220. return wx.getAccountInfoSync().miniProgram.appId;
  17221. }
  17222. }, {
  17223. key: "platformGetSignOption",
  17224. value: function () {
  17225. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  17226. var _yield$this$getUserEn, e, t, n;
  17227. return _regenerator.default.wrap(function _callee42$(_context42) {
  17228. while (1) {
  17229. switch (_context42.prev = _context42.next) {
  17230. case 0:
  17231. _context42.next = 2;
  17232. return this.getUserEncryptKey();
  17233. case 2:
  17234. _yield$this$getUserEn = _context42.sent;
  17235. e = _yield$this$getUserEn.encryptKey;
  17236. t = _yield$this$getUserEn.iv;
  17237. n = _yield$this$getUserEn.version;
  17238. return _context42.abrupt("return", {
  17239. verifyClientSign: bn(JSON.stringify({
  17240. data: JSON.stringify({}),
  17241. appId: this.appId,
  17242. deviceId: this.deviceId,
  17243. wxAppId: this.getWxAppId(),
  17244. simulator: "devtools" === ae().platform,
  17245. timestamp: Date.now()
  17246. }), e, t),
  17247. encryptKeyId: n,
  17248. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17249. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17250. });
  17251. case 7:
  17252. case "end":
  17253. return _context42.stop();
  17254. }
  17255. }
  17256. }, _callee42, this);
  17257. }));
  17258. function platformGetSignOption() {
  17259. return _platformGetSignOption.apply(this, arguments);
  17260. }
  17261. return platformGetSignOption;
  17262. }()
  17263. }, {
  17264. key: "platformEncryptData",
  17265. value: function () {
  17266. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(e) {
  17267. var _yield$this$getUserEn2, t, n, s, r;
  17268. return _regenerator.default.wrap(function _callee43$(_context43) {
  17269. while (1) {
  17270. switch (_context43.prev = _context43.next) {
  17271. case 0:
  17272. _context43.next = 2;
  17273. return this.getUserEncryptKey();
  17274. case 2:
  17275. _yield$this$getUserEn2 = _context43.sent;
  17276. t = _yield$this$getUserEn2.encryptKey;
  17277. n = _yield$this$getUserEn2.iv;
  17278. s = _yield$this$getUserEn2.version;
  17279. r = {
  17280. secretType: this.secretType,
  17281. encryptKeyId: s,
  17282. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17283. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17284. };
  17285. return _context43.abrupt("return", this.secretType === Kt ? {
  17286. content: e,
  17287. _uniCloudOptions: r
  17288. } : {
  17289. content: bn(JSON.stringify({
  17290. data: JSON.stringify(e),
  17291. appId: this.appId,
  17292. deviceId: this.deviceId,
  17293. wxAppId: this.getWxAppId(),
  17294. simulator: "devtools" === ae().platform,
  17295. timestamp: Date.now()
  17296. }), t, n),
  17297. _uniCloudOptions: r
  17298. });
  17299. case 8:
  17300. case "end":
  17301. return _context43.stop();
  17302. }
  17303. }
  17304. }, _callee43, this);
  17305. }));
  17306. function platformEncryptData(_x35) {
  17307. return _platformEncryptData.apply(this, arguments);
  17308. }
  17309. return platformEncryptData;
  17310. }()
  17311. }, {
  17312. key: "platformDecryptResult",
  17313. value: function () {
  17314. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44(e) {
  17315. var t, _yield$this$getUserEn3, n, s;
  17316. return _regenerator.default.wrap(function _callee44$(_context44) {
  17317. while (1) {
  17318. switch (_context44.prev = _context44.next) {
  17319. case 0:
  17320. t = e.content;
  17321. _context44.next = 3;
  17322. return this.getUserEncryptKey();
  17323. case 3:
  17324. _yield$this$getUserEn3 = _context44.sent;
  17325. n = _yield$this$getUserEn3.encryptKey;
  17326. s = _yield$this$getUserEn3.iv;
  17327. return _context44.abrupt("return", JSON.parse(function (e, t, n) {
  17328. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  17329. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  17330. i = Sn.utils.utf8.toBytes(n),
  17331. o = new Sn.ModeOfOperation.cbc(r, i),
  17332. a = Sn.padding.pkcs7.strip(o.decrypt(s));
  17333. return Sn.utils.utf8.fromBytes(a);
  17334. }(t, n, s)));
  17335. case 7:
  17336. case "end":
  17337. return _context44.stop();
  17338. }
  17339. }
  17340. }, _callee44, this);
  17341. }));
  17342. function platformDecryptResult(_x36) {
  17343. return _platformDecryptResult.apply(this, arguments);
  17344. }
  17345. return platformDecryptResult;
  17346. }()
  17347. }, {
  17348. key: "isClientKeyNotFound",
  17349. value: function isClientKeyNotFound() {
  17350. return !1;
  17351. }
  17352. }]);
  17353. return Ln;
  17354. }($t);
  17355. function Rn(e) {
  17356. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  17357. n = {};
  17358. var _loop = function _loop(_s11) {
  17359. var r = t[_s11];
  17360. n[r] = function () {
  17361. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  17362. t[_key] = arguments[_key];
  17363. }
  17364. return new Promise(function (n, s) {
  17365. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  17366. var _ref33 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17367. e = _ref33.type,
  17368. t = _ref33.data,
  17369. r = _ref33.errCode,
  17370. i = _ref33.errMsg,
  17371. o = _ref33.errSubject,
  17372. a = _ref33.message;
  17373. "success" === e ? n(t) : s(Cn({
  17374. errCode: r,
  17375. errMsg: Tn[r] || i || a,
  17376. errSubject: o
  17377. }));
  17378. }])) : s(Cn({
  17379. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  17380. }));
  17381. });
  17382. };
  17383. };
  17384. for (var _s11 = 0; _s11 < t.length; _s11++) {
  17385. _loop(_s11);
  17386. }
  17387. return n;
  17388. }
  17389. var Un = /*#__PURE__*/function (_$t2) {
  17390. (0, _inherits2.default)(Un, _$t2);
  17391. var _super10 = _createSuper(Un);
  17392. function Un(e) {
  17393. var _this17;
  17394. (0, _classCallCheck2.default)(this, Un);
  17395. _this17 = _super10.call(this, e), _this17.clientType = "app", _this17.appUtils = _objectSpread({}, Rn(uni.requireNativePlugin("plus"))), _this17.systemInfo = xn || (xn = ae());
  17396. return _this17;
  17397. }
  17398. (0, _createClass2.default)(Un, [{
  17399. key: "hasClientKey",
  17400. value: function () {
  17401. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  17402. return _regenerator.default.wrap(function _callee45$(_context45) {
  17403. while (1) {
  17404. switch (_context45.prev = _context45.next) {
  17405. case 0:
  17406. _context45.next = 2;
  17407. return this.appUtils.hasClientKey({
  17408. provider: this.provider,
  17409. spaceId: this.spaceId
  17410. });
  17411. case 2:
  17412. this._hasClientKey = _context45.sent;
  17413. return _context45.abrupt("return", this._hasClientKey);
  17414. case 4:
  17415. case "end":
  17416. return _context45.stop();
  17417. }
  17418. }
  17419. }, _callee45, this);
  17420. }));
  17421. function hasClientKey() {
  17422. return _hasClientKey.apply(this, arguments);
  17423. }
  17424. return hasClientKey;
  17425. }()
  17426. }, {
  17427. key: "getAppClientKey",
  17428. value: function () {
  17429. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  17430. var _yield$this$appUtils$, e, t, n, s, r;
  17431. return _regenerator.default.wrap(function _callee46$(_context46) {
  17432. while (1) {
  17433. switch (_context46.prev = _context46.next) {
  17434. case 0:
  17435. _context46.next = 2;
  17436. return this.appUtils.encryptGetClientKeyPayload({
  17437. data: JSON.stringify({})
  17438. });
  17439. case 2:
  17440. _yield$this$appUtils$ = _context46.sent;
  17441. e = _yield$this$appUtils$.data;
  17442. t = _yield$this$appUtils$.key;
  17443. _context46.next = 7;
  17444. return this.uniCloudIns.callFunction({
  17445. name: "DCloud-clientDB",
  17446. data: {
  17447. redirectTo: "encryption",
  17448. action: "getAppClientKey",
  17449. data: e,
  17450. key: t
  17451. }
  17452. });
  17453. case 7:
  17454. _context46.t0 = _context46.sent.result;
  17455. if (_context46.t0) {
  17456. _context46.next = 10;
  17457. break;
  17458. }
  17459. _context46.t0 = {};
  17460. case 10:
  17461. n = _context46.t0;
  17462. if (!(0 !== n.errCode)) {
  17463. _context46.next = 13;
  17464. break;
  17465. }
  17466. throw function (e) {
  17467. return new te({
  17468. subject: e.errSubject || "uni-secure-network",
  17469. code: e.errCode || e.code || kn.code,
  17470. message: e.errMsg || e.message
  17471. });
  17472. }(n);
  17473. case 13:
  17474. s = n.clientKey, r = n.key;
  17475. _context46.next = 16;
  17476. return this.appUtils.setClientKey({
  17477. provider: this.provider,
  17478. spaceId: this.spaceId,
  17479. clientKey: s,
  17480. key: r
  17481. });
  17482. case 16:
  17483. case "end":
  17484. return _context46.stop();
  17485. }
  17486. }
  17487. }, _callee46, this);
  17488. }));
  17489. function getAppClientKey() {
  17490. return _getAppClientKey.apply(this, arguments);
  17491. }
  17492. return getAppClientKey;
  17493. }()
  17494. }, {
  17495. key: "ensureClientKey",
  17496. value: function () {
  17497. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  17498. var _this18 = this;
  17499. var _ref34,
  17500. _ref34$forceUpdate,
  17501. e,
  17502. _args47 = arguments;
  17503. return _regenerator.default.wrap(function _callee47$(_context47) {
  17504. while (1) {
  17505. switch (_context47.prev = _context47.next) {
  17506. case 0:
  17507. _ref34 = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {}, _ref34$forceUpdate = _ref34.forceUpdate, e = _ref34$forceUpdate === void 0 ? !1 : _ref34$forceUpdate;
  17508. _context47.t1 = !0;
  17509. _context47.next = 4;
  17510. return this.hasClientKey();
  17511. case 4:
  17512. _context47.t2 = _context47.sent;
  17513. _context47.t0 = _context47.t1 !== _context47.t2;
  17514. if (_context47.t0) {
  17515. _context47.next = 8;
  17516. break;
  17517. }
  17518. _context47.t0 = e;
  17519. case 8:
  17520. if (!_context47.t0) {
  17521. _context47.next = 10;
  17522. break;
  17523. }
  17524. return _context47.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === l || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== p || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  17525. _this18.scopedGlobalCache.initStatus = d;
  17526. }).catch(function (e) {
  17527. throw _this18.scopedGlobalCache.initStatus = p, e;
  17528. }), this.scopedGlobalCache.initStatus = l), this.scopedGlobalCache.initPromise));
  17529. case 10:
  17530. case "end":
  17531. return _context47.stop();
  17532. }
  17533. }
  17534. }, _callee47, this);
  17535. }));
  17536. function ensureClientKey() {
  17537. return _ensureClientKey.apply(this, arguments);
  17538. }
  17539. return ensureClientKey;
  17540. }()
  17541. }, {
  17542. key: "prepare",
  17543. value: function () {
  17544. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
  17545. var _ref35,
  17546. _ref35$forceUpdate,
  17547. e,
  17548. _args48 = arguments;
  17549. return _regenerator.default.wrap(function _callee48$(_context48) {
  17550. while (1) {
  17551. switch (_context48.prev = _context48.next) {
  17552. case 0:
  17553. _ref35 = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {}, _ref35$forceUpdate = _ref35.forceUpdate, e = _ref35$forceUpdate === void 0 ? !1 : _ref35$forceUpdate;
  17554. _context48.next = 3;
  17555. return this.ensureClientKey({
  17556. forceUpdate: e
  17557. });
  17558. case 3:
  17559. case "end":
  17560. return _context48.stop();
  17561. }
  17562. }
  17563. }, _callee48, this);
  17564. }));
  17565. function prepare() {
  17566. return _prepare3.apply(this, arguments);
  17567. }
  17568. return prepare;
  17569. }()
  17570. }, {
  17571. key: "platformGetSignOption",
  17572. value: function () {
  17573. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49() {
  17574. var _yield$this$appUtils$2, e, t;
  17575. return _regenerator.default.wrap(function _callee49$(_context49) {
  17576. while (1) {
  17577. switch (_context49.prev = _context49.next) {
  17578. case 0:
  17579. _context49.next = 2;
  17580. return this.appUtils.encrypt({
  17581. provider: this.provider,
  17582. spaceId: this.spaceId,
  17583. data: JSON.stringify({})
  17584. });
  17585. case 2:
  17586. _yield$this$appUtils$2 = _context49.sent;
  17587. e = _yield$this$appUtils$2.data;
  17588. t = _yield$this$appUtils$2.key;
  17589. return _context49.abrupt("return", {
  17590. verifyClientSign: e,
  17591. encryptKeyId: t
  17592. });
  17593. case 6:
  17594. case "end":
  17595. return _context49.stop();
  17596. }
  17597. }
  17598. }, _callee49, this);
  17599. }));
  17600. function platformGetSignOption() {
  17601. return _platformGetSignOption2.apply(this, arguments);
  17602. }
  17603. return platformGetSignOption;
  17604. }()
  17605. }, {
  17606. key: "platformEncryptData",
  17607. value: function () {
  17608. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50(e) {
  17609. var _yield$this$appUtils$3, t, n, s;
  17610. return _regenerator.default.wrap(function _callee50$(_context50) {
  17611. while (1) {
  17612. switch (_context50.prev = _context50.next) {
  17613. case 0:
  17614. _context50.next = 2;
  17615. return this.appUtils.encrypt({
  17616. provider: this.provider,
  17617. spaceId: this.spaceId,
  17618. data: JSON.stringify(e)
  17619. });
  17620. case 2:
  17621. _yield$this$appUtils$3 = _context50.sent;
  17622. t = _yield$this$appUtils$3.data;
  17623. n = _yield$this$appUtils$3.key;
  17624. s = {
  17625. secretType: this.secretType,
  17626. encryptKeyId: n
  17627. };
  17628. return _context50.abrupt("return", this.secretType === Kt ? {
  17629. content: e,
  17630. _uniCloudOptions: s
  17631. } : {
  17632. content: t,
  17633. _uniCloudOptions: s
  17634. });
  17635. case 7:
  17636. case "end":
  17637. return _context50.stop();
  17638. }
  17639. }
  17640. }, _callee50, this);
  17641. }));
  17642. function platformEncryptData(_x37) {
  17643. return _platformEncryptData2.apply(this, arguments);
  17644. }
  17645. return platformEncryptData;
  17646. }()
  17647. }, {
  17648. key: "platformDecryptResult",
  17649. value: function () {
  17650. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51(e) {
  17651. var t, _e$_uniCloudOptions, n, s, r;
  17652. return _regenerator.default.wrap(function _callee51$(_context51) {
  17653. while (1) {
  17654. switch (_context51.prev = _context51.next) {
  17655. case 0:
  17656. t = e.content;
  17657. _e$_uniCloudOptions = e._uniCloudOptions;
  17658. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  17659. s = n.encryptKeyId;
  17660. _context51.next = 6;
  17661. return this.appUtils.decrypt({
  17662. provider: this.provider,
  17663. spaceId: this.spaceId,
  17664. data: t,
  17665. key: s
  17666. });
  17667. case 6:
  17668. r = _context51.sent;
  17669. return _context51.abrupt("return", JSON.parse(r.data));
  17670. case 8:
  17671. case "end":
  17672. return _context51.stop();
  17673. }
  17674. }
  17675. }, _callee51, this);
  17676. }));
  17677. function platformDecryptResult(_x38) {
  17678. return _platformDecryptResult2.apply(this, arguments);
  17679. }
  17680. return platformDecryptResult;
  17681. }()
  17682. }, {
  17683. key: "isClientKeyNotFound",
  17684. value: function isClientKeyNotFound() {
  17685. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17686. var t = e.result || {};
  17687. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  17688. }
  17689. }]);
  17690. return Un;
  17691. }($t);
  17692. function Nn() {
  17693. var _ref36 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17694. e = _ref36.secretType;
  17695. return e === Ft || e === Kt || e === jt;
  17696. }
  17697. function Dn() {
  17698. var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17699. e = _ref37.name,
  17700. _ref37$data = _ref37.data,
  17701. t = _ref37$data === void 0 ? {} : _ref37$data;
  17702. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  17703. }
  17704. function Mn() {
  17705. var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17706. e = _ref38.provider,
  17707. t = _ref38.spaceId,
  17708. n = _ref38.functionName;
  17709. var _ae = ae(),
  17710. s = _ae.appId,
  17711. r = _ae.uniPlatform,
  17712. i = _ae.osName;
  17713. var o = r;
  17714. "app" === r && (o = i);
  17715. var a = function () {
  17716. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17717. e = _ref39.provider,
  17718. t = _ref39.spaceId;
  17719. var n = A;
  17720. if (!n) return {};
  17721. e = function (e) {
  17722. return "tencent" === e ? "tcb" : e;
  17723. }(e);
  17724. var s = n.find(function (n) {
  17725. return n.provider === e && n.spaceId === t;
  17726. });
  17727. return s && s.config;
  17728. }({
  17729. provider: e,
  17730. spaceId: t
  17731. });
  17732. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  17733. var c = a.accessControl.function || {},
  17734. u = Object.keys(c);
  17735. if (0 === u.length) return !0;
  17736. var h = function (e, t) {
  17737. var n, s, r;
  17738. for (var _i2 = 0; _i2 < e.length; _i2++) {
  17739. var _o2 = e[_i2];
  17740. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  17741. return e.trim();
  17742. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  17743. }
  17744. return n || s || r;
  17745. }(u, n);
  17746. if (!h) return !1;
  17747. if ((c[h] || []).find(function () {
  17748. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17749. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  17750. })) return !0;
  17751. throw console.error("\u6B64\u5E94\u7528[appId: ".concat(s, ", platform: ").concat(o, "]\u4E0D\u5728\u4E91\u7AEF\u914D\u7F6E\u7684\u5141\u8BB8\u8BBF\u95EE\u7684\u5E94\u7528\u5217\u8868\u5185\uFF0C\u53C2\u8003\uFF1Ahttps://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client")), Cn(An);
  17752. }
  17753. function qn(_ref40) {
  17754. var e = _ref40.functionName,
  17755. t = _ref40.result,
  17756. n = _ref40.logPvd;
  17757. if (S && this.__dev__.debugLog && t && t.requestId) {
  17758. var _s12 = JSON.stringify({
  17759. spaceId: this.config.spaceId,
  17760. functionName: e,
  17761. requestId: t.requestId
  17762. });
  17763. console.log("[".concat(n, "-request]").concat(_s12, "[/").concat(n, "-request]"));
  17764. }
  17765. }
  17766. function Fn(e) {
  17767. var t = e.callFunction,
  17768. n = function n(_n9) {
  17769. var _this19 = this;
  17770. var s = _n9.name;
  17771. _n9.data = Lt.call(e, {
  17772. data: _n9.data
  17773. });
  17774. var r = {
  17775. aliyun: "aliyun",
  17776. tencent: "tcb",
  17777. tcb: "tcb",
  17778. alipay: "alipay"
  17779. }[this.config.provider],
  17780. i = Nn(_n9),
  17781. o = Dn(_n9),
  17782. a = i || o;
  17783. return t.call(this, _n9).then(function (e) {
  17784. return e.errCode = 0, !a && qn.call(_this19, {
  17785. functionName: s,
  17786. result: e,
  17787. logPvd: r
  17788. }), Promise.resolve(e);
  17789. }, function (e) {
  17790. return !a && qn.call(_this19, {
  17791. functionName: s,
  17792. result: e,
  17793. logPvd: r
  17794. }), e && e.message && (e.message = function () {
  17795. var _ref41 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17796. _ref41$message = _ref41.message,
  17797. e = _ref41$message === void 0 ? "" : _ref41$message,
  17798. _ref41$extraInfo = _ref41.extraInfo,
  17799. t = _ref41$extraInfo === void 0 ? {} : _ref41$extraInfo,
  17800. _ref41$formatter = _ref41.formatter,
  17801. n = _ref41$formatter === void 0 ? [] : _ref41$formatter;
  17802. for (var _s13 = 0; _s13 < n.length; _s13++) {
  17803. var _n$_s = n[_s13],
  17804. _r6 = _n$_s.rule,
  17805. _i3 = _n$_s.content,
  17806. _o3 = _n$_s.mode,
  17807. _a = e.match(_r6);
  17808. if (!_a) continue;
  17809. var _c = _i3;
  17810. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  17811. _c = Mt(_c, "{$".concat(_e19, "}"), _a[_e19]);
  17812. }
  17813. for (var _e20 in t) {
  17814. _c = Mt(_c, "{".concat(_e20, "}"), t[_e20]);
  17815. }
  17816. return "replace" === _o3 ? _c : e + _c;
  17817. }
  17818. return e;
  17819. }({
  17820. message: "[".concat(_n9.name, "]: ").concat(e.message),
  17821. formatter: Ut,
  17822. extraInfo: {
  17823. functionName: s
  17824. }
  17825. })), Promise.reject(e);
  17826. });
  17827. };
  17828. e.callFunction = function (t) {
  17829. var _e$config = e.config,
  17830. s = _e$config.provider,
  17831. r = _e$config.spaceId,
  17832. i = t.name;
  17833. var o, a;
  17834. if (t.data = t.data || {}, S && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && C ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Rt), o = Rt) : o = n, o = o.bind(e), Dn(t)) a = n.call(e, t);else if (function (_ref42) {
  17835. var e = _ref42.name,
  17836. _ref42$data = _ref42.data,
  17837. t = _ref42$data === void 0 ? {} : _ref42$data;
  17838. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  17839. }(t)) a = o.call(e, t);else if (Nn(t)) {
  17840. a = new On({
  17841. secretType: t.secretType,
  17842. uniCloudIns: e
  17843. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  17844. } else if (Mn({
  17845. provider: s,
  17846. spaceId: r,
  17847. functionName: i
  17848. })) {
  17849. a = new On({
  17850. secretType: t.secretType,
  17851. uniCloudIns: e
  17852. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  17853. } else a = o(t);
  17854. return Object.defineProperty(a, "result", {
  17855. get: function get() {
  17856. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  17857. }
  17858. }), a.then(function (e) {
  17859. return "undefined" != typeof UTSJSONObject && (e.result = new UTSJSONObject(e.result)), e;
  17860. });
  17861. };
  17862. }
  17863. On = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  17864. function _class2() {
  17865. (0, _classCallCheck2.default)(this, _class2);
  17866. throw Cn({
  17867. message: "Platform ".concat(P, " is not supported by secure network")
  17868. });
  17869. }
  17870. return (0, _createClass2.default)(_class2);
  17871. }() : k ? "mp-weixin" === P ? Ln : Un : /*#__PURE__*/function () {
  17872. function _class3() {
  17873. (0, _classCallCheck2.default)(this, _class3);
  17874. throw Cn({
  17875. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  17876. });
  17877. }
  17878. return (0, _createClass2.default)(_class3);
  17879. }();
  17880. var Kn = Symbol("CLIENT_DB_INTERNAL");
  17881. function jn(e, t) {
  17882. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Kn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  17883. get: function get(e, n, s) {
  17884. if ("_uniClient" === n) return null;
  17885. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  17886. if (n in e || "string" != typeof n) {
  17887. var _t11 = e[n];
  17888. return "function" == typeof _t11 ? _t11.bind(e) : _t11;
  17889. }
  17890. return t.get(e, n, s);
  17891. }
  17892. });
  17893. }
  17894. function $n(e) {
  17895. return {
  17896. on: function on(t, n) {
  17897. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  17898. },
  17899. off: function off(t, n) {
  17900. e[t] = e[t] || [];
  17901. var s = e[t].indexOf(n);
  17902. -1 !== s && e[t].splice(s, 1);
  17903. }
  17904. };
  17905. }
  17906. var Bn = ["db.Geo", "db.command", "command.aggregate"];
  17907. function Wn(e, t) {
  17908. return Bn.indexOf("".concat(e, ".").concat(t)) > -1;
  17909. }
  17910. function Hn(e) {
  17911. switch (f(e)) {
  17912. case "array":
  17913. return e.map(function (e) {
  17914. return Hn(e);
  17915. });
  17916. case "object":
  17917. return e._internalType === Kn || Object.keys(e).forEach(function (t) {
  17918. e[t] = Hn(e[t]);
  17919. }), e;
  17920. case "regexp":
  17921. return {
  17922. $regexp: {
  17923. source: e.source,
  17924. flags: e.flags
  17925. }
  17926. };
  17927. case "date":
  17928. return {
  17929. $date: e.toISOString()
  17930. };
  17931. default:
  17932. return e;
  17933. }
  17934. }
  17935. function zn(e) {
  17936. return e && e.content && e.content.$method;
  17937. }
  17938. var Jn = /*#__PURE__*/function () {
  17939. function Jn(e, t, n) {
  17940. (0, _classCallCheck2.default)(this, Jn);
  17941. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  17942. }
  17943. (0, _createClass2.default)(Jn, [{
  17944. key: "toJSON",
  17945. value: function toJSON() {
  17946. var e = this;
  17947. var t = [e.content];
  17948. for (; e.prevStage;) {
  17949. e = e.prevStage, t.push(e.content);
  17950. }
  17951. return {
  17952. $db: t.reverse().map(function (e) {
  17953. return {
  17954. $method: e.$method,
  17955. $param: Hn(e.$param)
  17956. };
  17957. })
  17958. };
  17959. }
  17960. }, {
  17961. key: "toString",
  17962. value: function toString() {
  17963. return JSON.stringify(this.toJSON());
  17964. }
  17965. }, {
  17966. key: "getAction",
  17967. value: function getAction() {
  17968. var e = this.toJSON().$db.find(function (e) {
  17969. return "action" === e.$method;
  17970. });
  17971. return e && e.$param && e.$param[0];
  17972. }
  17973. }, {
  17974. key: "getCommand",
  17975. value: function getCommand() {
  17976. return {
  17977. $db: this.toJSON().$db.filter(function (e) {
  17978. return "action" !== e.$method;
  17979. })
  17980. };
  17981. }
  17982. }, {
  17983. key: "isAggregate",
  17984. get: function get() {
  17985. var e = this;
  17986. for (; e;) {
  17987. var t = zn(e),
  17988. _n10 = zn(e.prevStage);
  17989. if ("aggregate" === t && "collection" === _n10 || "pipeline" === t) return !0;
  17990. e = e.prevStage;
  17991. }
  17992. return !1;
  17993. }
  17994. }, {
  17995. key: "isCommand",
  17996. get: function get() {
  17997. var e = this;
  17998. for (; e;) {
  17999. if ("command" === zn(e)) return !0;
  18000. e = e.prevStage;
  18001. }
  18002. return !1;
  18003. }
  18004. }, {
  18005. key: "isAggregateCommand",
  18006. get: function get() {
  18007. var e = this;
  18008. for (; e;) {
  18009. var t = zn(e),
  18010. _n11 = zn(e.prevStage);
  18011. if ("aggregate" === t && "command" === _n11) return !0;
  18012. e = e.prevStage;
  18013. }
  18014. return !1;
  18015. }
  18016. }, {
  18017. key: "getNextStageFn",
  18018. value: function getNextStageFn(e) {
  18019. var t = this;
  18020. return function () {
  18021. return Gn({
  18022. $method: e,
  18023. $param: Hn(Array.from(arguments))
  18024. }, t, t._database);
  18025. };
  18026. }
  18027. }, {
  18028. key: "count",
  18029. get: function get() {
  18030. return this.isAggregate ? this.getNextStageFn("count") : function () {
  18031. return this._send("count", Array.from(arguments));
  18032. };
  18033. }
  18034. }, {
  18035. key: "remove",
  18036. get: function get() {
  18037. return this.isCommand ? this.getNextStageFn("remove") : function () {
  18038. return this._send("remove", Array.from(arguments));
  18039. };
  18040. }
  18041. }, {
  18042. key: "get",
  18043. value: function get() {
  18044. return this._send("get", Array.from(arguments));
  18045. }
  18046. }, {
  18047. key: "add",
  18048. get: function get() {
  18049. return this.isCommand ? this.getNextStageFn("add") : function () {
  18050. return this._send("add", Array.from(arguments));
  18051. };
  18052. }
  18053. }, {
  18054. key: "update",
  18055. value: function update() {
  18056. return this._send("update", Array.from(arguments));
  18057. }
  18058. }, {
  18059. key: "end",
  18060. value: function end() {
  18061. return this._send("end", Array.from(arguments));
  18062. }
  18063. }, {
  18064. key: "set",
  18065. get: function get() {
  18066. return this.isCommand ? this.getNextStageFn("set") : function () {
  18067. throw new Error("JQL禁止使用set方法");
  18068. };
  18069. }
  18070. }, {
  18071. key: "_send",
  18072. value: function _send(e, t) {
  18073. var n = this.getAction(),
  18074. s = this.getCommand();
  18075. if (s.$db.push({
  18076. $method: e,
  18077. $param: Hn(t)
  18078. }), S) {
  18079. var _e21 = s.$db.find(function (e) {
  18080. return "collection" === e.$method;
  18081. }),
  18082. _t12 = _e21 && _e21.$param;
  18083. _t12 && 1 === _t12.length && "string" == typeof _e21.$param[0] && _e21.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  18084. }
  18085. return this._database._callCloudFunction({
  18086. action: n,
  18087. command: s
  18088. });
  18089. }
  18090. }]);
  18091. return Jn;
  18092. }();
  18093. function Gn(e, t, n) {
  18094. return jn(new Jn(e, t, n), {
  18095. get: function get(e, t) {
  18096. var s = "db";
  18097. return e && e.content && (s = e.content.$method), Wn(s, t) ? Gn({
  18098. $method: t
  18099. }, e, n) : function () {
  18100. return Gn({
  18101. $method: t,
  18102. $param: Hn(Array.from(arguments))
  18103. }, e, n);
  18104. };
  18105. }
  18106. });
  18107. }
  18108. function Vn(_ref43) {
  18109. var e = _ref43.path,
  18110. t = _ref43.method;
  18111. return /*#__PURE__*/function () {
  18112. function _class4() {
  18113. (0, _classCallCheck2.default)(this, _class4);
  18114. this.param = Array.from(arguments);
  18115. }
  18116. (0, _createClass2.default)(_class4, [{
  18117. key: "toJSON",
  18118. value: function toJSON() {
  18119. return {
  18120. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  18121. return {
  18122. $method: e
  18123. };
  18124. })), [{
  18125. $method: t,
  18126. $param: this.param
  18127. }])
  18128. };
  18129. }
  18130. }, {
  18131. key: "toString",
  18132. value: function toString() {
  18133. return JSON.stringify(this.toJSON());
  18134. }
  18135. }]);
  18136. return _class4;
  18137. }();
  18138. }
  18139. function Yn(e) {
  18140. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18141. return jn(new e(t), {
  18142. get: function get(e, t) {
  18143. return Wn("db", t) ? Gn({
  18144. $method: t
  18145. }, null, e) : function () {
  18146. return Gn({
  18147. $method: t,
  18148. $param: Hn(Array.from(arguments))
  18149. }, null, e);
  18150. };
  18151. }
  18152. });
  18153. }
  18154. var Qn = /*#__PURE__*/function (_ref44) {
  18155. (0, _inherits2.default)(Qn, _ref44);
  18156. var _super11 = _createSuper(Qn);
  18157. function Qn() {
  18158. (0, _classCallCheck2.default)(this, Qn);
  18159. return _super11.apply(this, arguments);
  18160. }
  18161. (0, _createClass2.default)(Qn, [{
  18162. key: "_parseResult",
  18163. value: function _parseResult(e) {
  18164. return this._isJQL ? e.result : e;
  18165. }
  18166. }, {
  18167. key: "_callCloudFunction",
  18168. value: function _callCloudFunction(_ref45) {
  18169. var _this20 = this;
  18170. var e = _ref45.action,
  18171. t = _ref45.command,
  18172. n = _ref45.multiCommand,
  18173. s = _ref45.queryList;
  18174. function r(e, t) {
  18175. if (n && s) for (var _n12 = 0; _n12 < s.length; _n12++) {
  18176. var _r7 = s[_n12];
  18177. _r7.udb && "function" == typeof _r7.udb.setResult && (t ? _r7.udb.setResult(t) : _r7.udb.setResult(e.result.dataList[_n12]));
  18178. }
  18179. }
  18180. var i = this,
  18181. o = this._isJQL ? "databaseForJQL" : "database";
  18182. function a(e) {
  18183. return i._callback("error", [e]), M(q(o, "fail"), e).then(function () {
  18184. return M(q(o, "complete"), e);
  18185. }).then(function () {
  18186. return r(null, e), Y(j, {
  18187. type: W,
  18188. content: e
  18189. }), Promise.reject(e);
  18190. });
  18191. }
  18192. var c = M(q(o, "invoke")),
  18193. u = this._uniClient;
  18194. return c.then(function () {
  18195. return u.callFunction({
  18196. name: "DCloud-clientDB",
  18197. type: h,
  18198. data: {
  18199. action: e,
  18200. command: t,
  18201. multiCommand: n
  18202. }
  18203. });
  18204. }).then(function (e) {
  18205. var _e$result = e.result,
  18206. t = _e$result.code,
  18207. n = _e$result.message,
  18208. s = _e$result.token,
  18209. c = _e$result.tokenExpired,
  18210. _e$result$systemInfo = _e$result.systemInfo,
  18211. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  18212. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  18213. var _u$_e = u[_e22],
  18214. _t13 = _u$_e.level,
  18215. _n13 = _u$_e.message,
  18216. _s14 = _u$_e.detail,
  18217. _r8 = console["app" === P && "warn" === _t13 ? "error" : _t13] || console.log;
  18218. var _i4 = "[System Info]" + _n13;
  18219. _s14 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s14)), _r8(_i4);
  18220. }
  18221. if (t) {
  18222. return a(new te({
  18223. code: t,
  18224. message: n,
  18225. requestId: e.requestId
  18226. }));
  18227. }
  18228. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (re({
  18229. token: s,
  18230. tokenExpired: c
  18231. }), _this20._callbackAuth("refreshToken", [{
  18232. token: s,
  18233. tokenExpired: c
  18234. }]), _this20._callback("refreshToken", [{
  18235. token: s,
  18236. tokenExpired: c
  18237. }]), Y(B, {
  18238. token: s,
  18239. tokenExpired: c
  18240. }));
  18241. var h = [{
  18242. prop: "affectedDocs",
  18243. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  18244. }, {
  18245. prop: "code",
  18246. tips: "code不再推荐使用,请使用errCode替代"
  18247. }, {
  18248. prop: "message",
  18249. tips: "message不再推荐使用,请使用errMsg替代"
  18250. }];
  18251. var _loop2 = function _loop2(_t14) {
  18252. var _h$_t = h[_t14],
  18253. n = _h$_t.prop,
  18254. s = _h$_t.tips;
  18255. if (n in e.result) {
  18256. var _t15 = e.result[n];
  18257. Object.defineProperty(e.result, n, {
  18258. get: function get() {
  18259. return console.warn(s), _t15;
  18260. }
  18261. });
  18262. }
  18263. };
  18264. for (var _t14 = 0; _t14 < h.length; _t14++) {
  18265. _loop2(_t14);
  18266. }
  18267. return function (e) {
  18268. return M(q(o, "success"), e).then(function () {
  18269. return M(q(o, "complete"), e);
  18270. }).then(function () {
  18271. r(e, null);
  18272. var t = i._parseResult(e);
  18273. return Y(j, {
  18274. type: W,
  18275. content: t
  18276. }), Promise.resolve(t);
  18277. });
  18278. }(e);
  18279. }, function (e) {
  18280. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  18281. return a(new te({
  18282. code: e.code || "SYSTEM_ERROR",
  18283. message: e.message,
  18284. requestId: e.requestId
  18285. }));
  18286. });
  18287. }
  18288. }]);
  18289. return Qn;
  18290. }( /*#__PURE__*/function () {
  18291. function _class5() {
  18292. var _ref46 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18293. _ref46$uniClient = _ref46.uniClient,
  18294. e = _ref46$uniClient === void 0 ? {} : _ref46$uniClient,
  18295. _ref46$isJQL = _ref46.isJQL,
  18296. t = _ref46$isJQL === void 0 ? !1 : _ref46$isJQL;
  18297. (0, _classCallCheck2.default)(this, _class5);
  18298. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = $n(this._authCallBacks)), this._isJQL = t, Object.assign(this, $n(this._dbCallBacks)), this.env = jn({}, {
  18299. get: function get(e, t) {
  18300. return {
  18301. $env: t
  18302. };
  18303. }
  18304. }), this.Geo = jn({}, {
  18305. get: function get(e, t) {
  18306. return Vn({
  18307. path: ["Geo"],
  18308. method: t
  18309. });
  18310. }
  18311. }), this.serverDate = Vn({
  18312. path: [],
  18313. method: "serverDate"
  18314. }), this.RegExp = Vn({
  18315. path: [],
  18316. method: "RegExp"
  18317. });
  18318. }
  18319. (0, _createClass2.default)(_class5, [{
  18320. key: "getCloudEnv",
  18321. value: function getCloudEnv(e) {
  18322. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  18323. return {
  18324. $env: e.replace("$cloudEnv_", "")
  18325. };
  18326. }
  18327. }, {
  18328. key: "_callback",
  18329. value: function _callback(e, t) {
  18330. var n = this._dbCallBacks;
  18331. n[e] && n[e].forEach(function (e) {
  18332. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18333. });
  18334. }
  18335. }, {
  18336. key: "_callbackAuth",
  18337. value: function _callbackAuth(e, t) {
  18338. var n = this._authCallBacks;
  18339. n[e] && n[e].forEach(function (e) {
  18340. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18341. });
  18342. }
  18343. }, {
  18344. key: "multiSend",
  18345. value: function multiSend() {
  18346. var e = Array.from(arguments),
  18347. t = e.map(function (e) {
  18348. var t = e.getAction(),
  18349. n = e.getCommand();
  18350. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  18351. return {
  18352. action: t,
  18353. command: n
  18354. };
  18355. });
  18356. return this._callCloudFunction({
  18357. multiCommand: t,
  18358. queryList: e
  18359. });
  18360. }
  18361. }]);
  18362. return _class5;
  18363. }());
  18364. var Xn = "token无效,跳转登录页面",
  18365. Zn = "token过期,跳转登录页面",
  18366. es = {
  18367. TOKEN_INVALID_TOKEN_EXPIRED: Zn,
  18368. TOKEN_INVALID_INVALID_CLIENTID: Xn,
  18369. TOKEN_INVALID: Xn,
  18370. TOKEN_INVALID_WRONG_TOKEN: Xn,
  18371. TOKEN_INVALID_ANONYMOUS_USER: Xn
  18372. },
  18373. ts = {
  18374. "uni-id-token-expired": Zn,
  18375. "uni-id-check-token-failed": Xn,
  18376. "uni-id-token-not-exist": Xn,
  18377. "uni-id-check-device-feature-failed": Xn
  18378. };
  18379. function ns(e, t) {
  18380. var n = "";
  18381. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  18382. }
  18383. function ss() {
  18384. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18385. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  18386. var n = [],
  18387. s = [];
  18388. return e.forEach(function (e) {
  18389. !0 === e.needLogin ? n.push(ns(t, e.path)) : !1 === e.needLogin && s.push(ns(t, e.path));
  18390. }), {
  18391. needLoginPage: n,
  18392. notNeedLoginPage: s
  18393. };
  18394. }
  18395. function rs(e) {
  18396. return e.split("?")[0].replace(/^\//, "");
  18397. }
  18398. function is() {
  18399. return function (e) {
  18400. var t = e && e.$page && e.$page.fullPath || "";
  18401. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  18402. }(function () {
  18403. var e = getCurrentPages();
  18404. return e[e.length - 1];
  18405. }());
  18406. }
  18407. function os() {
  18408. return rs(is());
  18409. }
  18410. function as() {
  18411. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  18412. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18413. if (!e) return !1;
  18414. if (!(t && t.list && t.list.length)) return !1;
  18415. var n = t.list,
  18416. s = rs(e);
  18417. return n.some(function (e) {
  18418. return e.pagePath === s;
  18419. });
  18420. }
  18421. var cs = !!_pages.default.uniIdRouter;
  18422. var _ref47 = function () {
  18423. var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  18424. _ref28$pages = _ref28.pages,
  18425. t = _ref28$pages === void 0 ? [] : _ref28$pages,
  18426. _ref28$subPackages = _ref28.subPackages,
  18427. n = _ref28$subPackages === void 0 ? [] : _ref28$subPackages,
  18428. _ref28$uniIdRouter = _ref28.uniIdRouter,
  18429. s = _ref28$uniIdRouter === void 0 ? {} : _ref28$uniIdRouter,
  18430. _ref28$tabBar = _ref28.tabBar,
  18431. r = _ref28$tabBar === void 0 ? {} : _ref28$tabBar;
  18432. var i = s.loginPage,
  18433. _s$needLogin = s.needLogin,
  18434. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  18435. _s$resToLogin = s.resToLogin,
  18436. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  18437. _ss = ss(t),
  18438. c = _ss.needLoginPage,
  18439. u = _ss.notNeedLoginPage,
  18440. _ref30 = function () {
  18441. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18442. var t = [],
  18443. n = [];
  18444. return e.forEach(function (e) {
  18445. var s = e.root,
  18446. _e$pages = e.pages,
  18447. r = _e$pages === void 0 ? [] : _e$pages,
  18448. _ss2 = ss(r, s),
  18449. i = _ss2.needLoginPage,
  18450. o = _ss2.notNeedLoginPage;
  18451. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  18452. }), {
  18453. needLoginPage: t,
  18454. notNeedLoginPage: n
  18455. };
  18456. }(n),
  18457. h = _ref30.needLoginPage,
  18458. l = _ref30.notNeedLoginPage;
  18459. return {
  18460. loginPage: i,
  18461. routerNeedLogin: o,
  18462. resToLogin: a,
  18463. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  18464. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  18465. loginPageInTabBar: as(i, r)
  18466. };
  18467. }(),
  18468. us = _ref47.loginPage,
  18469. hs = _ref47.routerNeedLogin,
  18470. ls = _ref47.resToLogin,
  18471. ds = _ref47.needLoginPage,
  18472. ps = _ref47.notNeedLoginPage,
  18473. fs = _ref47.loginPageInTabBar;
  18474. if (ds.indexOf(us) > -1) throw new Error("Login page [".concat(us, "] should not be \"needLogin\", please check your pages.json"));
  18475. function gs(e) {
  18476. var t = os();
  18477. if ("/" === e.charAt(0)) return e;
  18478. var _e$split = e.split("?"),
  18479. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  18480. n = _e$split2[0],
  18481. s = _e$split2[1],
  18482. r = n.replace(/^\//, "").split("/"),
  18483. i = t.split("/");
  18484. i.pop();
  18485. for (var _e23 = 0; _e23 < r.length; _e23++) {
  18486. var _t16 = r[_e23];
  18487. ".." === _t16 ? i.pop() : "." !== _t16 && i.push(_t16);
  18488. }
  18489. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  18490. }
  18491. function ms(e) {
  18492. var t = rs(gs(e));
  18493. return !(ps.indexOf(t) > -1) && (ds.indexOf(t) > -1 || hs.some(function (t) {
  18494. return function (e, t) {
  18495. return new RegExp(t).test(e);
  18496. }(e, t);
  18497. }));
  18498. }
  18499. function ys(_ref48) {
  18500. var e = _ref48.redirect;
  18501. var t = rs(e),
  18502. n = rs(us);
  18503. return os() !== n && t !== n;
  18504. }
  18505. function _s() {
  18506. var _ref49 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18507. e = _ref49.api,
  18508. t = _ref49.redirect;
  18509. if (!t || !ys({
  18510. redirect: t
  18511. })) return;
  18512. var n = function (e, t) {
  18513. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  18514. }(us, t);
  18515. fs ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  18516. var s = {
  18517. navigateTo: uni.navigateTo,
  18518. redirectTo: uni.redirectTo,
  18519. switchTab: uni.switchTab,
  18520. reLaunch: uni.reLaunch
  18521. };
  18522. setTimeout(function () {
  18523. s[e]({
  18524. url: n
  18525. });
  18526. }, 0);
  18527. }
  18528. function ws() {
  18529. var _ref50 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18530. e = _ref50.url;
  18531. var t = {
  18532. abortLoginPageJump: !1,
  18533. autoToLoginPage: !1
  18534. },
  18535. n = function () {
  18536. var _se3 = se(),
  18537. e = _se3.token,
  18538. t = _se3.tokenExpired;
  18539. var n;
  18540. if (e) {
  18541. if (t < Date.now()) {
  18542. var _e24 = "uni-id-token-expired";
  18543. n = {
  18544. errCode: _e24,
  18545. errMsg: ts[_e24]
  18546. };
  18547. }
  18548. } else {
  18549. var _e25 = "uni-id-check-token-failed";
  18550. n = {
  18551. errCode: _e25,
  18552. errMsg: ts[_e25]
  18553. };
  18554. }
  18555. return n;
  18556. }();
  18557. if (ms(e) && n) {
  18558. n.uniIdRedirectUrl = e;
  18559. if (J($).length > 0) return setTimeout(function () {
  18560. Y($, n);
  18561. }, 0), t.abortLoginPageJump = !0, t;
  18562. t.autoToLoginPage = !0;
  18563. }
  18564. return t;
  18565. }
  18566. function vs() {
  18567. !function () {
  18568. var e = is(),
  18569. _ws = ws({
  18570. url: e
  18571. }),
  18572. t = _ws.abortLoginPageJump,
  18573. n = _ws.autoToLoginPage;
  18574. t || n && _s({
  18575. api: "redirectTo",
  18576. redirect: e
  18577. });
  18578. }();
  18579. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  18580. var _loop3 = function _loop3(_t17) {
  18581. var n = e[_t17];
  18582. uni.addInterceptor(n, {
  18583. invoke: function invoke(e) {
  18584. var _ws2 = ws({
  18585. url: e.url
  18586. }),
  18587. t = _ws2.abortLoginPageJump,
  18588. s = _ws2.autoToLoginPage;
  18589. return t ? e : s ? (_s({
  18590. api: n,
  18591. redirect: gs(e.url)
  18592. }), !1) : e;
  18593. }
  18594. });
  18595. };
  18596. for (var _t17 = 0; _t17 < e.length; _t17++) {
  18597. _loop3(_t17);
  18598. }
  18599. }
  18600. function Is() {
  18601. this.onResponse(function (e) {
  18602. var t = e.type,
  18603. n = e.content;
  18604. var s = !1;
  18605. switch (t) {
  18606. case "cloudobject":
  18607. s = function (e) {
  18608. if ("object" != (0, _typeof2.default)(e)) return !1;
  18609. var _ref51 = e || {},
  18610. t = _ref51.errCode;
  18611. return t in ts;
  18612. }(n);
  18613. break;
  18614. case "clientdb":
  18615. s = function (e) {
  18616. if ("object" != (0, _typeof2.default)(e)) return !1;
  18617. var _ref52 = e || {},
  18618. t = _ref52.errCode;
  18619. return t in es;
  18620. }(n);
  18621. }
  18622. s && function () {
  18623. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18624. var t = J($);
  18625. Z().then(function () {
  18626. var n = is();
  18627. if (n && ys({
  18628. redirect: n
  18629. })) return t.length > 0 ? Y($, Object.assign({
  18630. uniIdRedirectUrl: n
  18631. }, e)) : void (us && _s({
  18632. api: "navigateTo",
  18633. redirect: n
  18634. }));
  18635. });
  18636. }(n);
  18637. });
  18638. }
  18639. function Ss(e) {
  18640. !function (e) {
  18641. e.onResponse = function (e) {
  18642. G(j, e);
  18643. }, e.offResponse = function (e) {
  18644. V(j, e);
  18645. };
  18646. }(e), function (e) {
  18647. e.onNeedLogin = function (e) {
  18648. G($, e);
  18649. }, e.offNeedLogin = function (e) {
  18650. V($, e);
  18651. }, cs && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, Z().then(function () {
  18652. vs.call(e);
  18653. }), ls && Is.call(e)));
  18654. }(e), function (e) {
  18655. e.onRefreshToken = function (e) {
  18656. G(B, e);
  18657. }, e.offRefreshToken = function (e) {
  18658. V(B, e);
  18659. };
  18660. }(e);
  18661. }
  18662. var bs;
  18663. var ks = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  18664. As = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  18665. function Ps() {
  18666. var e = se().token || "",
  18667. t = e.split(".");
  18668. if (!e || 3 !== t.length) return {
  18669. uid: null,
  18670. role: [],
  18671. permission: [],
  18672. tokenExpired: 0
  18673. };
  18674. var n;
  18675. try {
  18676. n = JSON.parse((s = t[1], decodeURIComponent(bs(s).split("").map(function (e) {
  18677. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  18678. }).join(""))));
  18679. } catch (e) {
  18680. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  18681. }
  18682. var s;
  18683. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  18684. }
  18685. bs = "function" != typeof atob ? function (e) {
  18686. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !As.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  18687. var t;
  18688. e += "==".slice(2 - (3 & e.length));
  18689. for (var n, s, r = "", i = 0; i < e.length;) {
  18690. t = ks.indexOf(e.charAt(i++)) << 18 | ks.indexOf(e.charAt(i++)) << 12 | (n = ks.indexOf(e.charAt(i++))) << 6 | (s = ks.indexOf(e.charAt(i++))), r += 64 === n ? String.fromCharCode(t >> 16 & 255) : 64 === s ? String.fromCharCode(t >> 16 & 255, t >> 8 & 255) : String.fromCharCode(t >> 16 & 255, t >> 8 & 255, 255 & t);
  18691. }
  18692. return r;
  18693. } : atob;
  18694. var Ts = n(function (e, t) {
  18695. Object.defineProperty(t, "__esModule", {
  18696. value: !0
  18697. });
  18698. var n = "chooseAndUploadFile:ok",
  18699. s = "chooseAndUploadFile:fail";
  18700. function r(e, t) {
  18701. return e.tempFiles.forEach(function (e, n) {
  18702. e.name || (e.name = e.path.substring(e.path.lastIndexOf("/") + 1)), t && (e.fileType = t), e.cloudPath = Date.now() + "_" + n + e.name.substring(e.name.lastIndexOf("."));
  18703. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  18704. return e.path;
  18705. })), e;
  18706. }
  18707. function i(e, t, _ref53) {
  18708. var s = _ref53.onChooseFile,
  18709. r = _ref53.onUploadProgress;
  18710. return t.then(function (e) {
  18711. if (s) {
  18712. var _t18 = s(e);
  18713. if (void 0 !== _t18) return Promise.resolve(_t18).then(function (t) {
  18714. return void 0 === t ? e : t;
  18715. });
  18716. }
  18717. return e;
  18718. }).then(function (t) {
  18719. return !1 === t ? {
  18720. errMsg: n,
  18721. tempFilePaths: [],
  18722. tempFiles: []
  18723. } : function (e, t) {
  18724. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  18725. var r = arguments.length > 3 ? arguments[3] : undefined;
  18726. (t = Object.assign({}, t)).errMsg = n;
  18727. var i = t.tempFiles,
  18728. o = i.length;
  18729. var a = 0;
  18730. return new Promise(function (n) {
  18731. for (; a < s;) {
  18732. c();
  18733. }
  18734. function c() {
  18735. var s = a++;
  18736. if (s >= o) return void (!i.find(function (e) {
  18737. return !e.url && !e.errMsg;
  18738. }) && n(t));
  18739. var u = i[s];
  18740. e.uploadFile({
  18741. provider: u.provider,
  18742. filePath: u.path,
  18743. cloudPath: u.cloudPath,
  18744. fileType: u.fileType,
  18745. cloudPathAsRealPath: u.cloudPathAsRealPath,
  18746. onUploadProgress: function onUploadProgress(e) {
  18747. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  18748. }
  18749. }).then(function (e) {
  18750. u.url = e.fileID, s < o && c();
  18751. }).catch(function (e) {
  18752. u.errMsg = e.errMsg || e.message, s < o && c();
  18753. });
  18754. }
  18755. });
  18756. }(e, t, 5, r);
  18757. });
  18758. }
  18759. t.initChooseAndUploadFile = function (e) {
  18760. return function () {
  18761. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  18762. type: "all"
  18763. };
  18764. return "image" === t.type ? i(e, function (e) {
  18765. var t = e.count,
  18766. n = e.sizeType,
  18767. _e$sourceType = e.sourceType,
  18768. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  18769. o = e.extension;
  18770. return new Promise(function (e, a) {
  18771. uni.chooseImage({
  18772. count: t,
  18773. sizeType: n,
  18774. sourceType: i,
  18775. extension: o,
  18776. success: function success(t) {
  18777. e(r(t, "image"));
  18778. },
  18779. fail: function fail(e) {
  18780. a({
  18781. errMsg: e.errMsg.replace("chooseImage:fail", s)
  18782. });
  18783. }
  18784. });
  18785. });
  18786. }(t), t) : "video" === t.type ? i(e, function (e) {
  18787. var t = e.camera,
  18788. n = e.compressed,
  18789. i = e.maxDuration,
  18790. _e$sourceType2 = e.sourceType,
  18791. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  18792. a = e.extension;
  18793. return new Promise(function (e, c) {
  18794. uni.chooseVideo({
  18795. camera: t,
  18796. compressed: n,
  18797. maxDuration: i,
  18798. sourceType: o,
  18799. extension: a,
  18800. success: function success(t) {
  18801. var n = t.tempFilePath,
  18802. s = t.duration,
  18803. i = t.size,
  18804. o = t.height,
  18805. a = t.width;
  18806. e(r({
  18807. errMsg: "chooseVideo:ok",
  18808. tempFilePaths: [n],
  18809. tempFiles: [{
  18810. name: t.tempFile && t.tempFile.name || "",
  18811. path: n,
  18812. size: i,
  18813. type: t.tempFile && t.tempFile.type || "",
  18814. width: a,
  18815. height: o,
  18816. duration: s,
  18817. fileType: "video",
  18818. cloudPath: ""
  18819. }]
  18820. }, "video"));
  18821. },
  18822. fail: function fail(e) {
  18823. c({
  18824. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  18825. });
  18826. }
  18827. });
  18828. });
  18829. }(t), t) : i(e, function (e) {
  18830. var t = e.count,
  18831. n = e.extension;
  18832. return new Promise(function (e, i) {
  18833. var o = uni.chooseFile;
  18834. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  18835. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  18836. });
  18837. o({
  18838. type: "all",
  18839. count: t,
  18840. extension: n,
  18841. success: function success(t) {
  18842. e(r(t));
  18843. },
  18844. fail: function fail(e) {
  18845. i({
  18846. errMsg: e.errMsg.replace("chooseFile:fail", s)
  18847. });
  18848. }
  18849. });
  18850. });
  18851. }(t), t);
  18852. };
  18853. };
  18854. }),
  18855. Cs = t(Ts);
  18856. var xs = "manual";
  18857. function Os(e) {
  18858. return {
  18859. props: {
  18860. localdata: {
  18861. type: Array,
  18862. default: function _default() {
  18863. return [];
  18864. }
  18865. },
  18866. options: {
  18867. type: [Object, Array],
  18868. default: function _default() {
  18869. return {};
  18870. }
  18871. },
  18872. spaceInfo: {
  18873. type: Object,
  18874. default: function _default() {
  18875. return {};
  18876. }
  18877. },
  18878. collection: {
  18879. type: [String, Array],
  18880. default: ""
  18881. },
  18882. action: {
  18883. type: String,
  18884. default: ""
  18885. },
  18886. field: {
  18887. type: String,
  18888. default: ""
  18889. },
  18890. orderby: {
  18891. type: String,
  18892. default: ""
  18893. },
  18894. where: {
  18895. type: [String, Object],
  18896. default: ""
  18897. },
  18898. pageData: {
  18899. type: String,
  18900. default: "add"
  18901. },
  18902. pageCurrent: {
  18903. type: Number,
  18904. default: 1
  18905. },
  18906. pageSize: {
  18907. type: Number,
  18908. default: 20
  18909. },
  18910. getcount: {
  18911. type: [Boolean, String],
  18912. default: !1
  18913. },
  18914. gettree: {
  18915. type: [Boolean, String],
  18916. default: !1
  18917. },
  18918. gettreepath: {
  18919. type: [Boolean, String],
  18920. default: !1
  18921. },
  18922. startwith: {
  18923. type: String,
  18924. default: ""
  18925. },
  18926. limitlevel: {
  18927. type: Number,
  18928. default: 10
  18929. },
  18930. groupby: {
  18931. type: String,
  18932. default: ""
  18933. },
  18934. groupField: {
  18935. type: String,
  18936. default: ""
  18937. },
  18938. distinct: {
  18939. type: [Boolean, String],
  18940. default: !1
  18941. },
  18942. foreignKey: {
  18943. type: String,
  18944. default: ""
  18945. },
  18946. loadtime: {
  18947. type: String,
  18948. default: "auto"
  18949. },
  18950. manual: {
  18951. type: Boolean,
  18952. default: !1
  18953. }
  18954. },
  18955. data: function data() {
  18956. return {
  18957. mixinDatacomLoading: !1,
  18958. mixinDatacomHasMore: !1,
  18959. mixinDatacomResData: [],
  18960. mixinDatacomErrorMessage: "",
  18961. mixinDatacomPage: {},
  18962. mixinDatacomError: null
  18963. };
  18964. },
  18965. created: function created() {
  18966. var _this21 = this;
  18967. this.mixinDatacomPage = {
  18968. current: this.pageCurrent,
  18969. size: this.pageSize,
  18970. count: 0
  18971. }, this.$watch(function () {
  18972. var e = [];
  18973. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  18974. e.push(_this21[t]);
  18975. }), e;
  18976. }, function (e, t) {
  18977. if (_this21.loadtime === xs) return;
  18978. var n = !1;
  18979. var s = [];
  18980. for (var _r9 = 2; _r9 < e.length; _r9++) {
  18981. e[_r9] !== t[_r9] && (s.push(e[_r9]), n = !0);
  18982. }
  18983. e[0] !== t[0] && (_this21.mixinDatacomPage.current = _this21.pageCurrent), _this21.mixinDatacomPage.size = _this21.pageSize, _this21.onMixinDatacomPropsChange(n, s);
  18984. });
  18985. },
  18986. methods: {
  18987. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  18988. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  18989. var _this22 = this;
  18990. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18991. _ref54$getone = _ref54.getone,
  18992. e = _ref54$getone === void 0 ? !1 : _ref54$getone,
  18993. t = _ref54.success,
  18994. n = _ref54.fail;
  18995. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then(function (n) {
  18996. _this22.mixinDatacomLoading = !1;
  18997. var _n$result = n.result,
  18998. s = _n$result.data,
  18999. r = _n$result.count;
  19000. _this22.getcount && (_this22.mixinDatacomPage.count = r), _this22.mixinDatacomHasMore = s.length < _this22.pageSize;
  19001. var i = e ? s.length ? s[0] : void 0 : s;
  19002. _this22.mixinDatacomResData = i, t && t(i);
  19003. }).catch(function (e) {
  19004. _this22.mixinDatacomLoading = !1, _this22.mixinDatacomErrorMessage = e, _this22.mixinDatacomError = e, n && n(e);
  19005. }));
  19006. },
  19007. mixinDatacomGet: function mixinDatacomGet() {
  19008. var _n14;
  19009. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19010. var n;
  19011. t = t || {}, n = "undefined" != typeof __uniX && __uniX ? e.databaseForJQL(this.spaceInfo) : e.database(this.spaceInfo);
  19012. var s = t.action || this.action;
  19013. s && (n = n.action(s));
  19014. var r = t.collection || this.collection;
  19015. n = Array.isArray(r) ? (_n14 = n).collection.apply(_n14, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  19016. var i = t.where || this.where;
  19017. i && Object.keys(i).length && (n = n.where(i));
  19018. var o = t.field || this.field;
  19019. o && (n = n.field(o));
  19020. var a = t.foreignKey || this.foreignKey;
  19021. a && (n = n.foreignKey(a));
  19022. var c = t.groupby || this.groupby;
  19023. c && (n = n.groupBy(c));
  19024. var u = t.groupField || this.groupField;
  19025. u && (n = n.groupField(u));
  19026. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  19027. var h = t.orderby || this.orderby;
  19028. h && (n = n.orderBy(h));
  19029. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  19030. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  19031. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  19032. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  19033. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  19034. m = {
  19035. getCount: p
  19036. },
  19037. y = {
  19038. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  19039. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  19040. };
  19041. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  19042. }
  19043. }
  19044. };
  19045. }
  19046. function Es(e) {
  19047. return function (t) {
  19048. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19049. n = function (e) {
  19050. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19051. return e.customUI = t.customUI || e.customUI, e.parseSystemError = t.parseSystemError || e.parseSystemError, Object.assign(e.loadingOptions, t.loadingOptions), Object.assign(e.errorOptions, t.errorOptions), "object" == (0, _typeof2.default)(t.secretMethods) && (e.secretMethods = t.secretMethods), e;
  19052. }({
  19053. customUI: !1,
  19054. loadingOptions: {
  19055. title: "加载中...",
  19056. mask: !0
  19057. },
  19058. errorOptions: {
  19059. type: "modal",
  19060. retry: !1
  19061. }
  19062. }, n);
  19063. var _n15 = n,
  19064. s = _n15.customUI,
  19065. r = _n15.loadingOptions,
  19066. i = _n15.errorOptions,
  19067. o = _n15.parseSystemError,
  19068. a = !s;
  19069. return new Proxy({}, {
  19070. get: function get(s, c) {
  19071. switch (c) {
  19072. case "toString":
  19073. return "[object UniCloudObject]";
  19074. case "toJSON":
  19075. return {};
  19076. }
  19077. return function () {
  19078. var _ref55 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19079. e = _ref55.fn,
  19080. t = _ref55.interceptorName,
  19081. n = _ref55.getCallbackArgs;
  19082. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  19083. var _len2,
  19084. s,
  19085. _key2,
  19086. r,
  19087. i,
  19088. o,
  19089. _args = arguments;
  19090. return _regenerator.default.wrap(function _callee52$(_context52) {
  19091. while (1) {
  19092. switch (_context52.prev = _context52.next) {
  19093. case 0:
  19094. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  19095. s[_key2] = _args[_key2];
  19096. }
  19097. r = n ? n({
  19098. params: s
  19099. }) : {};
  19100. _context52.prev = 2;
  19101. _context52.next = 5;
  19102. return M(q(t, "invoke"), _objectSpread({}, r));
  19103. case 5:
  19104. _context52.next = 7;
  19105. return e.apply(void 0, s);
  19106. case 7:
  19107. i = _context52.sent;
  19108. _context52.next = 10;
  19109. return M(q(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  19110. result: i
  19111. }));
  19112. case 10:
  19113. return _context52.abrupt("return", i);
  19114. case 13:
  19115. _context52.prev = 13;
  19116. _context52.t0 = _context52["catch"](2);
  19117. o = _context52.t0;
  19118. _context52.next = 18;
  19119. return M(q(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  19120. error: o
  19121. }));
  19122. case 18:
  19123. throw o;
  19124. case 19:
  19125. _context52.prev = 19;
  19126. _context52.next = 22;
  19127. return M(q(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  19128. error: o
  19129. }) : _objectSpread(_objectSpread({}, r), {}, {
  19130. result: i
  19131. }));
  19132. case 22:
  19133. return _context52.finish(19);
  19134. case 23:
  19135. case "end":
  19136. return _context52.stop();
  19137. }
  19138. }
  19139. }, _callee52, null, [[2, 13, 19, 23]]);
  19140. }));
  19141. }({
  19142. fn: function () {
  19143. var _s15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  19144. var l,
  19145. _len3,
  19146. h,
  19147. _key3,
  19148. d,
  19149. p,
  19150. _ref57,
  19151. f,
  19152. g,
  19153. m,
  19154. y,
  19155. _e26,
  19156. _yield,
  19157. _t19,
  19158. _n16,
  19159. _args4 = arguments;
  19160. return _regenerator.default.wrap(function _callee54$(_context54) {
  19161. while (1) {
  19162. switch (_context54.prev = _context54.next) {
  19163. case 0:
  19164. a && uni.showLoading({
  19165. title: r.title,
  19166. mask: r.mask
  19167. });
  19168. for (_len3 = _args4.length, h = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  19169. h[_key3] = _args4[_key3];
  19170. }
  19171. d = {
  19172. name: t,
  19173. type: u,
  19174. data: {
  19175. method: c,
  19176. params: h
  19177. }
  19178. };
  19179. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  19180. var n = t.data.method,
  19181. s = e.secretMethods || {},
  19182. r = s[n] || s["*"];
  19183. r && (t.secretType = r);
  19184. }(n, d);
  19185. p = !1;
  19186. _context54.prev = 5;
  19187. _context54.next = 8;
  19188. return e.callFunction(d);
  19189. case 8:
  19190. l = _context54.sent;
  19191. _context54.next = 14;
  19192. break;
  19193. case 11:
  19194. _context54.prev = 11;
  19195. _context54.t0 = _context54["catch"](5);
  19196. p = !0, l = {
  19197. result: new te(_context54.t0)
  19198. };
  19199. case 14:
  19200. _ref57 = l.result || {}, f = _ref57.errSubject, g = _ref57.errCode, m = _ref57.errMsg, y = _ref57.newToken;
  19201. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (re(y), Y(B, _objectSpread({}, y))), g)) {
  19202. _context54.next = 39;
  19203. break;
  19204. }
  19205. _e26 = m;
  19206. if (!(p && o)) {
  19207. _context54.next = 24;
  19208. break;
  19209. }
  19210. _context54.next = 20;
  19211. return o({
  19212. objectName: t,
  19213. methodName: c,
  19214. params: h,
  19215. errSubject: f,
  19216. errCode: g,
  19217. errMsg: m
  19218. });
  19219. case 20:
  19220. _context54.t1 = _context54.sent.errMsg;
  19221. if (_context54.t1) {
  19222. _context54.next = 23;
  19223. break;
  19224. }
  19225. _context54.t1 = m;
  19226. case 23:
  19227. _e26 = _context54.t1;
  19228. case 24:
  19229. if (!a) {
  19230. _context54.next = 37;
  19231. break;
  19232. }
  19233. if (!("toast" === i.type)) {
  19234. _context54.next = 29;
  19235. break;
  19236. }
  19237. uni.showToast({
  19238. title: _e26,
  19239. icon: "none"
  19240. });
  19241. _context54.next = 37;
  19242. break;
  19243. case 29:
  19244. if (!("modal" !== i.type)) {
  19245. _context54.next = 31;
  19246. break;
  19247. }
  19248. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  19249. case 31:
  19250. _context54.next = 33;
  19251. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  19252. var _ref59,
  19253. e,
  19254. t,
  19255. n,
  19256. s,
  19257. r,
  19258. _args2 = arguments;
  19259. return _regenerator.default.wrap(function _callee53$(_context53) {
  19260. while (1) {
  19261. switch (_context53.prev = _context53.next) {
  19262. case 0:
  19263. _ref59 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref59.title, t = _ref59.content, n = _ref59.showCancel, s = _ref59.cancelText, r = _ref59.confirmText;
  19264. return _context53.abrupt("return", new Promise(function (i, o) {
  19265. uni.showModal({
  19266. title: e,
  19267. content: t,
  19268. showCancel: n,
  19269. cancelText: s,
  19270. confirmText: r,
  19271. success: function success(e) {
  19272. i(e);
  19273. },
  19274. fail: function fail() {
  19275. i({
  19276. confirm: !1,
  19277. cancel: !0
  19278. });
  19279. }
  19280. });
  19281. }));
  19282. case 2:
  19283. case "end":
  19284. return _context53.stop();
  19285. }
  19286. }
  19287. }, _callee53);
  19288. }))({
  19289. title: "提示",
  19290. content: _e26,
  19291. showCancel: i.retry,
  19292. cancelText: "取消",
  19293. confirmText: i.retry ? "重试" : "确定"
  19294. });
  19295. case 33:
  19296. _yield = _context54.sent;
  19297. _t19 = _yield.confirm;
  19298. if (!(i.retry && _t19)) {
  19299. _context54.next = 37;
  19300. break;
  19301. }
  19302. return _context54.abrupt("return", s.apply(void 0, h));
  19303. case 37:
  19304. _n16 = new te({
  19305. subject: f,
  19306. code: g,
  19307. message: m,
  19308. requestId: l.requestId
  19309. });
  19310. throw _n16.detail = l.result, Y(j, {
  19311. type: z,
  19312. content: _n16
  19313. }), _n16;
  19314. case 39:
  19315. return _context54.abrupt("return", (Y(j, {
  19316. type: z,
  19317. content: l.result
  19318. }), l.result));
  19319. case 40:
  19320. case "end":
  19321. return _context54.stop();
  19322. }
  19323. }
  19324. }, _callee54, null, [[5, 11]]);
  19325. }));
  19326. function s() {
  19327. return _s15.apply(this, arguments);
  19328. }
  19329. return s;
  19330. }(),
  19331. interceptorName: "callObject",
  19332. getCallbackArgs: function getCallbackArgs() {
  19333. var _ref60 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19334. e = _ref60.params;
  19335. return {
  19336. objectName: t,
  19337. methodName: c,
  19338. params: e
  19339. };
  19340. }
  19341. });
  19342. }
  19343. });
  19344. };
  19345. }
  19346. function Ls(e) {
  19347. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  19348. }
  19349. function Rs() {
  19350. return _Rs.apply(this, arguments);
  19351. }
  19352. function _Rs() {
  19353. _Rs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57() {
  19354. var _ref72,
  19355. e,
  19356. _ref72$callLoginByWei,
  19357. t,
  19358. n,
  19359. s,
  19360. r,
  19361. _args7 = arguments;
  19362. return _regenerator.default.wrap(function _callee57$(_context57) {
  19363. while (1) {
  19364. switch (_context57.prev = _context57.next) {
  19365. case 0:
  19366. _ref72 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref72.openid, _ref72$callLoginByWei = _ref72.callLoginByWeixin, t = _ref72$callLoginByWei === void 0 ? !1 : _ref72$callLoginByWei;
  19367. n = Ls(this);
  19368. if (!("mp-weixin" !== P)) {
  19369. _context57.next = 4;
  19370. break;
  19371. }
  19372. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  19373. case 4:
  19374. if (!(e && t)) {
  19375. _context57.next = 6;
  19376. break;
  19377. }
  19378. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  19379. case 6:
  19380. if (!e) {
  19381. _context57.next = 8;
  19382. break;
  19383. }
  19384. return _context57.abrupt("return", (n.mpWeixinOpenid = e, {}));
  19385. case 8:
  19386. _context57.next = 10;
  19387. return new Promise(function (e, t) {
  19388. uni.login({
  19389. success: function success(t) {
  19390. e(t.code);
  19391. },
  19392. fail: function fail(e) {
  19393. t(new Error(e.errMsg));
  19394. }
  19395. });
  19396. });
  19397. case 10:
  19398. s = _context57.sent;
  19399. r = this.importObject("uni-id-co", {
  19400. customUI: !0
  19401. });
  19402. _context57.next = 14;
  19403. return r.secureNetworkHandshakeByWeixin({
  19404. code: s,
  19405. callLoginByWeixin: t
  19406. });
  19407. case 14:
  19408. n.mpWeixinCode = s;
  19409. return _context57.abrupt("return", {
  19410. code: s
  19411. });
  19412. case 16:
  19413. case "end":
  19414. return _context57.stop();
  19415. }
  19416. }
  19417. }, _callee57, this);
  19418. }));
  19419. return _Rs.apply(this, arguments);
  19420. }
  19421. function Us(_x39) {
  19422. return _Us.apply(this, arguments);
  19423. }
  19424. function _Us() {
  19425. _Us = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e) {
  19426. var t;
  19427. return _regenerator.default.wrap(function _callee58$(_context58) {
  19428. while (1) {
  19429. switch (_context58.prev = _context58.next) {
  19430. case 0:
  19431. t = Ls(this);
  19432. return _context58.abrupt("return", (t.initPromise || (t.initPromise = Rs.call(this, e).then(function (e) {
  19433. return e;
  19434. }).catch(function (e) {
  19435. throw delete t.initPromise, e;
  19436. })), t.initPromise));
  19437. case 2:
  19438. case "end":
  19439. return _context58.stop();
  19440. }
  19441. }
  19442. }, _callee58, this);
  19443. }));
  19444. return _Us.apply(this, arguments);
  19445. }
  19446. function Ns(e) {
  19447. return function () {
  19448. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19449. t = _ref61.openid,
  19450. _ref61$callLoginByWei = _ref61.callLoginByWeixin,
  19451. n = _ref61$callLoginByWei === void 0 ? !1 : _ref61$callLoginByWei;
  19452. return Us.call(e, {
  19453. openid: t,
  19454. callLoginByWeixin: n
  19455. });
  19456. };
  19457. }
  19458. function Ds(e) {
  19459. var t = {
  19460. getSystemInfo: uni.getSystemInfo,
  19461. getPushClientId: uni.getPushClientId
  19462. };
  19463. return function (n) {
  19464. return new Promise(function (s, r) {
  19465. t[e](_objectSpread(_objectSpread({}, n), {}, {
  19466. success: function success(e) {
  19467. s(e);
  19468. },
  19469. fail: function fail(e) {
  19470. r(e);
  19471. }
  19472. }));
  19473. });
  19474. };
  19475. }
  19476. var Ms = /*#__PURE__*/function (_ref62) {
  19477. (0, _inherits2.default)(Ms, _ref62);
  19478. var _super12 = _createSuper(Ms);
  19479. function Ms() {
  19480. var _this23;
  19481. (0, _classCallCheck2.default)(this, Ms);
  19482. _this23 = _super12.call(this), _this23._uniPushMessageCallback = _this23._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this23)), _this23._currentMessageId = -1, _this23._payloadQueue = [];
  19483. return _this23;
  19484. }
  19485. (0, _createClass2.default)(Ms, [{
  19486. key: "init",
  19487. value: function init() {
  19488. var _this24 = this;
  19489. return Promise.all([Ds("getSystemInfo")(), Ds("getPushClientId")()]).then(function () {
  19490. var _ref63 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  19491. _ref64 = (0, _slicedToArray2.default)(_ref63, 2),
  19492. _ref64$ = _ref64[0];
  19493. _ref64$ = _ref64$ === void 0 ? {} : _ref64$;
  19494. var e = _ref64$.appId,
  19495. _ref64$2 = _ref64[1];
  19496. _ref64$2 = _ref64$2 === void 0 ? {} : _ref64$2;
  19497. var t = _ref64$2.cid;
  19498. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  19499. if (!t) throw new Error("Invalid push client id");
  19500. _this24._appId = e, _this24._pushClientId = t, _this24._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this24.emit("open"), _this24._initMessageListener();
  19501. }, function (e) {
  19502. throw _this24.emit("error", e), _this24.close(), e;
  19503. });
  19504. }
  19505. }, {
  19506. key: "open",
  19507. value: function () {
  19508. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  19509. return _regenerator.default.wrap(function _callee55$(_context55) {
  19510. while (1) {
  19511. switch (_context55.prev = _context55.next) {
  19512. case 0:
  19513. return _context55.abrupt("return", this.init());
  19514. case 1:
  19515. case "end":
  19516. return _context55.stop();
  19517. }
  19518. }
  19519. }, _callee55, this);
  19520. }));
  19521. function open() {
  19522. return _open.apply(this, arguments);
  19523. }
  19524. return open;
  19525. }()
  19526. }, {
  19527. key: "_isUniCloudSSE",
  19528. value: function _isUniCloudSSE(e) {
  19529. if ("receive" !== e.type) return !1;
  19530. var t = e && e.data && e.data.payload;
  19531. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  19532. }
  19533. }, {
  19534. key: "_receivePushMessage",
  19535. value: function _receivePushMessage(e) {
  19536. if (!this._isUniCloudSSE(e)) return;
  19537. var t = e && e.data && e.data.payload,
  19538. n = t.action,
  19539. s = t.messageId,
  19540. r = t.message;
  19541. this._payloadQueue.push({
  19542. action: n,
  19543. messageId: s,
  19544. message: r
  19545. }), this._consumMessage();
  19546. }
  19547. }, {
  19548. key: "_consumMessage",
  19549. value: function _consumMessage() {
  19550. var _this25 = this;
  19551. for (;;) {
  19552. var _e27 = this._payloadQueue.find(function (e) {
  19553. return e.messageId === _this25._currentMessageId + 1;
  19554. });
  19555. if (!_e27) break;
  19556. this._currentMessageId++, this._parseMessagePayload(_e27);
  19557. }
  19558. }
  19559. }, {
  19560. key: "_parseMessagePayload",
  19561. value: function _parseMessagePayload(e) {
  19562. var t = e.action,
  19563. n = e.messageId,
  19564. s = e.message;
  19565. "end" === t ? this._end({
  19566. messageId: n,
  19567. message: s
  19568. }) : "message" === t && this._appendMessage({
  19569. messageId: n,
  19570. message: s
  19571. });
  19572. }
  19573. }, {
  19574. key: "_appendMessage",
  19575. value: function _appendMessage() {
  19576. var _ref65 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19577. e = _ref65.messageId,
  19578. t = _ref65.message;
  19579. this.emit("message", t);
  19580. }
  19581. }, {
  19582. key: "_end",
  19583. value: function _end() {
  19584. var _ref66 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19585. e = _ref66.messageId,
  19586. t = _ref66.message;
  19587. this.emit("end", t), this.close();
  19588. }
  19589. }, {
  19590. key: "_initMessageListener",
  19591. value: function _initMessageListener() {
  19592. uni.onPushMessage(this._uniPushMessageCallback);
  19593. }
  19594. }, {
  19595. key: "_destroy",
  19596. value: function _destroy() {
  19597. uni.offPushMessage(this._uniPushMessageCallback);
  19598. }
  19599. }, {
  19600. key: "toJSON",
  19601. value: function toJSON() {
  19602. return {
  19603. appId: this._appId,
  19604. pushClientId: this._pushClientId,
  19605. seqId: this._seqId
  19606. };
  19607. }
  19608. }, {
  19609. key: "close",
  19610. value: function close() {
  19611. this._destroy(), this.emit("close");
  19612. }
  19613. }]);
  19614. return Ms;
  19615. }( /*#__PURE__*/function () {
  19616. function _class6() {
  19617. (0, _classCallCheck2.default)(this, _class6);
  19618. this._callback = {};
  19619. }
  19620. (0, _createClass2.default)(_class6, [{
  19621. key: "addListener",
  19622. value: function addListener(e, t) {
  19623. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  19624. }
  19625. }, {
  19626. key: "on",
  19627. value: function on(e, t) {
  19628. return this.addListener(e, t);
  19629. }
  19630. }, {
  19631. key: "removeListener",
  19632. value: function removeListener(e, t) {
  19633. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  19634. var n = this._callback[e];
  19635. if (!n) return;
  19636. var s = function (e, t) {
  19637. for (var _n17 = e.length - 1; _n17 >= 0; _n17--) {
  19638. if (e[_n17] === t) return _n17;
  19639. }
  19640. return -1;
  19641. }(n, t);
  19642. n.splice(s, 1);
  19643. }
  19644. }, {
  19645. key: "off",
  19646. value: function off(e, t) {
  19647. return this.removeListener(e, t);
  19648. }
  19649. }, {
  19650. key: "removeAllListener",
  19651. value: function removeAllListener(e) {
  19652. delete this._callback[e];
  19653. }
  19654. }, {
  19655. key: "emit",
  19656. value: function emit(e) {
  19657. var n = this._callback[e];
  19658. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  19659. t[_key4 - 1] = arguments[_key4];
  19660. }
  19661. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  19662. n[_e28].apply(n, t);
  19663. }
  19664. }
  19665. }]);
  19666. return _class6;
  19667. }());
  19668. function qs(_x40, _x41) {
  19669. return _qs.apply(this, arguments);
  19670. }
  19671. function _qs() {
  19672. _qs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e, t) {
  19673. var n, _e32, s;
  19674. return _regenerator.default.wrap(function _callee59$(_context59) {
  19675. while (1) {
  19676. switch (_context59.prev = _context59.next) {
  19677. case 0:
  19678. n = "http://".concat(e, ":").concat(t, "/system/ping");
  19679. _context59.prev = 1;
  19680. _context59.next = 4;
  19681. return s = {
  19682. url: n,
  19683. timeout: 500
  19684. }, new Promise(function (e, t) {
  19685. ne.request(_objectSpread(_objectSpread({}, s), {}, {
  19686. success: function success(t) {
  19687. e(t);
  19688. },
  19689. fail: function fail(e) {
  19690. t(e);
  19691. }
  19692. }));
  19693. });
  19694. case 4:
  19695. _e32 = _context59.sent;
  19696. return _context59.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  19697. case 8:
  19698. _context59.prev = 8;
  19699. _context59.t0 = _context59["catch"](1);
  19700. return _context59.abrupt("return", !1);
  19701. case 11:
  19702. case "end":
  19703. return _context59.stop();
  19704. }
  19705. }
  19706. }, _callee59, null, [[1, 8]]);
  19707. }));
  19708. return _qs.apply(this, arguments);
  19709. }
  19710. function Fs(_x42) {
  19711. return _Fs.apply(this, arguments);
  19712. }
  19713. function _Fs() {
  19714. _Fs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61(e) {
  19715. var _ae2, _e33, _t21, t, _t$debugInfo, n, s, _yield2, r, i, o;
  19716. return _regenerator.default.wrap(function _callee61$(_context61) {
  19717. while (1) {
  19718. switch (_context61.prev = _context61.next) {
  19719. case 0:
  19720. if (S) {
  19721. _context61.next = 2;
  19722. break;
  19723. }
  19724. return _context61.abrupt("return", Promise.resolve());
  19725. case 2:
  19726. if ("app" === P) {
  19727. _ae2 = ae(), _e33 = _ae2.osName, _t21 = _ae2.osVersion;
  19728. "ios" === _e33 && function (e) {
  19729. if (!e || "string" != typeof e) return 0;
  19730. var t = e.match(/^(\d+)./);
  19731. return t && t[1] ? parseInt(t[1]) : 0;
  19732. }(_t21) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  19733. }
  19734. t = e.__dev__;
  19735. if (t.debugInfo) {
  19736. _context61.next = 6;
  19737. break;
  19738. }
  19739. return _context61.abrupt("return");
  19740. case 6:
  19741. _t$debugInfo = t.debugInfo;
  19742. n = _t$debugInfo.address;
  19743. s = _t$debugInfo.servePort;
  19744. _context61.next = 11;
  19745. return function () {
  19746. var _ref73 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(e, t) {
  19747. var n, _s16, _r10;
  19748. return _regenerator.default.wrap(function _callee60$(_context60) {
  19749. while (1) {
  19750. switch (_context60.prev = _context60.next) {
  19751. case 0:
  19752. _s16 = 0;
  19753. case 1:
  19754. if (!(_s16 < e.length)) {
  19755. _context60.next = 11;
  19756. break;
  19757. }
  19758. _r10 = e[_s16];
  19759. _context60.next = 5;
  19760. return qs(_r10, t);
  19761. case 5:
  19762. if (!_context60.sent) {
  19763. _context60.next = 8;
  19764. break;
  19765. }
  19766. n = _r10;
  19767. return _context60.abrupt("break", 11);
  19768. case 8:
  19769. _s16++;
  19770. _context60.next = 1;
  19771. break;
  19772. case 11:
  19773. return _context60.abrupt("return", {
  19774. address: n,
  19775. port: t
  19776. });
  19777. case 12:
  19778. case "end":
  19779. return _context60.stop();
  19780. }
  19781. }
  19782. }, _callee60);
  19783. }));
  19784. return function (_x43, _x44) {
  19785. return _ref73.apply(this, arguments);
  19786. };
  19787. }()(n, s);
  19788. case 11:
  19789. _yield2 = _context61.sent;
  19790. r = _yield2.address;
  19791. if (!r) {
  19792. _context61.next = 15;
  19793. break;
  19794. }
  19795. return _context61.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  19796. case 15:
  19797. i = console["app" === P ? "error" : "warn"];
  19798. o = "";
  19799. if (!("remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, o = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", "web" === P && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === P.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  19800. _context61.next = 19;
  19801. break;
  19802. }
  19803. throw new Error(o);
  19804. case 19:
  19805. i(o);
  19806. case 20:
  19807. case "end":
  19808. return _context61.stop();
  19809. }
  19810. }
  19811. }, _callee61);
  19812. }));
  19813. return _Fs.apply(this, arguments);
  19814. }
  19815. function Ks(e) {
  19816. e._initPromiseHub || (e._initPromiseHub = new v({
  19817. createPromise: function createPromise() {
  19818. var t = Promise.resolve();
  19819. var n;
  19820. n = 1, t = new Promise(function (e) {
  19821. setTimeout(function () {
  19822. e();
  19823. }, n);
  19824. });
  19825. var s = e.auth();
  19826. return t.then(function () {
  19827. return s.getLoginState();
  19828. }).then(function (e) {
  19829. return e ? Promise.resolve() : s.signInAnonymously();
  19830. });
  19831. }
  19832. }));
  19833. }
  19834. var js = {
  19835. tcb: It,
  19836. tencent: It,
  19837. aliyun: de,
  19838. private: bt,
  19839. alipay: Et
  19840. };
  19841. var $s = new ( /*#__PURE__*/function () {
  19842. function _class7() {
  19843. (0, _classCallCheck2.default)(this, _class7);
  19844. }
  19845. (0, _createClass2.default)(_class7, [{
  19846. key: "init",
  19847. value: function init(e) {
  19848. var t = {};
  19849. var n = js[e.provider];
  19850. if (!n) throw new Error("未提供正确的provider参数");
  19851. t = n.init(e), S && function (e) {
  19852. if (!S) return;
  19853. var t = {};
  19854. e.__dev__ = t, t.debugLog = S && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  19855. var n = T;
  19856. n && !n.code && (t.debugInfo = n);
  19857. var s = new v({
  19858. createPromise: function createPromise() {
  19859. return Fs(e);
  19860. }
  19861. });
  19862. t.initLocalNetwork = function () {
  19863. return s.exec();
  19864. };
  19865. }(t), Ks(t), Fn(t), function (e) {
  19866. var t = e.uploadFile;
  19867. e.uploadFile = function (e) {
  19868. return t.call(this, e);
  19869. };
  19870. }(t), function (e) {
  19871. e.database = function (t) {
  19872. if (t && Object.keys(t).length > 0) return e.init(t).database();
  19873. if (this._database) return this._database;
  19874. var n = Yn(Qn, {
  19875. uniClient: e
  19876. });
  19877. return this._database = n, n;
  19878. }, e.databaseForJQL = function (t) {
  19879. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  19880. if (this._databaseForJQL) return this._databaseForJQL;
  19881. var n = Yn(Qn, {
  19882. uniClient: e,
  19883. isJQL: !0
  19884. });
  19885. return this._databaseForJQL = n, n;
  19886. };
  19887. }(t), function (e) {
  19888. e.getCurrentUserInfo = Ps, e.chooseAndUploadFile = Cs.initChooseAndUploadFile(e), Object.assign(e, {
  19889. get mixinDatacom() {
  19890. return Os(e);
  19891. }
  19892. }), e.SSEChannel = Ms, e.initSecureNetworkByWeixin = Ns(e), e.importObject = Es(e);
  19893. }(t);
  19894. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  19895. if (!t[e]) return;
  19896. var n = t[e];
  19897. t[e] = function () {
  19898. return n.apply(t, Array.from(arguments));
  19899. }, t[e] = function (e, t) {
  19900. return function (n) {
  19901. var _this26 = this;
  19902. var s = !1;
  19903. if ("callFunction" === t) {
  19904. var _e29 = n && n.type || c;
  19905. s = _e29 !== c;
  19906. }
  19907. var r = "callFunction" === t && !s,
  19908. i = this._initPromiseHub.exec();
  19909. n = n || {};
  19910. var _ee2 = ee(n),
  19911. o = _ee2.success,
  19912. a = _ee2.fail,
  19913. u = _ee2.complete,
  19914. h = i.then(function () {
  19915. return s ? Promise.resolve() : M(q(t, "invoke"), n);
  19916. }).then(function () {
  19917. return e.call(_this26, n);
  19918. }).then(function (e) {
  19919. return s ? Promise.resolve(e) : M(q(t, "success"), e).then(function () {
  19920. return M(q(t, "complete"), e);
  19921. }).then(function () {
  19922. return r && Y(j, {
  19923. type: H,
  19924. content: e
  19925. }), Promise.resolve(e);
  19926. });
  19927. }, function (e) {
  19928. return s ? Promise.reject(e) : M(q(t, "fail"), e).then(function () {
  19929. return M(q(t, "complete"), e);
  19930. }).then(function () {
  19931. return Y(j, {
  19932. type: H,
  19933. content: e
  19934. }), Promise.reject(e);
  19935. });
  19936. });
  19937. if (!(o || a || u)) return h;
  19938. h.then(function (e) {
  19939. o && o(e), u && u(e), r && Y(j, {
  19940. type: H,
  19941. content: e
  19942. });
  19943. }, function (e) {
  19944. a && a(e), u && u(e), r && Y(j, {
  19945. type: H,
  19946. content: e
  19947. });
  19948. });
  19949. };
  19950. }(t[e], e).bind(t);
  19951. }), t.init = this.init, t;
  19952. }
  19953. }]);
  19954. return _class7;
  19955. }())();
  19956. (function () {
  19957. var e = C;
  19958. var t = {};
  19959. if (e && 1 === e.length) t = e[0], $s = $s.init(t), $s._isDefault = !0;else {
  19960. var _t20 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  19961. var _n18;
  19962. _n18 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t20.forEach(function (e) {
  19963. $s[e] = function () {
  19964. return console.error(_n18), Promise.reject(new te({
  19965. code: "SYS_ERR",
  19966. message: _n18
  19967. }));
  19968. };
  19969. });
  19970. }
  19971. Object.assign($s, {
  19972. get mixinDatacom() {
  19973. return Os($s);
  19974. }
  19975. }), Ss($s), $s.addInterceptor = N, $s.removeInterceptor = D, $s.interceptObject = F, S && "web" === P && (window.uniCloud = $s);
  19976. })();
  19977. var Bs = $s;
  19978. exports.default = Bs;
  19979. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  19980. /***/ }),
  19981. /* 184 */
  19982. /*!************************************************************************************************!*\
  19983. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  19984. \************************************************************************************************/
  19985. /*! no static exports found */
  19986. /***/ (function(module, exports, __webpack_require__) {
  19987. // TODO(Babel 8): Remove this file.
  19988. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 185)();
  19989. module.exports = runtime;
  19990. /***/ }),
  19991. /* 185 */
  19992. /*!*******************************************************************!*\
  19993. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  19994. \*******************************************************************/
  19995. /*! no static exports found */
  19996. /***/ (function(module, exports, __webpack_require__) {
  19997. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  19998. function _regeneratorRuntime() {
  19999. "use strict";
  20000. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  20001. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  20002. return e;
  20003. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20004. var t,
  20005. e = {},
  20006. r = Object.prototype,
  20007. n = r.hasOwnProperty,
  20008. o = Object.defineProperty || function (t, e, r) {
  20009. t[e] = r.value;
  20010. },
  20011. i = "function" == typeof Symbol ? Symbol : {},
  20012. a = i.iterator || "@@iterator",
  20013. c = i.asyncIterator || "@@asyncIterator",
  20014. u = i.toStringTag || "@@toStringTag";
  20015. function define(t, e, r) {
  20016. return Object.defineProperty(t, e, {
  20017. value: r,
  20018. enumerable: !0,
  20019. configurable: !0,
  20020. writable: !0
  20021. }), t[e];
  20022. }
  20023. try {
  20024. define({}, "");
  20025. } catch (t) {
  20026. define = function define(t, e, r) {
  20027. return t[e] = r;
  20028. };
  20029. }
  20030. function wrap(t, e, r, n) {
  20031. var i = e && e.prototype instanceof Generator ? e : Generator,
  20032. a = Object.create(i.prototype),
  20033. c = new Context(n || []);
  20034. return o(a, "_invoke", {
  20035. value: makeInvokeMethod(t, r, c)
  20036. }), a;
  20037. }
  20038. function tryCatch(t, e, r) {
  20039. try {
  20040. return {
  20041. type: "normal",
  20042. arg: t.call(e, r)
  20043. };
  20044. } catch (t) {
  20045. return {
  20046. type: "throw",
  20047. arg: t
  20048. };
  20049. }
  20050. }
  20051. e.wrap = wrap;
  20052. var h = "suspendedStart",
  20053. l = "suspendedYield",
  20054. f = "executing",
  20055. s = "completed",
  20056. y = {};
  20057. function Generator() {}
  20058. function GeneratorFunction() {}
  20059. function GeneratorFunctionPrototype() {}
  20060. var p = {};
  20061. define(p, a, function () {
  20062. return this;
  20063. });
  20064. var d = Object.getPrototypeOf,
  20065. v = d && d(d(values([])));
  20066. v && v !== r && n.call(v, a) && (p = v);
  20067. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  20068. function defineIteratorMethods(t) {
  20069. ["next", "throw", "return"].forEach(function (e) {
  20070. define(t, e, function (t) {
  20071. return this._invoke(e, t);
  20072. });
  20073. });
  20074. }
  20075. function AsyncIterator(t, e) {
  20076. function invoke(r, o, i, a) {
  20077. var c = tryCatch(t[r], t, o);
  20078. if ("throw" !== c.type) {
  20079. var u = c.arg,
  20080. h = u.value;
  20081. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  20082. invoke("next", t, i, a);
  20083. }, function (t) {
  20084. invoke("throw", t, i, a);
  20085. }) : e.resolve(h).then(function (t) {
  20086. u.value = t, i(u);
  20087. }, function (t) {
  20088. return invoke("throw", t, i, a);
  20089. });
  20090. }
  20091. a(c.arg);
  20092. }
  20093. var r;
  20094. o(this, "_invoke", {
  20095. value: function value(t, n) {
  20096. function callInvokeWithMethodAndArg() {
  20097. return new e(function (e, r) {
  20098. invoke(t, n, e, r);
  20099. });
  20100. }
  20101. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  20102. }
  20103. });
  20104. }
  20105. function makeInvokeMethod(e, r, n) {
  20106. var o = h;
  20107. return function (i, a) {
  20108. if (o === f) throw Error("Generator is already running");
  20109. if (o === s) {
  20110. if ("throw" === i) throw a;
  20111. return {
  20112. value: t,
  20113. done: !0
  20114. };
  20115. }
  20116. for (n.method = i, n.arg = a;;) {
  20117. var c = n.delegate;
  20118. if (c) {
  20119. var u = maybeInvokeDelegate(c, n);
  20120. if (u) {
  20121. if (u === y) continue;
  20122. return u;
  20123. }
  20124. }
  20125. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  20126. if (o === h) throw o = s, n.arg;
  20127. n.dispatchException(n.arg);
  20128. } else "return" === n.method && n.abrupt("return", n.arg);
  20129. o = f;
  20130. var p = tryCatch(e, r, n);
  20131. if ("normal" === p.type) {
  20132. if (o = n.done ? s : l, p.arg === y) continue;
  20133. return {
  20134. value: p.arg,
  20135. done: n.done
  20136. };
  20137. }
  20138. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  20139. }
  20140. };
  20141. }
  20142. function maybeInvokeDelegate(e, r) {
  20143. var n = r.method,
  20144. o = e.iterator[n];
  20145. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  20146. var i = tryCatch(o, e.iterator, r.arg);
  20147. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  20148. var a = i.arg;
  20149. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  20150. }
  20151. function pushTryEntry(t) {
  20152. var e = {
  20153. tryLoc: t[0]
  20154. };
  20155. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  20156. }
  20157. function resetTryEntry(t) {
  20158. var e = t.completion || {};
  20159. e.type = "normal", delete e.arg, t.completion = e;
  20160. }
  20161. function Context(t) {
  20162. this.tryEntries = [{
  20163. tryLoc: "root"
  20164. }], t.forEach(pushTryEntry, this), this.reset(!0);
  20165. }
  20166. function values(e) {
  20167. if (e || "" === e) {
  20168. var r = e[a];
  20169. if (r) return r.call(e);
  20170. if ("function" == typeof e.next) return e;
  20171. if (!isNaN(e.length)) {
  20172. var o = -1,
  20173. i = function next() {
  20174. for (; ++o < e.length;) {
  20175. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  20176. }
  20177. return next.value = t, next.done = !0, next;
  20178. };
  20179. return i.next = i;
  20180. }
  20181. }
  20182. throw new TypeError(_typeof(e) + " is not iterable");
  20183. }
  20184. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  20185. value: GeneratorFunctionPrototype,
  20186. configurable: !0
  20187. }), o(GeneratorFunctionPrototype, "constructor", {
  20188. value: GeneratorFunction,
  20189. configurable: !0
  20190. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  20191. var e = "function" == typeof t && t.constructor;
  20192. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  20193. }, e.mark = function (t) {
  20194. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  20195. }, e.awrap = function (t) {
  20196. return {
  20197. __await: t
  20198. };
  20199. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  20200. return this;
  20201. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  20202. void 0 === i && (i = Promise);
  20203. var a = new AsyncIterator(wrap(t, r, n, o), i);
  20204. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  20205. return t.done ? t.value : a.next();
  20206. });
  20207. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  20208. return this;
  20209. }), define(g, "toString", function () {
  20210. return "[object Generator]";
  20211. }), e.keys = function (t) {
  20212. var e = Object(t),
  20213. r = [];
  20214. for (var n in e) {
  20215. r.push(n);
  20216. }
  20217. return r.reverse(), function next() {
  20218. for (; r.length;) {
  20219. var t = r.pop();
  20220. if (t in e) return next.value = t, next.done = !1, next;
  20221. }
  20222. return next.done = !0, next;
  20223. };
  20224. }, e.values = values, Context.prototype = {
  20225. constructor: Context,
  20226. reset: function reset(e) {
  20227. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  20228. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  20229. }
  20230. },
  20231. stop: function stop() {
  20232. this.done = !0;
  20233. var t = this.tryEntries[0].completion;
  20234. if ("throw" === t.type) throw t.arg;
  20235. return this.rval;
  20236. },
  20237. dispatchException: function dispatchException(e) {
  20238. if (this.done) throw e;
  20239. var r = this;
  20240. function handle(n, o) {
  20241. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  20242. }
  20243. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  20244. var i = this.tryEntries[o],
  20245. a = i.completion;
  20246. if ("root" === i.tryLoc) return handle("end");
  20247. if (i.tryLoc <= this.prev) {
  20248. var c = n.call(i, "catchLoc"),
  20249. u = n.call(i, "finallyLoc");
  20250. if (c && u) {
  20251. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  20252. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  20253. } else if (c) {
  20254. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  20255. } else {
  20256. if (!u) throw Error("try statement without catch or finally");
  20257. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  20258. }
  20259. }
  20260. }
  20261. },
  20262. abrupt: function abrupt(t, e) {
  20263. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  20264. var o = this.tryEntries[r];
  20265. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  20266. var i = o;
  20267. break;
  20268. }
  20269. }
  20270. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  20271. var a = i ? i.completion : {};
  20272. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  20273. },
  20274. complete: function complete(t, e) {
  20275. if ("throw" === t.type) throw t.arg;
  20276. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  20277. },
  20278. finish: function finish(t) {
  20279. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  20280. var r = this.tryEntries[e];
  20281. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  20282. }
  20283. },
  20284. "catch": function _catch(t) {
  20285. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  20286. var r = this.tryEntries[e];
  20287. if (r.tryLoc === t) {
  20288. var n = r.completion;
  20289. if ("throw" === n.type) {
  20290. var o = n.arg;
  20291. resetTryEntry(r);
  20292. }
  20293. return o;
  20294. }
  20295. }
  20296. throw Error("illegal catch attempt");
  20297. },
  20298. delegateYield: function delegateYield(e, r, n) {
  20299. return this.delegate = {
  20300. iterator: values(e),
  20301. resultName: r,
  20302. nextLoc: n
  20303. }, "next" === this.method && (this.arg = t), y;
  20304. }
  20305. }, e;
  20306. }
  20307. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20308. /***/ }),
  20309. /* 186 */
  20310. /*!**********************************************************************!*\
  20311. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  20312. \**********************************************************************/
  20313. /*! no static exports found */
  20314. /***/ (function(module, exports) {
  20315. function _assertThisInitialized(self) {
  20316. if (self === void 0) {
  20317. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  20318. }
  20319. return self;
  20320. }
  20321. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20322. /***/ }),
  20323. /* 187 */
  20324. /*!*****************************************************************!*\
  20325. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  20326. \*****************************************************************/
  20327. /*! no static exports found */
  20328. /***/ (function(module, exports) {
  20329. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  20330. try {
  20331. var info = gen[key](arg);
  20332. var value = info.value;
  20333. } catch (error) {
  20334. reject(error);
  20335. return;
  20336. }
  20337. if (info.done) {
  20338. resolve(value);
  20339. } else {
  20340. Promise.resolve(value).then(_next, _throw);
  20341. }
  20342. }
  20343. function _asyncToGenerator(fn) {
  20344. return function () {
  20345. var self = this,
  20346. args = arguments;
  20347. return new Promise(function (resolve, reject) {
  20348. var gen = fn.apply(self, args);
  20349. function _next(value) {
  20350. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  20351. }
  20352. function _throw(err) {
  20353. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  20354. }
  20355. _next(undefined);
  20356. });
  20357. };
  20358. }
  20359. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20360. /***/ }),
  20361. /* 188 */
  20362. /*!*********************************************************!*\
  20363. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  20364. \*********************************************************/
  20365. /*! no static exports found */
  20366. /***/ (function(module, exports, __webpack_require__) {
  20367. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  20368. function _inherits(subClass, superClass) {
  20369. if (typeof superClass !== "function" && superClass !== null) {
  20370. throw new TypeError("Super expression must either be null or a function");
  20371. }
  20372. subClass.prototype = Object.create(superClass && superClass.prototype, {
  20373. constructor: {
  20374. value: subClass,
  20375. writable: true,
  20376. configurable: true
  20377. }
  20378. });
  20379. Object.defineProperty(subClass, "prototype", {
  20380. writable: false
  20381. });
  20382. if (superClass) setPrototypeOf(subClass, superClass);
  20383. }
  20384. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20385. /***/ }),
  20386. /* 189 */
  20387. /*!**************************************************************************!*\
  20388. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  20389. \**************************************************************************/
  20390. /*! no static exports found */
  20391. /***/ (function(module, exports, __webpack_require__) {
  20392. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  20393. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 186);
  20394. function _possibleConstructorReturn(self, call) {
  20395. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  20396. return call;
  20397. } else if (call !== void 0) {
  20398. throw new TypeError("Derived constructors may only return object or undefined");
  20399. }
  20400. return assertThisInitialized(self);
  20401. }
  20402. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20403. /***/ }),
  20404. /* 190 */
  20405. /*!***************************************************************!*\
  20406. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  20407. \***************************************************************/
  20408. /*! no static exports found */
  20409. /***/ (function(module, exports) {
  20410. function _getPrototypeOf(o) {
  20411. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  20412. return o.__proto__ || Object.getPrototypeOf(o);
  20413. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20414. return _getPrototypeOf(o);
  20415. }
  20416. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20417. /***/ }),
  20418. /* 191 */
  20419. /*!****************************************************************!*\
  20420. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  20421. \****************************************************************/
  20422. /*! no static exports found */
  20423. /***/ (function(module, exports, __webpack_require__) {
  20424. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 190);
  20425. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  20426. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 192);
  20427. var construct = __webpack_require__(/*! ./construct.js */ 15);
  20428. function _wrapNativeSuper(Class) {
  20429. var _cache = typeof Map === "function" ? new Map() : undefined;
  20430. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  20431. if (Class === null || !isNativeFunction(Class)) return Class;
  20432. if (typeof Class !== "function") {
  20433. throw new TypeError("Super expression must either be null or a function");
  20434. }
  20435. if (typeof _cache !== "undefined") {
  20436. if (_cache.has(Class)) return _cache.get(Class);
  20437. _cache.set(Class, Wrapper);
  20438. }
  20439. function Wrapper() {
  20440. return construct(Class, arguments, getPrototypeOf(this).constructor);
  20441. }
  20442. Wrapper.prototype = Object.create(Class.prototype, {
  20443. constructor: {
  20444. value: Wrapper,
  20445. enumerable: false,
  20446. writable: true,
  20447. configurable: true
  20448. }
  20449. });
  20450. return setPrototypeOf(Wrapper, Class);
  20451. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20452. return _wrapNativeSuper(Class);
  20453. }
  20454. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20455. /***/ }),
  20456. /* 192 */
  20457. /*!*****************************************************************!*\
  20458. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  20459. \*****************************************************************/
  20460. /*! no static exports found */
  20461. /***/ (function(module, exports) {
  20462. function _isNativeFunction(fn) {
  20463. try {
  20464. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  20465. } catch (e) {
  20466. return typeof fn === "function";
  20467. }
  20468. }
  20469. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20470. /***/ }),
  20471. /* 193 */
  20472. /*!**********************************************************************************************************!*\
  20473. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/pages.json?{"type":"origin-pages-json"} ***!
  20474. \**********************************************************************************************************/
  20475. /*! no static exports found */
  20476. /***/ (function(module, exports, __webpack_require__) {
  20477. "use strict";
  20478. Object.defineProperty(exports, "__esModule", {
  20479. value: true
  20480. });
  20481. exports.default = void 0;
  20482. var _default = {
  20483. "pages": [{
  20484. "path": "pages/index/index",
  20485. "style": {
  20486. "navigationBarTitleText": "首页"
  20487. }
  20488. }, {
  20489. "path": "pages/login/login",
  20490. "style": {
  20491. "navigationBarTitleText": "登录"
  20492. }
  20493. }, {
  20494. "path": "pages/order/order",
  20495. "style": {
  20496. "navigationBarTitleText": "工单"
  20497. }
  20498. }, {
  20499. "path": "pages/my/my",
  20500. "style": {
  20501. "navigationBarTitleText": "我的"
  20502. }
  20503. }, {
  20504. "path": "pages/message/message",
  20505. "style": {
  20506. "navigationBarTitleText": "消息"
  20507. }
  20508. }, {
  20509. "path": "pages/house/house",
  20510. "style": {
  20511. "navigationBarTitleText": "房源列表"
  20512. }
  20513. }, {
  20514. "path": "pages/houseDetail/houseDetail",
  20515. "style": {
  20516. "navigationBarTitleText": "房源详情"
  20517. }
  20518. }, {
  20519. "path": "pages/messageList/messageList",
  20520. "style": {
  20521. "navigationBarTitleText": "消息列表"
  20522. }
  20523. }, {
  20524. "path": "pages/messageDetail/messageDetail",
  20525. "style": {
  20526. "navigationBarTitleText": "消息详情"
  20527. }
  20528. }, {
  20529. "path": "pages/projectList/projectList",
  20530. "style": {
  20531. "navigationBarTitleText": "项目列表"
  20532. }
  20533. }],
  20534. "tabBar": {
  20535. "color": "#3a3a3a",
  20536. "selectedColor": "#3371FF",
  20537. "list": [{
  20538. "text": "首页",
  20539. "pagePath": "pages/index/index",
  20540. "iconPath": "static/image/tabbar/index.png",
  20541. "selectedIconPath": "static/image/tabbar/index-active.png"
  20542. }, {
  20543. "text": "工单",
  20544. "pagePath": "pages/order/order",
  20545. "iconPath": "static/image/tabbar/order.png",
  20546. "selectedIconPath": "static/image/tabbar/order-active.png"
  20547. }, {
  20548. "text": "通知",
  20549. "pagePath": "pages/message/message",
  20550. "iconPath": "static/image/tabbar/message.png",
  20551. "selectedIconPath": "static/image/tabbar/message-active.png"
  20552. }, {
  20553. "text": "我的",
  20554. "pagePath": "pages/my/my",
  20555. "iconPath": "static/image/tabbar/my.png",
  20556. "selectedIconPath": "static/image/tabbar/my-active.png"
  20557. }]
  20558. },
  20559. "globalStyle": {
  20560. "navigationBarTextStyle": "black",
  20561. "navigationBarTitleText": "有极物业",
  20562. "navigationBarBackgroundColor": "#ffffff",
  20563. "backgroundColor": "#F8F8F8"
  20564. }
  20565. };
  20566. exports.default = _default;
  20567. /***/ }),
  20568. /* 194 */
  20569. /*!*********************************************************************************************!*\
  20570. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/pages.json?{"type":"stat"} ***!
  20571. \*********************************************************************************************/
  20572. /*! no static exports found */
  20573. /***/ (function(module, exports, __webpack_require__) {
  20574. "use strict";
  20575. Object.defineProperty(exports, "__esModule", {
  20576. value: true
  20577. });
  20578. exports.default = void 0;
  20579. var _default = {
  20580. "appid": "__UNI__E00CD61"
  20581. };
  20582. exports.default = _default;
  20583. /***/ }),
  20584. /* 195 */,
  20585. /* 196 */,
  20586. /* 197 */,
  20587. /* 198 */,
  20588. /* 199 */,
  20589. /* 200 */,
  20590. /* 201 */,
  20591. /* 202 */
  20592. /*!***********************************************************************************************************************************!*\
  20593. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  20594. \***********************************************************************************************************************************/
  20595. /*! no static exports found */
  20596. /***/ (function(module, exports, __webpack_require__) {
  20597. "use strict";
  20598. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20599. Object.defineProperty(exports, "__esModule", {
  20600. value: true
  20601. });
  20602. exports.default = void 0;
  20603. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 203));
  20604. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 204));
  20605. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 205));
  20606. var _default = {
  20607. en: _en.default,
  20608. 'zh-Hans': _zhHans.default,
  20609. 'zh-Hant': _zhHant.default
  20610. };
  20611. exports.default = _default;
  20612. /***/ }),
  20613. /* 203 */
  20614. /*!**********************************************************************************************************************************!*\
  20615. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  20616. \**********************************************************************************************************************************/
  20617. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20618. /***/ (function(module) {
  20619. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"Pull up to show more\",\"uni-load-more.contentrefresh\":\"loading...\",\"uni-load-more.contentnomore\":\"No more data\"}");
  20620. /***/ }),
  20621. /* 204 */
  20622. /*!***************************************************************************************************************************************!*\
  20623. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  20624. \***************************************************************************************************************************************/
  20625. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20626. /***/ (function(module) {
  20627. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  20628. /***/ }),
  20629. /* 205 */
  20630. /*!***************************************************************************************************************************************!*\
  20631. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  20632. \***************************************************************************************************************************************/
  20633. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20634. /***/ (function(module) {
  20635. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  20636. /***/ })
  20637. ]]);
  20638. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map