vendor.js 837 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 103:
  53. /*!*************************************************************************!*\
  54. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/common/jsencrypt.js ***!
  55. \*************************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  60. Object.defineProperty(exports, "__esModule", {
  61. value: true
  62. });
  63. exports.decrypt = decrypt;
  64. exports.encrypt = encrypt;
  65. var _jsencrypt = _interopRequireDefault(__webpack_require__(/*! jsencrypt/bin/jsencrypt.min */ 104));
  66. // 密钥对生成 http://web.chacuo.net/netrsakeypair
  67. var publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' + 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==';
  68. var privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' + '7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' + 'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' + 'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' + 'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' + 'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' + 'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' + 'UP8iWi1Qw0Y=';
  69. // 加密
  70. function encrypt(txt) {
  71. var encryptor = new _jsencrypt.default();
  72. encryptor.setPublicKey(publicKey); // 设置公钥
  73. return encryptor.encrypt(txt); // 对数据进行加密
  74. }
  75. // 解密
  76. function decrypt(txt) {
  77. var encryptor = new _jsencrypt.default();
  78. encryptor.setPrivateKey(privateKey); // 设置私钥
  79. return encryptor.decrypt(txt); // 对数据进行解密
  80. }
  81. /***/ }),
  82. /***/ 104:
  83. /*!*************************************************************************************************!*\
  84. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/node_modules/jsencrypt/bin/jsencrypt.min.js ***!
  85. \*************************************************************************************************/
  86. /*! no static exports found */
  87. /***/ (function(module, exports, __webpack_require__) {
  88. /* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  89. /*! For license information please see jsencrypt.min.js.LICENSE.txt */
  90. !function (t, e) {
  91. "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = e() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e),
  92. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  93. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  94. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  95. }(window, function () {
  96. return function () {
  97. var t = {
  98. 155: function _(t) {
  99. var e,
  100. i,
  101. r = t.exports = {};
  102. function n() {
  103. throw new Error("setTimeout has not been defined");
  104. }
  105. function s() {
  106. throw new Error("clearTimeout has not been defined");
  107. }
  108. function o(t) {
  109. if (e === setTimeout) return setTimeout(t, 0);
  110. if ((e === n || !e) && setTimeout) return e = setTimeout, setTimeout(t, 0);
  111. try {
  112. return e(t, 0);
  113. } catch (i) {
  114. try {
  115. return e.call(null, t, 0);
  116. } catch (i) {
  117. return e.call(this, t, 0);
  118. }
  119. }
  120. }
  121. !function () {
  122. try {
  123. e = "function" == typeof setTimeout ? setTimeout : n;
  124. } catch (t) {
  125. e = n;
  126. }
  127. try {
  128. i = "function" == typeof clearTimeout ? clearTimeout : s;
  129. } catch (t) {
  130. i = s;
  131. }
  132. }();
  133. var h,
  134. a = [],
  135. u = !1,
  136. c = -1;
  137. function f() {
  138. u && h && (u = !1, h.length ? a = h.concat(a) : c = -1, a.length && l());
  139. }
  140. function l() {
  141. if (!u) {
  142. var t = o(f);
  143. u = !0;
  144. for (var e = a.length; e;) {
  145. for (h = a, a = []; ++c < e;) {
  146. h && h[c].run();
  147. }
  148. c = -1, e = a.length;
  149. }
  150. h = null, u = !1, function (t) {
  151. if (i === clearTimeout) return clearTimeout(t);
  152. if ((i === s || !i) && clearTimeout) return i = clearTimeout, clearTimeout(t);
  153. try {
  154. return i(t);
  155. } catch (e) {
  156. try {
  157. return i.call(null, t);
  158. } catch (e) {
  159. return i.call(this, t);
  160. }
  161. }
  162. }(t);
  163. }
  164. }
  165. function p(t, e) {
  166. this.fun = t, this.array = e;
  167. }
  168. function g() {}
  169. r.nextTick = function (t) {
  170. var e = new Array(arguments.length - 1);
  171. if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) {
  172. e[i - 1] = arguments[i];
  173. }
  174. a.push(new p(t, e)), 1 !== a.length || u || o(l);
  175. }, p.prototype.run = function () {
  176. this.fun.apply(null, this.array);
  177. }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener = g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener = g, r.listeners = function (t) {
  178. return [];
  179. }, r.binding = function (t) {
  180. throw new Error("process.binding is not supported");
  181. }, r.cwd = function () {
  182. return "/";
  183. }, r.chdir = function (t) {
  184. throw new Error("process.chdir is not supported");
  185. }, r.umask = function () {
  186. return 0;
  187. };
  188. }
  189. },
  190. e = {};
  191. function i(r) {
  192. var n = e[r];
  193. if (void 0 !== n) return n.exports;
  194. var s = e[r] = {
  195. exports: {}
  196. };
  197. return t[r](s, s.exports, i), s.exports;
  198. }
  199. i.d = function (t, e) {
  200. for (var r in e) {
  201. i.o(e, r) && !i.o(t, r) && Object.defineProperty(t, r, {
  202. enumerable: !0,
  203. get: e[r]
  204. });
  205. }
  206. }, i.o = function (t, e) {
  207. return Object.prototype.hasOwnProperty.call(t, e);
  208. };
  209. var r = {};
  210. return function () {
  211. "use strict";
  212. i.d(r, {
  213. default: function _default() {
  214. return ct;
  215. }
  216. });
  217. var t = "0123456789abcdefghijklmnopqrstuvwxyz";
  218. function e(e) {
  219. return t.charAt(e);
  220. }
  221. function n(t, e) {
  222. return t & e;
  223. }
  224. function s(t, e) {
  225. return t | e;
  226. }
  227. function o(t, e) {
  228. return t ^ e;
  229. }
  230. function h(t, e) {
  231. return t & ~e;
  232. }
  233. function a(t) {
  234. if (0 == t) return -1;
  235. var e = 0;
  236. return 0 == (65535 & t) && (t >>= 16, e += 16), 0 == (255 & t) && (t >>= 8, e += 8), 0 == (15 & t) && (t >>= 4, e += 4), 0 == (3 & t) && (t >>= 2, e += 2), 0 == (1 & t) && ++e, e;
  237. }
  238. function u(t) {
  239. for (var e = 0; 0 != t;) {
  240. t &= t - 1, ++e;
  241. }
  242. return e;
  243. }
  244. var c,
  245. f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  246. l = "=";
  247. function p(t) {
  248. var e,
  249. i,
  250. r = "";
  251. for (e = 0; e + 3 <= t.length; e += 3) {
  252. i = parseInt(t.substring(e, e + 3), 16), r += f.charAt(i >> 6) + f.charAt(63 & i);
  253. }
  254. for (e + 1 == t.length ? (i = parseInt(t.substring(e, e + 1), 16), r += f.charAt(i << 2)) : e + 2 == t.length && (i = parseInt(t.substring(e, e + 2), 16), r += f.charAt(i >> 2) + f.charAt((3 & i) << 4)); (3 & r.length) > 0;) {
  255. r += l;
  256. }
  257. return r;
  258. }
  259. function g(t) {
  260. var i,
  261. r = "",
  262. n = 0,
  263. s = 0;
  264. for (i = 0; i < t.length && t.charAt(i) != l; ++i) {
  265. var o = f.indexOf(t.charAt(i));
  266. o < 0 || (0 == n ? (r += e(o >> 2), s = 3 & o, n = 1) : 1 == n ? (r += e(s << 2 | o >> 4), s = 15 & o, n = 2) : 2 == n ? (r += e(s), r += e(o >> 2), s = 3 & o, n = 3) : (r += e(s << 2 | o >> 4), r += e(15 & o), n = 0));
  267. }
  268. return 1 == n && (r += e(s << 2)), r;
  269. }
  270. var d,
  271. v = {
  272. decode: function decode(t) {
  273. var e;
  274. if (void 0 === d) {
  275. var i = "= \f\n\r\t\xA0\u2028\u2029";
  276. for (d = Object.create(null), e = 0; e < 64; ++e) {
  277. d["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)] = e;
  278. }
  279. for (d["-"] = 62, d._ = 63, e = 0; e < i.length; ++e) {
  280. d[i.charAt(e)] = -1;
  281. }
  282. }
  283. var r = [],
  284. n = 0,
  285. s = 0;
  286. for (e = 0; e < t.length; ++e) {
  287. var o = t.charAt(e);
  288. if ("=" == o) break;
  289. if (-1 != (o = d[o])) {
  290. if (void 0 === o) throw new Error("Illegal character at offset " + e);
  291. n |= o, ++s >= 4 ? (r[r.length] = n >> 16, r[r.length] = n >> 8 & 255, r[r.length] = 255 & n, n = 0, s = 0) : n <<= 6;
  292. }
  293. }
  294. switch (s) {
  295. case 1:
  296. throw new Error("Base64 encoding incomplete: at least 2 bits missing");
  297. case 2:
  298. r[r.length] = n >> 10;
  299. break;
  300. case 3:
  301. r[r.length] = n >> 16, r[r.length] = n >> 8 & 255;
  302. }
  303. return r;
  304. },
  305. re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  306. unarmor: function unarmor(t) {
  307. var e = v.re.exec(t);
  308. if (e) if (e[1]) t = e[1];else {
  309. if (!e[2]) throw new Error("RegExp out of sync");
  310. t = e[2];
  311. }
  312. return v.decode(t);
  313. }
  314. },
  315. m = 1e13,
  316. y = function () {
  317. function t(t) {
  318. this.buf = [+t || 0];
  319. }
  320. return t.prototype.mulAdd = function (t, e) {
  321. var i,
  322. r,
  323. n = this.buf,
  324. s = n.length;
  325. for (i = 0; i < s; ++i) {
  326. (r = n[i] * t + e) < m ? e = 0 : r -= (e = 0 | r / m) * m, n[i] = r;
  327. }
  328. e > 0 && (n[i] = e);
  329. }, t.prototype.sub = function (t) {
  330. var e,
  331. i,
  332. r = this.buf,
  333. n = r.length;
  334. for (e = 0; e < n; ++e) {
  335. (i = r[e] - t) < 0 ? (i += m, t = 1) : t = 0, r[e] = i;
  336. }
  337. for (; 0 === r[r.length - 1];) {
  338. r.pop();
  339. }
  340. }, t.prototype.toString = function (t) {
  341. if (10 != (t || 10)) throw new Error("only base 10 is supported");
  342. for (var e = this.buf, i = e[e.length - 1].toString(), r = e.length - 2; r >= 0; --r) {
  343. i += (m + e[r]).toString().substring(1);
  344. }
  345. return i;
  346. }, t.prototype.valueOf = function () {
  347. for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i) {
  348. e = e * m + t[i];
  349. }
  350. return e;
  351. }, t.prototype.simplify = function () {
  352. var t = this.buf;
  353. return 1 == t.length ? t[0] : this;
  354. }, t;
  355. }(),
  356. b = "…",
  357. T = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  358. S = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
  359. function E(t, e) {
  360. return t.length > e && (t = t.substring(0, e) + b), t;
  361. }
  362. var w,
  363. D = function () {
  364. function t(e, i) {
  365. this.hexDigits = "0123456789ABCDEF", e instanceof t ? (this.enc = e.enc, this.pos = e.pos) : (this.enc = e, this.pos = i);
  366. }
  367. return t.prototype.get = function (t) {
  368. if (void 0 === t && (t = this.pos++), t >= this.enc.length) throw new Error("Requesting byte offset ".concat(t, " on a stream of length ").concat(this.enc.length));
  369. return "string" == typeof this.enc ? this.enc.charCodeAt(t) : this.enc[t];
  370. }, t.prototype.hexByte = function (t) {
  371. return this.hexDigits.charAt(t >> 4 & 15) + this.hexDigits.charAt(15 & t);
  372. }, t.prototype.hexDump = function (t, e, i) {
  373. for (var r = "", n = t; n < e; ++n) {
  374. if (r += this.hexByte(this.get(n)), !0 !== i) switch (15 & n) {
  375. case 7:
  376. r += " ";
  377. break;
  378. case 15:
  379. r += "\n";
  380. break;
  381. default:
  382. r += " ";
  383. }
  384. }
  385. return r;
  386. }, t.prototype.isASCII = function (t, e) {
  387. for (var i = t; i < e; ++i) {
  388. var r = this.get(i);
  389. if (r < 32 || r > 176) return !1;
  390. }
  391. return !0;
  392. }, t.prototype.parseStringISO = function (t, e) {
  393. for (var i = "", r = t; r < e; ++r) {
  394. i += String.fromCharCode(this.get(r));
  395. }
  396. return i;
  397. }, t.prototype.parseStringUTF = function (t, e) {
  398. for (var i = "", r = t; r < e;) {
  399. var n = this.get(r++);
  400. i += n < 128 ? String.fromCharCode(n) : n > 191 && n < 224 ? String.fromCharCode((31 & n) << 6 | 63 & this.get(r++)) : String.fromCharCode((15 & n) << 12 | (63 & this.get(r++)) << 6 | 63 & this.get(r++));
  401. }
  402. return i;
  403. }, t.prototype.parseStringBMP = function (t, e) {
  404. for (var i, r, n = "", s = t; s < e;) {
  405. i = this.get(s++), r = this.get(s++), n += String.fromCharCode(i << 8 | r);
  406. }
  407. return n;
  408. }, t.prototype.parseTime = function (t, e, i) {
  409. var r = this.parseStringISO(t, e),
  410. n = (i ? T : S).exec(r);
  411. return n ? (i && (n[1] = +n[1], n[1] += +n[1] < 70 ? 2e3 : 1900), r = n[1] + "-" + n[2] + "-" + n[3] + " " + n[4], n[5] && (r += ":" + n[5], n[6] && (r += ":" + n[6], n[7] && (r += "." + n[7]))), n[8] && (r += " UTC", "Z" != n[8] && (r += n[8], n[9] && (r += ":" + n[9]))), r) : "Unrecognized time: " + r;
  412. }, t.prototype.parseInteger = function (t, e) {
  413. for (var i, r = this.get(t), n = r > 127, s = n ? 255 : 0, o = ""; r == s && ++t < e;) {
  414. r = this.get(t);
  415. }
  416. if (0 == (i = e - t)) return n ? -1 : 0;
  417. if (i > 4) {
  418. for (o = r, i <<= 3; 0 == (128 & (+o ^ s));) {
  419. o = +o << 1, --i;
  420. }
  421. o = "(" + i + " bit)\n";
  422. }
  423. n && (r -= 256);
  424. for (var h = new y(r), a = t + 1; a < e; ++a) {
  425. h.mulAdd(256, this.get(a));
  426. }
  427. return o + h.toString();
  428. }, t.prototype.parseBitString = function (t, e, i) {
  429. for (var r = this.get(t), n = "(" + ((e - t - 1 << 3) - r) + " bit)\n", s = "", o = t + 1; o < e; ++o) {
  430. for (var h = this.get(o), a = o == e - 1 ? r : 0, u = 7; u >= a; --u) {
  431. s += h >> u & 1 ? "1" : "0";
  432. }
  433. if (s.length > i) return n + E(s, i);
  434. }
  435. return n + s;
  436. }, t.prototype.parseOctetString = function (t, e, i) {
  437. if (this.isASCII(t, e)) return E(this.parseStringISO(t, e), i);
  438. var r = e - t,
  439. n = "(" + r + " byte)\n";
  440. r > (i /= 2) && (e = t + i);
  441. for (var s = t; s < e; ++s) {
  442. n += this.hexByte(this.get(s));
  443. }
  444. return r > i && (n += b), n;
  445. }, t.prototype.parseOID = function (t, e, i) {
  446. for (var r = "", n = new y(), s = 0, o = t; o < e; ++o) {
  447. var h = this.get(o);
  448. if (n.mulAdd(128, 127 & h), s += 7, !(128 & h)) {
  449. if ("" === r) {
  450. if ((n = n.simplify()) instanceof y) n.sub(80), r = "2." + n.toString();else {
  451. var a = n < 80 ? n < 40 ? 0 : 1 : 2;
  452. r = a + "." + (n - 40 * a);
  453. }
  454. } else r += "." + n.toString();
  455. if (r.length > i) return E(r, i);
  456. n = new y(), s = 0;
  457. }
  458. }
  459. return s > 0 && (r += ".incomplete"), r;
  460. }, t;
  461. }(),
  462. x = function () {
  463. function t(t, e, i, r, n) {
  464. if (!(r instanceof R)) throw new Error("Invalid tag value.");
  465. this.stream = t, this.header = e, this.length = i, this.tag = r, this.sub = n;
  466. }
  467. return t.prototype.typeName = function () {
  468. switch (this.tag.tagClass) {
  469. case 0:
  470. switch (this.tag.tagNumber) {
  471. case 0:
  472. return "EOC";
  473. case 1:
  474. return "BOOLEAN";
  475. case 2:
  476. return "INTEGER";
  477. case 3:
  478. return "BIT_STRING";
  479. case 4:
  480. return "OCTET_STRING";
  481. case 5:
  482. return "NULL";
  483. case 6:
  484. return "OBJECT_IDENTIFIER";
  485. case 7:
  486. return "ObjectDescriptor";
  487. case 8:
  488. return "EXTERNAL";
  489. case 9:
  490. return "REAL";
  491. case 10:
  492. return "ENUMERATED";
  493. case 11:
  494. return "EMBEDDED_PDV";
  495. case 12:
  496. return "UTF8String";
  497. case 16:
  498. return "SEQUENCE";
  499. case 17:
  500. return "SET";
  501. case 18:
  502. return "NumericString";
  503. case 19:
  504. return "PrintableString";
  505. case 20:
  506. return "TeletexString";
  507. case 21:
  508. return "VideotexString";
  509. case 22:
  510. return "IA5String";
  511. case 23:
  512. return "UTCTime";
  513. case 24:
  514. return "GeneralizedTime";
  515. case 25:
  516. return "GraphicString";
  517. case 26:
  518. return "VisibleString";
  519. case 27:
  520. return "GeneralString";
  521. case 28:
  522. return "UniversalString";
  523. case 30:
  524. return "BMPString";
  525. }
  526. return "Universal_" + this.tag.tagNumber.toString();
  527. case 1:
  528. return "Application_" + this.tag.tagNumber.toString();
  529. case 2:
  530. return "[" + this.tag.tagNumber.toString() + "]";
  531. case 3:
  532. return "Private_" + this.tag.tagNumber.toString();
  533. }
  534. }, t.prototype.content = function (t) {
  535. if (void 0 === this.tag) return null;
  536. void 0 === t && (t = 1 / 0);
  537. var e = this.posContent(),
  538. i = Math.abs(this.length);
  539. if (!this.tag.isUniversal()) return null !== this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + i, t);
  540. switch (this.tag.tagNumber) {
  541. case 1:
  542. return 0 === this.stream.get(e) ? "false" : "true";
  543. case 2:
  544. return this.stream.parseInteger(e, e + i);
  545. case 3:
  546. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(e, e + i, t);
  547. case 4:
  548. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + i, t);
  549. case 6:
  550. return this.stream.parseOID(e, e + i, t);
  551. case 16:
  552. case 17:
  553. return null !== this.sub ? "(" + this.sub.length + " elem)" : "(no elem)";
  554. case 12:
  555. return E(this.stream.parseStringUTF(e, e + i), t);
  556. case 18:
  557. case 19:
  558. case 20:
  559. case 21:
  560. case 22:
  561. case 26:
  562. return E(this.stream.parseStringISO(e, e + i), t);
  563. case 30:
  564. return E(this.stream.parseStringBMP(e, e + i), t);
  565. case 23:
  566. case 24:
  567. return this.stream.parseTime(e, e + i, 23 == this.tag.tagNumber);
  568. }
  569. return null;
  570. }, t.prototype.toString = function () {
  571. return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]";
  572. }, t.prototype.toPrettyString = function (t) {
  573. void 0 === t && (t = "");
  574. var e = t + this.typeName() + " @" + this.stream.pos;
  575. if (this.length >= 0 && (e += "+"), e += this.length, this.tag.tagConstructed ? e += " (constructed)" : !this.tag.isUniversal() || 3 != this.tag.tagNumber && 4 != this.tag.tagNumber || null === this.sub || (e += " (encapsulates)"), e += "\n", null !== this.sub) {
  576. t += " ";
  577. for (var i = 0, r = this.sub.length; i < r; ++i) {
  578. e += this.sub[i].toPrettyString(t);
  579. }
  580. }
  581. return e;
  582. }, t.prototype.posStart = function () {
  583. return this.stream.pos;
  584. }, t.prototype.posContent = function () {
  585. return this.stream.pos + this.header;
  586. }, t.prototype.posEnd = function () {
  587. return this.stream.pos + this.header + Math.abs(this.length);
  588. }, t.prototype.toHexString = function () {
  589. return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
  590. }, t.decodeLength = function (t) {
  591. var e = t.get(),
  592. i = 127 & e;
  593. if (i == e) return i;
  594. if (i > 6) throw new Error("Length over 48 bits not supported at position " + (t.pos - 1));
  595. if (0 === i) return null;
  596. e = 0;
  597. for (var r = 0; r < i; ++r) {
  598. e = 256 * e + t.get();
  599. }
  600. return e;
  601. }, t.prototype.getHexStringValue = function () {
  602. var t = this.toHexString(),
  603. e = 2 * this.header,
  604. i = 2 * this.length;
  605. return t.substr(e, i);
  606. }, t.decode = function (e) {
  607. var i;
  608. i = e instanceof D ? e : new D(e, 0);
  609. var r = new D(i),
  610. n = new R(i),
  611. s = t.decodeLength(i),
  612. o = i.pos,
  613. h = o - r.pos,
  614. a = null,
  615. u = function u() {
  616. var e = [];
  617. if (null !== s) {
  618. for (var r = o + s; i.pos < r;) {
  619. e[e.length] = t.decode(i);
  620. }
  621. if (i.pos != r) throw new Error("Content size is not correct for container starting at offset " + o);
  622. } else try {
  623. for (;;) {
  624. var n = t.decode(i);
  625. if (n.tag.isEOC()) break;
  626. e[e.length] = n;
  627. }
  628. s = o - i.pos;
  629. } catch (t) {
  630. throw new Error("Exception while decoding undefined length content: " + t);
  631. }
  632. return e;
  633. };
  634. if (n.tagConstructed) a = u();else if (n.isUniversal() && (3 == n.tagNumber || 4 == n.tagNumber)) try {
  635. if (3 == n.tagNumber && 0 != i.get()) throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
  636. a = u();
  637. for (var c = 0; c < a.length; ++c) {
  638. if (a[c].tag.isEOC()) throw new Error("EOC is not supposed to be actual content.");
  639. }
  640. } catch (t) {
  641. a = null;
  642. }
  643. if (null === a) {
  644. if (null === s) throw new Error("We can't skip over an invalid tag with undefined length at offset " + o);
  645. i.pos = o + Math.abs(s);
  646. }
  647. return new t(r, h, s, n, a);
  648. }, t;
  649. }(),
  650. R = function () {
  651. function t(t) {
  652. var e = t.get();
  653. if (this.tagClass = e >> 6, this.tagConstructed = 0 != (32 & e), this.tagNumber = 31 & e, 31 == this.tagNumber) {
  654. var i = new y();
  655. do {
  656. e = t.get(), i.mulAdd(128, 127 & e);
  657. } while (128 & e);
  658. this.tagNumber = i.simplify();
  659. }
  660. }
  661. return t.prototype.isUniversal = function () {
  662. return 0 === this.tagClass;
  663. }, t.prototype.isEOC = function () {
  664. return 0 === this.tagClass && 0 === this.tagNumber;
  665. }, t;
  666. }(),
  667. B = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
  668. O = (1 << 26) / B[B.length - 1],
  669. A = function () {
  670. function t(t, e, i) {
  671. null != t && ("number" == typeof t ? this.fromNumber(t, e, i) : null == e && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, e));
  672. }
  673. return t.prototype.toString = function (t) {
  674. if (this.s < 0) return "-" + this.negate().toString(t);
  675. var i;
  676. if (16 == t) i = 4;else if (8 == t) i = 3;else if (2 == t) i = 1;else if (32 == t) i = 5;else {
  677. if (4 != t) return this.toRadix(t);
  678. i = 2;
  679. }
  680. var r,
  681. n = (1 << i) - 1,
  682. s = !1,
  683. o = "",
  684. h = this.t,
  685. a = this.DB - h * this.DB % i;
  686. if (h-- > 0) for (a < this.DB && (r = this[h] >> a) > 0 && (s = !0, o = e(r)); h >= 0;) {
  687. a < i ? (r = (this[h] & (1 << a) - 1) << i - a, r |= this[--h] >> (a += this.DB - i)) : (r = this[h] >> (a -= i) & n, a <= 0 && (a += this.DB, --h)), r > 0 && (s = !0), s && (o += e(r));
  688. }
  689. return s ? o : "0";
  690. }, t.prototype.negate = function () {
  691. var e = M();
  692. return t.ZERO.subTo(this, e), e;
  693. }, t.prototype.abs = function () {
  694. return this.s < 0 ? this.negate() : this;
  695. }, t.prototype.compareTo = function (t) {
  696. var e = this.s - t.s;
  697. if (0 != e) return e;
  698. var i = this.t;
  699. if (0 != (e = i - t.t)) return this.s < 0 ? -e : e;
  700. for (; --i >= 0;) {
  701. if (0 != (e = this[i] - t[i])) return e;
  702. }
  703. return 0;
  704. }, t.prototype.bitLength = function () {
  705. return this.t <= 0 ? 0 : this.DB * (this.t - 1) + K(this[this.t - 1] ^ this.s & this.DM);
  706. }, t.prototype.mod = function (e) {
  707. var i = M();
  708. return this.abs().divRemTo(e, null, i), this.s < 0 && i.compareTo(t.ZERO) > 0 && e.subTo(i, i), i;
  709. }, t.prototype.modPowInt = function (t, e) {
  710. var i;
  711. return i = t < 256 || e.isEven() ? new I(e) : new N(e), this.exp(t, i);
  712. }, t.prototype.clone = function () {
  713. var t = M();
  714. return this.copyTo(t), t;
  715. }, t.prototype.intValue = function () {
  716. if (this.s < 0) {
  717. if (1 == this.t) return this[0] - this.DV;
  718. if (0 == this.t) return -1;
  719. } else {
  720. if (1 == this.t) return this[0];
  721. if (0 == this.t) return 0;
  722. }
  723. return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
  724. }, t.prototype.byteValue = function () {
  725. return 0 == this.t ? this.s : this[0] << 24 >> 24;
  726. }, t.prototype.shortValue = function () {
  727. return 0 == this.t ? this.s : this[0] << 16 >> 16;
  728. }, t.prototype.signum = function () {
  729. return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1;
  730. }, t.prototype.toByteArray = function () {
  731. var t = this.t,
  732. e = [];
  733. e[0] = this.s;
  734. var i,
  735. r = this.DB - t * this.DB % 8,
  736. n = 0;
  737. if (t-- > 0) for (r < this.DB && (i = this[t] >> r) != (this.s & this.DM) >> r && (e[n++] = i | this.s << this.DB - r); t >= 0;) {
  738. r < 8 ? (i = (this[t] & (1 << r) - 1) << 8 - r, i |= this[--t] >> (r += this.DB - 8)) : (i = this[t] >> (r -= 8) & 255, r <= 0 && (r += this.DB, --t)), 0 != (128 & i) && (i |= -256), 0 == n && (128 & this.s) != (128 & i) && ++n, (n > 0 || i != this.s) && (e[n++] = i);
  739. }
  740. return e;
  741. }, t.prototype.equals = function (t) {
  742. return 0 == this.compareTo(t);
  743. }, t.prototype.min = function (t) {
  744. return this.compareTo(t) < 0 ? this : t;
  745. }, t.prototype.max = function (t) {
  746. return this.compareTo(t) > 0 ? this : t;
  747. }, t.prototype.and = function (t) {
  748. var e = M();
  749. return this.bitwiseTo(t, n, e), e;
  750. }, t.prototype.or = function (t) {
  751. var e = M();
  752. return this.bitwiseTo(t, s, e), e;
  753. }, t.prototype.xor = function (t) {
  754. var e = M();
  755. return this.bitwiseTo(t, o, e), e;
  756. }, t.prototype.andNot = function (t) {
  757. var e = M();
  758. return this.bitwiseTo(t, h, e), e;
  759. }, t.prototype.not = function () {
  760. for (var t = M(), e = 0; e < this.t; ++e) {
  761. t[e] = this.DM & ~this[e];
  762. }
  763. return t.t = this.t, t.s = ~this.s, t;
  764. }, t.prototype.shiftLeft = function (t) {
  765. var e = M();
  766. return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
  767. }, t.prototype.shiftRight = function (t) {
  768. var e = M();
  769. return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
  770. }, t.prototype.getLowestSetBit = function () {
  771. for (var t = 0; t < this.t; ++t) {
  772. if (0 != this[t]) return t * this.DB + a(this[t]);
  773. }
  774. return this.s < 0 ? this.t * this.DB : -1;
  775. }, t.prototype.bitCount = function () {
  776. for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i) {
  777. t += u(this[i] ^ e);
  778. }
  779. return t;
  780. }, t.prototype.testBit = function (t) {
  781. var e = Math.floor(t / this.DB);
  782. return e >= this.t ? 0 != this.s : 0 != (this[e] & 1 << t % this.DB);
  783. }, t.prototype.setBit = function (t) {
  784. return this.changeBit(t, s);
  785. }, t.prototype.clearBit = function (t) {
  786. return this.changeBit(t, h);
  787. }, t.prototype.flipBit = function (t) {
  788. return this.changeBit(t, o);
  789. }, t.prototype.add = function (t) {
  790. var e = M();
  791. return this.addTo(t, e), e;
  792. }, t.prototype.subtract = function (t) {
  793. var e = M();
  794. return this.subTo(t, e), e;
  795. }, t.prototype.multiply = function (t) {
  796. var e = M();
  797. return this.multiplyTo(t, e), e;
  798. }, t.prototype.divide = function (t) {
  799. var e = M();
  800. return this.divRemTo(t, e, null), e;
  801. }, t.prototype.remainder = function (t) {
  802. var e = M();
  803. return this.divRemTo(t, null, e), e;
  804. }, t.prototype.divideAndRemainder = function (t) {
  805. var e = M(),
  806. i = M();
  807. return this.divRemTo(t, e, i), [e, i];
  808. }, t.prototype.modPow = function (t, e) {
  809. var i,
  810. r,
  811. n = t.bitLength(),
  812. s = U(1);
  813. if (n <= 0) return s;
  814. i = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, r = n < 8 ? new I(e) : e.isEven() ? new P(e) : new N(e);
  815. var o = [],
  816. h = 3,
  817. a = i - 1,
  818. u = (1 << i) - 1;
  819. if (o[1] = r.convert(this), i > 1) {
  820. var c = M();
  821. for (r.sqrTo(o[1], c); h <= u;) {
  822. o[h] = M(), r.mulTo(c, o[h - 2], o[h]), h += 2;
  823. }
  824. }
  825. var f,
  826. l,
  827. p = t.t - 1,
  828. g = !0,
  829. d = M();
  830. for (n = K(t[p]) - 1; p >= 0;) {
  831. for (n >= a ? f = t[p] >> n - a & u : (f = (t[p] & (1 << n + 1) - 1) << a - n, p > 0 && (f |= t[p - 1] >> this.DB + n - a)), h = i; 0 == (1 & f);) {
  832. f >>= 1, --h;
  833. }
  834. if ((n -= h) < 0 && (n += this.DB, --p), g) o[f].copyTo(s), g = !1;else {
  835. for (; h > 1;) {
  836. r.sqrTo(s, d), r.sqrTo(d, s), h -= 2;
  837. }
  838. h > 0 ? r.sqrTo(s, d) : (l = s, s = d, d = l), r.mulTo(d, o[f], s);
  839. }
  840. for (; p >= 0 && 0 == (t[p] & 1 << n);) {
  841. r.sqrTo(s, d), l = s, s = d, d = l, --n < 0 && (n = this.DB - 1, --p);
  842. }
  843. }
  844. return r.revert(s);
  845. }, t.prototype.modInverse = function (e) {
  846. var i = e.isEven();
  847. if (this.isEven() && i || 0 == e.signum()) return t.ZERO;
  848. for (var r = e.clone(), n = this.clone(), s = U(1), o = U(0), h = U(0), a = U(1); 0 != r.signum();) {
  849. for (; r.isEven();) {
  850. r.rShiftTo(1, r), i ? (s.isEven() && o.isEven() || (s.addTo(this, s), o.subTo(e, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(e, o), o.rShiftTo(1, o);
  851. }
  852. for (; n.isEven();) {
  853. n.rShiftTo(1, n), i ? (h.isEven() && a.isEven() || (h.addTo(this, h), a.subTo(e, a)), h.rShiftTo(1, h)) : a.isEven() || a.subTo(e, a), a.rShiftTo(1, a);
  854. }
  855. r.compareTo(n) >= 0 ? (r.subTo(n, r), i && s.subTo(h, s), o.subTo(a, o)) : (n.subTo(r, n), i && h.subTo(s, h), a.subTo(o, a));
  856. }
  857. return 0 != n.compareTo(t.ONE) ? t.ZERO : a.compareTo(e) >= 0 ? a.subtract(e) : a.signum() < 0 ? (a.addTo(e, a), a.signum() < 0 ? a.add(e) : a) : a;
  858. }, t.prototype.pow = function (t) {
  859. return this.exp(t, new V());
  860. }, t.prototype.gcd = function (t) {
  861. var e = this.s < 0 ? this.negate() : this.clone(),
  862. i = t.s < 0 ? t.negate() : t.clone();
  863. if (e.compareTo(i) < 0) {
  864. var r = e;
  865. e = i, i = r;
  866. }
  867. var n = e.getLowestSetBit(),
  868. s = i.getLowestSetBit();
  869. if (s < 0) return e;
  870. for (n < s && (s = n), s > 0 && (e.rShiftTo(s, e), i.rShiftTo(s, i)); e.signum() > 0;) {
  871. (n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e), (n = i.getLowestSetBit()) > 0 && i.rShiftTo(n, i), e.compareTo(i) >= 0 ? (e.subTo(i, e), e.rShiftTo(1, e)) : (i.subTo(e, i), i.rShiftTo(1, i));
  872. }
  873. return s > 0 && i.lShiftTo(s, i), i;
  874. }, t.prototype.isProbablePrime = function (t) {
  875. var e,
  876. i = this.abs();
  877. if (1 == i.t && i[0] <= B[B.length - 1]) {
  878. for (e = 0; e < B.length; ++e) {
  879. if (i[0] == B[e]) return !0;
  880. }
  881. return !1;
  882. }
  883. if (i.isEven()) return !1;
  884. for (e = 1; e < B.length;) {
  885. for (var r = B[e], n = e + 1; n < B.length && r < O;) {
  886. r *= B[n++];
  887. }
  888. for (r = i.modInt(r); e < n;) {
  889. if (r % B[e++] == 0) return !1;
  890. }
  891. }
  892. return i.millerRabin(t);
  893. }, t.prototype.copyTo = function (t) {
  894. for (var e = this.t - 1; e >= 0; --e) {
  895. t[e] = this[e];
  896. }
  897. t.t = this.t, t.s = this.s;
  898. }, t.prototype.fromInt = function (t) {
  899. this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0;
  900. }, t.prototype.fromString = function (e, i) {
  901. var r;
  902. if (16 == i) r = 4;else if (8 == i) r = 3;else if (256 == i) r = 8;else if (2 == i) r = 1;else if (32 == i) r = 5;else {
  903. if (4 != i) return void this.fromRadix(e, i);
  904. r = 2;
  905. }
  906. this.t = 0, this.s = 0;
  907. for (var n = e.length, s = !1, o = 0; --n >= 0;) {
  908. var h = 8 == r ? 255 & +e[n] : F(e, n);
  909. h < 0 ? "-" == e.charAt(n) && (s = !0) : (s = !1, 0 == o ? this[this.t++] = h : o + r > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - o) - 1) << o, this[this.t++] = h >> this.DB - o) : this[this.t - 1] |= h << o, (o += r) >= this.DB && (o -= this.DB));
  910. }
  911. 8 == r && 0 != (128 & +e[0]) && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), s && t.ZERO.subTo(this, this);
  912. }, t.prototype.clamp = function () {
  913. for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;) {
  914. --this.t;
  915. }
  916. }, t.prototype.dlShiftTo = function (t, e) {
  917. var i;
  918. for (i = this.t - 1; i >= 0; --i) {
  919. e[i + t] = this[i];
  920. }
  921. for (i = t - 1; i >= 0; --i) {
  922. e[i] = 0;
  923. }
  924. e.t = this.t + t, e.s = this.s;
  925. }, t.prototype.drShiftTo = function (t, e) {
  926. for (var i = t; i < this.t; ++i) {
  927. e[i - t] = this[i];
  928. }
  929. e.t = Math.max(this.t - t, 0), e.s = this.s;
  930. }, t.prototype.lShiftTo = function (t, e) {
  931. for (var i = t % this.DB, r = this.DB - i, n = (1 << r) - 1, s = Math.floor(t / this.DB), o = this.s << i & this.DM, h = this.t - 1; h >= 0; --h) {
  932. e[h + s + 1] = this[h] >> r | o, o = (this[h] & n) << i;
  933. }
  934. for (h = s - 1; h >= 0; --h) {
  935. e[h] = 0;
  936. }
  937. e[s] = o, e.t = this.t + s + 1, e.s = this.s, e.clamp();
  938. }, t.prototype.rShiftTo = function (t, e) {
  939. e.s = this.s;
  940. var i = Math.floor(t / this.DB);
  941. if (i >= this.t) e.t = 0;else {
  942. var r = t % this.DB,
  943. n = this.DB - r,
  944. s = (1 << r) - 1;
  945. e[0] = this[i] >> r;
  946. for (var o = i + 1; o < this.t; ++o) {
  947. e[o - i - 1] |= (this[o] & s) << n, e[o - i] = this[o] >> r;
  948. }
  949. r > 0 && (e[this.t - i - 1] |= (this.s & s) << n), e.t = this.t - i, e.clamp();
  950. }
  951. }, t.prototype.subTo = function (t, e) {
  952. for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n;) {
  953. r += this[i] - t[i], e[i++] = r & this.DM, r >>= this.DB;
  954. }
  955. if (t.t < this.t) {
  956. for (r -= t.s; i < this.t;) {
  957. r += this[i], e[i++] = r & this.DM, r >>= this.DB;
  958. }
  959. r += this.s;
  960. } else {
  961. for (r += this.s; i < t.t;) {
  962. r -= t[i], e[i++] = r & this.DM, r >>= this.DB;
  963. }
  964. r -= t.s;
  965. }
  966. e.s = r < 0 ? -1 : 0, r < -1 ? e[i++] = this.DV + r : r > 0 && (e[i++] = r), e.t = i, e.clamp();
  967. }, t.prototype.multiplyTo = function (e, i) {
  968. var r = this.abs(),
  969. n = e.abs(),
  970. s = r.t;
  971. for (i.t = s + n.t; --s >= 0;) {
  972. i[s] = 0;
  973. }
  974. for (s = 0; s < n.t; ++s) {
  975. i[s + r.t] = r.am(0, n[s], i, s, 0, r.t);
  976. }
  977. i.s = 0, i.clamp(), this.s != e.s && t.ZERO.subTo(i, i);
  978. }, t.prototype.squareTo = function (t) {
  979. for (var e = this.abs(), i = t.t = 2 * e.t; --i >= 0;) {
  980. t[i] = 0;
  981. }
  982. for (i = 0; i < e.t - 1; ++i) {
  983. var r = e.am(i, e[i], t, 2 * i, 0, 1);
  984. (t[i + e.t] += e.am(i + 1, 2 * e[i], t, 2 * i + 1, r, e.t - i - 1)) >= e.DV && (t[i + e.t] -= e.DV, t[i + e.t + 1] = 1);
  985. }
  986. t.t > 0 && (t[t.t - 1] += e.am(i, e[i], t, 2 * i, 0, 1)), t.s = 0, t.clamp();
  987. }, t.prototype.divRemTo = function (e, i, r) {
  988. var n = e.abs();
  989. if (!(n.t <= 0)) {
  990. var s = this.abs();
  991. if (s.t < n.t) return null != i && i.fromInt(0), void (null != r && this.copyTo(r));
  992. null == r && (r = M());
  993. var o = M(),
  994. h = this.s,
  995. a = e.s,
  996. u = this.DB - K(n[n.t - 1]);
  997. u > 0 ? (n.lShiftTo(u, o), s.lShiftTo(u, r)) : (n.copyTo(o), s.copyTo(r));
  998. var c = o.t,
  999. f = o[c - 1];
  1000. if (0 != f) {
  1001. var l = f * (1 << this.F1) + (c > 1 ? o[c - 2] >> this.F2 : 0),
  1002. p = this.FV / l,
  1003. g = (1 << this.F1) / l,
  1004. d = 1 << this.F2,
  1005. v = r.t,
  1006. m = v - c,
  1007. y = null == i ? M() : i;
  1008. for (o.dlShiftTo(m, y), r.compareTo(y) >= 0 && (r[r.t++] = 1, r.subTo(y, r)), t.ONE.dlShiftTo(c, y), y.subTo(o, o); o.t < c;) {
  1009. o[o.t++] = 0;
  1010. }
  1011. for (; --m >= 0;) {
  1012. var b = r[--v] == f ? this.DM : Math.floor(r[v] * p + (r[v - 1] + d) * g);
  1013. if ((r[v] += o.am(0, b, r, m, 0, c)) < b) for (o.dlShiftTo(m, y), r.subTo(y, r); r[v] < --b;) {
  1014. r.subTo(y, r);
  1015. }
  1016. }
  1017. null != i && (r.drShiftTo(c, i), h != a && t.ZERO.subTo(i, i)), r.t = c, r.clamp(), u > 0 && r.rShiftTo(u, r), h < 0 && t.ZERO.subTo(r, r);
  1018. }
  1019. }
  1020. }, t.prototype.invDigit = function () {
  1021. if (this.t < 1) return 0;
  1022. var t = this[0];
  1023. if (0 == (1 & t)) return 0;
  1024. var e = 3 & t;
  1025. return (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) > 0 ? this.DV - e : -e;
  1026. }, t.prototype.isEven = function () {
  1027. return 0 == (this.t > 0 ? 1 & this[0] : this.s);
  1028. }, t.prototype.exp = function (e, i) {
  1029. if (e > 4294967295 || e < 1) return t.ONE;
  1030. var r = M(),
  1031. n = M(),
  1032. s = i.convert(this),
  1033. o = K(e) - 1;
  1034. for (s.copyTo(r); --o >= 0;) {
  1035. if (i.sqrTo(r, n), (e & 1 << o) > 0) i.mulTo(n, s, r);else {
  1036. var h = r;
  1037. r = n, n = h;
  1038. }
  1039. }
  1040. return i.revert(r);
  1041. }, t.prototype.chunkSize = function (t) {
  1042. return Math.floor(Math.LN2 * this.DB / Math.log(t));
  1043. }, t.prototype.toRadix = function (t) {
  1044. if (null == t && (t = 10), 0 == this.signum() || t < 2 || t > 36) return "0";
  1045. var e = this.chunkSize(t),
  1046. i = Math.pow(t, e),
  1047. r = U(i),
  1048. n = M(),
  1049. s = M(),
  1050. o = "";
  1051. for (this.divRemTo(r, n, s); n.signum() > 0;) {
  1052. o = (i + s.intValue()).toString(t).substr(1) + o, n.divRemTo(r, n, s);
  1053. }
  1054. return s.intValue().toString(t) + o;
  1055. }, t.prototype.fromRadix = function (e, i) {
  1056. this.fromInt(0), null == i && (i = 10);
  1057. for (var r = this.chunkSize(i), n = Math.pow(i, r), s = !1, o = 0, h = 0, a = 0; a < e.length; ++a) {
  1058. var u = F(e, a);
  1059. u < 0 ? "-" == e.charAt(a) && 0 == this.signum() && (s = !0) : (h = i * h + u, ++o >= r && (this.dMultiply(n), this.dAddOffset(h, 0), o = 0, h = 0));
  1060. }
  1061. o > 0 && (this.dMultiply(Math.pow(i, o)), this.dAddOffset(h, 0)), s && t.ZERO.subTo(this, this);
  1062. }, t.prototype.fromNumber = function (e, i, r) {
  1063. if ("number" == typeof i) {
  1064. if (e < 2) this.fromInt(1);else for (this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(i);) {
  1065. this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(t.ONE.shiftLeft(e - 1), this);
  1066. }
  1067. } else {
  1068. var n = [],
  1069. o = 7 & e;
  1070. n.length = 1 + (e >> 3), i.nextBytes(n), o > 0 ? n[0] &= (1 << o) - 1 : n[0] = 0, this.fromString(n, 256);
  1071. }
  1072. }, t.prototype.bitwiseTo = function (t, e, i) {
  1073. var r,
  1074. n,
  1075. s = Math.min(t.t, this.t);
  1076. for (r = 0; r < s; ++r) {
  1077. i[r] = e(this[r], t[r]);
  1078. }
  1079. if (t.t < this.t) {
  1080. for (n = t.s & this.DM, r = s; r < this.t; ++r) {
  1081. i[r] = e(this[r], n);
  1082. }
  1083. i.t = this.t;
  1084. } else {
  1085. for (n = this.s & this.DM, r = s; r < t.t; ++r) {
  1086. i[r] = e(n, t[r]);
  1087. }
  1088. i.t = t.t;
  1089. }
  1090. i.s = e(this.s, t.s), i.clamp();
  1091. }, t.prototype.changeBit = function (e, i) {
  1092. var r = t.ONE.shiftLeft(e);
  1093. return this.bitwiseTo(r, i, r), r;
  1094. }, t.prototype.addTo = function (t, e) {
  1095. for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n;) {
  1096. r += this[i] + t[i], e[i++] = r & this.DM, r >>= this.DB;
  1097. }
  1098. if (t.t < this.t) {
  1099. for (r += t.s; i < this.t;) {
  1100. r += this[i], e[i++] = r & this.DM, r >>= this.DB;
  1101. }
  1102. r += this.s;
  1103. } else {
  1104. for (r += this.s; i < t.t;) {
  1105. r += t[i], e[i++] = r & this.DM, r >>= this.DB;
  1106. }
  1107. r += t.s;
  1108. }
  1109. e.s = r < 0 ? -1 : 0, r > 0 ? e[i++] = r : r < -1 && (e[i++] = this.DV + r), e.t = i, e.clamp();
  1110. }, t.prototype.dMultiply = function (t) {
  1111. this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp();
  1112. }, t.prototype.dAddOffset = function (t, e) {
  1113. if (0 != t) {
  1114. for (; this.t <= e;) {
  1115. this[this.t++] = 0;
  1116. }
  1117. for (this[e] += t; this[e] >= this.DV;) {
  1118. this[e] -= this.DV, ++e >= this.t && (this[this.t++] = 0), ++this[e];
  1119. }
  1120. }
  1121. }, t.prototype.multiplyLowerTo = function (t, e, i) {
  1122. var r = Math.min(this.t + t.t, e);
  1123. for (i.s = 0, i.t = r; r > 0;) {
  1124. i[--r] = 0;
  1125. }
  1126. for (var n = i.t - this.t; r < n; ++r) {
  1127. i[r + this.t] = this.am(0, t[r], i, r, 0, this.t);
  1128. }
  1129. for (n = Math.min(t.t, e); r < n; ++r) {
  1130. this.am(0, t[r], i, r, 0, e - r);
  1131. }
  1132. i.clamp();
  1133. }, t.prototype.multiplyUpperTo = function (t, e, i) {
  1134. --e;
  1135. var r = i.t = this.t + t.t - e;
  1136. for (i.s = 0; --r >= 0;) {
  1137. i[r] = 0;
  1138. }
  1139. for (r = Math.max(e - this.t, 0); r < t.t; ++r) {
  1140. i[this.t + r - e] = this.am(e - r, t[r], i, 0, 0, this.t + r - e);
  1141. }
  1142. i.clamp(), i.drShiftTo(1, i);
  1143. }, t.prototype.modInt = function (t) {
  1144. if (t <= 0) return 0;
  1145. var e = this.DV % t,
  1146. i = this.s < 0 ? t - 1 : 0;
  1147. if (this.t > 0) if (0 == e) i = this[0] % t;else for (var r = this.t - 1; r >= 0; --r) {
  1148. i = (e * i + this[r]) % t;
  1149. }
  1150. return i;
  1151. }, t.prototype.millerRabin = function (e) {
  1152. var i = this.subtract(t.ONE),
  1153. r = i.getLowestSetBit();
  1154. if (r <= 0) return !1;
  1155. var n = i.shiftRight(r);
  1156. (e = e + 1 >> 1) > B.length && (e = B.length);
  1157. for (var s = M(), o = 0; o < e; ++o) {
  1158. s.fromInt(B[Math.floor(Math.random() * B.length)]);
  1159. var h = s.modPow(n, this);
  1160. if (0 != h.compareTo(t.ONE) && 0 != h.compareTo(i)) {
  1161. for (var a = 1; a++ < r && 0 != h.compareTo(i);) {
  1162. if (0 == (h = h.modPowInt(2, this)).compareTo(t.ONE)) return !1;
  1163. }
  1164. if (0 != h.compareTo(i)) return !1;
  1165. }
  1166. }
  1167. return !0;
  1168. }, t.prototype.square = function () {
  1169. var t = M();
  1170. return this.squareTo(t), t;
  1171. }, t.prototype.gcda = function (t, e) {
  1172. var i = this.s < 0 ? this.negate() : this.clone(),
  1173. r = t.s < 0 ? t.negate() : t.clone();
  1174. if (i.compareTo(r) < 0) {
  1175. var n = i;
  1176. i = r, r = n;
  1177. }
  1178. var s = i.getLowestSetBit(),
  1179. o = r.getLowestSetBit();
  1180. if (o < 0) e(i);else {
  1181. s < o && (o = s), o > 0 && (i.rShiftTo(o, i), r.rShiftTo(o, r));
  1182. var h = function h() {
  1183. (s = i.getLowestSetBit()) > 0 && i.rShiftTo(s, i), (s = r.getLowestSetBit()) > 0 && r.rShiftTo(s, r), i.compareTo(r) >= 0 ? (i.subTo(r, i), i.rShiftTo(1, i)) : (r.subTo(i, r), r.rShiftTo(1, r)), i.signum() > 0 ? setTimeout(h, 0) : (o > 0 && r.lShiftTo(o, r), setTimeout(function () {
  1184. e(r);
  1185. }, 0));
  1186. };
  1187. setTimeout(h, 10);
  1188. }
  1189. }, t.prototype.fromNumberAsync = function (e, i, r, n) {
  1190. if ("number" == typeof i) {
  1191. if (e < 2) this.fromInt(1);else {
  1192. this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this), this.isEven() && this.dAddOffset(1, 0);
  1193. var o = this,
  1194. h = function h() {
  1195. o.dAddOffset(2, 0), o.bitLength() > e && o.subTo(t.ONE.shiftLeft(e - 1), o), o.isProbablePrime(i) ? setTimeout(function () {
  1196. n();
  1197. }, 0) : setTimeout(h, 0);
  1198. };
  1199. setTimeout(h, 0);
  1200. }
  1201. } else {
  1202. var a = [],
  1203. u = 7 & e;
  1204. a.length = 1 + (e >> 3), i.nextBytes(a), u > 0 ? a[0] &= (1 << u) - 1 : a[0] = 0, this.fromString(a, 256);
  1205. }
  1206. }, t;
  1207. }(),
  1208. V = function () {
  1209. function t() {}
  1210. return t.prototype.convert = function (t) {
  1211. return t;
  1212. }, t.prototype.revert = function (t) {
  1213. return t;
  1214. }, t.prototype.mulTo = function (t, e, i) {
  1215. t.multiplyTo(e, i);
  1216. }, t.prototype.sqrTo = function (t, e) {
  1217. t.squareTo(e);
  1218. }, t;
  1219. }(),
  1220. I = function () {
  1221. function t(t) {
  1222. this.m = t;
  1223. }
  1224. return t.prototype.convert = function (t) {
  1225. return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
  1226. }, t.prototype.revert = function (t) {
  1227. return t;
  1228. }, t.prototype.reduce = function (t) {
  1229. t.divRemTo(this.m, null, t);
  1230. }, t.prototype.mulTo = function (t, e, i) {
  1231. t.multiplyTo(e, i), this.reduce(i);
  1232. }, t.prototype.sqrTo = function (t, e) {
  1233. t.squareTo(e), this.reduce(e);
  1234. }, t;
  1235. }(),
  1236. N = function () {
  1237. function t(t) {
  1238. this.m = t, this.mp = t.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
  1239. }
  1240. return t.prototype.convert = function (t) {
  1241. var e = M();
  1242. return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(A.ZERO) > 0 && this.m.subTo(e, e), e;
  1243. }, t.prototype.revert = function (t) {
  1244. var e = M();
  1245. return t.copyTo(e), this.reduce(e), e;
  1246. }, t.prototype.reduce = function (t) {
  1247. for (; t.t <= this.mt2;) {
  1248. t[t.t++] = 0;
  1249. }
  1250. for (var e = 0; e < this.m.t; ++e) {
  1251. var i = 32767 & t[e],
  1252. r = i * this.mpl + ((i * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
  1253. for (t[i = e + this.m.t] += this.m.am(0, r, t, e, 0, this.m.t); t[i] >= t.DV;) {
  1254. t[i] -= t.DV, t[++i]++;
  1255. }
  1256. }
  1257. t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
  1258. }, t.prototype.mulTo = function (t, e, i) {
  1259. t.multiplyTo(e, i), this.reduce(i);
  1260. }, t.prototype.sqrTo = function (t, e) {
  1261. t.squareTo(e), this.reduce(e);
  1262. }, t;
  1263. }(),
  1264. P = function () {
  1265. function t(t) {
  1266. this.m = t, this.r2 = M(), this.q3 = M(), A.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
  1267. }
  1268. return t.prototype.convert = function (t) {
  1269. if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
  1270. if (t.compareTo(this.m) < 0) return t;
  1271. var e = M();
  1272. return t.copyTo(e), this.reduce(e), e;
  1273. }, t.prototype.revert = function (t) {
  1274. return t;
  1275. }, t.prototype.reduce = function (t) {
  1276. for (t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0;) {
  1277. t.dAddOffset(1, this.m.t + 1);
  1278. }
  1279. for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0;) {
  1280. t.subTo(this.m, t);
  1281. }
  1282. }, t.prototype.mulTo = function (t, e, i) {
  1283. t.multiplyTo(e, i), this.reduce(i);
  1284. }, t.prototype.sqrTo = function (t, e) {
  1285. t.squareTo(e), this.reduce(e);
  1286. }, t;
  1287. }();
  1288. function M() {
  1289. return new A(null);
  1290. }
  1291. function L(t, e) {
  1292. return new A(t, e);
  1293. }
  1294. var j = "undefined" != typeof navigator;
  1295. j && "Microsoft Internet Explorer" == navigator.appName ? (A.prototype.am = function (t, e, i, r, n, s) {
  1296. for (var o = 32767 & e, h = e >> 15; --s >= 0;) {
  1297. var a = 32767 & this[t],
  1298. u = this[t++] >> 15,
  1299. c = h * a + u * o;
  1300. n = ((a = o * a + ((32767 & c) << 15) + i[r] + (1073741823 & n)) >>> 30) + (c >>> 15) + h * u + (n >>> 30), i[r++] = 1073741823 & a;
  1301. }
  1302. return n;
  1303. }, w = 30) : j && "Netscape" != navigator.appName ? (A.prototype.am = function (t, e, i, r, n, s) {
  1304. for (; --s >= 0;) {
  1305. var o = e * this[t++] + i[r] + n;
  1306. n = Math.floor(o / 67108864), i[r++] = 67108863 & o;
  1307. }
  1308. return n;
  1309. }, w = 26) : (A.prototype.am = function (t, e, i, r, n, s) {
  1310. for (var o = 16383 & e, h = e >> 14; --s >= 0;) {
  1311. var a = 16383 & this[t],
  1312. u = this[t++] >> 14,
  1313. c = h * a + u * o;
  1314. n = ((a = o * a + ((16383 & c) << 14) + i[r] + n) >> 28) + (c >> 14) + h * u, i[r++] = 268435455 & a;
  1315. }
  1316. return n;
  1317. }, w = 28), A.prototype.DB = w, A.prototype.DM = (1 << w) - 1, A.prototype.DV = 1 << w, A.prototype.FV = Math.pow(2, 52), A.prototype.F1 = 52 - w, A.prototype.F2 = 2 * w - 52;
  1318. var q,
  1319. H,
  1320. C = [];
  1321. for (q = "0".charCodeAt(0), H = 0; H <= 9; ++H) {
  1322. C[q++] = H;
  1323. }
  1324. for (q = "a".charCodeAt(0), H = 10; H < 36; ++H) {
  1325. C[q++] = H;
  1326. }
  1327. for (q = "A".charCodeAt(0), H = 10; H < 36; ++H) {
  1328. C[q++] = H;
  1329. }
  1330. function F(t, e) {
  1331. var i = C[t.charCodeAt(e)];
  1332. return null == i ? -1 : i;
  1333. }
  1334. function U(t) {
  1335. var e = M();
  1336. return e.fromInt(t), e;
  1337. }
  1338. function K(t) {
  1339. var e,
  1340. i = 1;
  1341. return 0 != (e = t >>> 16) && (t = e, i += 16), 0 != (e = t >> 8) && (t = e, i += 8), 0 != (e = t >> 4) && (t = e, i += 4), 0 != (e = t >> 2) && (t = e, i += 2), 0 != (e = t >> 1) && (t = e, i += 1), i;
  1342. }
  1343. A.ZERO = U(0), A.ONE = U(1);
  1344. var k,
  1345. _,
  1346. z = function () {
  1347. function t() {
  1348. this.i = 0, this.j = 0, this.S = [];
  1349. }
  1350. return t.prototype.init = function (t) {
  1351. var e, i, r;
  1352. for (e = 0; e < 256; ++e) {
  1353. this.S[e] = e;
  1354. }
  1355. for (i = 0, e = 0; e < 256; ++e) {
  1356. i = i + this.S[e] + t[e % t.length] & 255, r = this.S[e], this.S[e] = this.S[i], this.S[i] = r;
  1357. }
  1358. this.i = 0, this.j = 0;
  1359. }, t.prototype.next = function () {
  1360. var t;
  1361. return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255];
  1362. }, t;
  1363. }(),
  1364. Z = 256,
  1365. G = null;
  1366. if (null == G) {
  1367. G = [], _ = 0;
  1368. var $ = void 0;
  1369. if ("undefined" != typeof window && window.crypto && window.crypto.getRandomValues) {
  1370. var Y = new Uint32Array(256);
  1371. for (window.crypto.getRandomValues(Y), $ = 0; $ < Y.length; ++$) {
  1372. G[_++] = 255 & Y[$];
  1373. }
  1374. }
  1375. var J = 0,
  1376. X = function X(t) {
  1377. if ((J = J || 0) >= 256 || _ >= Z) window.removeEventListener ? window.removeEventListener("mousemove", X, !1) : window.detachEvent && window.detachEvent("onmousemove", X);else try {
  1378. var e = t.x + t.y;
  1379. G[_++] = 255 & e, J += 1;
  1380. } catch (t) {}
  1381. };
  1382. "undefined" != typeof window && (window.addEventListener ? window.addEventListener("mousemove", X, !1) : window.attachEvent && window.attachEvent("onmousemove", X));
  1383. }
  1384. function Q() {
  1385. if (null == k) {
  1386. for (k = new z(); _ < Z;) {
  1387. var t = Math.floor(65536 * Math.random());
  1388. G[_++] = 255 & t;
  1389. }
  1390. for (k.init(G), _ = 0; _ < G.length; ++_) {
  1391. G[_] = 0;
  1392. }
  1393. _ = 0;
  1394. }
  1395. return k.next();
  1396. }
  1397. var W = function () {
  1398. function t() {}
  1399. return t.prototype.nextBytes = function (t) {
  1400. for (var e = 0; e < t.length; ++e) {
  1401. t[e] = Q();
  1402. }
  1403. }, t;
  1404. }(),
  1405. tt = function () {
  1406. function t() {
  1407. this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
  1408. }
  1409. return t.prototype.doPublic = function (t) {
  1410. return t.modPowInt(this.e, this.n);
  1411. }, t.prototype.doPrivate = function (t) {
  1412. if (null == this.p || null == this.q) return t.modPow(this.d, this.n);
  1413. for (var e = t.mod(this.p).modPow(this.dmp1, this.p), i = t.mod(this.q).modPow(this.dmq1, this.q); e.compareTo(i) < 0;) {
  1414. e = e.add(this.p);
  1415. }
  1416. return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i);
  1417. }, t.prototype.setPublic = function (t, e) {
  1418. null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = L(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
  1419. }, t.prototype.encrypt = function (t) {
  1420. var e = this.n.bitLength() + 7 >> 3,
  1421. i = function (t, e) {
  1422. if (e < t.length + 11) return console.error("Message too long for RSA"), null;
  1423. for (var i = [], r = t.length - 1; r >= 0 && e > 0;) {
  1424. var n = t.charCodeAt(r--);
  1425. n < 128 ? i[--e] = n : n > 127 && n < 2048 ? (i[--e] = 63 & n | 128, i[--e] = n >> 6 | 192) : (i[--e] = 63 & n | 128, i[--e] = n >> 6 & 63 | 128, i[--e] = n >> 12 | 224);
  1426. }
  1427. i[--e] = 0;
  1428. for (var s = new W(), o = []; e > 2;) {
  1429. for (o[0] = 0; 0 == o[0];) {
  1430. s.nextBytes(o);
  1431. }
  1432. i[--e] = o[0];
  1433. }
  1434. return i[--e] = 2, i[--e] = 0, new A(i);
  1435. }(t, e);
  1436. if (null == i) return null;
  1437. var r = this.doPublic(i);
  1438. if (null == r) return null;
  1439. for (var n = r.toString(16), s = n.length, o = 0; o < 2 * e - s; o++) {
  1440. n = "0" + n;
  1441. }
  1442. return n;
  1443. }, t.prototype.setPrivate = function (t, e, i) {
  1444. null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = L(t, 16), this.e = parseInt(e, 16), this.d = L(i, 16)) : console.error("Invalid RSA private key");
  1445. }, t.prototype.setPrivateEx = function (t, e, i, r, n, s, o, h) {
  1446. null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = L(t, 16), this.e = parseInt(e, 16), this.d = L(i, 16), this.p = L(r, 16), this.q = L(n, 16), this.dmp1 = L(s, 16), this.dmq1 = L(o, 16), this.coeff = L(h, 16)) : console.error("Invalid RSA private key");
  1447. }, t.prototype.generate = function (t, e) {
  1448. var i = new W(),
  1449. r = t >> 1;
  1450. this.e = parseInt(e, 16);
  1451. for (var n = new A(e, 16);;) {
  1452. for (; this.p = new A(t - r, 1, i), 0 != this.p.subtract(A.ONE).gcd(n).compareTo(A.ONE) || !this.p.isProbablePrime(10);) {
  1453. ;
  1454. }
  1455. for (; this.q = new A(r, 1, i), 0 != this.q.subtract(A.ONE).gcd(n).compareTo(A.ONE) || !this.q.isProbablePrime(10);) {
  1456. ;
  1457. }
  1458. if (this.p.compareTo(this.q) <= 0) {
  1459. var s = this.p;
  1460. this.p = this.q, this.q = s;
  1461. }
  1462. var o = this.p.subtract(A.ONE),
  1463. h = this.q.subtract(A.ONE),
  1464. a = o.multiply(h);
  1465. if (0 == a.gcd(n).compareTo(A.ONE)) {
  1466. this.n = this.p.multiply(this.q), this.d = n.modInverse(a), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(h), this.coeff = this.q.modInverse(this.p);
  1467. break;
  1468. }
  1469. }
  1470. }, t.prototype.decrypt = function (t) {
  1471. var e = L(t, 16),
  1472. i = this.doPrivate(e);
  1473. return null == i ? null : function (t, e) {
  1474. for (var i = t.toByteArray(), r = 0; r < i.length && 0 == i[r];) {
  1475. ++r;
  1476. }
  1477. if (i.length - r != e - 1 || 2 != i[r]) return null;
  1478. for (++r; 0 != i[r];) {
  1479. if (++r >= i.length) return null;
  1480. }
  1481. for (var n = ""; ++r < i.length;) {
  1482. var s = 255 & i[r];
  1483. s < 128 ? n += String.fromCharCode(s) : s > 191 && s < 224 ? (n += String.fromCharCode((31 & s) << 6 | 63 & i[r + 1]), ++r) : (n += String.fromCharCode((15 & s) << 12 | (63 & i[r + 1]) << 6 | 63 & i[r + 2]), r += 2);
  1484. }
  1485. return n;
  1486. }(i, this.n.bitLength() + 7 >> 3);
  1487. }, t.prototype.generateAsync = function (t, e, i) {
  1488. var r = new W(),
  1489. n = t >> 1;
  1490. this.e = parseInt(e, 16);
  1491. var s = new A(e, 16),
  1492. o = this,
  1493. h = function h() {
  1494. var e = function e() {
  1495. if (o.p.compareTo(o.q) <= 0) {
  1496. var t = o.p;
  1497. o.p = o.q, o.q = t;
  1498. }
  1499. var e = o.p.subtract(A.ONE),
  1500. r = o.q.subtract(A.ONE),
  1501. n = e.multiply(r);
  1502. 0 == n.gcd(s).compareTo(A.ONE) ? (o.n = o.p.multiply(o.q), o.d = s.modInverse(n), o.dmp1 = o.d.mod(e), o.dmq1 = o.d.mod(r), o.coeff = o.q.modInverse(o.p), setTimeout(function () {
  1503. i();
  1504. }, 0)) : setTimeout(h, 0);
  1505. },
  1506. a = function a() {
  1507. o.q = M(), o.q.fromNumberAsync(n, 1, r, function () {
  1508. o.q.subtract(A.ONE).gcda(s, function (t) {
  1509. 0 == t.compareTo(A.ONE) && o.q.isProbablePrime(10) ? setTimeout(e, 0) : setTimeout(a, 0);
  1510. });
  1511. });
  1512. },
  1513. u = function u() {
  1514. o.p = M(), o.p.fromNumberAsync(t - n, 1, r, function () {
  1515. o.p.subtract(A.ONE).gcda(s, function (t) {
  1516. 0 == t.compareTo(A.ONE) && o.p.isProbablePrime(10) ? setTimeout(a, 0) : setTimeout(u, 0);
  1517. });
  1518. });
  1519. };
  1520. setTimeout(u, 0);
  1521. };
  1522. setTimeout(h, 0);
  1523. }, t.prototype.sign = function (t, e, i) {
  1524. var r = function (t, e) {
  1525. if (e < t.length + 22) return console.error("Message too long for RSA"), null;
  1526. for (var i = e - t.length - 6, r = "", n = 0; n < i; n += 2) {
  1527. r += "ff";
  1528. }
  1529. return L("0001" + r + "00" + t, 16);
  1530. }((et[i] || "") + e(t).toString(), this.n.bitLength() / 4);
  1531. if (null == r) return null;
  1532. var n = this.doPrivate(r);
  1533. if (null == n) return null;
  1534. var s = n.toString(16);
  1535. return 0 == (1 & s.length) ? s : "0" + s;
  1536. }, t.prototype.verify = function (t, e, i) {
  1537. var r = L(e, 16),
  1538. n = this.doPublic(r);
  1539. return null == n ? null : function (t) {
  1540. for (var e in et) {
  1541. if (et.hasOwnProperty(e)) {
  1542. var i = et[e],
  1543. r = i.length;
  1544. if (t.substr(0, r) == i) return t.substr(r);
  1545. }
  1546. }
  1547. return t;
  1548. }(n.toString(16).replace(/^1f+00/, "")) == i(t).toString();
  1549. }, t;
  1550. }(),
  1551. et = {
  1552. md2: "3020300c06082a864886f70d020205000410",
  1553. md5: "3020300c06082a864886f70d020505000410",
  1554. sha1: "3021300906052b0e03021a05000414",
  1555. sha224: "302d300d06096086480165030402040500041c",
  1556. sha256: "3031300d060960864801650304020105000420",
  1557. sha384: "3041300d060960864801650304020205000430",
  1558. sha512: "3051300d060960864801650304020305000440",
  1559. ripemd160: "3021300906052b2403020105000414"
  1560. },
  1561. it = {};
  1562. it.lang = {
  1563. extend: function extend(t, e, i) {
  1564. if (!e || !t) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
  1565. var r = function r() {};
  1566. if (r.prototype = e.prototype, t.prototype = new r(), t.prototype.constructor = t, t.superclass = e.prototype, e.prototype.constructor == Object.prototype.constructor && (e.prototype.constructor = e), i) {
  1567. var n;
  1568. for (n in i) {
  1569. t.prototype[n] = i[n];
  1570. }
  1571. var s = function s() {},
  1572. o = ["toString", "valueOf"];
  1573. try {
  1574. /MSIE/.test(navigator.userAgent) && (s = function s(t, e) {
  1575. for (n = 0; n < o.length; n += 1) {
  1576. var i = o[n],
  1577. r = e[i];
  1578. "function" == typeof r && r != Object.prototype[i] && (t[i] = r);
  1579. }
  1580. });
  1581. } catch (t) {}
  1582. s(t.prototype, i);
  1583. }
  1584. }
  1585. };
  1586. var rt = {};
  1587. void 0 !== rt.asn1 && rt.asn1 || (rt.asn1 = {}), rt.asn1.ASN1Util = new function () {
  1588. this.integerToByteHex = function (t) {
  1589. var e = t.toString(16);
  1590. return e.length % 2 == 1 && (e = "0" + e), e;
  1591. }, this.bigIntToMinTwosComplementsHex = function (t) {
  1592. var e = t.toString(16);
  1593. if ("-" != e.substr(0, 1)) e.length % 2 == 1 ? e = "0" + e : e.match(/^[0-7]/) || (e = "00" + e);else {
  1594. var i = e.substr(1).length;
  1595. i % 2 == 1 ? i += 1 : e.match(/^[0-7]/) || (i += 2);
  1596. for (var r = "", n = 0; n < i; n++) {
  1597. r += "f";
  1598. }
  1599. e = new A(r, 16).xor(t).add(A.ONE).toString(16).replace(/^-/, "");
  1600. }
  1601. return e;
  1602. }, this.getPEMStringFromHex = function (t, e) {
  1603. return hextopem(t, e);
  1604. }, this.newObject = function (t) {
  1605. var e = rt.asn1,
  1606. i = e.DERBoolean,
  1607. r = e.DERInteger,
  1608. n = e.DERBitString,
  1609. s = e.DEROctetString,
  1610. o = e.DERNull,
  1611. h = e.DERObjectIdentifier,
  1612. a = e.DEREnumerated,
  1613. u = e.DERUTF8String,
  1614. c = e.DERNumericString,
  1615. f = e.DERPrintableString,
  1616. l = e.DERTeletexString,
  1617. p = e.DERIA5String,
  1618. g = e.DERUTCTime,
  1619. d = e.DERGeneralizedTime,
  1620. v = e.DERSequence,
  1621. m = e.DERSet,
  1622. y = e.DERTaggedObject,
  1623. b = e.ASN1Util.newObject,
  1624. T = Object.keys(t);
  1625. if (1 != T.length) throw "key of param shall be only one.";
  1626. var S = T[0];
  1627. if (-1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + S + ":")) throw "undefined key: " + S;
  1628. if ("bool" == S) return new i(t[S]);
  1629. if ("int" == S) return new r(t[S]);
  1630. if ("bitstr" == S) return new n(t[S]);
  1631. if ("octstr" == S) return new s(t[S]);
  1632. if ("null" == S) return new o(t[S]);
  1633. if ("oid" == S) return new h(t[S]);
  1634. if ("enum" == S) return new a(t[S]);
  1635. if ("utf8str" == S) return new u(t[S]);
  1636. if ("numstr" == S) return new c(t[S]);
  1637. if ("prnstr" == S) return new f(t[S]);
  1638. if ("telstr" == S) return new l(t[S]);
  1639. if ("ia5str" == S) return new p(t[S]);
  1640. if ("utctime" == S) return new g(t[S]);
  1641. if ("gentime" == S) return new d(t[S]);
  1642. if ("seq" == S) {
  1643. for (var E = t[S], w = [], D = 0; D < E.length; D++) {
  1644. var x = b(E[D]);
  1645. w.push(x);
  1646. }
  1647. return new v({
  1648. array: w
  1649. });
  1650. }
  1651. if ("set" == S) {
  1652. for (E = t[S], w = [], D = 0; D < E.length; D++) {
  1653. x = b(E[D]), w.push(x);
  1654. }
  1655. return new m({
  1656. array: w
  1657. });
  1658. }
  1659. if ("tag" == S) {
  1660. var R = t[S];
  1661. if ("[object Array]" === Object.prototype.toString.call(R) && 3 == R.length) {
  1662. var B = b(R[2]);
  1663. return new y({
  1664. tag: R[0],
  1665. explicit: R[1],
  1666. obj: B
  1667. });
  1668. }
  1669. var O = {};
  1670. if (void 0 !== R.explicit && (O.explicit = R.explicit), void 0 !== R.tag && (O.tag = R.tag), void 0 === R.obj) throw "obj shall be specified for 'tag'.";
  1671. return O.obj = b(R.obj), new y(O);
  1672. }
  1673. }, this.jsonToASN1HEX = function (t) {
  1674. return this.newObject(t).getEncodedHex();
  1675. };
  1676. }(), rt.asn1.ASN1Util.oidHexToInt = function (t) {
  1677. for (var e = "", i = parseInt(t.substr(0, 2), 16), r = (e = Math.floor(i / 40) + "." + i % 40, ""), n = 2; n < t.length; n += 2) {
  1678. var s = ("00000000" + parseInt(t.substr(n, 2), 16).toString(2)).slice(-8);
  1679. r += s.substr(1, 7), "0" == s.substr(0, 1) && (e = e + "." + new A(r, 2).toString(10), r = "");
  1680. }
  1681. return e;
  1682. }, rt.asn1.ASN1Util.oidIntToHex = function (t) {
  1683. var e = function e(t) {
  1684. var e = t.toString(16);
  1685. return 1 == e.length && (e = "0" + e), e;
  1686. },
  1687. i = function i(t) {
  1688. var i = "",
  1689. r = new A(t, 10).toString(2),
  1690. n = 7 - r.length % 7;
  1691. 7 == n && (n = 0);
  1692. for (var s = "", o = 0; o < n; o++) {
  1693. s += "0";
  1694. }
  1695. for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  1696. var h = r.substr(o, 7);
  1697. o != r.length - 7 && (h = "1" + h), i += e(parseInt(h, 2));
  1698. }
  1699. return i;
  1700. };
  1701. if (!t.match(/^[0-9.]+$/)) throw "malformed oid string: " + t;
  1702. var r = "",
  1703. n = t.split("."),
  1704. s = 40 * parseInt(n[0]) + parseInt(n[1]);
  1705. r += e(s), n.splice(0, 2);
  1706. for (var o = 0; o < n.length; o++) {
  1707. r += i(n[o]);
  1708. }
  1709. return r;
  1710. }, rt.asn1.ASN1Object = function () {
  1711. this.getLengthHexFromValue = function () {
  1712. if (void 0 === this.hV || null == this.hV) throw "this.hV is null or undefined.";
  1713. if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + "".length + ",v=" + this.hV;
  1714. var t = this.hV.length / 2,
  1715. e = t.toString(16);
  1716. if (e.length % 2 == 1 && (e = "0" + e), t < 128) return e;
  1717. var i = e.length / 2;
  1718. if (i > 15) throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
  1719. return (128 + i).toString(16) + e;
  1720. }, this.getEncodedHex = function () {
  1721. return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
  1722. }, this.getValueHex = function () {
  1723. return this.getEncodedHex(), this.hV;
  1724. }, this.getFreshValueHex = function () {
  1725. return "";
  1726. };
  1727. }, rt.asn1.DERAbstractString = function (t) {
  1728. rt.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function () {
  1729. return this.s;
  1730. }, this.setString = function (t) {
  1731. this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(this.s);
  1732. }, this.setStringHex = function (t) {
  1733. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t;
  1734. }, this.getFreshValueHex = function () {
  1735. return this.hV;
  1736. }, void 0 !== t && ("string" == typeof t ? this.setString(t) : void 0 !== t.str ? this.setString(t.str) : void 0 !== t.hex && this.setStringHex(t.hex));
  1737. }, it.lang.extend(rt.asn1.DERAbstractString, rt.asn1.ASN1Object), rt.asn1.DERAbstractTime = function (t) {
  1738. rt.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function (t) {
  1739. return utc = t.getTime() + 6e4 * t.getTimezoneOffset(), new Date(utc);
  1740. }, this.formatDate = function (t, e, i) {
  1741. var r = this.zeroPadding,
  1742. n = this.localDateToUTC(t),
  1743. s = String(n.getFullYear());
  1744. "utc" == e && (s = s.substr(2, 2));
  1745. var o = s + r(String(n.getMonth() + 1), 2) + r(String(n.getDate()), 2) + r(String(n.getHours()), 2) + r(String(n.getMinutes()), 2) + r(String(n.getSeconds()), 2);
  1746. if (!0 === i) {
  1747. var h = n.getMilliseconds();
  1748. if (0 != h) {
  1749. var a = r(String(h), 3);
  1750. o = o + "." + (a = a.replace(/[0]+$/, ""));
  1751. }
  1752. }
  1753. return o + "Z";
  1754. }, this.zeroPadding = function (t, e) {
  1755. return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t;
  1756. }, this.getString = function () {
  1757. return this.s;
  1758. }, this.setString = function (t) {
  1759. this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(t);
  1760. }, this.setByDateValue = function (t, e, i, r, n, s) {
  1761. var o = new Date(Date.UTC(t, e - 1, i, r, n, s, 0));
  1762. this.setByDate(o);
  1763. }, this.getFreshValueHex = function () {
  1764. return this.hV;
  1765. };
  1766. }, it.lang.extend(rt.asn1.DERAbstractTime, rt.asn1.ASN1Object), rt.asn1.DERAbstractStructured = function (t) {
  1767. rt.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function (t) {
  1768. this.hTLV = null, this.isModified = !0, this.asn1Array = t;
  1769. }, this.appendASN1Object = function (t) {
  1770. this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
  1771. }, this.asn1Array = new Array(), void 0 !== t && void 0 !== t.array && (this.asn1Array = t.array);
  1772. }, it.lang.extend(rt.asn1.DERAbstractStructured, rt.asn1.ASN1Object), rt.asn1.DERBoolean = function () {
  1773. rt.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
  1774. }, it.lang.extend(rt.asn1.DERBoolean, rt.asn1.ASN1Object), rt.asn1.DERInteger = function (t) {
  1775. rt.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function (t) {
  1776. this.hTLV = null, this.isModified = !0, this.hV = rt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
  1777. }, this.setByInteger = function (t) {
  1778. var e = new A(String(t), 10);
  1779. this.setByBigInteger(e);
  1780. }, this.setValueHex = function (t) {
  1781. this.hV = t;
  1782. }, this.getFreshValueHex = function () {
  1783. return this.hV;
  1784. }, void 0 !== t && (void 0 !== t.bigint ? this.setByBigInteger(t.bigint) : void 0 !== t.int ? this.setByInteger(t.int) : "number" == typeof t ? this.setByInteger(t) : void 0 !== t.hex && this.setValueHex(t.hex));
  1785. }, it.lang.extend(rt.asn1.DERInteger, rt.asn1.ASN1Object), rt.asn1.DERBitString = function (t) {
  1786. if (void 0 !== t && void 0 !== t.obj) {
  1787. var e = rt.asn1.ASN1Util.newObject(t.obj);
  1788. t.hex = "00" + e.getEncodedHex();
  1789. }
  1790. rt.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function (t) {
  1791. this.hTLV = null, this.isModified = !0, this.hV = t;
  1792. }, this.setUnusedBitsAndHexValue = function (t, e) {
  1793. if (t < 0 || 7 < t) throw "unused bits shall be from 0 to 7: u = " + t;
  1794. var i = "0" + t;
  1795. this.hTLV = null, this.isModified = !0, this.hV = i + e;
  1796. }, this.setByBinaryString = function (t) {
  1797. var e = 8 - (t = t.replace(/0+$/, "")).length % 8;
  1798. 8 == e && (e = 0);
  1799. for (var i = 0; i <= e; i++) {
  1800. t += "0";
  1801. }
  1802. var r = "";
  1803. for (i = 0; i < t.length - 1; i += 8) {
  1804. var n = t.substr(i, 8),
  1805. s = parseInt(n, 2).toString(16);
  1806. 1 == s.length && (s = "0" + s), r += s;
  1807. }
  1808. this.hTLV = null, this.isModified = !0, this.hV = "0" + e + r;
  1809. }, this.setByBooleanArray = function (t) {
  1810. for (var e = "", i = 0; i < t.length; i++) {
  1811. 1 == t[i] ? e += "1" : e += "0";
  1812. }
  1813. this.setByBinaryString(e);
  1814. }, this.newFalseArray = function (t) {
  1815. for (var e = new Array(t), i = 0; i < t; i++) {
  1816. e[i] = !1;
  1817. }
  1818. return e;
  1819. }, this.getFreshValueHex = function () {
  1820. return this.hV;
  1821. }, void 0 !== t && ("string" == typeof t && t.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(t) : void 0 !== t.hex ? this.setHexValueIncludingUnusedBits(t.hex) : void 0 !== t.bin ? this.setByBinaryString(t.bin) : void 0 !== t.array && this.setByBooleanArray(t.array));
  1822. }, it.lang.extend(rt.asn1.DERBitString, rt.asn1.ASN1Object), rt.asn1.DEROctetString = function (t) {
  1823. if (void 0 !== t && void 0 !== t.obj) {
  1824. var e = rt.asn1.ASN1Util.newObject(t.obj);
  1825. t.hex = e.getEncodedHex();
  1826. }
  1827. rt.asn1.DEROctetString.superclass.constructor.call(this, t), this.hT = "04";
  1828. }, it.lang.extend(rt.asn1.DEROctetString, rt.asn1.DERAbstractString), rt.asn1.DERNull = function () {
  1829. rt.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
  1830. }, it.lang.extend(rt.asn1.DERNull, rt.asn1.ASN1Object), rt.asn1.DERObjectIdentifier = function (t) {
  1831. var e = function e(t) {
  1832. var e = t.toString(16);
  1833. return 1 == e.length && (e = "0" + e), e;
  1834. },
  1835. i = function i(t) {
  1836. var i = "",
  1837. r = new A(t, 10).toString(2),
  1838. n = 7 - r.length % 7;
  1839. 7 == n && (n = 0);
  1840. for (var s = "", o = 0; o < n; o++) {
  1841. s += "0";
  1842. }
  1843. for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  1844. var h = r.substr(o, 7);
  1845. o != r.length - 7 && (h = "1" + h), i += e(parseInt(h, 2));
  1846. }
  1847. return i;
  1848. };
  1849. rt.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function (t) {
  1850. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t;
  1851. }, this.setValueOidString = function (t) {
  1852. if (!t.match(/^[0-9.]+$/)) throw "malformed oid string: " + t;
  1853. var r = "",
  1854. n = t.split("."),
  1855. s = 40 * parseInt(n[0]) + parseInt(n[1]);
  1856. r += e(s), n.splice(0, 2);
  1857. for (var o = 0; o < n.length; o++) {
  1858. r += i(n[o]);
  1859. }
  1860. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
  1861. }, this.setValueName = function (t) {
  1862. var e = rt.asn1.x509.OID.name2oid(t);
  1863. if ("" === e) throw "DERObjectIdentifier oidName undefined: " + t;
  1864. this.setValueOidString(e);
  1865. }, this.getFreshValueHex = function () {
  1866. return this.hV;
  1867. }, void 0 !== t && ("string" == typeof t ? t.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(t) : this.setValueName(t) : void 0 !== t.oid ? this.setValueOidString(t.oid) : void 0 !== t.hex ? this.setValueHex(t.hex) : void 0 !== t.name && this.setValueName(t.name));
  1868. }, it.lang.extend(rt.asn1.DERObjectIdentifier, rt.asn1.ASN1Object), rt.asn1.DEREnumerated = function (t) {
  1869. rt.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function (t) {
  1870. this.hTLV = null, this.isModified = !0, this.hV = rt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
  1871. }, this.setByInteger = function (t) {
  1872. var e = new A(String(t), 10);
  1873. this.setByBigInteger(e);
  1874. }, this.setValueHex = function (t) {
  1875. this.hV = t;
  1876. }, this.getFreshValueHex = function () {
  1877. return this.hV;
  1878. }, void 0 !== t && (void 0 !== t.int ? this.setByInteger(t.int) : "number" == typeof t ? this.setByInteger(t) : void 0 !== t.hex && this.setValueHex(t.hex));
  1879. }, it.lang.extend(rt.asn1.DEREnumerated, rt.asn1.ASN1Object), rt.asn1.DERUTF8String = function (t) {
  1880. rt.asn1.DERUTF8String.superclass.constructor.call(this, t), this.hT = "0c";
  1881. }, it.lang.extend(rt.asn1.DERUTF8String, rt.asn1.DERAbstractString), rt.asn1.DERNumericString = function (t) {
  1882. rt.asn1.DERNumericString.superclass.constructor.call(this, t), this.hT = "12";
  1883. }, it.lang.extend(rt.asn1.DERNumericString, rt.asn1.DERAbstractString), rt.asn1.DERPrintableString = function (t) {
  1884. rt.asn1.DERPrintableString.superclass.constructor.call(this, t), this.hT = "13";
  1885. }, it.lang.extend(rt.asn1.DERPrintableString, rt.asn1.DERAbstractString), rt.asn1.DERTeletexString = function (t) {
  1886. rt.asn1.DERTeletexString.superclass.constructor.call(this, t), this.hT = "14";
  1887. }, it.lang.extend(rt.asn1.DERTeletexString, rt.asn1.DERAbstractString), rt.asn1.DERIA5String = function (t) {
  1888. rt.asn1.DERIA5String.superclass.constructor.call(this, t), this.hT = "16";
  1889. }, it.lang.extend(rt.asn1.DERIA5String, rt.asn1.DERAbstractString), rt.asn1.DERUTCTime = function (t) {
  1890. rt.asn1.DERUTCTime.superclass.constructor.call(this, t), this.hT = "17", this.setByDate = function (t) {
  1891. this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
  1892. }, this.getFreshValueHex = function () {
  1893. return void 0 === this.date && void 0 === this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
  1894. }, void 0 !== t && (void 0 !== t.str ? this.setString(t.str) : "string" == typeof t && t.match(/^[0-9]{12}Z$/) ? this.setString(t) : void 0 !== t.hex ? this.setStringHex(t.hex) : void 0 !== t.date && this.setByDate(t.date));
  1895. }, it.lang.extend(rt.asn1.DERUTCTime, rt.asn1.DERAbstractTime), rt.asn1.DERGeneralizedTime = function (t) {
  1896. rt.asn1.DERGeneralizedTime.superclass.constructor.call(this, t), this.hT = "18", this.withMillis = !1, this.setByDate = function (t) {
  1897. this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
  1898. }, this.getFreshValueHex = function () {
  1899. return void 0 === this.date && void 0 === this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
  1900. }, void 0 !== t && (void 0 !== t.str ? this.setString(t.str) : "string" == typeof t && t.match(/^[0-9]{14}Z$/) ? this.setString(t) : void 0 !== t.hex ? this.setStringHex(t.hex) : void 0 !== t.date && this.setByDate(t.date), !0 === t.millis && (this.withMillis = !0));
  1901. }, it.lang.extend(rt.asn1.DERGeneralizedTime, rt.asn1.DERAbstractTime), rt.asn1.DERSequence = function (t) {
  1902. rt.asn1.DERSequence.superclass.constructor.call(this, t), this.hT = "30", this.getFreshValueHex = function () {
  1903. for (var t = "", e = 0; e < this.asn1Array.length; e++) {
  1904. t += this.asn1Array[e].getEncodedHex();
  1905. }
  1906. return this.hV = t, this.hV;
  1907. };
  1908. }, it.lang.extend(rt.asn1.DERSequence, rt.asn1.DERAbstractStructured), rt.asn1.DERSet = function (t) {
  1909. rt.asn1.DERSet.superclass.constructor.call(this, t), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function () {
  1910. for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
  1911. var i = this.asn1Array[e];
  1912. t.push(i.getEncodedHex());
  1913. }
  1914. return 1 == this.sortFlag && t.sort(), this.hV = t.join(""), this.hV;
  1915. }, void 0 !== t && void 0 !== t.sortflag && 0 == t.sortflag && (this.sortFlag = !1);
  1916. }, it.lang.extend(rt.asn1.DERSet, rt.asn1.DERAbstractStructured), rt.asn1.DERTaggedObject = function (t) {
  1917. rt.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function (t, e, i) {
  1918. this.hT = e, this.isExplicit = t, this.asn1Object = i, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = i.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
  1919. }, this.getFreshValueHex = function () {
  1920. return this.hV;
  1921. }, void 0 !== t && (void 0 !== t.tag && (this.hT = t.tag), void 0 !== t.explicit && (this.isExplicit = t.explicit), void 0 !== t.obj && (this.asn1Object = t.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
  1922. }, it.lang.extend(rt.asn1.DERTaggedObject, rt.asn1.ASN1Object);
  1923. var _nt,
  1924. st,
  1925. ot = (_nt = function nt(t, e) {
  1926. return _nt = Object.setPrototypeOf || {
  1927. __proto__: []
  1928. } instanceof Array && function (t, e) {
  1929. t.__proto__ = e;
  1930. } || function (t, e) {
  1931. for (var i in e) {
  1932. Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
  1933. }
  1934. }, _nt(t, e);
  1935. }, function (t, e) {
  1936. if ("function" != typeof e && null !== e) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  1937. function i() {
  1938. this.constructor = t;
  1939. }
  1940. _nt(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
  1941. }),
  1942. ht = function (t) {
  1943. function e(i) {
  1944. var r = t.call(this) || this;
  1945. return i && ("string" == typeof i ? r.parseKey(i) : (e.hasPrivateKeyProperty(i) || e.hasPublicKeyProperty(i)) && r.parsePropertiesFrom(i)), r;
  1946. }
  1947. return ot(e, t), e.prototype.parseKey = function (t) {
  1948. try {
  1949. var e = 0,
  1950. i = 0,
  1951. r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t) ? function (t) {
  1952. var e;
  1953. if (void 0 === c) {
  1954. var i = "0123456789ABCDEF",
  1955. r = " \f\n\r\t\xA0\u2028\u2029";
  1956. for (c = {}, e = 0; e < 16; ++e) {
  1957. c[i.charAt(e)] = e;
  1958. }
  1959. for (i = i.toLowerCase(), e = 10; e < 16; ++e) {
  1960. c[i.charAt(e)] = e;
  1961. }
  1962. for (e = 0; e < r.length; ++e) {
  1963. c[r.charAt(e)] = -1;
  1964. }
  1965. }
  1966. var n = [],
  1967. s = 0,
  1968. o = 0;
  1969. for (e = 0; e < t.length; ++e) {
  1970. var h = t.charAt(e);
  1971. if ("=" == h) break;
  1972. if (-1 != (h = c[h])) {
  1973. if (void 0 === h) throw new Error("Illegal character at offset " + e);
  1974. s |= h, ++o >= 2 ? (n[n.length] = s, s = 0, o = 0) : s <<= 4;
  1975. }
  1976. }
  1977. if (o) throw new Error("Hex encoding incomplete: 4 bits missing");
  1978. return n;
  1979. }(t) : v.unarmor(t),
  1980. n = x.decode(r);
  1981. if (3 === n.sub.length && (n = n.sub[2].sub[0]), 9 === n.sub.length) {
  1982. e = n.sub[1].getHexStringValue(), this.n = L(e, 16), i = n.sub[2].getHexStringValue(), this.e = parseInt(i, 16);
  1983. var s = n.sub[3].getHexStringValue();
  1984. this.d = L(s, 16);
  1985. var o = n.sub[4].getHexStringValue();
  1986. this.p = L(o, 16);
  1987. var h = n.sub[5].getHexStringValue();
  1988. this.q = L(h, 16);
  1989. var a = n.sub[6].getHexStringValue();
  1990. this.dmp1 = L(a, 16);
  1991. var u = n.sub[7].getHexStringValue();
  1992. this.dmq1 = L(u, 16);
  1993. var f = n.sub[8].getHexStringValue();
  1994. this.coeff = L(f, 16);
  1995. } else {
  1996. if (2 !== n.sub.length) return !1;
  1997. if (n.sub[0].sub) {
  1998. var l = n.sub[1].sub[0];
  1999. e = l.sub[0].getHexStringValue(), this.n = L(e, 16), i = l.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
  2000. } else e = n.sub[0].getHexStringValue(), this.n = L(e, 16), i = n.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
  2001. }
  2002. return !0;
  2003. } catch (t) {
  2004. return !1;
  2005. }
  2006. }, e.prototype.getPrivateBaseKey = function () {
  2007. var t = {
  2008. array: [new rt.asn1.DERInteger({
  2009. int: 0
  2010. }), new rt.asn1.DERInteger({
  2011. bigint: this.n
  2012. }), new rt.asn1.DERInteger({
  2013. int: this.e
  2014. }), new rt.asn1.DERInteger({
  2015. bigint: this.d
  2016. }), new rt.asn1.DERInteger({
  2017. bigint: this.p
  2018. }), new rt.asn1.DERInteger({
  2019. bigint: this.q
  2020. }), new rt.asn1.DERInteger({
  2021. bigint: this.dmp1
  2022. }), new rt.asn1.DERInteger({
  2023. bigint: this.dmq1
  2024. }), new rt.asn1.DERInteger({
  2025. bigint: this.coeff
  2026. })]
  2027. };
  2028. return new rt.asn1.DERSequence(t).getEncodedHex();
  2029. }, e.prototype.getPrivateBaseKeyB64 = function () {
  2030. return p(this.getPrivateBaseKey());
  2031. }, e.prototype.getPublicBaseKey = function () {
  2032. var t = new rt.asn1.DERSequence({
  2033. array: [new rt.asn1.DERObjectIdentifier({
  2034. oid: "1.2.840.113549.1.1.1"
  2035. }), new rt.asn1.DERNull()]
  2036. }),
  2037. e = new rt.asn1.DERSequence({
  2038. array: [new rt.asn1.DERInteger({
  2039. bigint: this.n
  2040. }), new rt.asn1.DERInteger({
  2041. int: this.e
  2042. })]
  2043. }),
  2044. i = new rt.asn1.DERBitString({
  2045. hex: "00" + e.getEncodedHex()
  2046. });
  2047. return new rt.asn1.DERSequence({
  2048. array: [t, i]
  2049. }).getEncodedHex();
  2050. }, e.prototype.getPublicBaseKeyB64 = function () {
  2051. return p(this.getPublicBaseKey());
  2052. }, e.wordwrap = function (t, e) {
  2053. if (!t) return t;
  2054. var i = "(.{1," + (e = e || 64) + "})( +|$\n?)|(.{1," + e + "})";
  2055. return t.match(RegExp(i, "g")).join("\n");
  2056. }, e.prototype.getPrivateKey = function () {
  2057. var t = "-----BEGIN RSA PRIVATE KEY-----\n";
  2058. return (t += e.wordwrap(this.getPrivateBaseKeyB64()) + "\n") + "-----END RSA PRIVATE KEY-----";
  2059. }, e.prototype.getPublicKey = function () {
  2060. var t = "-----BEGIN PUBLIC KEY-----\n";
  2061. return (t += e.wordwrap(this.getPublicBaseKeyB64()) + "\n") + "-----END PUBLIC KEY-----";
  2062. }, e.hasPublicKeyProperty = function (t) {
  2063. return (t = t || {}).hasOwnProperty("n") && t.hasOwnProperty("e");
  2064. }, e.hasPrivateKeyProperty = function (t) {
  2065. return (t = t || {}).hasOwnProperty("n") && t.hasOwnProperty("e") && t.hasOwnProperty("d") && t.hasOwnProperty("p") && t.hasOwnProperty("q") && t.hasOwnProperty("dmp1") && t.hasOwnProperty("dmq1") && t.hasOwnProperty("coeff");
  2066. }, e.prototype.parsePropertiesFrom = function (t) {
  2067. this.n = t.n, this.e = t.e, t.hasOwnProperty("d") && (this.d = t.d, this.p = t.p, this.q = t.q, this.dmp1 = t.dmp1, this.dmq1 = t.dmq1, this.coeff = t.coeff);
  2068. }, e;
  2069. }(tt),
  2070. at = i(155),
  2071. ut = void 0 !== at ? null === (st = at.env) || void 0 === st ? void 0 : "3.3.2" : void 0;
  2072. var ct = function () {
  2073. function t(t) {
  2074. void 0 === t && (t = {}), t = t || {}, this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = null;
  2075. }
  2076. return t.prototype.setKey = function (t) {
  2077. this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new ht(t);
  2078. }, t.prototype.setPrivateKey = function (t) {
  2079. this.setKey(t);
  2080. }, t.prototype.setPublicKey = function (t) {
  2081. this.setKey(t);
  2082. }, t.prototype.decrypt = function (t) {
  2083. try {
  2084. return this.getKey().decrypt(g(t));
  2085. } catch (t) {
  2086. return !1;
  2087. }
  2088. }, t.prototype.encrypt = function (t) {
  2089. try {
  2090. return p(this.getKey().encrypt(t));
  2091. } catch (t) {
  2092. return !1;
  2093. }
  2094. }, t.prototype.sign = function (t, e, i) {
  2095. try {
  2096. return p(this.getKey().sign(t, e, i));
  2097. } catch (t) {
  2098. return !1;
  2099. }
  2100. }, t.prototype.verify = function (t, e, i) {
  2101. try {
  2102. return this.getKey().verify(t, g(e), i);
  2103. } catch (t) {
  2104. return !1;
  2105. }
  2106. }, t.prototype.getKey = function (t) {
  2107. if (!this.key) {
  2108. if (this.key = new ht(), t && "[object Function]" === {}.toString.call(t)) return void this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
  2109. this.key.generate(this.default_key_size, this.default_public_exponent);
  2110. }
  2111. return this.key;
  2112. }, t.prototype.getPrivateKey = function () {
  2113. return this.getKey().getPrivateKey();
  2114. }, t.prototype.getPrivateKeyB64 = function () {
  2115. return this.getKey().getPrivateBaseKeyB64();
  2116. }, t.prototype.getPublicKey = function () {
  2117. return this.getKey().getPublicKey();
  2118. }, t.prototype.getPublicKeyB64 = function () {
  2119. return this.getKey().getPublicBaseKeyB64();
  2120. }, t.version = ut, t;
  2121. }();
  2122. }(), r.default;
  2123. }();
  2124. });
  2125. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../工具/HBuilderX.3.6.4.20220922/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/module.js */ 105)(module)))
  2126. /***/ }),
  2127. /***/ 105:
  2128. /*!***********************************!*\
  2129. !*** (webpack)/buildin/module.js ***!
  2130. \***********************************/
  2131. /*! no static exports found */
  2132. /***/ (function(module, exports) {
  2133. module.exports = function(module) {
  2134. if (!module.webpackPolyfill) {
  2135. module.deprecate = function() {};
  2136. module.paths = [];
  2137. // module.parent = undefined by default
  2138. if (!module.children) module.children = [];
  2139. Object.defineProperty(module, "loaded", {
  2140. enumerable: true,
  2141. get: function() {
  2142. return module.l;
  2143. }
  2144. });
  2145. Object.defineProperty(module, "id", {
  2146. enumerable: true,
  2147. get: function() {
  2148. return module.i;
  2149. }
  2150. });
  2151. module.webpackPolyfill = 1;
  2152. }
  2153. return module;
  2154. };
  2155. /***/ }),
  2156. /***/ 11:
  2157. /*!***************************************************************!*\
  2158. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2159. \***************************************************************/
  2160. /*! no static exports found */
  2161. /***/ (function(module, exports, __webpack_require__) {
  2162. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2163. function _defineProperty(obj, key, value) {
  2164. key = toPropertyKey(key);
  2165. if (key in obj) {
  2166. Object.defineProperty(obj, key, {
  2167. value: value,
  2168. enumerable: true,
  2169. configurable: true,
  2170. writable: true
  2171. });
  2172. } else {
  2173. obj[key] = value;
  2174. }
  2175. return obj;
  2176. }
  2177. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2178. /***/ }),
  2179. /***/ 12:
  2180. /*!**************************************************************!*\
  2181. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2182. \**************************************************************/
  2183. /*! no static exports found */
  2184. /***/ (function(module, exports, __webpack_require__) {
  2185. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2186. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2187. function _toPropertyKey(arg) {
  2188. var key = toPrimitive(arg, "string");
  2189. return _typeof(key) === "symbol" ? key : String(key);
  2190. }
  2191. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2192. /***/ }),
  2193. /***/ 13:
  2194. /*!*******************************************************!*\
  2195. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2196. \*******************************************************/
  2197. /*! no static exports found */
  2198. /***/ (function(module, exports) {
  2199. function _typeof(obj) {
  2200. "@babel/helpers - typeof";
  2201. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  2202. return typeof obj;
  2203. } : function (obj) {
  2204. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  2205. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  2206. }
  2207. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2208. /***/ }),
  2209. /***/ 14:
  2210. /*!************************************************************!*\
  2211. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2212. \************************************************************/
  2213. /*! no static exports found */
  2214. /***/ (function(module, exports, __webpack_require__) {
  2215. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2216. function _toPrimitive(input, hint) {
  2217. if (_typeof(input) !== "object" || input === null) return input;
  2218. var prim = input[Symbol.toPrimitive];
  2219. if (prim !== undefined) {
  2220. var res = prim.call(input, hint || "default");
  2221. if (_typeof(res) !== "object") return res;
  2222. throw new TypeError("@@toPrimitive must return a primitive value.");
  2223. }
  2224. return (hint === "string" ? String : Number)(input);
  2225. }
  2226. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2227. /***/ }),
  2228. /***/ 15:
  2229. /*!**********************************************************!*\
  2230. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2231. \**********************************************************/
  2232. /*! no static exports found */
  2233. /***/ (function(module, exports, __webpack_require__) {
  2234. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2235. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2236. function _construct(Parent, args, Class) {
  2237. if (isNativeReflectConstruct()) {
  2238. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  2239. } else {
  2240. module.exports = _construct = function _construct(Parent, args, Class) {
  2241. var a = [null];
  2242. a.push.apply(a, args);
  2243. var Constructor = Function.bind.apply(Parent, a);
  2244. var instance = new Constructor();
  2245. if (Class) setPrototypeOf(instance, Class.prototype);
  2246. return instance;
  2247. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2248. }
  2249. return _construct.apply(null, arguments);
  2250. }
  2251. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2252. /***/ }),
  2253. /***/ 16:
  2254. /*!***************************************************************!*\
  2255. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2256. \***************************************************************/
  2257. /*! no static exports found */
  2258. /***/ (function(module, exports) {
  2259. function _setPrototypeOf(o, p) {
  2260. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2261. o.__proto__ = p;
  2262. return o;
  2263. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2264. return _setPrototypeOf(o, p);
  2265. }
  2266. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2267. /***/ }),
  2268. /***/ 17:
  2269. /*!*************************************************************************!*\
  2270. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2271. \*************************************************************************/
  2272. /*! no static exports found */
  2273. /***/ (function(module, exports) {
  2274. function _isNativeReflectConstruct() {
  2275. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  2276. if (Reflect.construct.sham) return false;
  2277. if (typeof Proxy === "function") return true;
  2278. try {
  2279. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2280. return true;
  2281. } catch (e) {
  2282. return false;
  2283. }
  2284. }
  2285. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2286. /***/ }),
  2287. /***/ 172:
  2288. /*!*********************************************************************!*\
  2289. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/common/goods.js ***!
  2290. \*********************************************************************/
  2291. /*! no static exports found */
  2292. /***/ (function(module, exports, __webpack_require__) {
  2293. "use strict";
  2294. Object.defineProperty(exports, "__esModule", {
  2295. value: true
  2296. });
  2297. exports.default = void 0;
  2298. var _default = [{
  2299. "_id": '00001',
  2300. "name": "清洁用品",
  2301. "goods_tip": "清洁",
  2302. "goods_thumb": "/static/defimages/5.png",
  2303. "tag": 4,
  2304. "goods_price": 15,
  2305. "comment_count": '3000+',
  2306. "month_sell_count": '200',
  2307. "shop_name": '店名'
  2308. }, {
  2309. "_id": '00002',
  2310. "name": "洗浴用品",
  2311. "goods_tip": "清洁",
  2312. "goods_thumb": "/static/defimages/5.png",
  2313. "tag": 4,
  2314. "goods_price": 15,
  2315. "comment_count": '3000+',
  2316. "month_sell_count": '200',
  2317. "shop_name": '店名'
  2318. }];
  2319. exports.default = _default;
  2320. /***/ }),
  2321. /***/ 18:
  2322. /*!******************************************************************!*\
  2323. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2324. \******************************************************************/
  2325. /*! no static exports found */
  2326. /***/ (function(module, exports, __webpack_require__) {
  2327. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2328. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2329. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2330. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2331. function _toConsumableArray(arr) {
  2332. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2333. }
  2334. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2335. /***/ }),
  2336. /***/ 19:
  2337. /*!******************************************************************!*\
  2338. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2339. \******************************************************************/
  2340. /*! no static exports found */
  2341. /***/ (function(module, exports, __webpack_require__) {
  2342. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2343. function _arrayWithoutHoles(arr) {
  2344. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2345. }
  2346. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2347. /***/ }),
  2348. /***/ 2:
  2349. /*!************************************************************!*\
  2350. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  2351. \************************************************************/
  2352. /*! no static exports found */
  2353. /***/ (function(module, exports, __webpack_require__) {
  2354. "use strict";
  2355. /* WEBPACK VAR INJECTION */(function(wx, global) {
  2356. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2357. Object.defineProperty(exports, "__esModule", {
  2358. value: true
  2359. });
  2360. exports.createApp = createApp;
  2361. exports.createComponent = createComponent;
  2362. exports.createPage = createPage;
  2363. exports.createPlugin = createPlugin;
  2364. exports.createSubpackageApp = createSubpackageApp;
  2365. exports.default = void 0;
  2366. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2367. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  2368. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  2369. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  2370. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2371. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  2372. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  2373. 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; }
  2374. 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; }
  2375. var realAtob;
  2376. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  2377. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  2378. if (typeof atob !== 'function') {
  2379. realAtob = function realAtob(str) {
  2380. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  2381. if (!b64re.test(str)) {
  2382. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  2383. }
  2384. // Adding the padding if missing, for semplicity
  2385. str += '=='.slice(2 - (str.length & 3));
  2386. var bitmap;
  2387. var result = '';
  2388. var r1;
  2389. var r2;
  2390. var i = 0;
  2391. for (; i < str.length;) {
  2392. 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++)));
  2393. 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);
  2394. }
  2395. return result;
  2396. };
  2397. } else {
  2398. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  2399. realAtob = atob;
  2400. }
  2401. function b64DecodeUnicode(str) {
  2402. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  2403. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  2404. }).join(''));
  2405. }
  2406. function getCurrentUserInfo() {
  2407. var token = wx.getStorageSync('uni_id_token') || '';
  2408. var tokenArr = token.split('.');
  2409. if (!token || tokenArr.length !== 3) {
  2410. return {
  2411. uid: null,
  2412. role: [],
  2413. permission: [],
  2414. tokenExpired: 0
  2415. };
  2416. }
  2417. var userInfo;
  2418. try {
  2419. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  2420. } catch (error) {
  2421. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  2422. }
  2423. userInfo.tokenExpired = userInfo.exp * 1000;
  2424. delete userInfo.exp;
  2425. delete userInfo.iat;
  2426. return userInfo;
  2427. }
  2428. function uniIdMixin(Vue) {
  2429. Vue.prototype.uniIDHasRole = function (roleId) {
  2430. var _getCurrentUserInfo = getCurrentUserInfo(),
  2431. role = _getCurrentUserInfo.role;
  2432. return role.indexOf(roleId) > -1;
  2433. };
  2434. Vue.prototype.uniIDHasPermission = function (permissionId) {
  2435. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  2436. permission = _getCurrentUserInfo2.permission;
  2437. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  2438. };
  2439. Vue.prototype.uniIDTokenValid = function () {
  2440. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  2441. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  2442. return tokenExpired > Date.now();
  2443. };
  2444. }
  2445. var _toString = Object.prototype.toString;
  2446. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2447. function isFn(fn) {
  2448. return typeof fn === 'function';
  2449. }
  2450. function isStr(str) {
  2451. return typeof str === 'string';
  2452. }
  2453. function isObject(obj) {
  2454. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  2455. }
  2456. function isPlainObject(obj) {
  2457. return _toString.call(obj) === '[object Object]';
  2458. }
  2459. function hasOwn(obj, key) {
  2460. return hasOwnProperty.call(obj, key);
  2461. }
  2462. function noop() {}
  2463. /**
  2464. * Create a cached version of a pure function.
  2465. */
  2466. function cached(fn) {
  2467. var cache = Object.create(null);
  2468. return function cachedFn(str) {
  2469. var hit = cache[str];
  2470. return hit || (cache[str] = fn(str));
  2471. };
  2472. }
  2473. /**
  2474. * Camelize a hyphen-delimited string.
  2475. */
  2476. var camelizeRE = /-(\w)/g;
  2477. var camelize = cached(function (str) {
  2478. return str.replace(camelizeRE, function (_, c) {
  2479. return c ? c.toUpperCase() : '';
  2480. });
  2481. });
  2482. function sortObject(obj) {
  2483. var sortObj = {};
  2484. if (isPlainObject(obj)) {
  2485. Object.keys(obj).sort().forEach(function (key) {
  2486. sortObj[key] = obj[key];
  2487. });
  2488. }
  2489. return !Object.keys(sortObj) ? obj : sortObj;
  2490. }
  2491. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  2492. var globalInterceptors = {};
  2493. var scopedInterceptors = {};
  2494. function mergeHook(parentVal, childVal) {
  2495. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  2496. return res ? dedupeHooks(res) : res;
  2497. }
  2498. function dedupeHooks(hooks) {
  2499. var res = [];
  2500. for (var i = 0; i < hooks.length; i++) {
  2501. if (res.indexOf(hooks[i]) === -1) {
  2502. res.push(hooks[i]);
  2503. }
  2504. }
  2505. return res;
  2506. }
  2507. function removeHook(hooks, hook) {
  2508. var index = hooks.indexOf(hook);
  2509. if (index !== -1) {
  2510. hooks.splice(index, 1);
  2511. }
  2512. }
  2513. function mergeInterceptorHook(interceptor, option) {
  2514. Object.keys(option).forEach(function (hook) {
  2515. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  2516. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  2517. }
  2518. });
  2519. }
  2520. function removeInterceptorHook(interceptor, option) {
  2521. if (!interceptor || !option) {
  2522. return;
  2523. }
  2524. Object.keys(option).forEach(function (hook) {
  2525. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  2526. removeHook(interceptor[hook], option[hook]);
  2527. }
  2528. });
  2529. }
  2530. function addInterceptor(method, option) {
  2531. if (typeof method === 'string' && isPlainObject(option)) {
  2532. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  2533. } else if (isPlainObject(method)) {
  2534. mergeInterceptorHook(globalInterceptors, method);
  2535. }
  2536. }
  2537. function removeInterceptor(method, option) {
  2538. if (typeof method === 'string') {
  2539. if (isPlainObject(option)) {
  2540. removeInterceptorHook(scopedInterceptors[method], option);
  2541. } else {
  2542. delete scopedInterceptors[method];
  2543. }
  2544. } else if (isPlainObject(method)) {
  2545. removeInterceptorHook(globalInterceptors, method);
  2546. }
  2547. }
  2548. function wrapperHook(hook) {
  2549. return function (data) {
  2550. return hook(data) || data;
  2551. };
  2552. }
  2553. function isPromise(obj) {
  2554. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  2555. }
  2556. function queue(hooks, data) {
  2557. var promise = false;
  2558. for (var i = 0; i < hooks.length; i++) {
  2559. var hook = hooks[i];
  2560. if (promise) {
  2561. promise = Promise.resolve(wrapperHook(hook));
  2562. } else {
  2563. var res = hook(data);
  2564. if (isPromise(res)) {
  2565. promise = Promise.resolve(res);
  2566. }
  2567. if (res === false) {
  2568. return {
  2569. then: function then() {}
  2570. };
  2571. }
  2572. }
  2573. }
  2574. return promise || {
  2575. then: function then(callback) {
  2576. return callback(data);
  2577. }
  2578. };
  2579. }
  2580. function wrapperOptions(interceptor) {
  2581. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2582. ['success', 'fail', 'complete'].forEach(function (name) {
  2583. if (Array.isArray(interceptor[name])) {
  2584. var oldCallback = options[name];
  2585. options[name] = function callbackInterceptor(res) {
  2586. queue(interceptor[name], res).then(function (res) {
  2587. /* eslint-disable no-mixed-operators */
  2588. return isFn(oldCallback) && oldCallback(res) || res;
  2589. });
  2590. };
  2591. }
  2592. });
  2593. return options;
  2594. }
  2595. function wrapperReturnValue(method, returnValue) {
  2596. var returnValueHooks = [];
  2597. if (Array.isArray(globalInterceptors.returnValue)) {
  2598. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  2599. }
  2600. var interceptor = scopedInterceptors[method];
  2601. if (interceptor && Array.isArray(interceptor.returnValue)) {
  2602. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  2603. }
  2604. returnValueHooks.forEach(function (hook) {
  2605. returnValue = hook(returnValue) || returnValue;
  2606. });
  2607. return returnValue;
  2608. }
  2609. function getApiInterceptorHooks(method) {
  2610. var interceptor = Object.create(null);
  2611. Object.keys(globalInterceptors).forEach(function (hook) {
  2612. if (hook !== 'returnValue') {
  2613. interceptor[hook] = globalInterceptors[hook].slice();
  2614. }
  2615. });
  2616. var scopedInterceptor = scopedInterceptors[method];
  2617. if (scopedInterceptor) {
  2618. Object.keys(scopedInterceptor).forEach(function (hook) {
  2619. if (hook !== 'returnValue') {
  2620. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  2621. }
  2622. });
  2623. }
  2624. return interceptor;
  2625. }
  2626. function invokeApi(method, api, options) {
  2627. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  2628. params[_key - 3] = arguments[_key];
  2629. }
  2630. var interceptor = getApiInterceptorHooks(method);
  2631. if (interceptor && Object.keys(interceptor).length) {
  2632. if (Array.isArray(interceptor.invoke)) {
  2633. var res = queue(interceptor.invoke, options);
  2634. return res.then(function (options) {
  2635. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  2636. });
  2637. } else {
  2638. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  2639. }
  2640. }
  2641. return api.apply(void 0, [options].concat(params));
  2642. }
  2643. var promiseInterceptor = {
  2644. returnValue: function returnValue(res) {
  2645. if (!isPromise(res)) {
  2646. return res;
  2647. }
  2648. return new Promise(function (resolve, reject) {
  2649. res.then(function (res) {
  2650. if (res[0]) {
  2651. reject(res[0]);
  2652. } else {
  2653. resolve(res[1]);
  2654. }
  2655. });
  2656. });
  2657. }
  2658. };
  2659. 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/;
  2660. var CONTEXT_API_RE = /^create|Manager$/;
  2661. // Context例外情况
  2662. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  2663. // 同步例外情况
  2664. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  2665. var CALLBACK_API_RE = /^on|^off/;
  2666. function isContextApi(name) {
  2667. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  2668. }
  2669. function isSyncApi(name) {
  2670. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  2671. }
  2672. function isCallbackApi(name) {
  2673. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  2674. }
  2675. function handlePromise(promise) {
  2676. return promise.then(function (data) {
  2677. return [null, data];
  2678. }).catch(function (err) {
  2679. return [err];
  2680. });
  2681. }
  2682. function shouldPromise(name) {
  2683. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  2684. return false;
  2685. }
  2686. return true;
  2687. }
  2688. /* eslint-disable no-extend-native */
  2689. if (!Promise.prototype.finally) {
  2690. Promise.prototype.finally = function (callback) {
  2691. var promise = this.constructor;
  2692. return this.then(function (value) {
  2693. return promise.resolve(callback()).then(function () {
  2694. return value;
  2695. });
  2696. }, function (reason) {
  2697. return promise.resolve(callback()).then(function () {
  2698. throw reason;
  2699. });
  2700. });
  2701. };
  2702. }
  2703. function promisify(name, api) {
  2704. if (!shouldPromise(name) || !isFn(api)) {
  2705. return api;
  2706. }
  2707. return function promiseApi() {
  2708. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2709. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  2710. params[_key2 - 1] = arguments[_key2];
  2711. }
  2712. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  2713. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  2714. }
  2715. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  2716. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  2717. success: resolve,
  2718. fail: reject
  2719. })].concat(params));
  2720. })));
  2721. };
  2722. }
  2723. var EPS = 1e-4;
  2724. var BASE_DEVICE_WIDTH = 750;
  2725. var isIOS = false;
  2726. var deviceWidth = 0;
  2727. var deviceDPR = 0;
  2728. function checkDeviceWidth() {
  2729. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  2730. platform = _wx$getSystemInfoSync.platform,
  2731. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  2732. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  2733. deviceWidth = windowWidth;
  2734. deviceDPR = pixelRatio;
  2735. isIOS = platform === 'ios';
  2736. }
  2737. function upx2px(number, newDeviceWidth) {
  2738. if (deviceWidth === 0) {
  2739. checkDeviceWidth();
  2740. }
  2741. number = Number(number);
  2742. if (number === 0) {
  2743. return 0;
  2744. }
  2745. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  2746. if (result < 0) {
  2747. result = -result;
  2748. }
  2749. result = Math.floor(result + EPS);
  2750. if (result === 0) {
  2751. if (deviceDPR === 1 || !isIOS) {
  2752. result = 1;
  2753. } else {
  2754. result = 0.5;
  2755. }
  2756. }
  2757. return number < 0 ? -result : result;
  2758. }
  2759. var LOCALE_ZH_HANS = 'zh-Hans';
  2760. var LOCALE_ZH_HANT = 'zh-Hant';
  2761. var LOCALE_EN = 'en';
  2762. var LOCALE_FR = 'fr';
  2763. var LOCALE_ES = 'es';
  2764. var messages = {};
  2765. var locale;
  2766. {
  2767. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2768. }
  2769. function initI18nMessages() {
  2770. if (!isEnableLocale()) {
  2771. return;
  2772. }
  2773. var localeKeys = Object.keys(__uniConfig.locales);
  2774. if (localeKeys.length) {
  2775. localeKeys.forEach(function (locale) {
  2776. var curMessages = messages[locale];
  2777. var userMessages = __uniConfig.locales[locale];
  2778. if (curMessages) {
  2779. Object.assign(curMessages, userMessages);
  2780. } else {
  2781. messages[locale] = userMessages;
  2782. }
  2783. });
  2784. }
  2785. }
  2786. initI18nMessages();
  2787. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  2788. var t = i18n.t;
  2789. var i18nMixin = i18n.mixin = {
  2790. beforeCreate: function beforeCreate() {
  2791. var _this = this;
  2792. var unwatch = i18n.i18n.watchLocale(function () {
  2793. _this.$forceUpdate();
  2794. });
  2795. this.$once('hook:beforeDestroy', function () {
  2796. unwatch();
  2797. });
  2798. },
  2799. methods: {
  2800. $$t: function $$t(key, values) {
  2801. return t(key, values);
  2802. }
  2803. }
  2804. };
  2805. var setLocale = i18n.setLocale;
  2806. var getLocale = i18n.getLocale;
  2807. function initAppLocale(Vue, appVm, locale) {
  2808. var state = Vue.observable({
  2809. locale: locale || i18n.getLocale()
  2810. });
  2811. var localeWatchers = [];
  2812. appVm.$watchLocale = function (fn) {
  2813. localeWatchers.push(fn);
  2814. };
  2815. Object.defineProperty(appVm, '$locale', {
  2816. get: function get() {
  2817. return state.locale;
  2818. },
  2819. set: function set(v) {
  2820. state.locale = v;
  2821. localeWatchers.forEach(function (watch) {
  2822. return watch(v);
  2823. });
  2824. }
  2825. });
  2826. }
  2827. function isEnableLocale() {
  2828. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  2829. }
  2830. function include(str, parts) {
  2831. return !!parts.find(function (part) {
  2832. return str.indexOf(part) !== -1;
  2833. });
  2834. }
  2835. function startsWith(str, parts) {
  2836. return parts.find(function (part) {
  2837. return str.indexOf(part) === 0;
  2838. });
  2839. }
  2840. function normalizeLocale(locale, messages) {
  2841. if (!locale) {
  2842. return;
  2843. }
  2844. locale = locale.trim().replace(/_/g, '-');
  2845. if (messages && messages[locale]) {
  2846. return locale;
  2847. }
  2848. locale = locale.toLowerCase();
  2849. if (locale === 'chinese') {
  2850. // 支付宝
  2851. return LOCALE_ZH_HANS;
  2852. }
  2853. if (locale.indexOf('zh') === 0) {
  2854. if (locale.indexOf('-hans') > -1) {
  2855. return LOCALE_ZH_HANS;
  2856. }
  2857. if (locale.indexOf('-hant') > -1) {
  2858. return LOCALE_ZH_HANT;
  2859. }
  2860. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2861. return LOCALE_ZH_HANT;
  2862. }
  2863. return LOCALE_ZH_HANS;
  2864. }
  2865. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2866. if (lang) {
  2867. return lang;
  2868. }
  2869. }
  2870. // export function initI18n() {
  2871. // const localeKeys = Object.keys(__uniConfig.locales || {})
  2872. // if (localeKeys.length) {
  2873. // localeKeys.forEach((locale) =>
  2874. // i18n.add(locale, __uniConfig.locales[locale])
  2875. // )
  2876. // }
  2877. // }
  2878. function getLocale$1() {
  2879. // 优先使用 $locale
  2880. if (isFn(getApp)) {
  2881. var app = getApp({
  2882. allowDefault: true
  2883. });
  2884. if (app && app.$vm) {
  2885. return app.$vm.$locale;
  2886. }
  2887. }
  2888. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2889. }
  2890. function setLocale$1(locale) {
  2891. var app = isFn(getApp) ? getApp() : false;
  2892. if (!app) {
  2893. return false;
  2894. }
  2895. var oldLocale = app.$vm.$locale;
  2896. if (oldLocale !== locale) {
  2897. app.$vm.$locale = locale;
  2898. onLocaleChangeCallbacks.forEach(function (fn) {
  2899. return fn({
  2900. locale: locale
  2901. });
  2902. });
  2903. return true;
  2904. }
  2905. return false;
  2906. }
  2907. var onLocaleChangeCallbacks = [];
  2908. function onLocaleChange(fn) {
  2909. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  2910. onLocaleChangeCallbacks.push(fn);
  2911. }
  2912. }
  2913. if (typeof global !== 'undefined') {
  2914. global.getLocale = getLocale$1;
  2915. }
  2916. var interceptors = {
  2917. promiseInterceptor: promiseInterceptor
  2918. };
  2919. var baseApi = /*#__PURE__*/Object.freeze({
  2920. __proto__: null,
  2921. upx2px: upx2px,
  2922. getLocale: getLocale$1,
  2923. setLocale: setLocale$1,
  2924. onLocaleChange: onLocaleChange,
  2925. addInterceptor: addInterceptor,
  2926. removeInterceptor: removeInterceptor,
  2927. interceptors: interceptors
  2928. });
  2929. function findExistsPageIndex(url) {
  2930. var pages = getCurrentPages();
  2931. var len = pages.length;
  2932. while (len--) {
  2933. var page = pages[len];
  2934. if (page.$page && page.$page.fullPath === url) {
  2935. return len;
  2936. }
  2937. }
  2938. return -1;
  2939. }
  2940. var redirectTo = {
  2941. name: function name(fromArgs) {
  2942. if (fromArgs.exists === 'back' && fromArgs.delta) {
  2943. return 'navigateBack';
  2944. }
  2945. return 'redirectTo';
  2946. },
  2947. args: function args(fromArgs) {
  2948. if (fromArgs.exists === 'back' && fromArgs.url) {
  2949. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  2950. if (existsPageIndex !== -1) {
  2951. var delta = getCurrentPages().length - 1 - existsPageIndex;
  2952. if (delta > 0) {
  2953. fromArgs.delta = delta;
  2954. }
  2955. }
  2956. }
  2957. }
  2958. };
  2959. var previewImage = {
  2960. args: function args(fromArgs) {
  2961. var currentIndex = parseInt(fromArgs.current);
  2962. if (isNaN(currentIndex)) {
  2963. return;
  2964. }
  2965. var urls = fromArgs.urls;
  2966. if (!Array.isArray(urls)) {
  2967. return;
  2968. }
  2969. var len = urls.length;
  2970. if (!len) {
  2971. return;
  2972. }
  2973. if (currentIndex < 0) {
  2974. currentIndex = 0;
  2975. } else if (currentIndex >= len) {
  2976. currentIndex = len - 1;
  2977. }
  2978. if (currentIndex > 0) {
  2979. fromArgs.current = urls[currentIndex];
  2980. fromArgs.urls = urls.filter(function (item, index) {
  2981. return index < currentIndex ? item !== urls[currentIndex] : true;
  2982. });
  2983. } else {
  2984. fromArgs.current = urls[0];
  2985. }
  2986. return {
  2987. indicator: false,
  2988. loop: false
  2989. };
  2990. }
  2991. };
  2992. var UUID_KEY = '__DC_STAT_UUID';
  2993. var deviceId;
  2994. function useDeviceId(result) {
  2995. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2996. if (!deviceId) {
  2997. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2998. wx.setStorage({
  2999. key: UUID_KEY,
  3000. data: deviceId
  3001. });
  3002. }
  3003. result.deviceId = deviceId;
  3004. }
  3005. function addSafeAreaInsets(result) {
  3006. if (result.safeArea) {
  3007. var safeArea = result.safeArea;
  3008. result.safeAreaInsets = {
  3009. top: safeArea.top,
  3010. left: safeArea.left,
  3011. right: result.windowWidth - safeArea.right,
  3012. bottom: result.screenHeight - safeArea.bottom
  3013. };
  3014. }
  3015. }
  3016. function populateParameters(result) {
  3017. var _result$brand = result.brand,
  3018. brand = _result$brand === void 0 ? '' : _result$brand,
  3019. _result$model = result.model,
  3020. model = _result$model === void 0 ? '' : _result$model,
  3021. _result$system = result.system,
  3022. system = _result$system === void 0 ? '' : _result$system,
  3023. _result$language = result.language,
  3024. language = _result$language === void 0 ? '' : _result$language,
  3025. theme = result.theme,
  3026. version = result.version,
  3027. platform = result.platform,
  3028. fontSizeSetting = result.fontSizeSetting,
  3029. SDKVersion = result.SDKVersion,
  3030. pixelRatio = result.pixelRatio,
  3031. deviceOrientation = result.deviceOrientation;
  3032. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  3033. var extraParam = {};
  3034. // osName osVersion
  3035. var osName = '';
  3036. var osVersion = '';
  3037. {
  3038. osName = system.split(' ')[0] || '';
  3039. osVersion = system.split(' ')[1] || '';
  3040. }
  3041. var hostVersion = version;
  3042. // deviceType
  3043. var deviceType = getGetDeviceType(result, model);
  3044. // deviceModel
  3045. var deviceBrand = getDeviceBrand(brand);
  3046. // hostName
  3047. var _hostName = getHostName(result);
  3048. // deviceOrientation
  3049. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  3050. // devicePixelRatio
  3051. var _devicePixelRatio = pixelRatio;
  3052. // SDKVersion
  3053. var _SDKVersion = SDKVersion;
  3054. // hostLanguage
  3055. var hostLanguage = language.replace(/_/g, '-');
  3056. // wx.getAccountInfoSync
  3057. var parameters = {
  3058. appId: "__UNI__1C3B7BE",
  3059. appName: "跑腿商家",
  3060. appVersion: "1.0.4",
  3061. appVersionCode: "104",
  3062. appLanguage: getAppLanguage(hostLanguage),
  3063. uniCompileVersion: "3.7.11",
  3064. uniRuntimeVersion: "3.7.11",
  3065. uniPlatform: undefined || "mp-weixin",
  3066. deviceBrand: deviceBrand,
  3067. deviceModel: model,
  3068. deviceType: deviceType,
  3069. devicePixelRatio: _devicePixelRatio,
  3070. deviceOrientation: _deviceOrientation,
  3071. osName: osName.toLocaleLowerCase(),
  3072. osVersion: osVersion,
  3073. hostTheme: theme,
  3074. hostVersion: hostVersion,
  3075. hostLanguage: hostLanguage,
  3076. hostName: _hostName,
  3077. hostSDKVersion: _SDKVersion,
  3078. hostFontSizeSetting: fontSizeSetting,
  3079. windowTop: 0,
  3080. windowBottom: 0,
  3081. // TODO
  3082. osLanguage: undefined,
  3083. osTheme: undefined,
  3084. ua: undefined,
  3085. hostPackageName: undefined,
  3086. browserName: undefined,
  3087. browserVersion: undefined
  3088. };
  3089. Object.assign(result, parameters, extraParam);
  3090. }
  3091. function getGetDeviceType(result, model) {
  3092. var deviceType = result.deviceType || 'phone';
  3093. {
  3094. var deviceTypeMaps = {
  3095. ipad: 'pad',
  3096. windows: 'pc',
  3097. mac: 'pc'
  3098. };
  3099. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  3100. var _model = model.toLocaleLowerCase();
  3101. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  3102. var _m = deviceTypeMapsKeys[index];
  3103. if (_model.indexOf(_m) !== -1) {
  3104. deviceType = deviceTypeMaps[_m];
  3105. break;
  3106. }
  3107. }
  3108. }
  3109. return deviceType;
  3110. }
  3111. function getDeviceBrand(brand) {
  3112. var deviceBrand = brand;
  3113. if (deviceBrand) {
  3114. deviceBrand = brand.toLocaleLowerCase();
  3115. }
  3116. return deviceBrand;
  3117. }
  3118. function getAppLanguage(defaultLanguage) {
  3119. return getLocale$1 ? getLocale$1() : defaultLanguage;
  3120. }
  3121. function getHostName(result) {
  3122. var _platform = 'WeChat';
  3123. var _hostName = result.hostName || _platform; // mp-jd
  3124. {
  3125. if (result.environment) {
  3126. _hostName = result.environment;
  3127. } else if (result.host && result.host.env) {
  3128. _hostName = result.host.env;
  3129. }
  3130. }
  3131. return _hostName;
  3132. }
  3133. var getSystemInfo = {
  3134. returnValue: function returnValue(result) {
  3135. useDeviceId(result);
  3136. addSafeAreaInsets(result);
  3137. populateParameters(result);
  3138. }
  3139. };
  3140. var showActionSheet = {
  3141. args: function args(fromArgs) {
  3142. if ((0, _typeof2.default)(fromArgs) === 'object') {
  3143. fromArgs.alertText = fromArgs.title;
  3144. }
  3145. }
  3146. };
  3147. var getAppBaseInfo = {
  3148. returnValue: function returnValue(result) {
  3149. var _result = result,
  3150. version = _result.version,
  3151. language = _result.language,
  3152. SDKVersion = _result.SDKVersion,
  3153. theme = _result.theme;
  3154. var _hostName = getHostName(result);
  3155. var hostLanguage = language.replace('_', '-');
  3156. result = sortObject(Object.assign(result, {
  3157. appId: "__UNI__1C3B7BE",
  3158. appName: "跑腿商家",
  3159. appVersion: "1.0.4",
  3160. appVersionCode: "104",
  3161. appLanguage: getAppLanguage(hostLanguage),
  3162. hostVersion: version,
  3163. hostLanguage: hostLanguage,
  3164. hostName: _hostName,
  3165. hostSDKVersion: SDKVersion,
  3166. hostTheme: theme
  3167. }));
  3168. }
  3169. };
  3170. var getDeviceInfo = {
  3171. returnValue: function returnValue(result) {
  3172. var _result2 = result,
  3173. brand = _result2.brand,
  3174. model = _result2.model;
  3175. var deviceType = getGetDeviceType(result, model);
  3176. var deviceBrand = getDeviceBrand(brand);
  3177. useDeviceId(result);
  3178. result = sortObject(Object.assign(result, {
  3179. deviceType: deviceType,
  3180. deviceBrand: deviceBrand,
  3181. deviceModel: model
  3182. }));
  3183. }
  3184. };
  3185. var getWindowInfo = {
  3186. returnValue: function returnValue(result) {
  3187. addSafeAreaInsets(result);
  3188. result = sortObject(Object.assign(result, {
  3189. windowTop: 0,
  3190. windowBottom: 0
  3191. }));
  3192. }
  3193. };
  3194. var getAppAuthorizeSetting = {
  3195. returnValue: function returnValue(result) {
  3196. var locationReducedAccuracy = result.locationReducedAccuracy;
  3197. result.locationAccuracy = 'unsupported';
  3198. if (locationReducedAccuracy === true) {
  3199. result.locationAccuracy = 'reduced';
  3200. } else if (locationReducedAccuracy === false) {
  3201. result.locationAccuracy = 'full';
  3202. }
  3203. }
  3204. };
  3205. // import navigateTo from 'uni-helpers/navigate-to'
  3206. var compressImage = {
  3207. args: function args(fromArgs) {
  3208. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  3209. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  3210. fromArgs.compressHeight = fromArgs.compressedHeight;
  3211. }
  3212. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  3213. fromArgs.compressWidth = fromArgs.compressedWidth;
  3214. }
  3215. }
  3216. };
  3217. var protocols = {
  3218. redirectTo: redirectTo,
  3219. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  3220. previewImage: previewImage,
  3221. getSystemInfo: getSystemInfo,
  3222. getSystemInfoSync: getSystemInfo,
  3223. showActionSheet: showActionSheet,
  3224. getAppBaseInfo: getAppBaseInfo,
  3225. getDeviceInfo: getDeviceInfo,
  3226. getWindowInfo: getWindowInfo,
  3227. getAppAuthorizeSetting: getAppAuthorizeSetting,
  3228. compressImage: compressImage
  3229. };
  3230. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  3231. var canIUses = [];
  3232. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  3233. function processCallback(methodName, method, returnValue) {
  3234. return function (res) {
  3235. return method(processReturnValue(methodName, res, returnValue));
  3236. };
  3237. }
  3238. function processArgs(methodName, fromArgs) {
  3239. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3240. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  3241. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  3242. if (isPlainObject(fromArgs)) {
  3243. // 一般 api 的参数解析
  3244. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  3245. if (isFn(argsOption)) {
  3246. argsOption = argsOption(fromArgs, toArgs) || {};
  3247. }
  3248. for (var key in fromArgs) {
  3249. if (hasOwn(argsOption, key)) {
  3250. var keyOption = argsOption[key];
  3251. if (isFn(keyOption)) {
  3252. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  3253. }
  3254. if (!keyOption) {
  3255. // 不支持的参数
  3256. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  3257. } else if (isStr(keyOption)) {
  3258. // 重写参数 key
  3259. toArgs[keyOption] = fromArgs[key];
  3260. } else if (isPlainObject(keyOption)) {
  3261. // {name:newName,value:value}可重新指定参数 key:value
  3262. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  3263. }
  3264. } else if (CALLBACKS.indexOf(key) !== -1) {
  3265. if (isFn(fromArgs[key])) {
  3266. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  3267. }
  3268. } else {
  3269. if (!keepFromArgs) {
  3270. toArgs[key] = fromArgs[key];
  3271. }
  3272. }
  3273. }
  3274. return toArgs;
  3275. } else if (isFn(fromArgs)) {
  3276. fromArgs = processCallback(methodName, fromArgs, returnValue);
  3277. }
  3278. return fromArgs;
  3279. }
  3280. function processReturnValue(methodName, res, returnValue) {
  3281. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  3282. if (isFn(protocols.returnValue)) {
  3283. // 处理通用 returnValue
  3284. res = protocols.returnValue(methodName, res);
  3285. }
  3286. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  3287. }
  3288. function wrapper(methodName, method) {
  3289. if (hasOwn(protocols, methodName)) {
  3290. var protocol = protocols[methodName];
  3291. if (!protocol) {
  3292. // 暂不支持的 api
  3293. return function () {
  3294. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  3295. };
  3296. }
  3297. return function (arg1, arg2) {
  3298. // 目前 api 最多两个参数
  3299. var options = protocol;
  3300. if (isFn(protocol)) {
  3301. options = protocol(arg1);
  3302. }
  3303. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  3304. var args = [arg1];
  3305. if (typeof arg2 !== 'undefined') {
  3306. args.push(arg2);
  3307. }
  3308. if (isFn(options.name)) {
  3309. methodName = options.name(arg1);
  3310. } else if (isStr(options.name)) {
  3311. methodName = options.name;
  3312. }
  3313. var returnValue = wx[methodName].apply(wx, args);
  3314. if (isSyncApi(methodName)) {
  3315. // 同步 api
  3316. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  3317. }
  3318. return returnValue;
  3319. };
  3320. }
  3321. return method;
  3322. }
  3323. var todoApis = Object.create(null);
  3324. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  3325. function createTodoApi(name) {
  3326. return function todoApi(_ref) {
  3327. var fail = _ref.fail,
  3328. complete = _ref.complete;
  3329. var res = {
  3330. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  3331. };
  3332. isFn(fail) && fail(res);
  3333. isFn(complete) && complete(res);
  3334. };
  3335. }
  3336. TODOS.forEach(function (name) {
  3337. todoApis[name] = createTodoApi(name);
  3338. });
  3339. var providers = {
  3340. oauth: ['weixin'],
  3341. share: ['weixin'],
  3342. payment: ['wxpay'],
  3343. push: ['weixin']
  3344. };
  3345. function getProvider(_ref2) {
  3346. var service = _ref2.service,
  3347. success = _ref2.success,
  3348. fail = _ref2.fail,
  3349. complete = _ref2.complete;
  3350. var res = false;
  3351. if (providers[service]) {
  3352. res = {
  3353. errMsg: 'getProvider:ok',
  3354. service: service,
  3355. provider: providers[service]
  3356. };
  3357. isFn(success) && success(res);
  3358. } else {
  3359. res = {
  3360. errMsg: 'getProvider:fail service not found'
  3361. };
  3362. isFn(fail) && fail(res);
  3363. }
  3364. isFn(complete) && complete(res);
  3365. }
  3366. var extraApi = /*#__PURE__*/Object.freeze({
  3367. __proto__: null,
  3368. getProvider: getProvider
  3369. });
  3370. var getEmitter = function () {
  3371. var Emitter;
  3372. return function getUniEmitter() {
  3373. if (!Emitter) {
  3374. Emitter = new _vue.default();
  3375. }
  3376. return Emitter;
  3377. };
  3378. }();
  3379. function apply(ctx, method, args) {
  3380. return ctx[method].apply(ctx, args);
  3381. }
  3382. function $on() {
  3383. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  3384. }
  3385. function $off() {
  3386. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  3387. }
  3388. function $once() {
  3389. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  3390. }
  3391. function $emit() {
  3392. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  3393. }
  3394. var eventApi = /*#__PURE__*/Object.freeze({
  3395. __proto__: null,
  3396. $on: $on,
  3397. $off: $off,
  3398. $once: $once,
  3399. $emit: $emit
  3400. });
  3401. /**
  3402. * 框架内 try-catch
  3403. */
  3404. /**
  3405. * 开发者 try-catch
  3406. */
  3407. function tryCatch(fn) {
  3408. return function () {
  3409. try {
  3410. return fn.apply(fn, arguments);
  3411. } catch (e) {
  3412. // TODO
  3413. console.error(e);
  3414. }
  3415. };
  3416. }
  3417. function getApiCallbacks(params) {
  3418. var apiCallbacks = {};
  3419. for (var name in params) {
  3420. var param = params[name];
  3421. if (isFn(param)) {
  3422. apiCallbacks[name] = tryCatch(param);
  3423. delete params[name];
  3424. }
  3425. }
  3426. return apiCallbacks;
  3427. }
  3428. var cid;
  3429. var cidErrMsg;
  3430. var enabled;
  3431. function normalizePushMessage(message) {
  3432. try {
  3433. return JSON.parse(message);
  3434. } catch (e) {}
  3435. return message;
  3436. }
  3437. function invokePushCallback(args) {
  3438. if (args.type === 'enabled') {
  3439. enabled = true;
  3440. } else if (args.type === 'clientId') {
  3441. cid = args.cid;
  3442. cidErrMsg = args.errMsg;
  3443. invokeGetPushCidCallbacks(cid, args.errMsg);
  3444. } else if (args.type === 'pushMsg') {
  3445. var message = {
  3446. type: 'receive',
  3447. data: normalizePushMessage(args.message)
  3448. };
  3449. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  3450. var callback = onPushMessageCallbacks[i];
  3451. callback(message);
  3452. // 该消息已被阻止
  3453. if (message.stopped) {
  3454. break;
  3455. }
  3456. }
  3457. } else if (args.type === 'click') {
  3458. onPushMessageCallbacks.forEach(function (callback) {
  3459. callback({
  3460. type: 'click',
  3461. data: normalizePushMessage(args.message)
  3462. });
  3463. });
  3464. }
  3465. }
  3466. var getPushCidCallbacks = [];
  3467. function invokeGetPushCidCallbacks(cid, errMsg) {
  3468. getPushCidCallbacks.forEach(function (callback) {
  3469. callback(cid, errMsg);
  3470. });
  3471. getPushCidCallbacks.length = 0;
  3472. }
  3473. function getPushClientId(args) {
  3474. if (!isPlainObject(args)) {
  3475. args = {};
  3476. }
  3477. var _getApiCallbacks = getApiCallbacks(args),
  3478. success = _getApiCallbacks.success,
  3479. fail = _getApiCallbacks.fail,
  3480. complete = _getApiCallbacks.complete;
  3481. var hasSuccess = isFn(success);
  3482. var hasFail = isFn(fail);
  3483. var hasComplete = isFn(complete);
  3484. Promise.resolve().then(function () {
  3485. if (typeof enabled === 'undefined') {
  3486. enabled = false;
  3487. cid = '';
  3488. cidErrMsg = 'uniPush is not enabled';
  3489. }
  3490. getPushCidCallbacks.push(function (cid, errMsg) {
  3491. var res;
  3492. if (cid) {
  3493. res = {
  3494. errMsg: 'getPushClientId:ok',
  3495. cid: cid
  3496. };
  3497. hasSuccess && success(res);
  3498. } else {
  3499. res = {
  3500. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  3501. };
  3502. hasFail && fail(res);
  3503. }
  3504. hasComplete && complete(res);
  3505. });
  3506. if (typeof cid !== 'undefined') {
  3507. invokeGetPushCidCallbacks(cid, cidErrMsg);
  3508. }
  3509. });
  3510. }
  3511. var onPushMessageCallbacks = [];
  3512. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  3513. var onPushMessage = function onPushMessage(fn) {
  3514. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  3515. onPushMessageCallbacks.push(fn);
  3516. }
  3517. };
  3518. var offPushMessage = function offPushMessage(fn) {
  3519. if (!fn) {
  3520. onPushMessageCallbacks.length = 0;
  3521. } else {
  3522. var index = onPushMessageCallbacks.indexOf(fn);
  3523. if (index > -1) {
  3524. onPushMessageCallbacks.splice(index, 1);
  3525. }
  3526. }
  3527. };
  3528. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  3529. if (!baseInfo) {
  3530. baseInfo = wx.getSystemInfoSync();
  3531. }
  3532. var host = baseInfo ? baseInfo.host : null;
  3533. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  3534. var api = /*#__PURE__*/Object.freeze({
  3535. __proto__: null,
  3536. shareVideoMessage: shareVideoMessage,
  3537. getPushClientId: getPushClientId,
  3538. onPushMessage: onPushMessage,
  3539. offPushMessage: offPushMessage,
  3540. invokePushCallback: invokePushCallback
  3541. });
  3542. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  3543. function findVmByVueId(vm, vuePid) {
  3544. var $children = vm.$children;
  3545. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  3546. for (var i = $children.length - 1; i >= 0; i--) {
  3547. var childVm = $children[i];
  3548. if (childVm.$scope._$vueId === vuePid) {
  3549. return childVm;
  3550. }
  3551. }
  3552. // 反向递归查找
  3553. var parentVm;
  3554. for (var _i = $children.length - 1; _i >= 0; _i--) {
  3555. parentVm = findVmByVueId($children[_i], vuePid);
  3556. if (parentVm) {
  3557. return parentVm;
  3558. }
  3559. }
  3560. }
  3561. function initBehavior(options) {
  3562. return Behavior(options);
  3563. }
  3564. function isPage() {
  3565. return !!this.route;
  3566. }
  3567. function initRelation(detail) {
  3568. this.triggerEvent('__l', detail);
  3569. }
  3570. function selectAllComponents(mpInstance, selector, $refs) {
  3571. var components = mpInstance.selectAllComponents(selector) || [];
  3572. components.forEach(function (component) {
  3573. var ref = component.dataset.ref;
  3574. $refs[ref] = component.$vm || toSkip(component);
  3575. {
  3576. if (component.dataset.vueGeneric === 'scoped') {
  3577. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  3578. selectAllComponents(scopedComponent, selector, $refs);
  3579. });
  3580. }
  3581. }
  3582. });
  3583. }
  3584. function syncRefs(refs, newRefs) {
  3585. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  3586. var newKeys = Object.keys(newRefs);
  3587. newKeys.forEach(function (key) {
  3588. var oldValue = refs[key];
  3589. var newValue = newRefs[key];
  3590. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  3591. return oldValue.includes(value);
  3592. })) {
  3593. return;
  3594. }
  3595. refs[key] = newValue;
  3596. oldKeys.delete(key);
  3597. });
  3598. oldKeys.forEach(function (key) {
  3599. delete refs[key];
  3600. });
  3601. return refs;
  3602. }
  3603. function initRefs(vm) {
  3604. var mpInstance = vm.$scope;
  3605. var refs = {};
  3606. Object.defineProperty(vm, '$refs', {
  3607. get: function get() {
  3608. var $refs = {};
  3609. selectAllComponents(mpInstance, '.vue-ref', $refs);
  3610. // TODO 暂不考虑 for 中的 scoped
  3611. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  3612. forComponents.forEach(function (component) {
  3613. var ref = component.dataset.ref;
  3614. if (!$refs[ref]) {
  3615. $refs[ref] = [];
  3616. }
  3617. $refs[ref].push(component.$vm || toSkip(component));
  3618. });
  3619. return syncRefs(refs, $refs);
  3620. }
  3621. });
  3622. }
  3623. function handleLink(event) {
  3624. var _ref3 = event.detail || event.value,
  3625. vuePid = _ref3.vuePid,
  3626. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  3627. var parentVm;
  3628. if (vuePid) {
  3629. parentVm = findVmByVueId(this.$vm, vuePid);
  3630. }
  3631. if (!parentVm) {
  3632. parentVm = this.$vm;
  3633. }
  3634. vueOptions.parent = parentVm;
  3635. }
  3636. function markMPComponent(component) {
  3637. // 在 Vue 中标记为小程序组件
  3638. var IS_MP = '__v_isMPComponent';
  3639. Object.defineProperty(component, IS_MP, {
  3640. configurable: true,
  3641. enumerable: false,
  3642. value: true
  3643. });
  3644. return component;
  3645. }
  3646. function toSkip(obj) {
  3647. var OB = '__ob__';
  3648. var SKIP = '__v_skip';
  3649. if (isObject(obj) && Object.isExtensible(obj)) {
  3650. // 避免被 @vue/composition-api 观测
  3651. Object.defineProperty(obj, OB, {
  3652. configurable: true,
  3653. enumerable: false,
  3654. value: (0, _defineProperty2.default)({}, SKIP, true)
  3655. });
  3656. }
  3657. return obj;
  3658. }
  3659. var WORKLET_RE = /_(.*)_worklet_factory_/;
  3660. function initWorkletMethods(mpMethods, vueMethods) {
  3661. if (vueMethods) {
  3662. Object.keys(vueMethods).forEach(function (name) {
  3663. var matches = name.match(WORKLET_RE);
  3664. if (matches) {
  3665. var workletName = matches[1];
  3666. mpMethods[name] = vueMethods[name];
  3667. mpMethods[workletName] = vueMethods[workletName];
  3668. }
  3669. });
  3670. }
  3671. }
  3672. var MPPage = Page;
  3673. var MPComponent = Component;
  3674. var customizeRE = /:/g;
  3675. var customize = cached(function (str) {
  3676. return camelize(str.replace(customizeRE, '-'));
  3677. });
  3678. function initTriggerEvent(mpInstance) {
  3679. var oldTriggerEvent = mpInstance.triggerEvent;
  3680. var newTriggerEvent = function newTriggerEvent(event) {
  3681. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  3682. args[_key3 - 1] = arguments[_key3];
  3683. }
  3684. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  3685. if (this.$vm || this.dataset && this.dataset.comType) {
  3686. event = customize(event);
  3687. } else {
  3688. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  3689. var newEvent = customize(event);
  3690. if (newEvent !== event) {
  3691. oldTriggerEvent.apply(this, [newEvent].concat(args));
  3692. }
  3693. }
  3694. return oldTriggerEvent.apply(this, [event].concat(args));
  3695. };
  3696. try {
  3697. // 京东小程序 triggerEvent 为只读
  3698. mpInstance.triggerEvent = newTriggerEvent;
  3699. } catch (error) {
  3700. mpInstance._triggerEvent = newTriggerEvent;
  3701. }
  3702. }
  3703. function initHook(name, options, isComponent) {
  3704. var oldHook = options[name];
  3705. options[name] = function () {
  3706. markMPComponent(this);
  3707. initTriggerEvent(this);
  3708. if (oldHook) {
  3709. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  3710. args[_key4] = arguments[_key4];
  3711. }
  3712. return oldHook.apply(this, args);
  3713. }
  3714. };
  3715. }
  3716. if (!MPPage.__$wrappered) {
  3717. MPPage.__$wrappered = true;
  3718. Page = function Page() {
  3719. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3720. initHook('onLoad', options);
  3721. return MPPage(options);
  3722. };
  3723. Page.after = MPPage.after;
  3724. Component = function Component() {
  3725. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3726. initHook('created', options);
  3727. return MPComponent(options);
  3728. };
  3729. }
  3730. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  3731. function initMocks(vm, mocks) {
  3732. var mpInstance = vm.$mp[vm.mpType];
  3733. mocks.forEach(function (mock) {
  3734. if (hasOwn(mpInstance, mock)) {
  3735. vm[mock] = mpInstance[mock];
  3736. }
  3737. });
  3738. }
  3739. function hasHook(hook, vueOptions) {
  3740. if (!vueOptions) {
  3741. return true;
  3742. }
  3743. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  3744. return true;
  3745. }
  3746. vueOptions = vueOptions.default || vueOptions;
  3747. if (isFn(vueOptions)) {
  3748. if (isFn(vueOptions.extendOptions[hook])) {
  3749. return true;
  3750. }
  3751. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  3752. return true;
  3753. }
  3754. return false;
  3755. }
  3756. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  3757. return true;
  3758. }
  3759. var mixins = vueOptions.mixins;
  3760. if (Array.isArray(mixins)) {
  3761. return !!mixins.find(function (mixin) {
  3762. return hasHook(hook, mixin);
  3763. });
  3764. }
  3765. }
  3766. function initHooks(mpOptions, hooks, vueOptions) {
  3767. hooks.forEach(function (hook) {
  3768. if (hasHook(hook, vueOptions)) {
  3769. mpOptions[hook] = function (args) {
  3770. return this.$vm && this.$vm.__call_hook(hook, args);
  3771. };
  3772. }
  3773. });
  3774. }
  3775. function initUnknownHooks(mpOptions, vueOptions) {
  3776. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3777. findHooks(vueOptions).forEach(function (hook) {
  3778. return initHook$1(mpOptions, hook, excludes);
  3779. });
  3780. }
  3781. function findHooks(vueOptions) {
  3782. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  3783. if (vueOptions) {
  3784. Object.keys(vueOptions).forEach(function (name) {
  3785. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  3786. hooks.push(name);
  3787. }
  3788. });
  3789. }
  3790. return hooks;
  3791. }
  3792. function initHook$1(mpOptions, hook, excludes) {
  3793. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  3794. mpOptions[hook] = function (args) {
  3795. return this.$vm && this.$vm.__call_hook(hook, args);
  3796. };
  3797. }
  3798. }
  3799. function initVueComponent(Vue, vueOptions) {
  3800. vueOptions = vueOptions.default || vueOptions;
  3801. var VueComponent;
  3802. if (isFn(vueOptions)) {
  3803. VueComponent = vueOptions;
  3804. } else {
  3805. VueComponent = Vue.extend(vueOptions);
  3806. }
  3807. vueOptions = VueComponent.options;
  3808. return [VueComponent, vueOptions];
  3809. }
  3810. function initSlots(vm, vueSlots) {
  3811. if (Array.isArray(vueSlots) && vueSlots.length) {
  3812. var $slots = Object.create(null);
  3813. vueSlots.forEach(function (slotName) {
  3814. $slots[slotName] = true;
  3815. });
  3816. vm.$scopedSlots = vm.$slots = $slots;
  3817. }
  3818. }
  3819. function initVueIds(vueIds, mpInstance) {
  3820. vueIds = (vueIds || '').split(',');
  3821. var len = vueIds.length;
  3822. if (len === 1) {
  3823. mpInstance._$vueId = vueIds[0];
  3824. } else if (len === 2) {
  3825. mpInstance._$vueId = vueIds[0];
  3826. mpInstance._$vuePid = vueIds[1];
  3827. }
  3828. }
  3829. function initData(vueOptions, context) {
  3830. var data = vueOptions.data || {};
  3831. var methods = vueOptions.methods || {};
  3832. if (typeof data === 'function') {
  3833. try {
  3834. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  3835. } catch (e) {
  3836. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"跑腿商家","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  3837. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  3838. }
  3839. }
  3840. } else {
  3841. try {
  3842. // 对 data 格式化
  3843. data = JSON.parse(JSON.stringify(data));
  3844. } catch (e) {}
  3845. }
  3846. if (!isPlainObject(data)) {
  3847. data = {};
  3848. }
  3849. Object.keys(methods).forEach(function (methodName) {
  3850. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  3851. data[methodName] = methods[methodName];
  3852. }
  3853. });
  3854. return data;
  3855. }
  3856. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  3857. function createObserver(name) {
  3858. return function observer(newVal, oldVal) {
  3859. if (this.$vm) {
  3860. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  3861. }
  3862. };
  3863. }
  3864. function initBehaviors(vueOptions, initBehavior) {
  3865. var vueBehaviors = vueOptions.behaviors;
  3866. var vueExtends = vueOptions.extends;
  3867. var vueMixins = vueOptions.mixins;
  3868. var vueProps = vueOptions.props;
  3869. if (!vueProps) {
  3870. vueOptions.props = vueProps = [];
  3871. }
  3872. var behaviors = [];
  3873. if (Array.isArray(vueBehaviors)) {
  3874. vueBehaviors.forEach(function (behavior) {
  3875. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  3876. if (behavior === 'uni://form-field') {
  3877. if (Array.isArray(vueProps)) {
  3878. vueProps.push('name');
  3879. vueProps.push('value');
  3880. } else {
  3881. vueProps.name = {
  3882. type: String,
  3883. default: ''
  3884. };
  3885. vueProps.value = {
  3886. type: [String, Number, Boolean, Array, Object, Date],
  3887. default: ''
  3888. };
  3889. }
  3890. }
  3891. });
  3892. }
  3893. if (isPlainObject(vueExtends) && vueExtends.props) {
  3894. behaviors.push(initBehavior({
  3895. properties: initProperties(vueExtends.props, true)
  3896. }));
  3897. }
  3898. if (Array.isArray(vueMixins)) {
  3899. vueMixins.forEach(function (vueMixin) {
  3900. if (isPlainObject(vueMixin) && vueMixin.props) {
  3901. behaviors.push(initBehavior({
  3902. properties: initProperties(vueMixin.props, true)
  3903. }));
  3904. }
  3905. });
  3906. }
  3907. return behaviors;
  3908. }
  3909. function parsePropType(key, type, defaultValue, file) {
  3910. // [String]=>String
  3911. if (Array.isArray(type) && type.length === 1) {
  3912. return type[0];
  3913. }
  3914. return type;
  3915. }
  3916. function initProperties(props) {
  3917. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3918. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  3919. var options = arguments.length > 3 ? arguments[3] : undefined;
  3920. var properties = {};
  3921. if (!isBehavior) {
  3922. properties.vueId = {
  3923. type: String,
  3924. value: ''
  3925. };
  3926. {
  3927. if (options.virtualHost) {
  3928. properties.virtualHostStyle = {
  3929. type: null,
  3930. value: ''
  3931. };
  3932. properties.virtualHostClass = {
  3933. type: null,
  3934. value: ''
  3935. };
  3936. }
  3937. }
  3938. // scopedSlotsCompiler auto
  3939. properties.scopedSlotsCompiler = {
  3940. type: String,
  3941. value: ''
  3942. };
  3943. properties.vueSlots = {
  3944. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  3945. type: null,
  3946. value: [],
  3947. observer: function observer(newVal, oldVal) {
  3948. var $slots = Object.create(null);
  3949. newVal.forEach(function (slotName) {
  3950. $slots[slotName] = true;
  3951. });
  3952. this.setData({
  3953. $slots: $slots
  3954. });
  3955. }
  3956. };
  3957. }
  3958. if (Array.isArray(props)) {
  3959. // ['title']
  3960. props.forEach(function (key) {
  3961. properties[key] = {
  3962. type: null,
  3963. observer: createObserver(key)
  3964. };
  3965. });
  3966. } else if (isPlainObject(props)) {
  3967. // {title:{type:String,default:''},content:String}
  3968. Object.keys(props).forEach(function (key) {
  3969. var opts = props[key];
  3970. if (isPlainObject(opts)) {
  3971. // title:{type:String,default:''}
  3972. var value = opts.default;
  3973. if (isFn(value)) {
  3974. value = value();
  3975. }
  3976. opts.type = parsePropType(key, opts.type);
  3977. properties[key] = {
  3978. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  3979. value: value,
  3980. observer: createObserver(key)
  3981. };
  3982. } else {
  3983. // content:String
  3984. var type = parsePropType(key, opts);
  3985. properties[key] = {
  3986. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  3987. observer: createObserver(key)
  3988. };
  3989. }
  3990. });
  3991. }
  3992. return properties;
  3993. }
  3994. function wrapper$1(event) {
  3995. // TODO 又得兼容 mpvue 的 mp 对象
  3996. try {
  3997. event.mp = JSON.parse(JSON.stringify(event));
  3998. } catch (e) {}
  3999. event.stopPropagation = noop;
  4000. event.preventDefault = noop;
  4001. event.target = event.target || {};
  4002. if (!hasOwn(event, 'detail')) {
  4003. event.detail = {};
  4004. }
  4005. if (hasOwn(event, 'markerId')) {
  4006. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  4007. event.detail.markerId = event.markerId;
  4008. }
  4009. if (isPlainObject(event.detail)) {
  4010. event.target = Object.assign({}, event.target, event.detail);
  4011. }
  4012. return event;
  4013. }
  4014. function getExtraValue(vm, dataPathsArray) {
  4015. var context = vm;
  4016. dataPathsArray.forEach(function (dataPathArray) {
  4017. var dataPath = dataPathArray[0];
  4018. var value = dataPathArray[2];
  4019. if (dataPath || typeof value !== 'undefined') {
  4020. // ['','',index,'disable']
  4021. var propPath = dataPathArray[1];
  4022. var valuePath = dataPathArray[3];
  4023. var vFor;
  4024. if (Number.isInteger(dataPath)) {
  4025. vFor = dataPath;
  4026. } else if (!dataPath) {
  4027. vFor = context;
  4028. } else if (typeof dataPath === 'string' && dataPath) {
  4029. if (dataPath.indexOf('#s#') === 0) {
  4030. vFor = dataPath.substr(3);
  4031. } else {
  4032. vFor = vm.__get_value(dataPath, context);
  4033. }
  4034. }
  4035. if (Number.isInteger(vFor)) {
  4036. context = value;
  4037. } else if (!propPath) {
  4038. context = vFor[value];
  4039. } else {
  4040. if (Array.isArray(vFor)) {
  4041. context = vFor.find(function (vForItem) {
  4042. return vm.__get_value(propPath, vForItem) === value;
  4043. });
  4044. } else if (isPlainObject(vFor)) {
  4045. context = Object.keys(vFor).find(function (vForKey) {
  4046. return vm.__get_value(propPath, vFor[vForKey]) === value;
  4047. });
  4048. } else {
  4049. console.error('v-for 暂不支持循环数据:', vFor);
  4050. }
  4051. }
  4052. if (valuePath) {
  4053. context = vm.__get_value(valuePath, context);
  4054. }
  4055. }
  4056. });
  4057. return context;
  4058. }
  4059. function processEventExtra(vm, extra, event, __args__) {
  4060. var extraObj = {};
  4061. if (Array.isArray(extra) && extra.length) {
  4062. /**
  4063. *[
  4064. * ['data.items', 'data.id', item.data.id],
  4065. * ['metas', 'id', meta.id]
  4066. *],
  4067. *[
  4068. * ['data.items', 'data.id', item.data.id],
  4069. * ['metas', 'id', meta.id]
  4070. *],
  4071. *'test'
  4072. */
  4073. extra.forEach(function (dataPath, index) {
  4074. if (typeof dataPath === 'string') {
  4075. if (!dataPath) {
  4076. // model,prop.sync
  4077. extraObj['$' + index] = vm;
  4078. } else {
  4079. if (dataPath === '$event') {
  4080. // $event
  4081. extraObj['$' + index] = event;
  4082. } else if (dataPath === 'arguments') {
  4083. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  4084. } else if (dataPath.indexOf('$event.') === 0) {
  4085. // $event.target.value
  4086. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  4087. } else {
  4088. extraObj['$' + index] = vm.__get_value(dataPath);
  4089. }
  4090. }
  4091. } else {
  4092. extraObj['$' + index] = getExtraValue(vm, dataPath);
  4093. }
  4094. });
  4095. }
  4096. return extraObj;
  4097. }
  4098. function getObjByArray(arr) {
  4099. var obj = {};
  4100. for (var i = 1; i < arr.length; i++) {
  4101. var element = arr[i];
  4102. obj[element[0]] = element[1];
  4103. }
  4104. return obj;
  4105. }
  4106. function processEventArgs(vm, event) {
  4107. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  4108. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  4109. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  4110. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  4111. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  4112. // fixed 用户直接触发 mpInstance.triggerEvent
  4113. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  4114. if (isCustom) {
  4115. // 自定义事件
  4116. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  4117. if (!args.length) {
  4118. // 无参数,直接传入 event 或 detail 数组
  4119. if (isCustomMPEvent) {
  4120. return [event];
  4121. }
  4122. return __args__;
  4123. }
  4124. }
  4125. var extraObj = processEventExtra(vm, extra, event, __args__);
  4126. var ret = [];
  4127. args.forEach(function (arg) {
  4128. if (arg === '$event') {
  4129. if (methodName === '__set_model' && !isCustom) {
  4130. // input v-model value
  4131. ret.push(event.target.value);
  4132. } else {
  4133. if (isCustom && !isCustomMPEvent) {
  4134. ret.push(__args__[0]);
  4135. } else {
  4136. // wxcomponent 组件或内置组件
  4137. ret.push(event);
  4138. }
  4139. }
  4140. } else {
  4141. if (Array.isArray(arg) && arg[0] === 'o') {
  4142. ret.push(getObjByArray(arg));
  4143. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  4144. ret.push(extraObj[arg]);
  4145. } else {
  4146. ret.push(arg);
  4147. }
  4148. }
  4149. });
  4150. return ret;
  4151. }
  4152. var ONCE = '~';
  4153. var CUSTOM = '^';
  4154. function isMatchEventType(eventType, optType) {
  4155. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  4156. }
  4157. function getContextVm(vm) {
  4158. var $parent = vm.$parent;
  4159. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  4160. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  4161. $parent = $parent.$parent;
  4162. }
  4163. return $parent && $parent.$parent;
  4164. }
  4165. function handleEvent(event) {
  4166. var _this2 = this;
  4167. event = wrapper$1(event);
  4168. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  4169. var dataset = (event.currentTarget || event.target).dataset;
  4170. if (!dataset) {
  4171. return console.warn('事件信息不存在');
  4172. }
  4173. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  4174. if (!eventOpts) {
  4175. return console.warn('事件信息不存在');
  4176. }
  4177. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  4178. var eventType = event.type;
  4179. var ret = [];
  4180. eventOpts.forEach(function (eventOpt) {
  4181. var type = eventOpt[0];
  4182. var eventsArray = eventOpt[1];
  4183. var isCustom = type.charAt(0) === CUSTOM;
  4184. type = isCustom ? type.slice(1) : type;
  4185. var isOnce = type.charAt(0) === ONCE;
  4186. type = isOnce ? type.slice(1) : type;
  4187. if (eventsArray && isMatchEventType(eventType, type)) {
  4188. eventsArray.forEach(function (eventArray) {
  4189. var methodName = eventArray[0];
  4190. if (methodName) {
  4191. var handlerCtx = _this2.$vm;
  4192. if (handlerCtx.$options.generic) {
  4193. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  4194. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  4195. }
  4196. if (methodName === '$emit') {
  4197. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  4198. return;
  4199. }
  4200. var handler = handlerCtx[methodName];
  4201. if (!isFn(handler)) {
  4202. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  4203. var path = _this2.route || _this2.is;
  4204. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  4205. }
  4206. if (isOnce) {
  4207. if (handler.once) {
  4208. return;
  4209. }
  4210. handler.once = true;
  4211. }
  4212. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  4213. params = Array.isArray(params) ? params : [];
  4214. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  4215. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  4216. // eslint-disable-next-line no-sparse-arrays
  4217. params = params.concat([,,,,,,,,,, event]);
  4218. }
  4219. ret.push(handler.apply(handlerCtx, params));
  4220. }
  4221. });
  4222. }
  4223. });
  4224. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  4225. return ret[0];
  4226. }
  4227. }
  4228. var eventChannels = {};
  4229. var eventChannelStack = [];
  4230. function getEventChannel(id) {
  4231. if (id) {
  4232. var eventChannel = eventChannels[id];
  4233. delete eventChannels[id];
  4234. return eventChannel;
  4235. }
  4236. return eventChannelStack.shift();
  4237. }
  4238. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  4239. function initEventChannel() {
  4240. _vue.default.prototype.getOpenerEventChannel = function () {
  4241. // 微信小程序使用自身getOpenerEventChannel
  4242. {
  4243. return this.$scope.getOpenerEventChannel();
  4244. }
  4245. };
  4246. var callHook = _vue.default.prototype.__call_hook;
  4247. _vue.default.prototype.__call_hook = function (hook, args) {
  4248. if (hook === 'onLoad' && args && args.__id__) {
  4249. this.__eventChannel__ = getEventChannel(args.__id__);
  4250. delete args.__id__;
  4251. }
  4252. return callHook.call(this, hook, args);
  4253. };
  4254. }
  4255. function initScopedSlotsParams() {
  4256. var center = {};
  4257. var parents = {};
  4258. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  4259. var has = center[vueId];
  4260. if (!has) {
  4261. parents[vueId] = this;
  4262. this.$on('hook:destroyed', function () {
  4263. delete parents[vueId];
  4264. });
  4265. }
  4266. return has;
  4267. };
  4268. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  4269. var data = center[vueId];
  4270. if (data) {
  4271. var object = data[name] || {};
  4272. return key ? object[key] : object;
  4273. } else {
  4274. parents[vueId] = this;
  4275. this.$on('hook:destroyed', function () {
  4276. delete parents[vueId];
  4277. });
  4278. }
  4279. };
  4280. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  4281. var vueIds = this.$options.propsData.vueId;
  4282. if (vueIds) {
  4283. var vueId = vueIds.split(',')[0];
  4284. var object = center[vueId] = center[vueId] || {};
  4285. object[name] = value;
  4286. if (parents[vueId]) {
  4287. parents[vueId].$forceUpdate();
  4288. }
  4289. }
  4290. };
  4291. _vue.default.mixin({
  4292. destroyed: function destroyed() {
  4293. var propsData = this.$options.propsData;
  4294. var vueId = propsData && propsData.vueId;
  4295. if (vueId) {
  4296. delete center[vueId];
  4297. delete parents[vueId];
  4298. }
  4299. }
  4300. });
  4301. }
  4302. function parseBaseApp(vm, _ref4) {
  4303. var mocks = _ref4.mocks,
  4304. initRefs = _ref4.initRefs;
  4305. initEventChannel();
  4306. {
  4307. initScopedSlotsParams();
  4308. }
  4309. if (vm.$options.store) {
  4310. _vue.default.prototype.$store = vm.$options.store;
  4311. }
  4312. uniIdMixin(_vue.default);
  4313. _vue.default.prototype.mpHost = "mp-weixin";
  4314. _vue.default.mixin({
  4315. beforeCreate: function beforeCreate() {
  4316. if (!this.$options.mpType) {
  4317. return;
  4318. }
  4319. this.mpType = this.$options.mpType;
  4320. this.$mp = (0, _defineProperty2.default)({
  4321. data: {}
  4322. }, this.mpType, this.$options.mpInstance);
  4323. this.$scope = this.$options.mpInstance;
  4324. delete this.$options.mpType;
  4325. delete this.$options.mpInstance;
  4326. if (this.mpType === 'page' && typeof getApp === 'function') {
  4327. // hack vue-i18n
  4328. var app = getApp();
  4329. if (app.$vm && app.$vm.$i18n) {
  4330. this._i18n = app.$vm.$i18n;
  4331. }
  4332. }
  4333. if (this.mpType !== 'app') {
  4334. initRefs(this);
  4335. initMocks(this, mocks);
  4336. }
  4337. }
  4338. });
  4339. var appOptions = {
  4340. onLaunch: function onLaunch(args) {
  4341. if (this.$vm) {
  4342. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  4343. return;
  4344. }
  4345. {
  4346. if (wx.canIUse && !wx.canIUse('nextTick')) {
  4347. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  4348. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  4349. }
  4350. }
  4351. this.$vm = vm;
  4352. this.$vm.$mp = {
  4353. app: this
  4354. };
  4355. this.$vm.$scope = this;
  4356. // vm 上也挂载 globalData
  4357. this.$vm.globalData = this.globalData;
  4358. this.$vm._isMounted = true;
  4359. this.$vm.__call_hook('mounted', args);
  4360. this.$vm.__call_hook('onLaunch', args);
  4361. }
  4362. };
  4363. // 兼容旧版本 globalData
  4364. appOptions.globalData = vm.$options.globalData || {};
  4365. // 将 methods 中的方法挂在 getApp() 中
  4366. var methods = vm.$options.methods;
  4367. if (methods) {
  4368. Object.keys(methods).forEach(function (name) {
  4369. appOptions[name] = methods[name];
  4370. });
  4371. }
  4372. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  4373. initHooks(appOptions, hooks);
  4374. initUnknownHooks(appOptions, vm.$options);
  4375. return appOptions;
  4376. }
  4377. function parseApp(vm) {
  4378. return parseBaseApp(vm, {
  4379. mocks: mocks,
  4380. initRefs: initRefs
  4381. });
  4382. }
  4383. function createApp(vm) {
  4384. App(parseApp(vm));
  4385. return vm;
  4386. }
  4387. var encodeReserveRE = /[!'()*]/g;
  4388. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  4389. return '%' + c.charCodeAt(0).toString(16);
  4390. };
  4391. var commaRE = /%2C/g;
  4392. // fixed encodeURIComponent which is more conformant to RFC3986:
  4393. // - escapes [!'()*]
  4394. // - preserve commas
  4395. var encode = function encode(str) {
  4396. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  4397. };
  4398. function stringifyQuery(obj) {
  4399. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  4400. var res = obj ? Object.keys(obj).map(function (key) {
  4401. var val = obj[key];
  4402. if (val === undefined) {
  4403. return '';
  4404. }
  4405. if (val === null) {
  4406. return encodeStr(key);
  4407. }
  4408. if (Array.isArray(val)) {
  4409. var result = [];
  4410. val.forEach(function (val2) {
  4411. if (val2 === undefined) {
  4412. return;
  4413. }
  4414. if (val2 === null) {
  4415. result.push(encodeStr(key));
  4416. } else {
  4417. result.push(encodeStr(key) + '=' + encodeStr(val2));
  4418. }
  4419. });
  4420. return result.join('&');
  4421. }
  4422. return encodeStr(key) + '=' + encodeStr(val);
  4423. }).filter(function (x) {
  4424. return x.length > 0;
  4425. }).join('&') : null;
  4426. return res ? "?".concat(res) : '';
  4427. }
  4428. function parseBaseComponent(vueComponentOptions) {
  4429. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  4430. isPage = _ref5.isPage,
  4431. initRelation = _ref5.initRelation;
  4432. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  4433. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  4434. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  4435. VueComponent = _initVueComponent2[0],
  4436. vueOptions = _initVueComponent2[1];
  4437. var options = _objectSpread({
  4438. multipleSlots: true,
  4439. addGlobalClass: true
  4440. }, vueOptions.options || {});
  4441. {
  4442. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  4443. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  4444. Object.assign(options, vueOptions['mp-weixin'].options);
  4445. }
  4446. }
  4447. var componentOptions = {
  4448. options: options,
  4449. data: initData(vueOptions, _vue.default.prototype),
  4450. behaviors: initBehaviors(vueOptions, initBehavior),
  4451. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  4452. lifetimes: {
  4453. attached: function attached() {
  4454. var properties = this.properties;
  4455. var options = {
  4456. mpType: isPage.call(this) ? 'page' : 'component',
  4457. mpInstance: this,
  4458. propsData: properties
  4459. };
  4460. initVueIds(properties.vueId, this);
  4461. // 处理父子关系
  4462. initRelation.call(this, {
  4463. vuePid: this._$vuePid,
  4464. vueOptions: options
  4465. });
  4466. // 初始化 vue 实例
  4467. this.$vm = new VueComponent(options);
  4468. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  4469. initSlots(this.$vm, properties.vueSlots);
  4470. // 触发首次 setData
  4471. this.$vm.$mount();
  4472. },
  4473. ready: function ready() {
  4474. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  4475. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  4476. if (this.$vm) {
  4477. this.$vm._isMounted = true;
  4478. this.$vm.__call_hook('mounted');
  4479. this.$vm.__call_hook('onReady');
  4480. }
  4481. },
  4482. detached: function detached() {
  4483. this.$vm && this.$vm.$destroy();
  4484. }
  4485. },
  4486. pageLifetimes: {
  4487. show: function show(args) {
  4488. this.$vm && this.$vm.__call_hook('onPageShow', args);
  4489. },
  4490. hide: function hide() {
  4491. this.$vm && this.$vm.__call_hook('onPageHide');
  4492. },
  4493. resize: function resize(size) {
  4494. this.$vm && this.$vm.__call_hook('onPageResize', size);
  4495. }
  4496. },
  4497. methods: {
  4498. __l: handleLink,
  4499. __e: handleEvent
  4500. }
  4501. };
  4502. // externalClasses
  4503. if (vueOptions.externalClasses) {
  4504. componentOptions.externalClasses = vueOptions.externalClasses;
  4505. }
  4506. if (Array.isArray(vueOptions.wxsCallMethods)) {
  4507. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  4508. componentOptions.methods[callMethod] = function (args) {
  4509. return this.$vm[callMethod](args);
  4510. };
  4511. });
  4512. }
  4513. if (needVueOptions) {
  4514. return [componentOptions, vueOptions, VueComponent];
  4515. }
  4516. if (isPage) {
  4517. return componentOptions;
  4518. }
  4519. return [componentOptions, VueComponent];
  4520. }
  4521. function parseComponent(vueComponentOptions, needVueOptions) {
  4522. return parseBaseComponent(vueComponentOptions, {
  4523. isPage: isPage,
  4524. initRelation: initRelation
  4525. }, needVueOptions);
  4526. }
  4527. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  4528. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  4529. function parseBasePage(vuePageOptions) {
  4530. var _parseComponent = parseComponent(vuePageOptions, true),
  4531. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  4532. pageOptions = _parseComponent2[0],
  4533. vueOptions = _parseComponent2[1];
  4534. initHooks(pageOptions.methods, hooks$1, vueOptions);
  4535. pageOptions.methods.onLoad = function (query) {
  4536. this.options = query;
  4537. var copyQuery = Object.assign({}, query);
  4538. delete copyQuery.__id__;
  4539. this.$page = {
  4540. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  4541. };
  4542. this.$vm.$mp.query = query; // 兼容 mpvue
  4543. this.$vm.__call_hook('onLoad', query);
  4544. };
  4545. {
  4546. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  4547. }
  4548. {
  4549. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  4550. }
  4551. return pageOptions;
  4552. }
  4553. function parsePage(vuePageOptions) {
  4554. return parseBasePage(vuePageOptions);
  4555. }
  4556. function createPage(vuePageOptions) {
  4557. {
  4558. return Component(parsePage(vuePageOptions));
  4559. }
  4560. }
  4561. function createComponent(vueOptions) {
  4562. {
  4563. return Component(parseComponent(vueOptions));
  4564. }
  4565. }
  4566. function createSubpackageApp(vm) {
  4567. var appOptions = parseApp(vm);
  4568. var app = getApp({
  4569. allowDefault: true
  4570. });
  4571. vm.$scope = app;
  4572. var globalData = app.globalData;
  4573. if (globalData) {
  4574. Object.keys(appOptions.globalData).forEach(function (name) {
  4575. if (!hasOwn(globalData, name)) {
  4576. globalData[name] = appOptions.globalData[name];
  4577. }
  4578. });
  4579. }
  4580. Object.keys(appOptions).forEach(function (name) {
  4581. if (!hasOwn(app, name)) {
  4582. app[name] = appOptions[name];
  4583. }
  4584. });
  4585. if (isFn(appOptions.onShow) && wx.onAppShow) {
  4586. wx.onAppShow(function () {
  4587. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  4588. args[_key5] = arguments[_key5];
  4589. }
  4590. vm.__call_hook('onShow', args);
  4591. });
  4592. }
  4593. if (isFn(appOptions.onHide) && wx.onAppHide) {
  4594. wx.onAppHide(function () {
  4595. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  4596. args[_key6] = arguments[_key6];
  4597. }
  4598. vm.__call_hook('onHide', args);
  4599. });
  4600. }
  4601. if (isFn(appOptions.onLaunch)) {
  4602. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  4603. vm.__call_hook('onLaunch', args);
  4604. }
  4605. return vm;
  4606. }
  4607. function createPlugin(vm) {
  4608. var appOptions = parseApp(vm);
  4609. if (isFn(appOptions.onShow) && wx.onAppShow) {
  4610. wx.onAppShow(function () {
  4611. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  4612. args[_key7] = arguments[_key7];
  4613. }
  4614. vm.__call_hook('onShow', args);
  4615. });
  4616. }
  4617. if (isFn(appOptions.onHide) && wx.onAppHide) {
  4618. wx.onAppHide(function () {
  4619. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  4620. args[_key8] = arguments[_key8];
  4621. }
  4622. vm.__call_hook('onHide', args);
  4623. });
  4624. }
  4625. if (isFn(appOptions.onLaunch)) {
  4626. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  4627. vm.__call_hook('onLaunch', args);
  4628. }
  4629. return vm;
  4630. }
  4631. todos.forEach(function (todoApi) {
  4632. protocols[todoApi] = false;
  4633. });
  4634. canIUses.forEach(function (canIUseApi) {
  4635. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  4636. if (!wx.canIUse(apiName)) {
  4637. protocols[canIUseApi] = false;
  4638. }
  4639. });
  4640. var uni = {};
  4641. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  4642. uni = new Proxy({}, {
  4643. get: function get(target, name) {
  4644. if (hasOwn(target, name)) {
  4645. return target[name];
  4646. }
  4647. if (baseApi[name]) {
  4648. return baseApi[name];
  4649. }
  4650. if (api[name]) {
  4651. return promisify(name, api[name]);
  4652. }
  4653. {
  4654. if (extraApi[name]) {
  4655. return promisify(name, extraApi[name]);
  4656. }
  4657. if (todoApis[name]) {
  4658. return promisify(name, todoApis[name]);
  4659. }
  4660. }
  4661. if (eventApi[name]) {
  4662. return eventApi[name];
  4663. }
  4664. return promisify(name, wrapper(name, wx[name]));
  4665. },
  4666. set: function set(target, name, value) {
  4667. target[name] = value;
  4668. return true;
  4669. }
  4670. });
  4671. } else {
  4672. Object.keys(baseApi).forEach(function (name) {
  4673. uni[name] = baseApi[name];
  4674. });
  4675. {
  4676. Object.keys(todoApis).forEach(function (name) {
  4677. uni[name] = promisify(name, todoApis[name]);
  4678. });
  4679. Object.keys(extraApi).forEach(function (name) {
  4680. uni[name] = promisify(name, todoApis[name]);
  4681. });
  4682. }
  4683. Object.keys(eventApi).forEach(function (name) {
  4684. uni[name] = eventApi[name];
  4685. });
  4686. Object.keys(api).forEach(function (name) {
  4687. uni[name] = promisify(name, api[name]);
  4688. });
  4689. Object.keys(wx).forEach(function (name) {
  4690. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  4691. uni[name] = promisify(name, wrapper(name, wx[name]));
  4692. }
  4693. });
  4694. }
  4695. wx.createApp = createApp;
  4696. wx.createPage = createPage;
  4697. wx.createComponent = createComponent;
  4698. wx.createSubpackageApp = createSubpackageApp;
  4699. wx.createPlugin = createPlugin;
  4700. var uni$1 = uni;
  4701. var _default = uni$1;
  4702. exports.default = _default;
  4703. /* 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)))
  4704. /***/ }),
  4705. /***/ 20:
  4706. /*!****************************************************************!*\
  4707. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  4708. \****************************************************************/
  4709. /*! no static exports found */
  4710. /***/ (function(module, exports) {
  4711. function _iterableToArray(iter) {
  4712. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  4713. }
  4714. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4715. /***/ }),
  4716. /***/ 21:
  4717. /*!******************************************************************!*\
  4718. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  4719. \******************************************************************/
  4720. /*! no static exports found */
  4721. /***/ (function(module, exports) {
  4722. function _nonIterableSpread() {
  4723. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  4724. }
  4725. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4726. /***/ }),
  4727. /***/ 22:
  4728. /*!*************************************************************!*\
  4729. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  4730. \*************************************************************/
  4731. /*! no static exports found */
  4732. /***/ (function(module, exports, __webpack_require__) {
  4733. "use strict";
  4734. /* WEBPACK VAR INJECTION */(function(uni, global) {
  4735. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  4736. Object.defineProperty(exports, "__esModule", {
  4737. value: true
  4738. });
  4739. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  4740. exports.compileI18nJsonStr = compileI18nJsonStr;
  4741. exports.hasI18nJson = hasI18nJson;
  4742. exports.initVueI18n = initVueI18n;
  4743. exports.isI18nStr = isI18nStr;
  4744. exports.isString = void 0;
  4745. exports.normalizeLocale = normalizeLocale;
  4746. exports.parseI18nJson = parseI18nJson;
  4747. exports.resolveLocale = resolveLocale;
  4748. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  4749. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  4750. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  4751. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  4752. var isArray = Array.isArray;
  4753. var isObject = function isObject(val) {
  4754. return val !== null && (0, _typeof2.default)(val) === 'object';
  4755. };
  4756. var defaultDelimiters = ['{', '}'];
  4757. var BaseFormatter = /*#__PURE__*/function () {
  4758. function BaseFormatter() {
  4759. (0, _classCallCheck2.default)(this, BaseFormatter);
  4760. this._caches = Object.create(null);
  4761. }
  4762. (0, _createClass2.default)(BaseFormatter, [{
  4763. key: "interpolate",
  4764. value: function interpolate(message, values) {
  4765. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4766. if (!values) {
  4767. return [message];
  4768. }
  4769. var tokens = this._caches[message];
  4770. if (!tokens) {
  4771. tokens = parse(message, delimiters);
  4772. this._caches[message] = tokens;
  4773. }
  4774. return compile(tokens, values);
  4775. }
  4776. }]);
  4777. return BaseFormatter;
  4778. }();
  4779. exports.Formatter = BaseFormatter;
  4780. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  4781. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  4782. function parse(format, _ref) {
  4783. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  4784. startDelimiter = _ref2[0],
  4785. endDelimiter = _ref2[1];
  4786. var tokens = [];
  4787. var position = 0;
  4788. var text = '';
  4789. while (position < format.length) {
  4790. var char = format[position++];
  4791. if (char === startDelimiter) {
  4792. if (text) {
  4793. tokens.push({
  4794. type: 'text',
  4795. value: text
  4796. });
  4797. }
  4798. text = '';
  4799. var sub = '';
  4800. char = format[position++];
  4801. while (char !== undefined && char !== endDelimiter) {
  4802. sub += char;
  4803. char = format[position++];
  4804. }
  4805. var isClosed = char === endDelimiter;
  4806. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  4807. tokens.push({
  4808. value: sub,
  4809. type: type
  4810. });
  4811. }
  4812. // else if (char === '%') {
  4813. // // when found rails i18n syntax, skip text capture
  4814. // if (format[position] !== '{') {
  4815. // text += char
  4816. // }
  4817. // }
  4818. else {
  4819. text += char;
  4820. }
  4821. }
  4822. text && tokens.push({
  4823. type: 'text',
  4824. value: text
  4825. });
  4826. return tokens;
  4827. }
  4828. function compile(tokens, values) {
  4829. var compiled = [];
  4830. var index = 0;
  4831. var mode = isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  4832. if (mode === 'unknown') {
  4833. return compiled;
  4834. }
  4835. while (index < tokens.length) {
  4836. var token = tokens[index];
  4837. switch (token.type) {
  4838. case 'text':
  4839. compiled.push(token.value);
  4840. break;
  4841. case 'list':
  4842. compiled.push(values[parseInt(token.value, 10)]);
  4843. break;
  4844. case 'named':
  4845. if (mode === 'named') {
  4846. compiled.push(values[token.value]);
  4847. } else {
  4848. if (true) {
  4849. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  4850. }
  4851. }
  4852. break;
  4853. case 'unknown':
  4854. if (true) {
  4855. console.warn("Detect 'unknown' type of token!");
  4856. }
  4857. break;
  4858. }
  4859. index++;
  4860. }
  4861. return compiled;
  4862. }
  4863. var LOCALE_ZH_HANS = 'zh-Hans';
  4864. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4865. var LOCALE_ZH_HANT = 'zh-Hant';
  4866. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4867. var LOCALE_EN = 'en';
  4868. exports.LOCALE_EN = LOCALE_EN;
  4869. var LOCALE_FR = 'fr';
  4870. exports.LOCALE_FR = LOCALE_FR;
  4871. var LOCALE_ES = 'es';
  4872. exports.LOCALE_ES = LOCALE_ES;
  4873. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4874. var hasOwn = function hasOwn(val, key) {
  4875. return hasOwnProperty.call(val, key);
  4876. };
  4877. var defaultFormatter = new BaseFormatter();
  4878. function include(str, parts) {
  4879. return !!parts.find(function (part) {
  4880. return str.indexOf(part) !== -1;
  4881. });
  4882. }
  4883. function startsWith(str, parts) {
  4884. return parts.find(function (part) {
  4885. return str.indexOf(part) === 0;
  4886. });
  4887. }
  4888. function normalizeLocale(locale, messages) {
  4889. if (!locale) {
  4890. return;
  4891. }
  4892. locale = locale.trim().replace(/_/g, '-');
  4893. if (messages && messages[locale]) {
  4894. return locale;
  4895. }
  4896. locale = locale.toLowerCase();
  4897. if (locale.indexOf('zh') === 0) {
  4898. if (locale.indexOf('-hans') > -1) {
  4899. return LOCALE_ZH_HANS;
  4900. }
  4901. if (locale.indexOf('-hant') > -1) {
  4902. return LOCALE_ZH_HANT;
  4903. }
  4904. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4905. return LOCALE_ZH_HANT;
  4906. }
  4907. return LOCALE_ZH_HANS;
  4908. }
  4909. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  4910. if (lang) {
  4911. return lang;
  4912. }
  4913. }
  4914. var I18n = /*#__PURE__*/function () {
  4915. function I18n(_ref3) {
  4916. var locale = _ref3.locale,
  4917. fallbackLocale = _ref3.fallbackLocale,
  4918. messages = _ref3.messages,
  4919. watcher = _ref3.watcher,
  4920. formater = _ref3.formater;
  4921. (0, _classCallCheck2.default)(this, I18n);
  4922. this.locale = LOCALE_EN;
  4923. this.fallbackLocale = LOCALE_EN;
  4924. this.message = {};
  4925. this.messages = {};
  4926. this.watchers = [];
  4927. if (fallbackLocale) {
  4928. this.fallbackLocale = fallbackLocale;
  4929. }
  4930. this.formater = formater || defaultFormatter;
  4931. this.messages = messages || {};
  4932. this.setLocale(locale || LOCALE_EN);
  4933. if (watcher) {
  4934. this.watchLocale(watcher);
  4935. }
  4936. }
  4937. (0, _createClass2.default)(I18n, [{
  4938. key: "setLocale",
  4939. value: function setLocale(locale) {
  4940. var _this = this;
  4941. var oldLocale = this.locale;
  4942. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4943. if (!this.messages[this.locale]) {
  4944. // 可能初始化时不存在
  4945. this.messages[this.locale] = {};
  4946. }
  4947. this.message = this.messages[this.locale];
  4948. // 仅发生变化时,通知
  4949. if (oldLocale !== this.locale) {
  4950. this.watchers.forEach(function (watcher) {
  4951. watcher(_this.locale, oldLocale);
  4952. });
  4953. }
  4954. }
  4955. }, {
  4956. key: "getLocale",
  4957. value: function getLocale() {
  4958. return this.locale;
  4959. }
  4960. }, {
  4961. key: "watchLocale",
  4962. value: function watchLocale(fn) {
  4963. var _this2 = this;
  4964. var index = this.watchers.push(fn) - 1;
  4965. return function () {
  4966. _this2.watchers.splice(index, 1);
  4967. };
  4968. }
  4969. }, {
  4970. key: "add",
  4971. value: function add(locale, message) {
  4972. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4973. var curMessages = this.messages[locale];
  4974. if (curMessages) {
  4975. if (override) {
  4976. Object.assign(curMessages, message);
  4977. } else {
  4978. Object.keys(message).forEach(function (key) {
  4979. if (!hasOwn(curMessages, key)) {
  4980. curMessages[key] = message[key];
  4981. }
  4982. });
  4983. }
  4984. } else {
  4985. this.messages[locale] = message;
  4986. }
  4987. }
  4988. }, {
  4989. key: "f",
  4990. value: function f(message, values, delimiters) {
  4991. return this.formater.interpolate(message, values, delimiters).join('');
  4992. }
  4993. }, {
  4994. key: "t",
  4995. value: function t(key, locale, values) {
  4996. var message = this.message;
  4997. if (typeof locale === 'string') {
  4998. locale = normalizeLocale(locale, this.messages);
  4999. locale && (message = this.messages[locale]);
  5000. } else {
  5001. values = locale;
  5002. }
  5003. if (!hasOwn(message, key)) {
  5004. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  5005. return key;
  5006. }
  5007. return this.formater.interpolate(message[key], values).join('');
  5008. }
  5009. }]);
  5010. return I18n;
  5011. }();
  5012. exports.I18n = I18n;
  5013. function watchAppLocale(appVm, i18n) {
  5014. // 需要保证 watch 的触发在组件渲染之前
  5015. if (appVm.$watchLocale) {
  5016. // vue2
  5017. appVm.$watchLocale(function (newLocale) {
  5018. i18n.setLocale(newLocale);
  5019. });
  5020. } else {
  5021. appVm.$watch(function () {
  5022. return appVm.$locale;
  5023. }, function (newLocale) {
  5024. i18n.setLocale(newLocale);
  5025. });
  5026. }
  5027. }
  5028. function getDefaultLocale() {
  5029. if (typeof uni !== 'undefined' && uni.getLocale) {
  5030. return uni.getLocale();
  5031. }
  5032. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  5033. if (typeof global !== 'undefined' && global.getLocale) {
  5034. return global.getLocale();
  5035. }
  5036. return LOCALE_EN;
  5037. }
  5038. function initVueI18n(locale) {
  5039. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5040. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  5041. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  5042. // 兼容旧版本入参
  5043. if (typeof locale !== 'string') {
  5044. var _ref4 = [messages, locale];
  5045. locale = _ref4[0];
  5046. messages = _ref4[1];
  5047. }
  5048. if (typeof locale !== 'string') {
  5049. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  5050. locale = getDefaultLocale();
  5051. }
  5052. if (typeof fallbackLocale !== 'string') {
  5053. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  5054. }
  5055. var i18n = new I18n({
  5056. locale: locale,
  5057. fallbackLocale: fallbackLocale,
  5058. messages: messages,
  5059. watcher: watcher
  5060. });
  5061. var _t = function t(key, values) {
  5062. if (typeof getApp !== 'function') {
  5063. // app view
  5064. /* eslint-disable no-func-assign */
  5065. _t = function t(key, values) {
  5066. return i18n.t(key, values);
  5067. };
  5068. } else {
  5069. var isWatchedAppLocale = false;
  5070. _t = function t(key, values) {
  5071. var appVm = getApp().$vm;
  5072. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  5073. // options: {
  5074. // type: Array,
  5075. // default () {
  5076. // return [{
  5077. // icon: 'shop',
  5078. // text: t("uni-goods-nav.options.shop"),
  5079. // }, {
  5080. // icon: 'cart',
  5081. // text: t("uni-goods-nav.options.cart")
  5082. // }]
  5083. // }
  5084. // },
  5085. if (appVm) {
  5086. // 触发响应式
  5087. appVm.$locale;
  5088. if (!isWatchedAppLocale) {
  5089. isWatchedAppLocale = true;
  5090. watchAppLocale(appVm, i18n);
  5091. }
  5092. }
  5093. return i18n.t(key, values);
  5094. };
  5095. }
  5096. return _t(key, values);
  5097. };
  5098. return {
  5099. i18n: i18n,
  5100. f: function f(message, values, delimiters) {
  5101. return i18n.f(message, values, delimiters);
  5102. },
  5103. t: function t(key, values) {
  5104. return _t(key, values);
  5105. },
  5106. add: function add(locale, message) {
  5107. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5108. return i18n.add(locale, message, override);
  5109. },
  5110. watch: function watch(fn) {
  5111. return i18n.watchLocale(fn);
  5112. },
  5113. getLocale: function getLocale() {
  5114. return i18n.getLocale();
  5115. },
  5116. setLocale: function setLocale(newLocale) {
  5117. return i18n.setLocale(newLocale);
  5118. }
  5119. };
  5120. }
  5121. var isString = function isString(val) {
  5122. return typeof val === 'string';
  5123. };
  5124. exports.isString = isString;
  5125. var formater;
  5126. function hasI18nJson(jsonObj, delimiters) {
  5127. if (!formater) {
  5128. formater = new BaseFormatter();
  5129. }
  5130. return walkJsonObj(jsonObj, function (jsonObj, key) {
  5131. var value = jsonObj[key];
  5132. if (isString(value)) {
  5133. if (isI18nStr(value, delimiters)) {
  5134. return true;
  5135. }
  5136. } else {
  5137. return hasI18nJson(value, delimiters);
  5138. }
  5139. });
  5140. }
  5141. function parseI18nJson(jsonObj, values, delimiters) {
  5142. if (!formater) {
  5143. formater = new BaseFormatter();
  5144. }
  5145. walkJsonObj(jsonObj, function (jsonObj, key) {
  5146. var value = jsonObj[key];
  5147. if (isString(value)) {
  5148. if (isI18nStr(value, delimiters)) {
  5149. jsonObj[key] = compileStr(value, values, delimiters);
  5150. }
  5151. } else {
  5152. parseI18nJson(value, values, delimiters);
  5153. }
  5154. });
  5155. return jsonObj;
  5156. }
  5157. function compileI18nJsonStr(jsonStr, _ref5) {
  5158. var locale = _ref5.locale,
  5159. locales = _ref5.locales,
  5160. delimiters = _ref5.delimiters;
  5161. if (!isI18nStr(jsonStr, delimiters)) {
  5162. return jsonStr;
  5163. }
  5164. if (!formater) {
  5165. formater = new BaseFormatter();
  5166. }
  5167. var localeValues = [];
  5168. Object.keys(locales).forEach(function (name) {
  5169. if (name !== locale) {
  5170. localeValues.push({
  5171. locale: name,
  5172. values: locales[name]
  5173. });
  5174. }
  5175. });
  5176. localeValues.unshift({
  5177. locale: locale,
  5178. values: locales[locale]
  5179. });
  5180. try {
  5181. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  5182. } catch (e) {}
  5183. return jsonStr;
  5184. }
  5185. function isI18nStr(value, delimiters) {
  5186. return value.indexOf(delimiters[0]) > -1;
  5187. }
  5188. function compileStr(value, values, delimiters) {
  5189. return formater.interpolate(value, values, delimiters).join('');
  5190. }
  5191. function compileValue(jsonObj, key, localeValues, delimiters) {
  5192. var value = jsonObj[key];
  5193. if (isString(value)) {
  5194. // 存在国际化
  5195. if (isI18nStr(value, delimiters)) {
  5196. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  5197. if (localeValues.length > 1) {
  5198. // 格式化国际化语言
  5199. var valueLocales = jsonObj[key + 'Locales'] = {};
  5200. localeValues.forEach(function (localValue) {
  5201. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  5202. });
  5203. }
  5204. }
  5205. } else {
  5206. compileJsonObj(value, localeValues, delimiters);
  5207. }
  5208. }
  5209. function compileJsonObj(jsonObj, localeValues, delimiters) {
  5210. walkJsonObj(jsonObj, function (jsonObj, key) {
  5211. compileValue(jsonObj, key, localeValues, delimiters);
  5212. });
  5213. return jsonObj;
  5214. }
  5215. function walkJsonObj(jsonObj, walk) {
  5216. if (isArray(jsonObj)) {
  5217. for (var i = 0; i < jsonObj.length; i++) {
  5218. if (walk(jsonObj, i)) {
  5219. return true;
  5220. }
  5221. }
  5222. } else if (isObject(jsonObj)) {
  5223. for (var key in jsonObj) {
  5224. if (walk(jsonObj, key)) {
  5225. return true;
  5226. }
  5227. }
  5228. }
  5229. return false;
  5230. }
  5231. function resolveLocale(locales) {
  5232. return function (locale) {
  5233. if (!locale) {
  5234. return locale;
  5235. }
  5236. locale = normalizeLocale(locale) || locale;
  5237. return resolveLocaleChain(locale).find(function (locale) {
  5238. return locales.indexOf(locale) > -1;
  5239. });
  5240. };
  5241. }
  5242. function resolveLocaleChain(locale) {
  5243. var chain = [];
  5244. var tokens = locale.split('-');
  5245. while (tokens.length) {
  5246. chain.push(tokens.join('-'));
  5247. tokens.pop();
  5248. }
  5249. return chain;
  5250. }
  5251. /* 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)))
  5252. /***/ }),
  5253. /***/ 23:
  5254. /*!***************************************************************!*\
  5255. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  5256. \***************************************************************/
  5257. /*! no static exports found */
  5258. /***/ (function(module, exports) {
  5259. function _classCallCheck(instance, Constructor) {
  5260. if (!(instance instanceof Constructor)) {
  5261. throw new TypeError("Cannot call a class as a function");
  5262. }
  5263. }
  5264. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  5265. /***/ }),
  5266. /***/ 24:
  5267. /*!************************************************************!*\
  5268. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  5269. \************************************************************/
  5270. /*! no static exports found */
  5271. /***/ (function(module, exports, __webpack_require__) {
  5272. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  5273. function _defineProperties(target, props) {
  5274. for (var i = 0; i < props.length; i++) {
  5275. var descriptor = props[i];
  5276. descriptor.enumerable = descriptor.enumerable || false;
  5277. descriptor.configurable = true;
  5278. if ("value" in descriptor) descriptor.writable = true;
  5279. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  5280. }
  5281. }
  5282. function _createClass(Constructor, protoProps, staticProps) {
  5283. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  5284. if (staticProps) _defineProperties(Constructor, staticProps);
  5285. Object.defineProperty(Constructor, "prototype", {
  5286. writable: false
  5287. });
  5288. return Constructor;
  5289. }
  5290. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  5291. /***/ }),
  5292. /***/ 25:
  5293. /*!******************************************************************************************!*\
  5294. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  5295. \******************************************************************************************/
  5296. /*! exports provided: default */
  5297. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5298. "use strict";
  5299. __webpack_require__.r(__webpack_exports__);
  5300. /* WEBPACK VAR INJECTION */(function(global) {/*!
  5301. * Vue.js v2.6.11
  5302. * (c) 2014-2022 Evan You
  5303. * Released under the MIT License.
  5304. */
  5305. /* */
  5306. var emptyObject = Object.freeze({});
  5307. // These helpers produce better VM code in JS engines due to their
  5308. // explicitness and function inlining.
  5309. function isUndef (v) {
  5310. return v === undefined || v === null
  5311. }
  5312. function isDef (v) {
  5313. return v !== undefined && v !== null
  5314. }
  5315. function isTrue (v) {
  5316. return v === true
  5317. }
  5318. function isFalse (v) {
  5319. return v === false
  5320. }
  5321. /**
  5322. * Check if value is primitive.
  5323. */
  5324. function isPrimitive (value) {
  5325. return (
  5326. typeof value === 'string' ||
  5327. typeof value === 'number' ||
  5328. // $flow-disable-line
  5329. typeof value === 'symbol' ||
  5330. typeof value === 'boolean'
  5331. )
  5332. }
  5333. /**
  5334. * Quick object check - this is primarily used to tell
  5335. * Objects from primitive values when we know the value
  5336. * is a JSON-compliant type.
  5337. */
  5338. function isObject (obj) {
  5339. return obj !== null && typeof obj === 'object'
  5340. }
  5341. /**
  5342. * Get the raw type string of a value, e.g., [object Object].
  5343. */
  5344. var _toString = Object.prototype.toString;
  5345. function toRawType (value) {
  5346. return _toString.call(value).slice(8, -1)
  5347. }
  5348. /**
  5349. * Strict object type check. Only returns true
  5350. * for plain JavaScript objects.
  5351. */
  5352. function isPlainObject (obj) {
  5353. return _toString.call(obj) === '[object Object]'
  5354. }
  5355. function isRegExp (v) {
  5356. return _toString.call(v) === '[object RegExp]'
  5357. }
  5358. /**
  5359. * Check if val is a valid array index.
  5360. */
  5361. function isValidArrayIndex (val) {
  5362. var n = parseFloat(String(val));
  5363. return n >= 0 && Math.floor(n) === n && isFinite(val)
  5364. }
  5365. function isPromise (val) {
  5366. return (
  5367. isDef(val) &&
  5368. typeof val.then === 'function' &&
  5369. typeof val.catch === 'function'
  5370. )
  5371. }
  5372. /**
  5373. * Convert a value to a string that is actually rendered.
  5374. */
  5375. function toString (val) {
  5376. return val == null
  5377. ? ''
  5378. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  5379. ? JSON.stringify(val, null, 2)
  5380. : String(val)
  5381. }
  5382. /**
  5383. * Convert an input value to a number for persistence.
  5384. * If the conversion fails, return original string.
  5385. */
  5386. function toNumber (val) {
  5387. var n = parseFloat(val);
  5388. return isNaN(n) ? val : n
  5389. }
  5390. /**
  5391. * Make a map and return a function for checking if a key
  5392. * is in that map.
  5393. */
  5394. function makeMap (
  5395. str,
  5396. expectsLowerCase
  5397. ) {
  5398. var map = Object.create(null);
  5399. var list = str.split(',');
  5400. for (var i = 0; i < list.length; i++) {
  5401. map[list[i]] = true;
  5402. }
  5403. return expectsLowerCase
  5404. ? function (val) { return map[val.toLowerCase()]; }
  5405. : function (val) { return map[val]; }
  5406. }
  5407. /**
  5408. * Check if a tag is a built-in tag.
  5409. */
  5410. var isBuiltInTag = makeMap('slot,component', true);
  5411. /**
  5412. * Check if an attribute is a reserved attribute.
  5413. */
  5414. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  5415. /**
  5416. * Remove an item from an array.
  5417. */
  5418. function remove (arr, item) {
  5419. if (arr.length) {
  5420. var index = arr.indexOf(item);
  5421. if (index > -1) {
  5422. return arr.splice(index, 1)
  5423. }
  5424. }
  5425. }
  5426. /**
  5427. * Check whether an object has the property.
  5428. */
  5429. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5430. function hasOwn (obj, key) {
  5431. return hasOwnProperty.call(obj, key)
  5432. }
  5433. /**
  5434. * Create a cached version of a pure function.
  5435. */
  5436. function cached (fn) {
  5437. var cache = Object.create(null);
  5438. return (function cachedFn (str) {
  5439. var hit = cache[str];
  5440. return hit || (cache[str] = fn(str))
  5441. })
  5442. }
  5443. /**
  5444. * Camelize a hyphen-delimited string.
  5445. */
  5446. var camelizeRE = /-(\w)/g;
  5447. var camelize = cached(function (str) {
  5448. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  5449. });
  5450. /**
  5451. * Capitalize a string.
  5452. */
  5453. var capitalize = cached(function (str) {
  5454. return str.charAt(0).toUpperCase() + str.slice(1)
  5455. });
  5456. /**
  5457. * Hyphenate a camelCase string.
  5458. */
  5459. var hyphenateRE = /\B([A-Z])/g;
  5460. var hyphenate = cached(function (str) {
  5461. return str.replace(hyphenateRE, '-$1').toLowerCase()
  5462. });
  5463. /**
  5464. * Simple bind polyfill for environments that do not support it,
  5465. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  5466. * since native bind is now performant enough in most browsers.
  5467. * But removing it would mean breaking code that was able to run in
  5468. * PhantomJS 1.x, so this must be kept for backward compatibility.
  5469. */
  5470. /* istanbul ignore next */
  5471. function polyfillBind (fn, ctx) {
  5472. function boundFn (a) {
  5473. var l = arguments.length;
  5474. return l
  5475. ? l > 1
  5476. ? fn.apply(ctx, arguments)
  5477. : fn.call(ctx, a)
  5478. : fn.call(ctx)
  5479. }
  5480. boundFn._length = fn.length;
  5481. return boundFn
  5482. }
  5483. function nativeBind (fn, ctx) {
  5484. return fn.bind(ctx)
  5485. }
  5486. var bind = Function.prototype.bind
  5487. ? nativeBind
  5488. : polyfillBind;
  5489. /**
  5490. * Convert an Array-like object to a real Array.
  5491. */
  5492. function toArray (list, start) {
  5493. start = start || 0;
  5494. var i = list.length - start;
  5495. var ret = new Array(i);
  5496. while (i--) {
  5497. ret[i] = list[i + start];
  5498. }
  5499. return ret
  5500. }
  5501. /**
  5502. * Mix properties into target object.
  5503. */
  5504. function extend (to, _from) {
  5505. for (var key in _from) {
  5506. to[key] = _from[key];
  5507. }
  5508. return to
  5509. }
  5510. /**
  5511. * Merge an Array of Objects into a single Object.
  5512. */
  5513. function toObject (arr) {
  5514. var res = {};
  5515. for (var i = 0; i < arr.length; i++) {
  5516. if (arr[i]) {
  5517. extend(res, arr[i]);
  5518. }
  5519. }
  5520. return res
  5521. }
  5522. /* eslint-disable no-unused-vars */
  5523. /**
  5524. * Perform no operation.
  5525. * Stubbing args to make Flow happy without leaving useless transpiled code
  5526. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  5527. */
  5528. function noop (a, b, c) {}
  5529. /**
  5530. * Always return false.
  5531. */
  5532. var no = function (a, b, c) { return false; };
  5533. /* eslint-enable no-unused-vars */
  5534. /**
  5535. * Return the same value.
  5536. */
  5537. var identity = function (_) { return _; };
  5538. /**
  5539. * Check if two values are loosely equal - that is,
  5540. * if they are plain objects, do they have the same shape?
  5541. */
  5542. function looseEqual (a, b) {
  5543. if (a === b) { return true }
  5544. var isObjectA = isObject(a);
  5545. var isObjectB = isObject(b);
  5546. if (isObjectA && isObjectB) {
  5547. try {
  5548. var isArrayA = Array.isArray(a);
  5549. var isArrayB = Array.isArray(b);
  5550. if (isArrayA && isArrayB) {
  5551. return a.length === b.length && a.every(function (e, i) {
  5552. return looseEqual(e, b[i])
  5553. })
  5554. } else if (a instanceof Date && b instanceof Date) {
  5555. return a.getTime() === b.getTime()
  5556. } else if (!isArrayA && !isArrayB) {
  5557. var keysA = Object.keys(a);
  5558. var keysB = Object.keys(b);
  5559. return keysA.length === keysB.length && keysA.every(function (key) {
  5560. return looseEqual(a[key], b[key])
  5561. })
  5562. } else {
  5563. /* istanbul ignore next */
  5564. return false
  5565. }
  5566. } catch (e) {
  5567. /* istanbul ignore next */
  5568. return false
  5569. }
  5570. } else if (!isObjectA && !isObjectB) {
  5571. return String(a) === String(b)
  5572. } else {
  5573. return false
  5574. }
  5575. }
  5576. /**
  5577. * Return the first index at which a loosely equal value can be
  5578. * found in the array (if value is a plain object, the array must
  5579. * contain an object of the same shape), or -1 if it is not present.
  5580. */
  5581. function looseIndexOf (arr, val) {
  5582. for (var i = 0; i < arr.length; i++) {
  5583. if (looseEqual(arr[i], val)) { return i }
  5584. }
  5585. return -1
  5586. }
  5587. /**
  5588. * Ensure a function is called only once.
  5589. */
  5590. function once (fn) {
  5591. var called = false;
  5592. return function () {
  5593. if (!called) {
  5594. called = true;
  5595. fn.apply(this, arguments);
  5596. }
  5597. }
  5598. }
  5599. var ASSET_TYPES = [
  5600. 'component',
  5601. 'directive',
  5602. 'filter'
  5603. ];
  5604. var LIFECYCLE_HOOKS = [
  5605. 'beforeCreate',
  5606. 'created',
  5607. 'beforeMount',
  5608. 'mounted',
  5609. 'beforeUpdate',
  5610. 'updated',
  5611. 'beforeDestroy',
  5612. 'destroyed',
  5613. 'activated',
  5614. 'deactivated',
  5615. 'errorCaptured',
  5616. 'serverPrefetch'
  5617. ];
  5618. /* */
  5619. var config = ({
  5620. /**
  5621. * Option merge strategies (used in core/util/options)
  5622. */
  5623. // $flow-disable-line
  5624. optionMergeStrategies: Object.create(null),
  5625. /**
  5626. * Whether to suppress warnings.
  5627. */
  5628. silent: false,
  5629. /**
  5630. * Show production mode tip message on boot?
  5631. */
  5632. productionTip: "development" !== 'production',
  5633. /**
  5634. * Whether to enable devtools
  5635. */
  5636. devtools: "development" !== 'production',
  5637. /**
  5638. * Whether to record perf
  5639. */
  5640. performance: false,
  5641. /**
  5642. * Error handler for watcher errors
  5643. */
  5644. errorHandler: null,
  5645. /**
  5646. * Warn handler for watcher warns
  5647. */
  5648. warnHandler: null,
  5649. /**
  5650. * Ignore certain custom elements
  5651. */
  5652. ignoredElements: [],
  5653. /**
  5654. * Custom user key aliases for v-on
  5655. */
  5656. // $flow-disable-line
  5657. keyCodes: Object.create(null),
  5658. /**
  5659. * Check if a tag is reserved so that it cannot be registered as a
  5660. * component. This is platform-dependent and may be overwritten.
  5661. */
  5662. isReservedTag: no,
  5663. /**
  5664. * Check if an attribute is reserved so that it cannot be used as a component
  5665. * prop. This is platform-dependent and may be overwritten.
  5666. */
  5667. isReservedAttr: no,
  5668. /**
  5669. * Check if a tag is an unknown element.
  5670. * Platform-dependent.
  5671. */
  5672. isUnknownElement: no,
  5673. /**
  5674. * Get the namespace of an element
  5675. */
  5676. getTagNamespace: noop,
  5677. /**
  5678. * Parse the real tag name for the specific platform.
  5679. */
  5680. parsePlatformTagName: identity,
  5681. /**
  5682. * Check if an attribute must be bound using property, e.g. value
  5683. * Platform-dependent.
  5684. */
  5685. mustUseProp: no,
  5686. /**
  5687. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5688. * This will significantly reduce performance if set to false.
  5689. */
  5690. async: true,
  5691. /**
  5692. * Exposed for legacy reasons
  5693. */
  5694. _lifecycleHooks: LIFECYCLE_HOOKS
  5695. });
  5696. /* */
  5697. /**
  5698. * unicode letters used for parsing html tags, component names and property paths.
  5699. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5700. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5701. */
  5702. 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/;
  5703. /**
  5704. * Check if a string starts with $ or _
  5705. */
  5706. function isReserved (str) {
  5707. var c = (str + '').charCodeAt(0);
  5708. return c === 0x24 || c === 0x5F
  5709. }
  5710. /**
  5711. * Define a property.
  5712. */
  5713. function def (obj, key, val, enumerable) {
  5714. Object.defineProperty(obj, key, {
  5715. value: val,
  5716. enumerable: !!enumerable,
  5717. writable: true,
  5718. configurable: true
  5719. });
  5720. }
  5721. /**
  5722. * Parse simple path.
  5723. */
  5724. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5725. function parsePath (path) {
  5726. if (bailRE.test(path)) {
  5727. return
  5728. }
  5729. var segments = path.split('.');
  5730. return function (obj) {
  5731. for (var i = 0; i < segments.length; i++) {
  5732. if (!obj) { return }
  5733. obj = obj[segments[i]];
  5734. }
  5735. return obj
  5736. }
  5737. }
  5738. /* */
  5739. // can we use __proto__?
  5740. var hasProto = '__proto__' in {};
  5741. // Browser environment sniffing
  5742. var inBrowser = typeof window !== 'undefined';
  5743. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5744. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5745. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5746. var isIE = UA && /msie|trident/.test(UA);
  5747. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5748. var isEdge = UA && UA.indexOf('edge/') > 0;
  5749. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5750. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5751. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5752. var isPhantomJS = UA && /phantomjs/.test(UA);
  5753. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5754. // Firefox has a "watch" function on Object.prototype...
  5755. var nativeWatch = ({}).watch;
  5756. if (inBrowser) {
  5757. try {
  5758. var opts = {};
  5759. Object.defineProperty(opts, 'passive', ({
  5760. get: function get () {
  5761. }
  5762. })); // https://github.com/facebook/flow/issues/285
  5763. window.addEventListener('test-passive', null, opts);
  5764. } catch (e) {}
  5765. }
  5766. // this needs to be lazy-evaled because vue may be required before
  5767. // vue-server-renderer can set VUE_ENV
  5768. var _isServer;
  5769. var isServerRendering = function () {
  5770. if (_isServer === undefined) {
  5771. /* istanbul ignore if */
  5772. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5773. // detect presence of vue-server-renderer and avoid
  5774. // Webpack shimming the process
  5775. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5776. } else {
  5777. _isServer = false;
  5778. }
  5779. }
  5780. return _isServer
  5781. };
  5782. // detect devtools
  5783. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5784. /* istanbul ignore next */
  5785. function isNative (Ctor) {
  5786. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5787. }
  5788. var hasSymbol =
  5789. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5790. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5791. var _Set;
  5792. /* istanbul ignore if */ // $flow-disable-line
  5793. if (typeof Set !== 'undefined' && isNative(Set)) {
  5794. // use native Set when available.
  5795. _Set = Set;
  5796. } else {
  5797. // a non-standard Set polyfill that only works with primitive keys.
  5798. _Set = /*@__PURE__*/(function () {
  5799. function Set () {
  5800. this.set = Object.create(null);
  5801. }
  5802. Set.prototype.has = function has (key) {
  5803. return this.set[key] === true
  5804. };
  5805. Set.prototype.add = function add (key) {
  5806. this.set[key] = true;
  5807. };
  5808. Set.prototype.clear = function clear () {
  5809. this.set = Object.create(null);
  5810. };
  5811. return Set;
  5812. }());
  5813. }
  5814. /* */
  5815. var warn = noop;
  5816. var tip = noop;
  5817. var generateComponentTrace = (noop); // work around flow check
  5818. var formatComponentName = (noop);
  5819. if (true) {
  5820. var hasConsole = typeof console !== 'undefined';
  5821. var classifyRE = /(?:^|[-_])(\w)/g;
  5822. var classify = function (str) { return str
  5823. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5824. .replace(/[-_]/g, ''); };
  5825. warn = function (msg, vm) {
  5826. var trace = vm ? generateComponentTrace(vm) : '';
  5827. if (config.warnHandler) {
  5828. config.warnHandler.call(null, msg, vm, trace);
  5829. } else if (hasConsole && (!config.silent)) {
  5830. console.error(("[Vue warn]: " + msg + trace));
  5831. }
  5832. };
  5833. tip = function (msg, vm) {
  5834. if (hasConsole && (!config.silent)) {
  5835. console.warn("[Vue tip]: " + msg + (
  5836. vm ? generateComponentTrace(vm) : ''
  5837. ));
  5838. }
  5839. };
  5840. formatComponentName = function (vm, includeFile) {
  5841. if (vm.$root === vm) {
  5842. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5843. return ('') + vm.$options.__file
  5844. }
  5845. return '<Root>'
  5846. }
  5847. var options = typeof vm === 'function' && vm.cid != null
  5848. ? vm.options
  5849. : vm._isVue
  5850. ? vm.$options || vm.constructor.options
  5851. : vm;
  5852. var name = options.name || options._componentTag;
  5853. var file = options.__file;
  5854. if (!name && file) {
  5855. var match = file.match(/([^/\\]+)\.vue$/);
  5856. name = match && match[1];
  5857. }
  5858. return (
  5859. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5860. (file && includeFile !== false ? (" at " + file) : '')
  5861. )
  5862. };
  5863. var repeat = function (str, n) {
  5864. var res = '';
  5865. while (n) {
  5866. if (n % 2 === 1) { res += str; }
  5867. if (n > 1) { str += str; }
  5868. n >>= 1;
  5869. }
  5870. return res
  5871. };
  5872. generateComponentTrace = function (vm) {
  5873. if (vm._isVue && vm.$parent) {
  5874. var tree = [];
  5875. var currentRecursiveSequence = 0;
  5876. while (vm && vm.$options.name !== 'PageBody') {
  5877. if (tree.length > 0) {
  5878. var last = tree[tree.length - 1];
  5879. if (last.constructor === vm.constructor) {
  5880. currentRecursiveSequence++;
  5881. vm = vm.$parent;
  5882. continue
  5883. } else if (currentRecursiveSequence > 0) {
  5884. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5885. currentRecursiveSequence = 0;
  5886. }
  5887. }
  5888. !vm.$options.isReserved && tree.push(vm);
  5889. vm = vm.$parent;
  5890. }
  5891. return '\n\nfound in\n\n' + tree
  5892. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5893. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5894. : formatComponentName(vm))); })
  5895. .join('\n')
  5896. } else {
  5897. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5898. }
  5899. };
  5900. }
  5901. /* */
  5902. var uid = 0;
  5903. /**
  5904. * A dep is an observable that can have multiple
  5905. * directives subscribing to it.
  5906. */
  5907. var Dep = function Dep () {
  5908. this.id = uid++;
  5909. this.subs = [];
  5910. };
  5911. Dep.prototype.addSub = function addSub (sub) {
  5912. this.subs.push(sub);
  5913. };
  5914. Dep.prototype.removeSub = function removeSub (sub) {
  5915. remove(this.subs, sub);
  5916. };
  5917. Dep.prototype.depend = function depend () {
  5918. if (Dep.SharedObject.target) {
  5919. Dep.SharedObject.target.addDep(this);
  5920. }
  5921. };
  5922. Dep.prototype.notify = function notify () {
  5923. // stabilize the subscriber list first
  5924. var subs = this.subs.slice();
  5925. if ( true && !config.async) {
  5926. // subs aren't sorted in scheduler if not running async
  5927. // we need to sort them now to make sure they fire in correct
  5928. // order
  5929. subs.sort(function (a, b) { return a.id - b.id; });
  5930. }
  5931. for (var i = 0, l = subs.length; i < l; i++) {
  5932. subs[i].update();
  5933. }
  5934. };
  5935. // The current target watcher being evaluated.
  5936. // This is globally unique because only one watcher
  5937. // can be evaluated at a time.
  5938. // fixed by xxxxxx (nvue shared vuex)
  5939. /* eslint-disable no-undef */
  5940. Dep.SharedObject = {};
  5941. Dep.SharedObject.target = null;
  5942. Dep.SharedObject.targetStack = [];
  5943. function pushTarget (target) {
  5944. Dep.SharedObject.targetStack.push(target);
  5945. Dep.SharedObject.target = target;
  5946. Dep.target = target;
  5947. }
  5948. function popTarget () {
  5949. Dep.SharedObject.targetStack.pop();
  5950. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5951. Dep.target = Dep.SharedObject.target;
  5952. }
  5953. /* */
  5954. var VNode = function VNode (
  5955. tag,
  5956. data,
  5957. children,
  5958. text,
  5959. elm,
  5960. context,
  5961. componentOptions,
  5962. asyncFactory
  5963. ) {
  5964. this.tag = tag;
  5965. this.data = data;
  5966. this.children = children;
  5967. this.text = text;
  5968. this.elm = elm;
  5969. this.ns = undefined;
  5970. this.context = context;
  5971. this.fnContext = undefined;
  5972. this.fnOptions = undefined;
  5973. this.fnScopeId = undefined;
  5974. this.key = data && data.key;
  5975. this.componentOptions = componentOptions;
  5976. this.componentInstance = undefined;
  5977. this.parent = undefined;
  5978. this.raw = false;
  5979. this.isStatic = false;
  5980. this.isRootInsert = true;
  5981. this.isComment = false;
  5982. this.isCloned = false;
  5983. this.isOnce = false;
  5984. this.asyncFactory = asyncFactory;
  5985. this.asyncMeta = undefined;
  5986. this.isAsyncPlaceholder = false;
  5987. };
  5988. var prototypeAccessors = { child: { configurable: true } };
  5989. // DEPRECATED: alias for componentInstance for backwards compat.
  5990. /* istanbul ignore next */
  5991. prototypeAccessors.child.get = function () {
  5992. return this.componentInstance
  5993. };
  5994. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5995. var createEmptyVNode = function (text) {
  5996. if ( text === void 0 ) text = '';
  5997. var node = new VNode();
  5998. node.text = text;
  5999. node.isComment = true;
  6000. return node
  6001. };
  6002. function createTextVNode (val) {
  6003. return new VNode(undefined, undefined, undefined, String(val))
  6004. }
  6005. // optimized shallow clone
  6006. // used for static nodes and slot nodes because they may be reused across
  6007. // multiple renders, cloning them avoids errors when DOM manipulations rely
  6008. // on their elm reference.
  6009. function cloneVNode (vnode) {
  6010. var cloned = new VNode(
  6011. vnode.tag,
  6012. vnode.data,
  6013. // #7975
  6014. // clone children array to avoid mutating original in case of cloning
  6015. // a child.
  6016. vnode.children && vnode.children.slice(),
  6017. vnode.text,
  6018. vnode.elm,
  6019. vnode.context,
  6020. vnode.componentOptions,
  6021. vnode.asyncFactory
  6022. );
  6023. cloned.ns = vnode.ns;
  6024. cloned.isStatic = vnode.isStatic;
  6025. cloned.key = vnode.key;
  6026. cloned.isComment = vnode.isComment;
  6027. cloned.fnContext = vnode.fnContext;
  6028. cloned.fnOptions = vnode.fnOptions;
  6029. cloned.fnScopeId = vnode.fnScopeId;
  6030. cloned.asyncMeta = vnode.asyncMeta;
  6031. cloned.isCloned = true;
  6032. return cloned
  6033. }
  6034. /*
  6035. * not type checking this file because flow doesn't play well with
  6036. * dynamically accessing methods on Array prototype
  6037. */
  6038. var arrayProto = Array.prototype;
  6039. var arrayMethods = Object.create(arrayProto);
  6040. var methodsToPatch = [
  6041. 'push',
  6042. 'pop',
  6043. 'shift',
  6044. 'unshift',
  6045. 'splice',
  6046. 'sort',
  6047. 'reverse'
  6048. ];
  6049. /**
  6050. * Intercept mutating methods and emit events
  6051. */
  6052. methodsToPatch.forEach(function (method) {
  6053. // cache original method
  6054. var original = arrayProto[method];
  6055. def(arrayMethods, method, function mutator () {
  6056. var args = [], len = arguments.length;
  6057. while ( len-- ) args[ len ] = arguments[ len ];
  6058. var result = original.apply(this, args);
  6059. var ob = this.__ob__;
  6060. var inserted;
  6061. switch (method) {
  6062. case 'push':
  6063. case 'unshift':
  6064. inserted = args;
  6065. break
  6066. case 'splice':
  6067. inserted = args.slice(2);
  6068. break
  6069. }
  6070. if (inserted) { ob.observeArray(inserted); }
  6071. // notify change
  6072. ob.dep.notify();
  6073. return result
  6074. });
  6075. });
  6076. /* */
  6077. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  6078. /**
  6079. * In some cases we may want to disable observation inside a component's
  6080. * update computation.
  6081. */
  6082. var shouldObserve = true;
  6083. function toggleObserving (value) {
  6084. shouldObserve = value;
  6085. }
  6086. /**
  6087. * Observer class that is attached to each observed
  6088. * object. Once attached, the observer converts the target
  6089. * object's property keys into getter/setters that
  6090. * collect dependencies and dispatch updates.
  6091. */
  6092. var Observer = function Observer (value) {
  6093. this.value = value;
  6094. this.dep = new Dep();
  6095. this.vmCount = 0;
  6096. def(value, '__ob__', this);
  6097. if (Array.isArray(value)) {
  6098. if (hasProto) {
  6099. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  6100. if(value.push !== value.__proto__.push){
  6101. copyAugment(value, arrayMethods, arrayKeys);
  6102. } else {
  6103. protoAugment(value, arrayMethods);
  6104. }
  6105. }
  6106. } else {
  6107. copyAugment(value, arrayMethods, arrayKeys);
  6108. }
  6109. this.observeArray(value);
  6110. } else {
  6111. this.walk(value);
  6112. }
  6113. };
  6114. /**
  6115. * Walk through all properties and convert them into
  6116. * getter/setters. This method should only be called when
  6117. * value type is Object.
  6118. */
  6119. Observer.prototype.walk = function walk (obj) {
  6120. var keys = Object.keys(obj);
  6121. for (var i = 0; i < keys.length; i++) {
  6122. defineReactive$$1(obj, keys[i]);
  6123. }
  6124. };
  6125. /**
  6126. * Observe a list of Array items.
  6127. */
  6128. Observer.prototype.observeArray = function observeArray (items) {
  6129. for (var i = 0, l = items.length; i < l; i++) {
  6130. observe(items[i]);
  6131. }
  6132. };
  6133. // helpers
  6134. /**
  6135. * Augment a target Object or Array by intercepting
  6136. * the prototype chain using __proto__
  6137. */
  6138. function protoAugment (target, src) {
  6139. /* eslint-disable no-proto */
  6140. target.__proto__ = src;
  6141. /* eslint-enable no-proto */
  6142. }
  6143. /**
  6144. * Augment a target Object or Array by defining
  6145. * hidden properties.
  6146. */
  6147. /* istanbul ignore next */
  6148. function copyAugment (target, src, keys) {
  6149. for (var i = 0, l = keys.length; i < l; i++) {
  6150. var key = keys[i];
  6151. def(target, key, src[key]);
  6152. }
  6153. }
  6154. /**
  6155. * Attempt to create an observer instance for a value,
  6156. * returns the new observer if successfully observed,
  6157. * or the existing observer if the value already has one.
  6158. */
  6159. function observe (value, asRootData) {
  6160. if (!isObject(value) || value instanceof VNode) {
  6161. return
  6162. }
  6163. var ob;
  6164. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  6165. ob = value.__ob__;
  6166. } else if (
  6167. shouldObserve &&
  6168. !isServerRendering() &&
  6169. (Array.isArray(value) || isPlainObject(value)) &&
  6170. Object.isExtensible(value) &&
  6171. !value._isVue &&
  6172. !value.__v_isMPComponent
  6173. ) {
  6174. ob = new Observer(value);
  6175. }
  6176. if (asRootData && ob) {
  6177. ob.vmCount++;
  6178. }
  6179. return ob
  6180. }
  6181. /**
  6182. * Define a reactive property on an Object.
  6183. */
  6184. function defineReactive$$1 (
  6185. obj,
  6186. key,
  6187. val,
  6188. customSetter,
  6189. shallow
  6190. ) {
  6191. var dep = new Dep();
  6192. var property = Object.getOwnPropertyDescriptor(obj, key);
  6193. if (property && property.configurable === false) {
  6194. return
  6195. }
  6196. // cater for pre-defined getter/setters
  6197. var getter = property && property.get;
  6198. var setter = property && property.set;
  6199. if ((!getter || setter) && arguments.length === 2) {
  6200. val = obj[key];
  6201. }
  6202. var childOb = !shallow && observe(val);
  6203. Object.defineProperty(obj, key, {
  6204. enumerable: true,
  6205. configurable: true,
  6206. get: function reactiveGetter () {
  6207. var value = getter ? getter.call(obj) : val;
  6208. if (Dep.SharedObject.target) { // fixed by xxxxxx
  6209. dep.depend();
  6210. if (childOb) {
  6211. childOb.dep.depend();
  6212. if (Array.isArray(value)) {
  6213. dependArray(value);
  6214. }
  6215. }
  6216. }
  6217. return value
  6218. },
  6219. set: function reactiveSetter (newVal) {
  6220. var value = getter ? getter.call(obj) : val;
  6221. /* eslint-disable no-self-compare */
  6222. if (newVal === value || (newVal !== newVal && value !== value)) {
  6223. return
  6224. }
  6225. /* eslint-enable no-self-compare */
  6226. if ( true && customSetter) {
  6227. customSetter();
  6228. }
  6229. // #7981: for accessor properties without setter
  6230. if (getter && !setter) { return }
  6231. if (setter) {
  6232. setter.call(obj, newVal);
  6233. } else {
  6234. val = newVal;
  6235. }
  6236. childOb = !shallow && observe(newVal);
  6237. dep.notify();
  6238. }
  6239. });
  6240. }
  6241. /**
  6242. * Set a property on an object. Adds the new property and
  6243. * triggers change notification if the property doesn't
  6244. * already exist.
  6245. */
  6246. function set (target, key, val) {
  6247. if ( true &&
  6248. (isUndef(target) || isPrimitive(target))
  6249. ) {
  6250. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  6251. }
  6252. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6253. target.length = Math.max(target.length, key);
  6254. target.splice(key, 1, val);
  6255. return val
  6256. }
  6257. if (key in target && !(key in Object.prototype)) {
  6258. target[key] = val;
  6259. return val
  6260. }
  6261. var ob = (target).__ob__;
  6262. if (target._isVue || (ob && ob.vmCount)) {
  6263. true && warn(
  6264. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  6265. 'at runtime - declare it upfront in the data option.'
  6266. );
  6267. return val
  6268. }
  6269. if (!ob) {
  6270. target[key] = val;
  6271. return val
  6272. }
  6273. defineReactive$$1(ob.value, key, val);
  6274. ob.dep.notify();
  6275. return val
  6276. }
  6277. /**
  6278. * Delete a property and trigger change if necessary.
  6279. */
  6280. function del (target, key) {
  6281. if ( true &&
  6282. (isUndef(target) || isPrimitive(target))
  6283. ) {
  6284. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  6285. }
  6286. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6287. target.splice(key, 1);
  6288. return
  6289. }
  6290. var ob = (target).__ob__;
  6291. if (target._isVue || (ob && ob.vmCount)) {
  6292. true && warn(
  6293. 'Avoid deleting properties on a Vue instance or its root $data ' +
  6294. '- just set it to null.'
  6295. );
  6296. return
  6297. }
  6298. if (!hasOwn(target, key)) {
  6299. return
  6300. }
  6301. delete target[key];
  6302. if (!ob) {
  6303. return
  6304. }
  6305. ob.dep.notify();
  6306. }
  6307. /**
  6308. * Collect dependencies on array elements when the array is touched, since
  6309. * we cannot intercept array element access like property getters.
  6310. */
  6311. function dependArray (value) {
  6312. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  6313. e = value[i];
  6314. e && e.__ob__ && e.__ob__.dep.depend();
  6315. if (Array.isArray(e)) {
  6316. dependArray(e);
  6317. }
  6318. }
  6319. }
  6320. /* */
  6321. /**
  6322. * Option overwriting strategies are functions that handle
  6323. * how to merge a parent option value and a child option
  6324. * value into the final value.
  6325. */
  6326. var strats = config.optionMergeStrategies;
  6327. /**
  6328. * Options with restrictions
  6329. */
  6330. if (true) {
  6331. strats.el = strats.propsData = function (parent, child, vm, key) {
  6332. if (!vm) {
  6333. warn(
  6334. "option \"" + key + "\" can only be used during instance " +
  6335. 'creation with the `new` keyword.'
  6336. );
  6337. }
  6338. return defaultStrat(parent, child)
  6339. };
  6340. }
  6341. /**
  6342. * Helper that recursively merges two data objects together.
  6343. */
  6344. function mergeData (to, from) {
  6345. if (!from) { return to }
  6346. var key, toVal, fromVal;
  6347. var keys = hasSymbol
  6348. ? Reflect.ownKeys(from)
  6349. : Object.keys(from);
  6350. for (var i = 0; i < keys.length; i++) {
  6351. key = keys[i];
  6352. // in case the object is already observed...
  6353. if (key === '__ob__') { continue }
  6354. toVal = to[key];
  6355. fromVal = from[key];
  6356. if (!hasOwn(to, key)) {
  6357. set(to, key, fromVal);
  6358. } else if (
  6359. toVal !== fromVal &&
  6360. isPlainObject(toVal) &&
  6361. isPlainObject(fromVal)
  6362. ) {
  6363. mergeData(toVal, fromVal);
  6364. }
  6365. }
  6366. return to
  6367. }
  6368. /**
  6369. * Data
  6370. */
  6371. function mergeDataOrFn (
  6372. parentVal,
  6373. childVal,
  6374. vm
  6375. ) {
  6376. if (!vm) {
  6377. // in a Vue.extend merge, both should be functions
  6378. if (!childVal) {
  6379. return parentVal
  6380. }
  6381. if (!parentVal) {
  6382. return childVal
  6383. }
  6384. // when parentVal & childVal are both present,
  6385. // we need to return a function that returns the
  6386. // merged result of both functions... no need to
  6387. // check if parentVal is a function here because
  6388. // it has to be a function to pass previous merges.
  6389. return function mergedDataFn () {
  6390. return mergeData(
  6391. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  6392. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  6393. )
  6394. }
  6395. } else {
  6396. return function mergedInstanceDataFn () {
  6397. // instance merge
  6398. var instanceData = typeof childVal === 'function'
  6399. ? childVal.call(vm, vm)
  6400. : childVal;
  6401. var defaultData = typeof parentVal === 'function'
  6402. ? parentVal.call(vm, vm)
  6403. : parentVal;
  6404. if (instanceData) {
  6405. return mergeData(instanceData, defaultData)
  6406. } else {
  6407. return defaultData
  6408. }
  6409. }
  6410. }
  6411. }
  6412. strats.data = function (
  6413. parentVal,
  6414. childVal,
  6415. vm
  6416. ) {
  6417. if (!vm) {
  6418. if (childVal && typeof childVal !== 'function') {
  6419. true && warn(
  6420. 'The "data" option should be a function ' +
  6421. 'that returns a per-instance value in component ' +
  6422. 'definitions.',
  6423. vm
  6424. );
  6425. return parentVal
  6426. }
  6427. return mergeDataOrFn(parentVal, childVal)
  6428. }
  6429. return mergeDataOrFn(parentVal, childVal, vm)
  6430. };
  6431. /**
  6432. * Hooks and props are merged as arrays.
  6433. */
  6434. function mergeHook (
  6435. parentVal,
  6436. childVal
  6437. ) {
  6438. var res = childVal
  6439. ? parentVal
  6440. ? parentVal.concat(childVal)
  6441. : Array.isArray(childVal)
  6442. ? childVal
  6443. : [childVal]
  6444. : parentVal;
  6445. return res
  6446. ? dedupeHooks(res)
  6447. : res
  6448. }
  6449. function dedupeHooks (hooks) {
  6450. var res = [];
  6451. for (var i = 0; i < hooks.length; i++) {
  6452. if (res.indexOf(hooks[i]) === -1) {
  6453. res.push(hooks[i]);
  6454. }
  6455. }
  6456. return res
  6457. }
  6458. LIFECYCLE_HOOKS.forEach(function (hook) {
  6459. strats[hook] = mergeHook;
  6460. });
  6461. /**
  6462. * Assets
  6463. *
  6464. * When a vm is present (instance creation), we need to do
  6465. * a three-way merge between constructor options, instance
  6466. * options and parent options.
  6467. */
  6468. function mergeAssets (
  6469. parentVal,
  6470. childVal,
  6471. vm,
  6472. key
  6473. ) {
  6474. var res = Object.create(parentVal || null);
  6475. if (childVal) {
  6476. true && assertObjectType(key, childVal, vm);
  6477. return extend(res, childVal)
  6478. } else {
  6479. return res
  6480. }
  6481. }
  6482. ASSET_TYPES.forEach(function (type) {
  6483. strats[type + 's'] = mergeAssets;
  6484. });
  6485. /**
  6486. * Watchers.
  6487. *
  6488. * Watchers hashes should not overwrite one
  6489. * another, so we merge them as arrays.
  6490. */
  6491. strats.watch = function (
  6492. parentVal,
  6493. childVal,
  6494. vm,
  6495. key
  6496. ) {
  6497. // work around Firefox's Object.prototype.watch...
  6498. if (parentVal === nativeWatch) { parentVal = undefined; }
  6499. if (childVal === nativeWatch) { childVal = undefined; }
  6500. /* istanbul ignore if */
  6501. if (!childVal) { return Object.create(parentVal || null) }
  6502. if (true) {
  6503. assertObjectType(key, childVal, vm);
  6504. }
  6505. if (!parentVal) { return childVal }
  6506. var ret = {};
  6507. extend(ret, parentVal);
  6508. for (var key$1 in childVal) {
  6509. var parent = ret[key$1];
  6510. var child = childVal[key$1];
  6511. if (parent && !Array.isArray(parent)) {
  6512. parent = [parent];
  6513. }
  6514. ret[key$1] = parent
  6515. ? parent.concat(child)
  6516. : Array.isArray(child) ? child : [child];
  6517. }
  6518. return ret
  6519. };
  6520. /**
  6521. * Other object hashes.
  6522. */
  6523. strats.props =
  6524. strats.methods =
  6525. strats.inject =
  6526. strats.computed = function (
  6527. parentVal,
  6528. childVal,
  6529. vm,
  6530. key
  6531. ) {
  6532. if (childVal && "development" !== 'production') {
  6533. assertObjectType(key, childVal, vm);
  6534. }
  6535. if (!parentVal) { return childVal }
  6536. var ret = Object.create(null);
  6537. extend(ret, parentVal);
  6538. if (childVal) { extend(ret, childVal); }
  6539. return ret
  6540. };
  6541. strats.provide = mergeDataOrFn;
  6542. /**
  6543. * Default strategy.
  6544. */
  6545. var defaultStrat = function (parentVal, childVal) {
  6546. return childVal === undefined
  6547. ? parentVal
  6548. : childVal
  6549. };
  6550. /**
  6551. * Validate component names
  6552. */
  6553. function checkComponents (options) {
  6554. for (var key in options.components) {
  6555. validateComponentName(key);
  6556. }
  6557. }
  6558. function validateComponentName (name) {
  6559. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  6560. warn(
  6561. 'Invalid component name: "' + name + '". Component names ' +
  6562. 'should conform to valid custom element name in html5 specification.'
  6563. );
  6564. }
  6565. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  6566. warn(
  6567. 'Do not use built-in or reserved HTML elements as component ' +
  6568. 'id: ' + name
  6569. );
  6570. }
  6571. }
  6572. /**
  6573. * Ensure all props option syntax are normalized into the
  6574. * Object-based format.
  6575. */
  6576. function normalizeProps (options, vm) {
  6577. var props = options.props;
  6578. if (!props) { return }
  6579. var res = {};
  6580. var i, val, name;
  6581. if (Array.isArray(props)) {
  6582. i = props.length;
  6583. while (i--) {
  6584. val = props[i];
  6585. if (typeof val === 'string') {
  6586. name = camelize(val);
  6587. res[name] = { type: null };
  6588. } else if (true) {
  6589. warn('props must be strings when using array syntax.');
  6590. }
  6591. }
  6592. } else if (isPlainObject(props)) {
  6593. for (var key in props) {
  6594. val = props[key];
  6595. name = camelize(key);
  6596. res[name] = isPlainObject(val)
  6597. ? val
  6598. : { type: val };
  6599. }
  6600. } else if (true) {
  6601. warn(
  6602. "Invalid value for option \"props\": expected an Array or an Object, " +
  6603. "but got " + (toRawType(props)) + ".",
  6604. vm
  6605. );
  6606. }
  6607. options.props = res;
  6608. }
  6609. /**
  6610. * Normalize all injections into Object-based format
  6611. */
  6612. function normalizeInject (options, vm) {
  6613. var inject = options.inject;
  6614. if (!inject) { return }
  6615. var normalized = options.inject = {};
  6616. if (Array.isArray(inject)) {
  6617. for (var i = 0; i < inject.length; i++) {
  6618. normalized[inject[i]] = { from: inject[i] };
  6619. }
  6620. } else if (isPlainObject(inject)) {
  6621. for (var key in inject) {
  6622. var val = inject[key];
  6623. normalized[key] = isPlainObject(val)
  6624. ? extend({ from: key }, val)
  6625. : { from: val };
  6626. }
  6627. } else if (true) {
  6628. warn(
  6629. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6630. "but got " + (toRawType(inject)) + ".",
  6631. vm
  6632. );
  6633. }
  6634. }
  6635. /**
  6636. * Normalize raw function directives into object format.
  6637. */
  6638. function normalizeDirectives (options) {
  6639. var dirs = options.directives;
  6640. if (dirs) {
  6641. for (var key in dirs) {
  6642. var def$$1 = dirs[key];
  6643. if (typeof def$$1 === 'function') {
  6644. dirs[key] = { bind: def$$1, update: def$$1 };
  6645. }
  6646. }
  6647. }
  6648. }
  6649. function assertObjectType (name, value, vm) {
  6650. if (!isPlainObject(value)) {
  6651. warn(
  6652. "Invalid value for option \"" + name + "\": expected an Object, " +
  6653. "but got " + (toRawType(value)) + ".",
  6654. vm
  6655. );
  6656. }
  6657. }
  6658. /**
  6659. * Merge two option objects into a new one.
  6660. * Core utility used in both instantiation and inheritance.
  6661. */
  6662. function mergeOptions (
  6663. parent,
  6664. child,
  6665. vm
  6666. ) {
  6667. if (true) {
  6668. checkComponents(child);
  6669. }
  6670. if (typeof child === 'function') {
  6671. child = child.options;
  6672. }
  6673. normalizeProps(child, vm);
  6674. normalizeInject(child, vm);
  6675. normalizeDirectives(child);
  6676. // Apply extends and mixins on the child options,
  6677. // but only if it is a raw options object that isn't
  6678. // the result of another mergeOptions call.
  6679. // Only merged options has the _base property.
  6680. if (!child._base) {
  6681. if (child.extends) {
  6682. parent = mergeOptions(parent, child.extends, vm);
  6683. }
  6684. if (child.mixins) {
  6685. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6686. parent = mergeOptions(parent, child.mixins[i], vm);
  6687. }
  6688. }
  6689. }
  6690. var options = {};
  6691. var key;
  6692. for (key in parent) {
  6693. mergeField(key);
  6694. }
  6695. for (key in child) {
  6696. if (!hasOwn(parent, key)) {
  6697. mergeField(key);
  6698. }
  6699. }
  6700. function mergeField (key) {
  6701. var strat = strats[key] || defaultStrat;
  6702. options[key] = strat(parent[key], child[key], vm, key);
  6703. }
  6704. return options
  6705. }
  6706. /**
  6707. * Resolve an asset.
  6708. * This function is used because child instances need access
  6709. * to assets defined in its ancestor chain.
  6710. */
  6711. function resolveAsset (
  6712. options,
  6713. type,
  6714. id,
  6715. warnMissing
  6716. ) {
  6717. /* istanbul ignore if */
  6718. if (typeof id !== 'string') {
  6719. return
  6720. }
  6721. var assets = options[type];
  6722. // check local registration variations first
  6723. if (hasOwn(assets, id)) { return assets[id] }
  6724. var camelizedId = camelize(id);
  6725. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6726. var PascalCaseId = capitalize(camelizedId);
  6727. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6728. // fallback to prototype chain
  6729. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6730. if ( true && warnMissing && !res) {
  6731. warn(
  6732. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6733. options
  6734. );
  6735. }
  6736. return res
  6737. }
  6738. /* */
  6739. function validateProp (
  6740. key,
  6741. propOptions,
  6742. propsData,
  6743. vm
  6744. ) {
  6745. var prop = propOptions[key];
  6746. var absent = !hasOwn(propsData, key);
  6747. var value = propsData[key];
  6748. // boolean casting
  6749. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6750. if (booleanIndex > -1) {
  6751. if (absent && !hasOwn(prop, 'default')) {
  6752. value = false;
  6753. } else if (value === '' || value === hyphenate(key)) {
  6754. // only cast empty string / same name to boolean if
  6755. // boolean has higher priority
  6756. var stringIndex = getTypeIndex(String, prop.type);
  6757. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6758. value = true;
  6759. }
  6760. }
  6761. }
  6762. // check default value
  6763. if (value === undefined) {
  6764. value = getPropDefaultValue(vm, prop, key);
  6765. // since the default value is a fresh copy,
  6766. // make sure to observe it.
  6767. var prevShouldObserve = shouldObserve;
  6768. toggleObserving(true);
  6769. observe(value);
  6770. toggleObserving(prevShouldObserve);
  6771. }
  6772. if (
  6773. true
  6774. ) {
  6775. assertProp(prop, key, value, vm, absent);
  6776. }
  6777. return value
  6778. }
  6779. /**
  6780. * Get the default value of a prop.
  6781. */
  6782. function getPropDefaultValue (vm, prop, key) {
  6783. // no default, return undefined
  6784. if (!hasOwn(prop, 'default')) {
  6785. return undefined
  6786. }
  6787. var def = prop.default;
  6788. // warn against non-factory defaults for Object & Array
  6789. if ( true && isObject(def)) {
  6790. warn(
  6791. 'Invalid default value for prop "' + key + '": ' +
  6792. 'Props with type Object/Array must use a factory function ' +
  6793. 'to return the default value.',
  6794. vm
  6795. );
  6796. }
  6797. // the raw prop value was also undefined from previous render,
  6798. // return previous default value to avoid unnecessary watcher trigger
  6799. if (vm && vm.$options.propsData &&
  6800. vm.$options.propsData[key] === undefined &&
  6801. vm._props[key] !== undefined
  6802. ) {
  6803. return vm._props[key]
  6804. }
  6805. // call factory function for non-Function types
  6806. // a value is Function if its prototype is function even across different execution context
  6807. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6808. ? def.call(vm)
  6809. : def
  6810. }
  6811. /**
  6812. * Assert whether a prop is valid.
  6813. */
  6814. function assertProp (
  6815. prop,
  6816. name,
  6817. value,
  6818. vm,
  6819. absent
  6820. ) {
  6821. if (prop.required && absent) {
  6822. warn(
  6823. 'Missing required prop: "' + name + '"',
  6824. vm
  6825. );
  6826. return
  6827. }
  6828. if (value == null && !prop.required) {
  6829. return
  6830. }
  6831. var type = prop.type;
  6832. var valid = !type || type === true;
  6833. var expectedTypes = [];
  6834. if (type) {
  6835. if (!Array.isArray(type)) {
  6836. type = [type];
  6837. }
  6838. for (var i = 0; i < type.length && !valid; i++) {
  6839. var assertedType = assertType(value, type[i]);
  6840. expectedTypes.push(assertedType.expectedType || '');
  6841. valid = assertedType.valid;
  6842. }
  6843. }
  6844. if (!valid) {
  6845. warn(
  6846. getInvalidTypeMessage(name, value, expectedTypes),
  6847. vm
  6848. );
  6849. return
  6850. }
  6851. var validator = prop.validator;
  6852. if (validator) {
  6853. if (!validator(value)) {
  6854. warn(
  6855. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6856. vm
  6857. );
  6858. }
  6859. }
  6860. }
  6861. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6862. function assertType (value, type) {
  6863. var valid;
  6864. var expectedType = getType(type);
  6865. if (simpleCheckRE.test(expectedType)) {
  6866. var t = typeof value;
  6867. valid = t === expectedType.toLowerCase();
  6868. // for primitive wrapper objects
  6869. if (!valid && t === 'object') {
  6870. valid = value instanceof type;
  6871. }
  6872. } else if (expectedType === 'Object') {
  6873. valid = isPlainObject(value);
  6874. } else if (expectedType === 'Array') {
  6875. valid = Array.isArray(value);
  6876. } else {
  6877. valid = value instanceof type;
  6878. }
  6879. return {
  6880. valid: valid,
  6881. expectedType: expectedType
  6882. }
  6883. }
  6884. /**
  6885. * Use function string name to check built-in types,
  6886. * because a simple equality check will fail when running
  6887. * across different vms / iframes.
  6888. */
  6889. function getType (fn) {
  6890. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6891. return match ? match[1] : ''
  6892. }
  6893. function isSameType (a, b) {
  6894. return getType(a) === getType(b)
  6895. }
  6896. function getTypeIndex (type, expectedTypes) {
  6897. if (!Array.isArray(expectedTypes)) {
  6898. return isSameType(expectedTypes, type) ? 0 : -1
  6899. }
  6900. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6901. if (isSameType(expectedTypes[i], type)) {
  6902. return i
  6903. }
  6904. }
  6905. return -1
  6906. }
  6907. function getInvalidTypeMessage (name, value, expectedTypes) {
  6908. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6909. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6910. var expectedType = expectedTypes[0];
  6911. var receivedType = toRawType(value);
  6912. var expectedValue = styleValue(value, expectedType);
  6913. var receivedValue = styleValue(value, receivedType);
  6914. // check if we need to specify expected value
  6915. if (expectedTypes.length === 1 &&
  6916. isExplicable(expectedType) &&
  6917. !isBoolean(expectedType, receivedType)) {
  6918. message += " with value " + expectedValue;
  6919. }
  6920. message += ", got " + receivedType + " ";
  6921. // check if we need to specify received value
  6922. if (isExplicable(receivedType)) {
  6923. message += "with value " + receivedValue + ".";
  6924. }
  6925. return message
  6926. }
  6927. function styleValue (value, type) {
  6928. if (type === 'String') {
  6929. return ("\"" + value + "\"")
  6930. } else if (type === 'Number') {
  6931. return ("" + (Number(value)))
  6932. } else {
  6933. return ("" + value)
  6934. }
  6935. }
  6936. function isExplicable (value) {
  6937. var explicitTypes = ['string', 'number', 'boolean'];
  6938. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6939. }
  6940. function isBoolean () {
  6941. var args = [], len = arguments.length;
  6942. while ( len-- ) args[ len ] = arguments[ len ];
  6943. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6944. }
  6945. /* */
  6946. function handleError (err, vm, info) {
  6947. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6948. // See: https://github.com/vuejs/vuex/issues/1505
  6949. pushTarget();
  6950. try {
  6951. if (vm) {
  6952. var cur = vm;
  6953. while ((cur = cur.$parent)) {
  6954. var hooks = cur.$options.errorCaptured;
  6955. if (hooks) {
  6956. for (var i = 0; i < hooks.length; i++) {
  6957. try {
  6958. var capture = hooks[i].call(cur, err, vm, info) === false;
  6959. if (capture) { return }
  6960. } catch (e) {
  6961. globalHandleError(e, cur, 'errorCaptured hook');
  6962. }
  6963. }
  6964. }
  6965. }
  6966. }
  6967. globalHandleError(err, vm, info);
  6968. } finally {
  6969. popTarget();
  6970. }
  6971. }
  6972. function invokeWithErrorHandling (
  6973. handler,
  6974. context,
  6975. args,
  6976. vm,
  6977. info
  6978. ) {
  6979. var res;
  6980. try {
  6981. res = args ? handler.apply(context, args) : handler.call(context);
  6982. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6983. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6984. // issue #9511
  6985. // avoid catch triggering multiple times when nested calls
  6986. res._handled = true;
  6987. }
  6988. } catch (e) {
  6989. handleError(e, vm, info);
  6990. }
  6991. return res
  6992. }
  6993. function globalHandleError (err, vm, info) {
  6994. if (config.errorHandler) {
  6995. try {
  6996. return config.errorHandler.call(null, err, vm, info)
  6997. } catch (e) {
  6998. // if the user intentionally throws the original error in the handler,
  6999. // do not log it twice
  7000. if (e !== err) {
  7001. logError(e, null, 'config.errorHandler');
  7002. }
  7003. }
  7004. }
  7005. logError(err, vm, info);
  7006. }
  7007. function logError (err, vm, info) {
  7008. if (true) {
  7009. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7010. }
  7011. /* istanbul ignore else */
  7012. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  7013. console.error(err);
  7014. } else {
  7015. throw err
  7016. }
  7017. }
  7018. /* */
  7019. var callbacks = [];
  7020. var pending = false;
  7021. function flushCallbacks () {
  7022. pending = false;
  7023. var copies = callbacks.slice(0);
  7024. callbacks.length = 0;
  7025. for (var i = 0; i < copies.length; i++) {
  7026. copies[i]();
  7027. }
  7028. }
  7029. // Here we have async deferring wrappers using microtasks.
  7030. // In 2.5 we used (macro) tasks (in combination with microtasks).
  7031. // However, it has subtle problems when state is changed right before repaint
  7032. // (e.g. #6813, out-in transitions).
  7033. // Also, using (macro) tasks in event handler would cause some weird behaviors
  7034. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  7035. // So we now use microtasks everywhere, again.
  7036. // A major drawback of this tradeoff is that there are some scenarios
  7037. // where microtasks have too high a priority and fire in between supposedly
  7038. // sequential events (e.g. #4521, #6690, which have workarounds)
  7039. // or even between bubbling of the same event (#6566).
  7040. var timerFunc;
  7041. // The nextTick behavior leverages the microtask queue, which can be accessed
  7042. // via either native Promise.then or MutationObserver.
  7043. // MutationObserver has wider support, however it is seriously bugged in
  7044. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  7045. // completely stops working after triggering a few times... so, if native
  7046. // Promise is available, we will use it:
  7047. /* istanbul ignore next, $flow-disable-line */
  7048. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  7049. var p = Promise.resolve();
  7050. timerFunc = function () {
  7051. p.then(flushCallbacks);
  7052. // In problematic UIWebViews, Promise.then doesn't completely break, but
  7053. // it can get stuck in a weird state where callbacks are pushed into the
  7054. // microtask queue but the queue isn't being flushed, until the browser
  7055. // needs to do some other work, e.g. handle a timer. Therefore we can
  7056. // "force" the microtask queue to be flushed by adding an empty timer.
  7057. if (isIOS) { setTimeout(noop); }
  7058. };
  7059. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  7060. isNative(MutationObserver) ||
  7061. // PhantomJS and iOS 7.x
  7062. MutationObserver.toString() === '[object MutationObserverConstructor]'
  7063. )) {
  7064. // Use MutationObserver where native Promise is not available,
  7065. // e.g. PhantomJS, iOS7, Android 4.4
  7066. // (#6466 MutationObserver is unreliable in IE11)
  7067. var counter = 1;
  7068. var observer = new MutationObserver(flushCallbacks);
  7069. var textNode = document.createTextNode(String(counter));
  7070. observer.observe(textNode, {
  7071. characterData: true
  7072. });
  7073. timerFunc = function () {
  7074. counter = (counter + 1) % 2;
  7075. textNode.data = String(counter);
  7076. };
  7077. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  7078. // Fallback to setImmediate.
  7079. // Technically it leverages the (macro) task queue,
  7080. // but it is still a better choice than setTimeout.
  7081. timerFunc = function () {
  7082. setImmediate(flushCallbacks);
  7083. };
  7084. } else {
  7085. // Fallback to setTimeout.
  7086. timerFunc = function () {
  7087. setTimeout(flushCallbacks, 0);
  7088. };
  7089. }
  7090. function nextTick (cb, ctx) {
  7091. var _resolve;
  7092. callbacks.push(function () {
  7093. if (cb) {
  7094. try {
  7095. cb.call(ctx);
  7096. } catch (e) {
  7097. handleError(e, ctx, 'nextTick');
  7098. }
  7099. } else if (_resolve) {
  7100. _resolve(ctx);
  7101. }
  7102. });
  7103. if (!pending) {
  7104. pending = true;
  7105. timerFunc();
  7106. }
  7107. // $flow-disable-line
  7108. if (!cb && typeof Promise !== 'undefined') {
  7109. return new Promise(function (resolve) {
  7110. _resolve = resolve;
  7111. })
  7112. }
  7113. }
  7114. /* */
  7115. /* not type checking this file because flow doesn't play well with Proxy */
  7116. var initProxy;
  7117. if (true) {
  7118. var allowedGlobals = makeMap(
  7119. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  7120. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  7121. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  7122. 'require' // for Webpack/Browserify
  7123. );
  7124. var warnNonPresent = function (target, key) {
  7125. warn(
  7126. "Property or method \"" + key + "\" is not defined on the instance but " +
  7127. 'referenced during render. Make sure that this property is reactive, ' +
  7128. 'either in the data option, or for class-based components, by ' +
  7129. 'initializing the property. ' +
  7130. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  7131. target
  7132. );
  7133. };
  7134. var warnReservedPrefix = function (target, key) {
  7135. warn(
  7136. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  7137. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  7138. 'prevent conflicts with Vue internals. ' +
  7139. 'See: https://vuejs.org/v2/api/#data',
  7140. target
  7141. );
  7142. };
  7143. var hasProxy =
  7144. typeof Proxy !== 'undefined' && isNative(Proxy);
  7145. if (hasProxy) {
  7146. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  7147. config.keyCodes = new Proxy(config.keyCodes, {
  7148. set: function set (target, key, value) {
  7149. if (isBuiltInModifier(key)) {
  7150. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  7151. return false
  7152. } else {
  7153. target[key] = value;
  7154. return true
  7155. }
  7156. }
  7157. });
  7158. }
  7159. var hasHandler = {
  7160. has: function has (target, key) {
  7161. var has = key in target;
  7162. var isAllowed = allowedGlobals(key) ||
  7163. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  7164. if (!has && !isAllowed) {
  7165. if (key in target.$data) { warnReservedPrefix(target, key); }
  7166. else { warnNonPresent(target, key); }
  7167. }
  7168. return has || !isAllowed
  7169. }
  7170. };
  7171. var getHandler = {
  7172. get: function get (target, key) {
  7173. if (typeof key === 'string' && !(key in target)) {
  7174. if (key in target.$data) { warnReservedPrefix(target, key); }
  7175. else { warnNonPresent(target, key); }
  7176. }
  7177. return target[key]
  7178. }
  7179. };
  7180. initProxy = function initProxy (vm) {
  7181. if (hasProxy) {
  7182. // determine which proxy handler to use
  7183. var options = vm.$options;
  7184. var handlers = options.render && options.render._withStripped
  7185. ? getHandler
  7186. : hasHandler;
  7187. vm._renderProxy = new Proxy(vm, handlers);
  7188. } else {
  7189. vm._renderProxy = vm;
  7190. }
  7191. };
  7192. }
  7193. /* */
  7194. var seenObjects = new _Set();
  7195. /**
  7196. * Recursively traverse an object to evoke all converted
  7197. * getters, so that every nested property inside the object
  7198. * is collected as a "deep" dependency.
  7199. */
  7200. function traverse (val) {
  7201. _traverse(val, seenObjects);
  7202. seenObjects.clear();
  7203. }
  7204. function _traverse (val, seen) {
  7205. var i, keys;
  7206. var isA = Array.isArray(val);
  7207. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  7208. return
  7209. }
  7210. if (val.__ob__) {
  7211. var depId = val.__ob__.dep.id;
  7212. if (seen.has(depId)) {
  7213. return
  7214. }
  7215. seen.add(depId);
  7216. }
  7217. if (isA) {
  7218. i = val.length;
  7219. while (i--) { _traverse(val[i], seen); }
  7220. } else {
  7221. keys = Object.keys(val);
  7222. i = keys.length;
  7223. while (i--) { _traverse(val[keys[i]], seen); }
  7224. }
  7225. }
  7226. var mark;
  7227. var measure;
  7228. if (true) {
  7229. var perf = inBrowser && window.performance;
  7230. /* istanbul ignore if */
  7231. if (
  7232. perf &&
  7233. perf.mark &&
  7234. perf.measure &&
  7235. perf.clearMarks &&
  7236. perf.clearMeasures
  7237. ) {
  7238. mark = function (tag) { return perf.mark(tag); };
  7239. measure = function (name, startTag, endTag) {
  7240. perf.measure(name, startTag, endTag);
  7241. perf.clearMarks(startTag);
  7242. perf.clearMarks(endTag);
  7243. // perf.clearMeasures(name)
  7244. };
  7245. }
  7246. }
  7247. /* */
  7248. var normalizeEvent = cached(function (name) {
  7249. var passive = name.charAt(0) === '&';
  7250. name = passive ? name.slice(1) : name;
  7251. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  7252. name = once$$1 ? name.slice(1) : name;
  7253. var capture = name.charAt(0) === '!';
  7254. name = capture ? name.slice(1) : name;
  7255. return {
  7256. name: name,
  7257. once: once$$1,
  7258. capture: capture,
  7259. passive: passive
  7260. }
  7261. });
  7262. function createFnInvoker (fns, vm) {
  7263. function invoker () {
  7264. var arguments$1 = arguments;
  7265. var fns = invoker.fns;
  7266. if (Array.isArray(fns)) {
  7267. var cloned = fns.slice();
  7268. for (var i = 0; i < cloned.length; i++) {
  7269. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  7270. }
  7271. } else {
  7272. // return handler return value for single handlers
  7273. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  7274. }
  7275. }
  7276. invoker.fns = fns;
  7277. return invoker
  7278. }
  7279. function updateListeners (
  7280. on,
  7281. oldOn,
  7282. add,
  7283. remove$$1,
  7284. createOnceHandler,
  7285. vm
  7286. ) {
  7287. var name, def$$1, cur, old, event;
  7288. for (name in on) {
  7289. def$$1 = cur = on[name];
  7290. old = oldOn[name];
  7291. event = normalizeEvent(name);
  7292. if (isUndef(cur)) {
  7293. true && warn(
  7294. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  7295. vm
  7296. );
  7297. } else if (isUndef(old)) {
  7298. if (isUndef(cur.fns)) {
  7299. cur = on[name] = createFnInvoker(cur, vm);
  7300. }
  7301. if (isTrue(event.once)) {
  7302. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  7303. }
  7304. add(event.name, cur, event.capture, event.passive, event.params);
  7305. } else if (cur !== old) {
  7306. old.fns = cur;
  7307. on[name] = old;
  7308. }
  7309. }
  7310. for (name in oldOn) {
  7311. if (isUndef(on[name])) {
  7312. event = normalizeEvent(name);
  7313. remove$$1(event.name, oldOn[name], event.capture);
  7314. }
  7315. }
  7316. }
  7317. /* */
  7318. /* */
  7319. // fixed by xxxxxx (mp properties)
  7320. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  7321. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  7322. if (isUndef(propOptions)) {
  7323. return res
  7324. }
  7325. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  7326. var attrs = data.attrs;
  7327. var props = data.props;
  7328. if (isDef(attrs) || isDef(props)) {
  7329. for (var key in propOptions) {
  7330. var altKey = hyphenate(key);
  7331. var result = checkProp(res, props, key, altKey, true) ||
  7332. checkProp(res, attrs, key, altKey, false);
  7333. // externalClass
  7334. if (
  7335. result &&
  7336. res[key] &&
  7337. externalClasses.indexOf(altKey) !== -1 &&
  7338. context[camelize(res[key])]
  7339. ) {
  7340. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  7341. res[key] = context[camelize(res[key])];
  7342. }
  7343. }
  7344. }
  7345. return res
  7346. }
  7347. function extractPropsFromVNodeData (
  7348. data,
  7349. Ctor,
  7350. tag,
  7351. context// fixed by xxxxxx
  7352. ) {
  7353. // we are only extracting raw values here.
  7354. // validation and default values are handled in the child
  7355. // component itself.
  7356. var propOptions = Ctor.options.props;
  7357. if (isUndef(propOptions)) {
  7358. // fixed by xxxxxx
  7359. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  7360. }
  7361. var res = {};
  7362. var attrs = data.attrs;
  7363. var props = data.props;
  7364. if (isDef(attrs) || isDef(props)) {
  7365. for (var key in propOptions) {
  7366. var altKey = hyphenate(key);
  7367. if (true) {
  7368. var keyInLowerCase = key.toLowerCase();
  7369. if (
  7370. key !== keyInLowerCase &&
  7371. attrs && hasOwn(attrs, keyInLowerCase)
  7372. ) {
  7373. tip(
  7374. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  7375. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  7376. " \"" + key + "\". " +
  7377. "Note that HTML attributes are case-insensitive and camelCased " +
  7378. "props need to use their kebab-case equivalents when using in-DOM " +
  7379. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  7380. );
  7381. }
  7382. }
  7383. checkProp(res, props, key, altKey, true) ||
  7384. checkProp(res, attrs, key, altKey, false);
  7385. }
  7386. }
  7387. // fixed by xxxxxx
  7388. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  7389. }
  7390. function checkProp (
  7391. res,
  7392. hash,
  7393. key,
  7394. altKey,
  7395. preserve
  7396. ) {
  7397. if (isDef(hash)) {
  7398. if (hasOwn(hash, key)) {
  7399. res[key] = hash[key];
  7400. if (!preserve) {
  7401. delete hash[key];
  7402. }
  7403. return true
  7404. } else if (hasOwn(hash, altKey)) {
  7405. res[key] = hash[altKey];
  7406. if (!preserve) {
  7407. delete hash[altKey];
  7408. }
  7409. return true
  7410. }
  7411. }
  7412. return false
  7413. }
  7414. /* */
  7415. // The template compiler attempts to minimize the need for normalization by
  7416. // statically analyzing the template at compile time.
  7417. //
  7418. // For plain HTML markup, normalization can be completely skipped because the
  7419. // generated render function is guaranteed to return Array<VNode>. There are
  7420. // two cases where extra normalization is needed:
  7421. // 1. When the children contains components - because a functional component
  7422. // may return an Array instead of a single root. In this case, just a simple
  7423. // normalization is needed - if any child is an Array, we flatten the whole
  7424. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  7425. // because functional components already normalize their own children.
  7426. function simpleNormalizeChildren (children) {
  7427. for (var i = 0; i < children.length; i++) {
  7428. if (Array.isArray(children[i])) {
  7429. return Array.prototype.concat.apply([], children)
  7430. }
  7431. }
  7432. return children
  7433. }
  7434. // 2. When the children contains constructs that always generated nested Arrays,
  7435. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  7436. // with hand-written render functions / JSX. In such cases a full normalization
  7437. // is needed to cater to all possible types of children values.
  7438. function normalizeChildren (children) {
  7439. return isPrimitive(children)
  7440. ? [createTextVNode(children)]
  7441. : Array.isArray(children)
  7442. ? normalizeArrayChildren(children)
  7443. : undefined
  7444. }
  7445. function isTextNode (node) {
  7446. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  7447. }
  7448. function normalizeArrayChildren (children, nestedIndex) {
  7449. var res = [];
  7450. var i, c, lastIndex, last;
  7451. for (i = 0; i < children.length; i++) {
  7452. c = children[i];
  7453. if (isUndef(c) || typeof c === 'boolean') { continue }
  7454. lastIndex = res.length - 1;
  7455. last = res[lastIndex];
  7456. // nested
  7457. if (Array.isArray(c)) {
  7458. if (c.length > 0) {
  7459. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  7460. // merge adjacent text nodes
  7461. if (isTextNode(c[0]) && isTextNode(last)) {
  7462. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  7463. c.shift();
  7464. }
  7465. res.push.apply(res, c);
  7466. }
  7467. } else if (isPrimitive(c)) {
  7468. if (isTextNode(last)) {
  7469. // merge adjacent text nodes
  7470. // this is necessary for SSR hydration because text nodes are
  7471. // essentially merged when rendered to HTML strings
  7472. res[lastIndex] = createTextVNode(last.text + c);
  7473. } else if (c !== '') {
  7474. // convert primitive to vnode
  7475. res.push(createTextVNode(c));
  7476. }
  7477. } else {
  7478. if (isTextNode(c) && isTextNode(last)) {
  7479. // merge adjacent text nodes
  7480. res[lastIndex] = createTextVNode(last.text + c.text);
  7481. } else {
  7482. // default key for nested array children (likely generated by v-for)
  7483. if (isTrue(children._isVList) &&
  7484. isDef(c.tag) &&
  7485. isUndef(c.key) &&
  7486. isDef(nestedIndex)) {
  7487. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  7488. }
  7489. res.push(c);
  7490. }
  7491. }
  7492. }
  7493. return res
  7494. }
  7495. /* */
  7496. function initProvide (vm) {
  7497. var provide = vm.$options.provide;
  7498. if (provide) {
  7499. vm._provided = typeof provide === 'function'
  7500. ? provide.call(vm)
  7501. : provide;
  7502. }
  7503. }
  7504. function initInjections (vm) {
  7505. var result = resolveInject(vm.$options.inject, vm);
  7506. if (result) {
  7507. toggleObserving(false);
  7508. Object.keys(result).forEach(function (key) {
  7509. /* istanbul ignore else */
  7510. if (true) {
  7511. defineReactive$$1(vm, key, result[key], function () {
  7512. warn(
  7513. "Avoid mutating an injected value directly since the changes will be " +
  7514. "overwritten whenever the provided component re-renders. " +
  7515. "injection being mutated: \"" + key + "\"",
  7516. vm
  7517. );
  7518. });
  7519. } else {}
  7520. });
  7521. toggleObserving(true);
  7522. }
  7523. }
  7524. function resolveInject (inject, vm) {
  7525. if (inject) {
  7526. // inject is :any because flow is not smart enough to figure out cached
  7527. var result = Object.create(null);
  7528. var keys = hasSymbol
  7529. ? Reflect.ownKeys(inject)
  7530. : Object.keys(inject);
  7531. for (var i = 0; i < keys.length; i++) {
  7532. var key = keys[i];
  7533. // #6574 in case the inject object is observed...
  7534. if (key === '__ob__') { continue }
  7535. var provideKey = inject[key].from;
  7536. var source = vm;
  7537. while (source) {
  7538. if (source._provided && hasOwn(source._provided, provideKey)) {
  7539. result[key] = source._provided[provideKey];
  7540. break
  7541. }
  7542. source = source.$parent;
  7543. }
  7544. if (!source) {
  7545. if ('default' in inject[key]) {
  7546. var provideDefault = inject[key].default;
  7547. result[key] = typeof provideDefault === 'function'
  7548. ? provideDefault.call(vm)
  7549. : provideDefault;
  7550. } else if (true) {
  7551. warn(("Injection \"" + key + "\" not found"), vm);
  7552. }
  7553. }
  7554. }
  7555. return result
  7556. }
  7557. }
  7558. /* */
  7559. /**
  7560. * Runtime helper for resolving raw children VNodes into a slot object.
  7561. */
  7562. function resolveSlots (
  7563. children,
  7564. context
  7565. ) {
  7566. if (!children || !children.length) {
  7567. return {}
  7568. }
  7569. var slots = {};
  7570. for (var i = 0, l = children.length; i < l; i++) {
  7571. var child = children[i];
  7572. var data = child.data;
  7573. // remove slot attribute if the node is resolved as a Vue slot node
  7574. if (data && data.attrs && data.attrs.slot) {
  7575. delete data.attrs.slot;
  7576. }
  7577. // named slots should only be respected if the vnode was rendered in the
  7578. // same context.
  7579. if ((child.context === context || child.fnContext === context) &&
  7580. data && data.slot != null
  7581. ) {
  7582. var name = data.slot;
  7583. var slot = (slots[name] || (slots[name] = []));
  7584. if (child.tag === 'template') {
  7585. slot.push.apply(slot, child.children || []);
  7586. } else {
  7587. slot.push(child);
  7588. }
  7589. } else {
  7590. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7591. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7592. (slots['page'] || (slots['page'] = [])).push(child);
  7593. }else{
  7594. (slots.default || (slots.default = [])).push(child);
  7595. }
  7596. }
  7597. }
  7598. // ignore slots that contains only whitespace
  7599. for (var name$1 in slots) {
  7600. if (slots[name$1].every(isWhitespace)) {
  7601. delete slots[name$1];
  7602. }
  7603. }
  7604. return slots
  7605. }
  7606. function isWhitespace (node) {
  7607. return (node.isComment && !node.asyncFactory) || node.text === ' '
  7608. }
  7609. /* */
  7610. function normalizeScopedSlots (
  7611. slots,
  7612. normalSlots,
  7613. prevSlots
  7614. ) {
  7615. var res;
  7616. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  7617. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  7618. var key = slots && slots.$key;
  7619. if (!slots) {
  7620. res = {};
  7621. } else if (slots._normalized) {
  7622. // fast path 1: child component re-render only, parent did not change
  7623. return slots._normalized
  7624. } else if (
  7625. isStable &&
  7626. prevSlots &&
  7627. prevSlots !== emptyObject &&
  7628. key === prevSlots.$key &&
  7629. !hasNormalSlots &&
  7630. !prevSlots.$hasNormal
  7631. ) {
  7632. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7633. // only need to normalize once
  7634. return prevSlots
  7635. } else {
  7636. res = {};
  7637. for (var key$1 in slots) {
  7638. if (slots[key$1] && key$1[0] !== '$') {
  7639. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7640. }
  7641. }
  7642. }
  7643. // expose normal slots on scopedSlots
  7644. for (var key$2 in normalSlots) {
  7645. if (!(key$2 in res)) {
  7646. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7647. }
  7648. }
  7649. // avoriaz seems to mock a non-extensible $scopedSlots object
  7650. // and when that is passed down this would cause an error
  7651. if (slots && Object.isExtensible(slots)) {
  7652. (slots)._normalized = res;
  7653. }
  7654. def(res, '$stable', isStable);
  7655. def(res, '$key', key);
  7656. def(res, '$hasNormal', hasNormalSlots);
  7657. return res
  7658. }
  7659. function normalizeScopedSlot(normalSlots, key, fn) {
  7660. var normalized = function () {
  7661. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7662. res = res && typeof res === 'object' && !Array.isArray(res)
  7663. ? [res] // single vnode
  7664. : normalizeChildren(res);
  7665. return res && (
  7666. res.length === 0 ||
  7667. (res.length === 1 && res[0].isComment) // #9658
  7668. ) ? undefined
  7669. : res
  7670. };
  7671. // this is a slot using the new v-slot syntax without scope. although it is
  7672. // compiled as a scoped slot, render fn users would expect it to be present
  7673. // on this.$slots because the usage is semantically a normal slot.
  7674. if (fn.proxy) {
  7675. Object.defineProperty(normalSlots, key, {
  7676. get: normalized,
  7677. enumerable: true,
  7678. configurable: true
  7679. });
  7680. }
  7681. return normalized
  7682. }
  7683. function proxyNormalSlot(slots, key) {
  7684. return function () { return slots[key]; }
  7685. }
  7686. /* */
  7687. /**
  7688. * Runtime helper for rendering v-for lists.
  7689. */
  7690. function renderList (
  7691. val,
  7692. render
  7693. ) {
  7694. var ret, i, l, keys, key;
  7695. if (Array.isArray(val) || typeof val === 'string') {
  7696. ret = new Array(val.length);
  7697. for (i = 0, l = val.length; i < l; i++) {
  7698. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7699. }
  7700. } else if (typeof val === 'number') {
  7701. ret = new Array(val);
  7702. for (i = 0; i < val; i++) {
  7703. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7704. }
  7705. } else if (isObject(val)) {
  7706. if (hasSymbol && val[Symbol.iterator]) {
  7707. ret = [];
  7708. var iterator = val[Symbol.iterator]();
  7709. var result = iterator.next();
  7710. while (!result.done) {
  7711. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  7712. result = iterator.next();
  7713. }
  7714. } else {
  7715. keys = Object.keys(val);
  7716. ret = new Array(keys.length);
  7717. for (i = 0, l = keys.length; i < l; i++) {
  7718. key = keys[i];
  7719. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7720. }
  7721. }
  7722. }
  7723. if (!isDef(ret)) {
  7724. ret = [];
  7725. }
  7726. (ret)._isVList = true;
  7727. return ret
  7728. }
  7729. /* */
  7730. /**
  7731. * Runtime helper for rendering <slot>
  7732. */
  7733. function renderSlot (
  7734. name,
  7735. fallback,
  7736. props,
  7737. bindObject
  7738. ) {
  7739. var scopedSlotFn = this.$scopedSlots[name];
  7740. var nodes;
  7741. if (scopedSlotFn) { // scoped slot
  7742. props = props || {};
  7743. if (bindObject) {
  7744. if ( true && !isObject(bindObject)) {
  7745. warn(
  7746. 'slot v-bind without argument expects an Object',
  7747. this
  7748. );
  7749. }
  7750. props = extend(extend({}, bindObject), props);
  7751. }
  7752. // fixed by xxxxxx app-plus scopedSlot
  7753. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7754. } else {
  7755. nodes = this.$slots[name] || fallback;
  7756. }
  7757. var target = props && props.slot;
  7758. if (target) {
  7759. return this.$createElement('template', { slot: target }, nodes)
  7760. } else {
  7761. return nodes
  7762. }
  7763. }
  7764. /* */
  7765. /**
  7766. * Runtime helper for resolving filters
  7767. */
  7768. function resolveFilter (id) {
  7769. return resolveAsset(this.$options, 'filters', id, true) || identity
  7770. }
  7771. /* */
  7772. function isKeyNotMatch (expect, actual) {
  7773. if (Array.isArray(expect)) {
  7774. return expect.indexOf(actual) === -1
  7775. } else {
  7776. return expect !== actual
  7777. }
  7778. }
  7779. /**
  7780. * Runtime helper for checking keyCodes from config.
  7781. * exposed as Vue.prototype._k
  7782. * passing in eventKeyName as last argument separately for backwards compat
  7783. */
  7784. function checkKeyCodes (
  7785. eventKeyCode,
  7786. key,
  7787. builtInKeyCode,
  7788. eventKeyName,
  7789. builtInKeyName
  7790. ) {
  7791. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7792. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7793. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7794. } else if (mappedKeyCode) {
  7795. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7796. } else if (eventKeyName) {
  7797. return hyphenate(eventKeyName) !== key
  7798. }
  7799. }
  7800. /* */
  7801. /**
  7802. * Runtime helper for merging v-bind="object" into a VNode's data.
  7803. */
  7804. function bindObjectProps (
  7805. data,
  7806. tag,
  7807. value,
  7808. asProp,
  7809. isSync
  7810. ) {
  7811. if (value) {
  7812. if (!isObject(value)) {
  7813. true && warn(
  7814. 'v-bind without argument expects an Object or Array value',
  7815. this
  7816. );
  7817. } else {
  7818. if (Array.isArray(value)) {
  7819. value = toObject(value);
  7820. }
  7821. var hash;
  7822. var loop = function ( key ) {
  7823. if (
  7824. key === 'class' ||
  7825. key === 'style' ||
  7826. isReservedAttribute(key)
  7827. ) {
  7828. hash = data;
  7829. } else {
  7830. var type = data.attrs && data.attrs.type;
  7831. hash = asProp || config.mustUseProp(tag, type, key)
  7832. ? data.domProps || (data.domProps = {})
  7833. : data.attrs || (data.attrs = {});
  7834. }
  7835. var camelizedKey = camelize(key);
  7836. var hyphenatedKey = hyphenate(key);
  7837. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7838. hash[key] = value[key];
  7839. if (isSync) {
  7840. var on = data.on || (data.on = {});
  7841. on[("update:" + key)] = function ($event) {
  7842. value[key] = $event;
  7843. };
  7844. }
  7845. }
  7846. };
  7847. for (var key in value) loop( key );
  7848. }
  7849. }
  7850. return data
  7851. }
  7852. /* */
  7853. /**
  7854. * Runtime helper for rendering static trees.
  7855. */
  7856. function renderStatic (
  7857. index,
  7858. isInFor
  7859. ) {
  7860. var cached = this._staticTrees || (this._staticTrees = []);
  7861. var tree = cached[index];
  7862. // if has already-rendered static tree and not inside v-for,
  7863. // we can reuse the same tree.
  7864. if (tree && !isInFor) {
  7865. return tree
  7866. }
  7867. // otherwise, render a fresh tree.
  7868. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7869. this._renderProxy,
  7870. null,
  7871. this // for render fns generated for functional component templates
  7872. );
  7873. markStatic(tree, ("__static__" + index), false);
  7874. return tree
  7875. }
  7876. /**
  7877. * Runtime helper for v-once.
  7878. * Effectively it means marking the node as static with a unique key.
  7879. */
  7880. function markOnce (
  7881. tree,
  7882. index,
  7883. key
  7884. ) {
  7885. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7886. return tree
  7887. }
  7888. function markStatic (
  7889. tree,
  7890. key,
  7891. isOnce
  7892. ) {
  7893. if (Array.isArray(tree)) {
  7894. for (var i = 0; i < tree.length; i++) {
  7895. if (tree[i] && typeof tree[i] !== 'string') {
  7896. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7897. }
  7898. }
  7899. } else {
  7900. markStaticNode(tree, key, isOnce);
  7901. }
  7902. }
  7903. function markStaticNode (node, key, isOnce) {
  7904. node.isStatic = true;
  7905. node.key = key;
  7906. node.isOnce = isOnce;
  7907. }
  7908. /* */
  7909. function bindObjectListeners (data, value) {
  7910. if (value) {
  7911. if (!isPlainObject(value)) {
  7912. true && warn(
  7913. 'v-on without argument expects an Object value',
  7914. this
  7915. );
  7916. } else {
  7917. var on = data.on = data.on ? extend({}, data.on) : {};
  7918. for (var key in value) {
  7919. var existing = on[key];
  7920. var ours = value[key];
  7921. on[key] = existing ? [].concat(existing, ours) : ours;
  7922. }
  7923. }
  7924. }
  7925. return data
  7926. }
  7927. /* */
  7928. function resolveScopedSlots (
  7929. fns, // see flow/vnode
  7930. res,
  7931. // the following are added in 2.6
  7932. hasDynamicKeys,
  7933. contentHashKey
  7934. ) {
  7935. res = res || { $stable: !hasDynamicKeys };
  7936. for (var i = 0; i < fns.length; i++) {
  7937. var slot = fns[i];
  7938. if (Array.isArray(slot)) {
  7939. resolveScopedSlots(slot, res, hasDynamicKeys);
  7940. } else if (slot) {
  7941. // marker for reverse proxying v-slot without scope on this.$slots
  7942. if (slot.proxy) {
  7943. slot.fn.proxy = true;
  7944. }
  7945. res[slot.key] = slot.fn;
  7946. }
  7947. }
  7948. if (contentHashKey) {
  7949. (res).$key = contentHashKey;
  7950. }
  7951. return res
  7952. }
  7953. /* */
  7954. function bindDynamicKeys (baseObj, values) {
  7955. for (var i = 0; i < values.length; i += 2) {
  7956. var key = values[i];
  7957. if (typeof key === 'string' && key) {
  7958. baseObj[values[i]] = values[i + 1];
  7959. } else if ( true && key !== '' && key !== null) {
  7960. // null is a special value for explicitly removing a binding
  7961. warn(
  7962. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7963. this
  7964. );
  7965. }
  7966. }
  7967. return baseObj
  7968. }
  7969. // helper to dynamically append modifier runtime markers to event names.
  7970. // ensure only append when value is already string, otherwise it will be cast
  7971. // to string and cause the type check to miss.
  7972. function prependModifier (value, symbol) {
  7973. return typeof value === 'string' ? symbol + value : value
  7974. }
  7975. /* */
  7976. function installRenderHelpers (target) {
  7977. target._o = markOnce;
  7978. target._n = toNumber;
  7979. target._s = toString;
  7980. target._l = renderList;
  7981. target._t = renderSlot;
  7982. target._q = looseEqual;
  7983. target._i = looseIndexOf;
  7984. target._m = renderStatic;
  7985. target._f = resolveFilter;
  7986. target._k = checkKeyCodes;
  7987. target._b = bindObjectProps;
  7988. target._v = createTextVNode;
  7989. target._e = createEmptyVNode;
  7990. target._u = resolveScopedSlots;
  7991. target._g = bindObjectListeners;
  7992. target._d = bindDynamicKeys;
  7993. target._p = prependModifier;
  7994. }
  7995. /* */
  7996. function FunctionalRenderContext (
  7997. data,
  7998. props,
  7999. children,
  8000. parent,
  8001. Ctor
  8002. ) {
  8003. var this$1 = this;
  8004. var options = Ctor.options;
  8005. // ensure the createElement function in functional components
  8006. // gets a unique context - this is necessary for correct named slot check
  8007. var contextVm;
  8008. if (hasOwn(parent, '_uid')) {
  8009. contextVm = Object.create(parent);
  8010. // $flow-disable-line
  8011. contextVm._original = parent;
  8012. } else {
  8013. // the context vm passed in is a functional context as well.
  8014. // in this case we want to make sure we are able to get a hold to the
  8015. // real context instance.
  8016. contextVm = parent;
  8017. // $flow-disable-line
  8018. parent = parent._original;
  8019. }
  8020. var isCompiled = isTrue(options._compiled);
  8021. var needNormalization = !isCompiled;
  8022. this.data = data;
  8023. this.props = props;
  8024. this.children = children;
  8025. this.parent = parent;
  8026. this.listeners = data.on || emptyObject;
  8027. this.injections = resolveInject(options.inject, parent);
  8028. this.slots = function () {
  8029. if (!this$1.$slots) {
  8030. normalizeScopedSlots(
  8031. data.scopedSlots,
  8032. this$1.$slots = resolveSlots(children, parent)
  8033. );
  8034. }
  8035. return this$1.$slots
  8036. };
  8037. Object.defineProperty(this, 'scopedSlots', ({
  8038. enumerable: true,
  8039. get: function get () {
  8040. return normalizeScopedSlots(data.scopedSlots, this.slots())
  8041. }
  8042. }));
  8043. // support for compiled functional template
  8044. if (isCompiled) {
  8045. // exposing $options for renderStatic()
  8046. this.$options = options;
  8047. // pre-resolve slots for renderSlot()
  8048. this.$slots = this.slots();
  8049. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  8050. }
  8051. if (options._scopeId) {
  8052. this._c = function (a, b, c, d) {
  8053. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  8054. if (vnode && !Array.isArray(vnode)) {
  8055. vnode.fnScopeId = options._scopeId;
  8056. vnode.fnContext = parent;
  8057. }
  8058. return vnode
  8059. };
  8060. } else {
  8061. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  8062. }
  8063. }
  8064. installRenderHelpers(FunctionalRenderContext.prototype);
  8065. function createFunctionalComponent (
  8066. Ctor,
  8067. propsData,
  8068. data,
  8069. contextVm,
  8070. children
  8071. ) {
  8072. var options = Ctor.options;
  8073. var props = {};
  8074. var propOptions = options.props;
  8075. if (isDef(propOptions)) {
  8076. for (var key in propOptions) {
  8077. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  8078. }
  8079. } else {
  8080. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  8081. if (isDef(data.props)) { mergeProps(props, data.props); }
  8082. }
  8083. var renderContext = new FunctionalRenderContext(
  8084. data,
  8085. props,
  8086. children,
  8087. contextVm,
  8088. Ctor
  8089. );
  8090. var vnode = options.render.call(null, renderContext._c, renderContext);
  8091. if (vnode instanceof VNode) {
  8092. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  8093. } else if (Array.isArray(vnode)) {
  8094. var vnodes = normalizeChildren(vnode) || [];
  8095. var res = new Array(vnodes.length);
  8096. for (var i = 0; i < vnodes.length; i++) {
  8097. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  8098. }
  8099. return res
  8100. }
  8101. }
  8102. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  8103. // #7817 clone node before setting fnContext, otherwise if the node is reused
  8104. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  8105. // that should not be matched to match.
  8106. var clone = cloneVNode(vnode);
  8107. clone.fnContext = contextVm;
  8108. clone.fnOptions = options;
  8109. if (true) {
  8110. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  8111. }
  8112. if (data.slot) {
  8113. (clone.data || (clone.data = {})).slot = data.slot;
  8114. }
  8115. return clone
  8116. }
  8117. function mergeProps (to, from) {
  8118. for (var key in from) {
  8119. to[camelize(key)] = from[key];
  8120. }
  8121. }
  8122. /* */
  8123. /* */
  8124. /* */
  8125. /* */
  8126. // inline hooks to be invoked on component VNodes during patch
  8127. var componentVNodeHooks = {
  8128. init: function init (vnode, hydrating) {
  8129. if (
  8130. vnode.componentInstance &&
  8131. !vnode.componentInstance._isDestroyed &&
  8132. vnode.data.keepAlive
  8133. ) {
  8134. // kept-alive components, treat as a patch
  8135. var mountedNode = vnode; // work around flow
  8136. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  8137. } else {
  8138. var child = vnode.componentInstance = createComponentInstanceForVnode(
  8139. vnode,
  8140. activeInstance
  8141. );
  8142. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  8143. }
  8144. },
  8145. prepatch: function prepatch (oldVnode, vnode) {
  8146. var options = vnode.componentOptions;
  8147. var child = vnode.componentInstance = oldVnode.componentInstance;
  8148. updateChildComponent(
  8149. child,
  8150. options.propsData, // updated props
  8151. options.listeners, // updated listeners
  8152. vnode, // new parent vnode
  8153. options.children // new children
  8154. );
  8155. },
  8156. insert: function insert (vnode) {
  8157. var context = vnode.context;
  8158. var componentInstance = vnode.componentInstance;
  8159. if (!componentInstance._isMounted) {
  8160. callHook(componentInstance, 'onServiceCreated');
  8161. callHook(componentInstance, 'onServiceAttached');
  8162. componentInstance._isMounted = true;
  8163. callHook(componentInstance, 'mounted');
  8164. }
  8165. if (vnode.data.keepAlive) {
  8166. if (context._isMounted) {
  8167. // vue-router#1212
  8168. // During updates, a kept-alive component's child components may
  8169. // change, so directly walking the tree here may call activated hooks
  8170. // on incorrect children. Instead we push them into a queue which will
  8171. // be processed after the whole patch process ended.
  8172. queueActivatedComponent(componentInstance);
  8173. } else {
  8174. activateChildComponent(componentInstance, true /* direct */);
  8175. }
  8176. }
  8177. },
  8178. destroy: function destroy (vnode) {
  8179. var componentInstance = vnode.componentInstance;
  8180. if (!componentInstance._isDestroyed) {
  8181. if (!vnode.data.keepAlive) {
  8182. componentInstance.$destroy();
  8183. } else {
  8184. deactivateChildComponent(componentInstance, true /* direct */);
  8185. }
  8186. }
  8187. }
  8188. };
  8189. var hooksToMerge = Object.keys(componentVNodeHooks);
  8190. function createComponent (
  8191. Ctor,
  8192. data,
  8193. context,
  8194. children,
  8195. tag
  8196. ) {
  8197. if (isUndef(Ctor)) {
  8198. return
  8199. }
  8200. var baseCtor = context.$options._base;
  8201. // plain options object: turn it into a constructor
  8202. if (isObject(Ctor)) {
  8203. Ctor = baseCtor.extend(Ctor);
  8204. }
  8205. // if at this stage it's not a constructor or an async component factory,
  8206. // reject.
  8207. if (typeof Ctor !== 'function') {
  8208. if (true) {
  8209. warn(("Invalid Component definition: " + (String(Ctor))), context);
  8210. }
  8211. return
  8212. }
  8213. // async component
  8214. var asyncFactory;
  8215. if (isUndef(Ctor.cid)) {
  8216. asyncFactory = Ctor;
  8217. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  8218. if (Ctor === undefined) {
  8219. // return a placeholder node for async component, which is rendered
  8220. // as a comment node but preserves all the raw information for the node.
  8221. // the information will be used for async server-rendering and hydration.
  8222. return createAsyncPlaceholder(
  8223. asyncFactory,
  8224. data,
  8225. context,
  8226. children,
  8227. tag
  8228. )
  8229. }
  8230. }
  8231. data = data || {};
  8232. // resolve constructor options in case global mixins are applied after
  8233. // component constructor creation
  8234. resolveConstructorOptions(Ctor);
  8235. // transform component v-model data into props & events
  8236. if (isDef(data.model)) {
  8237. transformModel(Ctor.options, data);
  8238. }
  8239. // extract props
  8240. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  8241. // functional component
  8242. if (isTrue(Ctor.options.functional)) {
  8243. return createFunctionalComponent(Ctor, propsData, data, context, children)
  8244. }
  8245. // extract listeners, since these needs to be treated as
  8246. // child component listeners instead of DOM listeners
  8247. var listeners = data.on;
  8248. // replace with listeners with .native modifier
  8249. // so it gets processed during parent component patch.
  8250. data.on = data.nativeOn;
  8251. if (isTrue(Ctor.options.abstract)) {
  8252. // abstract components do not keep anything
  8253. // other than props & listeners & slot
  8254. // work around flow
  8255. var slot = data.slot;
  8256. data = {};
  8257. if (slot) {
  8258. data.slot = slot;
  8259. }
  8260. }
  8261. // install component management hooks onto the placeholder node
  8262. installComponentHooks(data);
  8263. // return a placeholder vnode
  8264. var name = Ctor.options.name || tag;
  8265. var vnode = new VNode(
  8266. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  8267. data, undefined, undefined, undefined, context,
  8268. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  8269. asyncFactory
  8270. );
  8271. return vnode
  8272. }
  8273. function createComponentInstanceForVnode (
  8274. vnode, // we know it's MountedComponentVNode but flow doesn't
  8275. parent // activeInstance in lifecycle state
  8276. ) {
  8277. var options = {
  8278. _isComponent: true,
  8279. _parentVnode: vnode,
  8280. parent: parent
  8281. };
  8282. // check inline-template render functions
  8283. var inlineTemplate = vnode.data.inlineTemplate;
  8284. if (isDef(inlineTemplate)) {
  8285. options.render = inlineTemplate.render;
  8286. options.staticRenderFns = inlineTemplate.staticRenderFns;
  8287. }
  8288. return new vnode.componentOptions.Ctor(options)
  8289. }
  8290. function installComponentHooks (data) {
  8291. var hooks = data.hook || (data.hook = {});
  8292. for (var i = 0; i < hooksToMerge.length; i++) {
  8293. var key = hooksToMerge[i];
  8294. var existing = hooks[key];
  8295. var toMerge = componentVNodeHooks[key];
  8296. if (existing !== toMerge && !(existing && existing._merged)) {
  8297. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  8298. }
  8299. }
  8300. }
  8301. function mergeHook$1 (f1, f2) {
  8302. var merged = function (a, b) {
  8303. // flow complains about extra args which is why we use any
  8304. f1(a, b);
  8305. f2(a, b);
  8306. };
  8307. merged._merged = true;
  8308. return merged
  8309. }
  8310. // transform component v-model info (value and callback) into
  8311. // prop and event handler respectively.
  8312. function transformModel (options, data) {
  8313. var prop = (options.model && options.model.prop) || 'value';
  8314. var event = (options.model && options.model.event) || 'input'
  8315. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  8316. var on = data.on || (data.on = {});
  8317. var existing = on[event];
  8318. var callback = data.model.callback;
  8319. if (isDef(existing)) {
  8320. if (
  8321. Array.isArray(existing)
  8322. ? existing.indexOf(callback) === -1
  8323. : existing !== callback
  8324. ) {
  8325. on[event] = [callback].concat(existing);
  8326. }
  8327. } else {
  8328. on[event] = callback;
  8329. }
  8330. }
  8331. /* */
  8332. var SIMPLE_NORMALIZE = 1;
  8333. var ALWAYS_NORMALIZE = 2;
  8334. // wrapper function for providing a more flexible interface
  8335. // without getting yelled at by flow
  8336. function createElement (
  8337. context,
  8338. tag,
  8339. data,
  8340. children,
  8341. normalizationType,
  8342. alwaysNormalize
  8343. ) {
  8344. if (Array.isArray(data) || isPrimitive(data)) {
  8345. normalizationType = children;
  8346. children = data;
  8347. data = undefined;
  8348. }
  8349. if (isTrue(alwaysNormalize)) {
  8350. normalizationType = ALWAYS_NORMALIZE;
  8351. }
  8352. return _createElement(context, tag, data, children, normalizationType)
  8353. }
  8354. function _createElement (
  8355. context,
  8356. tag,
  8357. data,
  8358. children,
  8359. normalizationType
  8360. ) {
  8361. if (isDef(data) && isDef((data).__ob__)) {
  8362. true && warn(
  8363. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  8364. 'Always create fresh vnode data objects in each render!',
  8365. context
  8366. );
  8367. return createEmptyVNode()
  8368. }
  8369. // object syntax in v-bind
  8370. if (isDef(data) && isDef(data.is)) {
  8371. tag = data.is;
  8372. }
  8373. if (!tag) {
  8374. // in case of component :is set to falsy value
  8375. return createEmptyVNode()
  8376. }
  8377. // warn against non-primitive key
  8378. if ( true &&
  8379. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  8380. ) {
  8381. {
  8382. warn(
  8383. 'Avoid using non-primitive value as key, ' +
  8384. 'use string/number value instead.',
  8385. context
  8386. );
  8387. }
  8388. }
  8389. // support single function children as default scoped slot
  8390. if (Array.isArray(children) &&
  8391. typeof children[0] === 'function'
  8392. ) {
  8393. data = data || {};
  8394. data.scopedSlots = { default: children[0] };
  8395. children.length = 0;
  8396. }
  8397. if (normalizationType === ALWAYS_NORMALIZE) {
  8398. children = normalizeChildren(children);
  8399. } else if (normalizationType === SIMPLE_NORMALIZE) {
  8400. children = simpleNormalizeChildren(children);
  8401. }
  8402. var vnode, ns;
  8403. if (typeof tag === 'string') {
  8404. var Ctor;
  8405. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  8406. if (config.isReservedTag(tag)) {
  8407. // platform built-in elements
  8408. if ( true && isDef(data) && isDef(data.nativeOn)) {
  8409. warn(
  8410. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  8411. context
  8412. );
  8413. }
  8414. vnode = new VNode(
  8415. config.parsePlatformTagName(tag), data, children,
  8416. undefined, undefined, context
  8417. );
  8418. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  8419. // component
  8420. vnode = createComponent(Ctor, data, context, children, tag);
  8421. } else {
  8422. // unknown or unlisted namespaced elements
  8423. // check at runtime because it may get assigned a namespace when its
  8424. // parent normalizes children
  8425. vnode = new VNode(
  8426. tag, data, children,
  8427. undefined, undefined, context
  8428. );
  8429. }
  8430. } else {
  8431. // direct component options / constructor
  8432. vnode = createComponent(tag, data, context, children);
  8433. }
  8434. if (Array.isArray(vnode)) {
  8435. return vnode
  8436. } else if (isDef(vnode)) {
  8437. if (isDef(ns)) { applyNS(vnode, ns); }
  8438. if (isDef(data)) { registerDeepBindings(data); }
  8439. return vnode
  8440. } else {
  8441. return createEmptyVNode()
  8442. }
  8443. }
  8444. function applyNS (vnode, ns, force) {
  8445. vnode.ns = ns;
  8446. if (vnode.tag === 'foreignObject') {
  8447. // use default namespace inside foreignObject
  8448. ns = undefined;
  8449. force = true;
  8450. }
  8451. if (isDef(vnode.children)) {
  8452. for (var i = 0, l = vnode.children.length; i < l; i++) {
  8453. var child = vnode.children[i];
  8454. if (isDef(child.tag) && (
  8455. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  8456. applyNS(child, ns, force);
  8457. }
  8458. }
  8459. }
  8460. }
  8461. // ref #5318
  8462. // necessary to ensure parent re-render when deep bindings like :style and
  8463. // :class are used on slot nodes
  8464. function registerDeepBindings (data) {
  8465. if (isObject(data.style)) {
  8466. traverse(data.style);
  8467. }
  8468. if (isObject(data.class)) {
  8469. traverse(data.class);
  8470. }
  8471. }
  8472. /* */
  8473. function initRender (vm) {
  8474. vm._vnode = null; // the root of the child tree
  8475. vm._staticTrees = null; // v-once cached trees
  8476. var options = vm.$options;
  8477. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  8478. var renderContext = parentVnode && parentVnode.context;
  8479. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  8480. vm.$scopedSlots = emptyObject;
  8481. // bind the createElement fn to this instance
  8482. // so that we get proper render context inside it.
  8483. // args order: tag, data, children, normalizationType, alwaysNormalize
  8484. // internal version is used by render functions compiled from templates
  8485. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  8486. // normalization is always applied for the public version, used in
  8487. // user-written render functions.
  8488. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  8489. // $attrs & $listeners are exposed for easier HOC creation.
  8490. // they need to be reactive so that HOCs using them are always updated
  8491. var parentData = parentVnode && parentVnode.data;
  8492. /* istanbul ignore else */
  8493. if (true) {
  8494. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  8495. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  8496. }, true);
  8497. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  8498. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  8499. }, true);
  8500. } else {}
  8501. }
  8502. var currentRenderingInstance = null;
  8503. function renderMixin (Vue) {
  8504. // install runtime convenience helpers
  8505. installRenderHelpers(Vue.prototype);
  8506. Vue.prototype.$nextTick = function (fn) {
  8507. return nextTick(fn, this)
  8508. };
  8509. Vue.prototype._render = function () {
  8510. var vm = this;
  8511. var ref = vm.$options;
  8512. var render = ref.render;
  8513. var _parentVnode = ref._parentVnode;
  8514. if (_parentVnode) {
  8515. vm.$scopedSlots = normalizeScopedSlots(
  8516. _parentVnode.data.scopedSlots,
  8517. vm.$slots,
  8518. vm.$scopedSlots
  8519. );
  8520. }
  8521. // set parent vnode. this allows render functions to have access
  8522. // to the data on the placeholder node.
  8523. vm.$vnode = _parentVnode;
  8524. // render self
  8525. var vnode;
  8526. try {
  8527. // There's no need to maintain a stack because all render fns are called
  8528. // separately from one another. Nested component's render fns are called
  8529. // when parent component is patched.
  8530. currentRenderingInstance = vm;
  8531. vnode = render.call(vm._renderProxy, vm.$createElement);
  8532. } catch (e) {
  8533. handleError(e, vm, "render");
  8534. // return error render result,
  8535. // or previous vnode to prevent render error causing blank component
  8536. /* istanbul ignore else */
  8537. if ( true && vm.$options.renderError) {
  8538. try {
  8539. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  8540. } catch (e) {
  8541. handleError(e, vm, "renderError");
  8542. vnode = vm._vnode;
  8543. }
  8544. } else {
  8545. vnode = vm._vnode;
  8546. }
  8547. } finally {
  8548. currentRenderingInstance = null;
  8549. }
  8550. // if the returned array contains only a single node, allow it
  8551. if (Array.isArray(vnode) && vnode.length === 1) {
  8552. vnode = vnode[0];
  8553. }
  8554. // return empty vnode in case the render function errored out
  8555. if (!(vnode instanceof VNode)) {
  8556. if ( true && Array.isArray(vnode)) {
  8557. warn(
  8558. 'Multiple root nodes returned from render function. Render function ' +
  8559. 'should return a single root node.',
  8560. vm
  8561. );
  8562. }
  8563. vnode = createEmptyVNode();
  8564. }
  8565. // set parent
  8566. vnode.parent = _parentVnode;
  8567. return vnode
  8568. };
  8569. }
  8570. /* */
  8571. function ensureCtor (comp, base) {
  8572. if (
  8573. comp.__esModule ||
  8574. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8575. ) {
  8576. comp = comp.default;
  8577. }
  8578. return isObject(comp)
  8579. ? base.extend(comp)
  8580. : comp
  8581. }
  8582. function createAsyncPlaceholder (
  8583. factory,
  8584. data,
  8585. context,
  8586. children,
  8587. tag
  8588. ) {
  8589. var node = createEmptyVNode();
  8590. node.asyncFactory = factory;
  8591. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8592. return node
  8593. }
  8594. function resolveAsyncComponent (
  8595. factory,
  8596. baseCtor
  8597. ) {
  8598. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8599. return factory.errorComp
  8600. }
  8601. if (isDef(factory.resolved)) {
  8602. return factory.resolved
  8603. }
  8604. var owner = currentRenderingInstance;
  8605. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  8606. // already pending
  8607. factory.owners.push(owner);
  8608. }
  8609. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  8610. return factory.loadingComp
  8611. }
  8612. if (owner && !isDef(factory.owners)) {
  8613. var owners = factory.owners = [owner];
  8614. var sync = true;
  8615. var timerLoading = null;
  8616. var timerTimeout = null
  8617. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  8618. var forceRender = function (renderCompleted) {
  8619. for (var i = 0, l = owners.length; i < l; i++) {
  8620. (owners[i]).$forceUpdate();
  8621. }
  8622. if (renderCompleted) {
  8623. owners.length = 0;
  8624. if (timerLoading !== null) {
  8625. clearTimeout(timerLoading);
  8626. timerLoading = null;
  8627. }
  8628. if (timerTimeout !== null) {
  8629. clearTimeout(timerTimeout);
  8630. timerTimeout = null;
  8631. }
  8632. }
  8633. };
  8634. var resolve = once(function (res) {
  8635. // cache resolved
  8636. factory.resolved = ensureCtor(res, baseCtor);
  8637. // invoke callbacks only if this is not a synchronous resolve
  8638. // (async resolves are shimmed as synchronous during SSR)
  8639. if (!sync) {
  8640. forceRender(true);
  8641. } else {
  8642. owners.length = 0;
  8643. }
  8644. });
  8645. var reject = once(function (reason) {
  8646. true && warn(
  8647. "Failed to resolve async component: " + (String(factory)) +
  8648. (reason ? ("\nReason: " + reason) : '')
  8649. );
  8650. if (isDef(factory.errorComp)) {
  8651. factory.error = true;
  8652. forceRender(true);
  8653. }
  8654. });
  8655. var res = factory(resolve, reject);
  8656. if (isObject(res)) {
  8657. if (isPromise(res)) {
  8658. // () => Promise
  8659. if (isUndef(factory.resolved)) {
  8660. res.then(resolve, reject);
  8661. }
  8662. } else if (isPromise(res.component)) {
  8663. res.component.then(resolve, reject);
  8664. if (isDef(res.error)) {
  8665. factory.errorComp = ensureCtor(res.error, baseCtor);
  8666. }
  8667. if (isDef(res.loading)) {
  8668. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8669. if (res.delay === 0) {
  8670. factory.loading = true;
  8671. } else {
  8672. timerLoading = setTimeout(function () {
  8673. timerLoading = null;
  8674. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8675. factory.loading = true;
  8676. forceRender(false);
  8677. }
  8678. }, res.delay || 200);
  8679. }
  8680. }
  8681. if (isDef(res.timeout)) {
  8682. timerTimeout = setTimeout(function () {
  8683. timerTimeout = null;
  8684. if (isUndef(factory.resolved)) {
  8685. reject(
  8686. true
  8687. ? ("timeout (" + (res.timeout) + "ms)")
  8688. : undefined
  8689. );
  8690. }
  8691. }, res.timeout);
  8692. }
  8693. }
  8694. }
  8695. sync = false;
  8696. // return in case resolved synchronously
  8697. return factory.loading
  8698. ? factory.loadingComp
  8699. : factory.resolved
  8700. }
  8701. }
  8702. /* */
  8703. function isAsyncPlaceholder (node) {
  8704. return node.isComment && node.asyncFactory
  8705. }
  8706. /* */
  8707. function getFirstComponentChild (children) {
  8708. if (Array.isArray(children)) {
  8709. for (var i = 0; i < children.length; i++) {
  8710. var c = children[i];
  8711. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8712. return c
  8713. }
  8714. }
  8715. }
  8716. }
  8717. /* */
  8718. /* */
  8719. function initEvents (vm) {
  8720. vm._events = Object.create(null);
  8721. vm._hasHookEvent = false;
  8722. // init parent attached events
  8723. var listeners = vm.$options._parentListeners;
  8724. if (listeners) {
  8725. updateComponentListeners(vm, listeners);
  8726. }
  8727. }
  8728. var target;
  8729. function add (event, fn) {
  8730. target.$on(event, fn);
  8731. }
  8732. function remove$1 (event, fn) {
  8733. target.$off(event, fn);
  8734. }
  8735. function createOnceHandler (event, fn) {
  8736. var _target = target;
  8737. return function onceHandler () {
  8738. var res = fn.apply(null, arguments);
  8739. if (res !== null) {
  8740. _target.$off(event, onceHandler);
  8741. }
  8742. }
  8743. }
  8744. function updateComponentListeners (
  8745. vm,
  8746. listeners,
  8747. oldListeners
  8748. ) {
  8749. target = vm;
  8750. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8751. target = undefined;
  8752. }
  8753. function eventsMixin (Vue) {
  8754. var hookRE = /^hook:/;
  8755. Vue.prototype.$on = function (event, fn) {
  8756. var vm = this;
  8757. if (Array.isArray(event)) {
  8758. for (var i = 0, l = event.length; i < l; i++) {
  8759. vm.$on(event[i], fn);
  8760. }
  8761. } else {
  8762. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8763. // optimize hook:event cost by using a boolean flag marked at registration
  8764. // instead of a hash lookup
  8765. if (hookRE.test(event)) {
  8766. vm._hasHookEvent = true;
  8767. }
  8768. }
  8769. return vm
  8770. };
  8771. Vue.prototype.$once = function (event, fn) {
  8772. var vm = this;
  8773. function on () {
  8774. vm.$off(event, on);
  8775. fn.apply(vm, arguments);
  8776. }
  8777. on.fn = fn;
  8778. vm.$on(event, on);
  8779. return vm
  8780. };
  8781. Vue.prototype.$off = function (event, fn) {
  8782. var vm = this;
  8783. // all
  8784. if (!arguments.length) {
  8785. vm._events = Object.create(null);
  8786. return vm
  8787. }
  8788. // array of events
  8789. if (Array.isArray(event)) {
  8790. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8791. vm.$off(event[i$1], fn);
  8792. }
  8793. return vm
  8794. }
  8795. // specific event
  8796. var cbs = vm._events[event];
  8797. if (!cbs) {
  8798. return vm
  8799. }
  8800. if (!fn) {
  8801. vm._events[event] = null;
  8802. return vm
  8803. }
  8804. // specific handler
  8805. var cb;
  8806. var i = cbs.length;
  8807. while (i--) {
  8808. cb = cbs[i];
  8809. if (cb === fn || cb.fn === fn) {
  8810. cbs.splice(i, 1);
  8811. break
  8812. }
  8813. }
  8814. return vm
  8815. };
  8816. Vue.prototype.$emit = function (event) {
  8817. var vm = this;
  8818. if (true) {
  8819. var lowerCaseEvent = event.toLowerCase();
  8820. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8821. tip(
  8822. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8823. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8824. "Note that HTML attributes are case-insensitive and you cannot use " +
  8825. "v-on to listen to camelCase events when using in-DOM templates. " +
  8826. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8827. );
  8828. }
  8829. }
  8830. var cbs = vm._events[event];
  8831. if (cbs) {
  8832. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8833. var args = toArray(arguments, 1);
  8834. var info = "event handler for \"" + event + "\"";
  8835. for (var i = 0, l = cbs.length; i < l; i++) {
  8836. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8837. }
  8838. }
  8839. return vm
  8840. };
  8841. }
  8842. /* */
  8843. var activeInstance = null;
  8844. var isUpdatingChildComponent = false;
  8845. function setActiveInstance(vm) {
  8846. var prevActiveInstance = activeInstance;
  8847. activeInstance = vm;
  8848. return function () {
  8849. activeInstance = prevActiveInstance;
  8850. }
  8851. }
  8852. function initLifecycle (vm) {
  8853. var options = vm.$options;
  8854. // locate first non-abstract parent
  8855. var parent = options.parent;
  8856. if (parent && !options.abstract) {
  8857. while (parent.$options.abstract && parent.$parent) {
  8858. parent = parent.$parent;
  8859. }
  8860. parent.$children.push(vm);
  8861. }
  8862. vm.$parent = parent;
  8863. vm.$root = parent ? parent.$root : vm;
  8864. vm.$children = [];
  8865. vm.$refs = {};
  8866. vm._watcher = null;
  8867. vm._inactive = null;
  8868. vm._directInactive = false;
  8869. vm._isMounted = false;
  8870. vm._isDestroyed = false;
  8871. vm._isBeingDestroyed = false;
  8872. }
  8873. function lifecycleMixin (Vue) {
  8874. Vue.prototype._update = function (vnode, hydrating) {
  8875. var vm = this;
  8876. var prevEl = vm.$el;
  8877. var prevVnode = vm._vnode;
  8878. var restoreActiveInstance = setActiveInstance(vm);
  8879. vm._vnode = vnode;
  8880. // Vue.prototype.__patch__ is injected in entry points
  8881. // based on the rendering backend used.
  8882. if (!prevVnode) {
  8883. // initial render
  8884. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8885. } else {
  8886. // updates
  8887. vm.$el = vm.__patch__(prevVnode, vnode);
  8888. }
  8889. restoreActiveInstance();
  8890. // update __vue__ reference
  8891. if (prevEl) {
  8892. prevEl.__vue__ = null;
  8893. }
  8894. if (vm.$el) {
  8895. vm.$el.__vue__ = vm;
  8896. }
  8897. // if parent is an HOC, update its $el as well
  8898. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8899. vm.$parent.$el = vm.$el;
  8900. }
  8901. // updated hook is called by the scheduler to ensure that children are
  8902. // updated in a parent's updated hook.
  8903. };
  8904. Vue.prototype.$forceUpdate = function () {
  8905. var vm = this;
  8906. if (vm._watcher) {
  8907. vm._watcher.update();
  8908. }
  8909. };
  8910. Vue.prototype.$destroy = function () {
  8911. var vm = this;
  8912. if (vm._isBeingDestroyed) {
  8913. return
  8914. }
  8915. callHook(vm, 'beforeDestroy');
  8916. vm._isBeingDestroyed = true;
  8917. // remove self from parent
  8918. var parent = vm.$parent;
  8919. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8920. remove(parent.$children, vm);
  8921. }
  8922. // teardown watchers
  8923. if (vm._watcher) {
  8924. vm._watcher.teardown();
  8925. }
  8926. var i = vm._watchers.length;
  8927. while (i--) {
  8928. vm._watchers[i].teardown();
  8929. }
  8930. // remove reference from data ob
  8931. // frozen object may not have observer.
  8932. if (vm._data.__ob__) {
  8933. vm._data.__ob__.vmCount--;
  8934. }
  8935. // call the last hook...
  8936. vm._isDestroyed = true;
  8937. // invoke destroy hooks on current rendered tree
  8938. vm.__patch__(vm._vnode, null);
  8939. // fire destroyed hook
  8940. callHook(vm, 'destroyed');
  8941. // turn off all instance listeners.
  8942. vm.$off();
  8943. // remove __vue__ reference
  8944. if (vm.$el) {
  8945. vm.$el.__vue__ = null;
  8946. }
  8947. // release circular reference (#6759)
  8948. if (vm.$vnode) {
  8949. vm.$vnode.parent = null;
  8950. }
  8951. };
  8952. }
  8953. function updateChildComponent (
  8954. vm,
  8955. propsData,
  8956. listeners,
  8957. parentVnode,
  8958. renderChildren
  8959. ) {
  8960. if (true) {
  8961. isUpdatingChildComponent = true;
  8962. }
  8963. // determine whether component has slot children
  8964. // we need to do this before overwriting $options._renderChildren.
  8965. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8966. // dynamic slot names). Static scoped slots compiled from template has the
  8967. // "$stable" marker.
  8968. var newScopedSlots = parentVnode.data.scopedSlots;
  8969. var oldScopedSlots = vm.$scopedSlots;
  8970. var hasDynamicScopedSlot = !!(
  8971. (newScopedSlots && !newScopedSlots.$stable) ||
  8972. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8973. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8974. );
  8975. // Any static slot children from the parent may have changed during parent's
  8976. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8977. // update is necessary to ensure correctness.
  8978. var needsForceUpdate = !!(
  8979. renderChildren || // has new static slots
  8980. vm.$options._renderChildren || // has old static slots
  8981. hasDynamicScopedSlot
  8982. );
  8983. vm.$options._parentVnode = parentVnode;
  8984. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8985. if (vm._vnode) { // update child tree's parent
  8986. vm._vnode.parent = parentVnode;
  8987. }
  8988. vm.$options._renderChildren = renderChildren;
  8989. // update $attrs and $listeners hash
  8990. // these are also reactive so they may trigger child update if the child
  8991. // used them during render
  8992. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8993. vm.$listeners = listeners || emptyObject;
  8994. // update props
  8995. if (propsData && vm.$options.props) {
  8996. toggleObserving(false);
  8997. var props = vm._props;
  8998. var propKeys = vm.$options._propKeys || [];
  8999. for (var i = 0; i < propKeys.length; i++) {
  9000. var key = propKeys[i];
  9001. var propOptions = vm.$options.props; // wtf flow?
  9002. props[key] = validateProp(key, propOptions, propsData, vm);
  9003. }
  9004. toggleObserving(true);
  9005. // keep a copy of raw propsData
  9006. vm.$options.propsData = propsData;
  9007. }
  9008. // fixed by xxxxxx update properties(mp runtime)
  9009. vm._$updateProperties && vm._$updateProperties(vm);
  9010. // update listeners
  9011. listeners = listeners || emptyObject;
  9012. var oldListeners = vm.$options._parentListeners;
  9013. vm.$options._parentListeners = listeners;
  9014. updateComponentListeners(vm, listeners, oldListeners);
  9015. // resolve slots + force update if has children
  9016. if (needsForceUpdate) {
  9017. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  9018. vm.$forceUpdate();
  9019. }
  9020. if (true) {
  9021. isUpdatingChildComponent = false;
  9022. }
  9023. }
  9024. function isInInactiveTree (vm) {
  9025. while (vm && (vm = vm.$parent)) {
  9026. if (vm._inactive) { return true }
  9027. }
  9028. return false
  9029. }
  9030. function activateChildComponent (vm, direct) {
  9031. if (direct) {
  9032. vm._directInactive = false;
  9033. if (isInInactiveTree(vm)) {
  9034. return
  9035. }
  9036. } else if (vm._directInactive) {
  9037. return
  9038. }
  9039. if (vm._inactive || vm._inactive === null) {
  9040. vm._inactive = false;
  9041. for (var i = 0; i < vm.$children.length; i++) {
  9042. activateChildComponent(vm.$children[i]);
  9043. }
  9044. callHook(vm, 'activated');
  9045. }
  9046. }
  9047. function deactivateChildComponent (vm, direct) {
  9048. if (direct) {
  9049. vm._directInactive = true;
  9050. if (isInInactiveTree(vm)) {
  9051. return
  9052. }
  9053. }
  9054. if (!vm._inactive) {
  9055. vm._inactive = true;
  9056. for (var i = 0; i < vm.$children.length; i++) {
  9057. deactivateChildComponent(vm.$children[i]);
  9058. }
  9059. callHook(vm, 'deactivated');
  9060. }
  9061. }
  9062. function callHook (vm, hook) {
  9063. // #7573 disable dep collection when invoking lifecycle hooks
  9064. pushTarget();
  9065. var handlers = vm.$options[hook];
  9066. var info = hook + " hook";
  9067. if (handlers) {
  9068. for (var i = 0, j = handlers.length; i < j; i++) {
  9069. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  9070. }
  9071. }
  9072. if (vm._hasHookEvent) {
  9073. vm.$emit('hook:' + hook);
  9074. }
  9075. popTarget();
  9076. }
  9077. /* */
  9078. var MAX_UPDATE_COUNT = 100;
  9079. var queue = [];
  9080. var activatedChildren = [];
  9081. var has = {};
  9082. var circular = {};
  9083. var waiting = false;
  9084. var flushing = false;
  9085. var index = 0;
  9086. /**
  9087. * Reset the scheduler's state.
  9088. */
  9089. function resetSchedulerState () {
  9090. index = queue.length = activatedChildren.length = 0;
  9091. has = {};
  9092. if (true) {
  9093. circular = {};
  9094. }
  9095. waiting = flushing = false;
  9096. }
  9097. // Async edge case #6566 requires saving the timestamp when event listeners are
  9098. // attached. However, calling performance.now() has a perf overhead especially
  9099. // if the page has thousands of event listeners. Instead, we take a timestamp
  9100. // every time the scheduler flushes and use that for all event listeners
  9101. // attached during that flush.
  9102. var currentFlushTimestamp = 0;
  9103. // Async edge case fix requires storing an event listener's attach timestamp.
  9104. var getNow = Date.now;
  9105. // Determine what event timestamp the browser is using. Annoyingly, the
  9106. // timestamp can either be hi-res (relative to page load) or low-res
  9107. // (relative to UNIX epoch), so in order to compare time we have to use the
  9108. // same timestamp type when saving the flush timestamp.
  9109. // All IE versions use low-res event timestamps, and have problematic clock
  9110. // implementations (#9632)
  9111. if (inBrowser && !isIE) {
  9112. var performance = window.performance;
  9113. if (
  9114. performance &&
  9115. typeof performance.now === 'function' &&
  9116. getNow() > document.createEvent('Event').timeStamp
  9117. ) {
  9118. // if the event timestamp, although evaluated AFTER the Date.now(), is
  9119. // smaller than it, it means the event is using a hi-res timestamp,
  9120. // and we need to use the hi-res version for event listener timestamps as
  9121. // well.
  9122. getNow = function () { return performance.now(); };
  9123. }
  9124. }
  9125. /**
  9126. * Flush both queues and run the watchers.
  9127. */
  9128. function flushSchedulerQueue () {
  9129. currentFlushTimestamp = getNow();
  9130. flushing = true;
  9131. var watcher, id;
  9132. // Sort queue before flush.
  9133. // This ensures that:
  9134. // 1. Components are updated from parent to child. (because parent is always
  9135. // created before the child)
  9136. // 2. A component's user watchers are run before its render watcher (because
  9137. // user watchers are created before the render watcher)
  9138. // 3. If a component is destroyed during a parent component's watcher run,
  9139. // its watchers can be skipped.
  9140. queue.sort(function (a, b) { return a.id - b.id; });
  9141. // do not cache length because more watchers might be pushed
  9142. // as we run existing watchers
  9143. for (index = 0; index < queue.length; index++) {
  9144. watcher = queue[index];
  9145. if (watcher.before) {
  9146. watcher.before();
  9147. }
  9148. id = watcher.id;
  9149. has[id] = null;
  9150. watcher.run();
  9151. // in dev build, check and stop circular updates.
  9152. if ( true && has[id] != null) {
  9153. circular[id] = (circular[id] || 0) + 1;
  9154. if (circular[id] > MAX_UPDATE_COUNT) {
  9155. warn(
  9156. 'You may have an infinite update loop ' + (
  9157. watcher.user
  9158. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  9159. : "in a component render function."
  9160. ),
  9161. watcher.vm
  9162. );
  9163. break
  9164. }
  9165. }
  9166. }
  9167. // keep copies of post queues before resetting state
  9168. var activatedQueue = activatedChildren.slice();
  9169. var updatedQueue = queue.slice();
  9170. resetSchedulerState();
  9171. // call component updated and activated hooks
  9172. callActivatedHooks(activatedQueue);
  9173. callUpdatedHooks(updatedQueue);
  9174. // devtool hook
  9175. /* istanbul ignore if */
  9176. if (devtools && config.devtools) {
  9177. devtools.emit('flush');
  9178. }
  9179. }
  9180. function callUpdatedHooks (queue) {
  9181. var i = queue.length;
  9182. while (i--) {
  9183. var watcher = queue[i];
  9184. var vm = watcher.vm;
  9185. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  9186. callHook(vm, 'updated');
  9187. }
  9188. }
  9189. }
  9190. /**
  9191. * Queue a kept-alive component that was activated during patch.
  9192. * The queue will be processed after the entire tree has been patched.
  9193. */
  9194. function queueActivatedComponent (vm) {
  9195. // setting _inactive to false here so that a render function can
  9196. // rely on checking whether it's in an inactive tree (e.g. router-view)
  9197. vm._inactive = false;
  9198. activatedChildren.push(vm);
  9199. }
  9200. function callActivatedHooks (queue) {
  9201. for (var i = 0; i < queue.length; i++) {
  9202. queue[i]._inactive = true;
  9203. activateChildComponent(queue[i], true /* true */);
  9204. }
  9205. }
  9206. /**
  9207. * Push a watcher into the watcher queue.
  9208. * Jobs with duplicate IDs will be skipped unless it's
  9209. * pushed when the queue is being flushed.
  9210. */
  9211. function queueWatcher (watcher) {
  9212. var id = watcher.id;
  9213. if (has[id] == null) {
  9214. has[id] = true;
  9215. if (!flushing) {
  9216. queue.push(watcher);
  9217. } else {
  9218. // if already flushing, splice the watcher based on its id
  9219. // if already past its id, it will be run next immediately.
  9220. var i = queue.length - 1;
  9221. while (i > index && queue[i].id > watcher.id) {
  9222. i--;
  9223. }
  9224. queue.splice(i + 1, 0, watcher);
  9225. }
  9226. // queue the flush
  9227. if (!waiting) {
  9228. waiting = true;
  9229. if ( true && !config.async) {
  9230. flushSchedulerQueue();
  9231. return
  9232. }
  9233. nextTick(flushSchedulerQueue);
  9234. }
  9235. }
  9236. }
  9237. /* */
  9238. var uid$2 = 0;
  9239. /**
  9240. * A watcher parses an expression, collects dependencies,
  9241. * and fires callback when the expression value changes.
  9242. * This is used for both the $watch() api and directives.
  9243. */
  9244. var Watcher = function Watcher (
  9245. vm,
  9246. expOrFn,
  9247. cb,
  9248. options,
  9249. isRenderWatcher
  9250. ) {
  9251. this.vm = vm;
  9252. if (isRenderWatcher) {
  9253. vm._watcher = this;
  9254. }
  9255. vm._watchers.push(this);
  9256. // options
  9257. if (options) {
  9258. this.deep = !!options.deep;
  9259. this.user = !!options.user;
  9260. this.lazy = !!options.lazy;
  9261. this.sync = !!options.sync;
  9262. this.before = options.before;
  9263. } else {
  9264. this.deep = this.user = this.lazy = this.sync = false;
  9265. }
  9266. this.cb = cb;
  9267. this.id = ++uid$2; // uid for batching
  9268. this.active = true;
  9269. this.dirty = this.lazy; // for lazy watchers
  9270. this.deps = [];
  9271. this.newDeps = [];
  9272. this.depIds = new _Set();
  9273. this.newDepIds = new _Set();
  9274. this.expression = true
  9275. ? expOrFn.toString()
  9276. : undefined;
  9277. // parse expression for getter
  9278. if (typeof expOrFn === 'function') {
  9279. this.getter = expOrFn;
  9280. } else {
  9281. this.getter = parsePath(expOrFn);
  9282. if (!this.getter) {
  9283. this.getter = noop;
  9284. true && warn(
  9285. "Failed watching path: \"" + expOrFn + "\" " +
  9286. 'Watcher only accepts simple dot-delimited paths. ' +
  9287. 'For full control, use a function instead.',
  9288. vm
  9289. );
  9290. }
  9291. }
  9292. this.value = this.lazy
  9293. ? undefined
  9294. : this.get();
  9295. };
  9296. /**
  9297. * Evaluate the getter, and re-collect dependencies.
  9298. */
  9299. Watcher.prototype.get = function get () {
  9300. pushTarget(this);
  9301. var value;
  9302. var vm = this.vm;
  9303. try {
  9304. value = this.getter.call(vm, vm);
  9305. } catch (e) {
  9306. if (this.user) {
  9307. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  9308. } else {
  9309. throw e
  9310. }
  9311. } finally {
  9312. // "touch" every property so they are all tracked as
  9313. // dependencies for deep watching
  9314. if (this.deep) {
  9315. traverse(value);
  9316. }
  9317. popTarget();
  9318. this.cleanupDeps();
  9319. }
  9320. return value
  9321. };
  9322. /**
  9323. * Add a dependency to this directive.
  9324. */
  9325. Watcher.prototype.addDep = function addDep (dep) {
  9326. var id = dep.id;
  9327. if (!this.newDepIds.has(id)) {
  9328. this.newDepIds.add(id);
  9329. this.newDeps.push(dep);
  9330. if (!this.depIds.has(id)) {
  9331. dep.addSub(this);
  9332. }
  9333. }
  9334. };
  9335. /**
  9336. * Clean up for dependency collection.
  9337. */
  9338. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  9339. var i = this.deps.length;
  9340. while (i--) {
  9341. var dep = this.deps[i];
  9342. if (!this.newDepIds.has(dep.id)) {
  9343. dep.removeSub(this);
  9344. }
  9345. }
  9346. var tmp = this.depIds;
  9347. this.depIds = this.newDepIds;
  9348. this.newDepIds = tmp;
  9349. this.newDepIds.clear();
  9350. tmp = this.deps;
  9351. this.deps = this.newDeps;
  9352. this.newDeps = tmp;
  9353. this.newDeps.length = 0;
  9354. };
  9355. /**
  9356. * Subscriber interface.
  9357. * Will be called when a dependency changes.
  9358. */
  9359. Watcher.prototype.update = function update () {
  9360. /* istanbul ignore else */
  9361. if (this.lazy) {
  9362. this.dirty = true;
  9363. } else if (this.sync) {
  9364. this.run();
  9365. } else {
  9366. queueWatcher(this);
  9367. }
  9368. };
  9369. /**
  9370. * Scheduler job interface.
  9371. * Will be called by the scheduler.
  9372. */
  9373. Watcher.prototype.run = function run () {
  9374. if (this.active) {
  9375. var value = this.get();
  9376. if (
  9377. value !== this.value ||
  9378. // Deep watchers and watchers on Object/Arrays should fire even
  9379. // when the value is the same, because the value may
  9380. // have mutated.
  9381. isObject(value) ||
  9382. this.deep
  9383. ) {
  9384. // set new value
  9385. var oldValue = this.value;
  9386. this.value = value;
  9387. if (this.user) {
  9388. try {
  9389. this.cb.call(this.vm, value, oldValue);
  9390. } catch (e) {
  9391. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  9392. }
  9393. } else {
  9394. this.cb.call(this.vm, value, oldValue);
  9395. }
  9396. }
  9397. }
  9398. };
  9399. /**
  9400. * Evaluate the value of the watcher.
  9401. * This only gets called for lazy watchers.
  9402. */
  9403. Watcher.prototype.evaluate = function evaluate () {
  9404. this.value = this.get();
  9405. this.dirty = false;
  9406. };
  9407. /**
  9408. * Depend on all deps collected by this watcher.
  9409. */
  9410. Watcher.prototype.depend = function depend () {
  9411. var i = this.deps.length;
  9412. while (i--) {
  9413. this.deps[i].depend();
  9414. }
  9415. };
  9416. /**
  9417. * Remove self from all dependencies' subscriber list.
  9418. */
  9419. Watcher.prototype.teardown = function teardown () {
  9420. if (this.active) {
  9421. // remove self from vm's watcher list
  9422. // this is a somewhat expensive operation so we skip it
  9423. // if the vm is being destroyed.
  9424. if (!this.vm._isBeingDestroyed) {
  9425. remove(this.vm._watchers, this);
  9426. }
  9427. var i = this.deps.length;
  9428. while (i--) {
  9429. this.deps[i].removeSub(this);
  9430. }
  9431. this.active = false;
  9432. }
  9433. };
  9434. /* */
  9435. var sharedPropertyDefinition = {
  9436. enumerable: true,
  9437. configurable: true,
  9438. get: noop,
  9439. set: noop
  9440. };
  9441. function proxy (target, sourceKey, key) {
  9442. sharedPropertyDefinition.get = function proxyGetter () {
  9443. return this[sourceKey][key]
  9444. };
  9445. sharedPropertyDefinition.set = function proxySetter (val) {
  9446. this[sourceKey][key] = val;
  9447. };
  9448. Object.defineProperty(target, key, sharedPropertyDefinition);
  9449. }
  9450. function initState (vm) {
  9451. vm._watchers = [];
  9452. var opts = vm.$options;
  9453. if (opts.props) { initProps(vm, opts.props); }
  9454. if (opts.methods) { initMethods(vm, opts.methods); }
  9455. if (opts.data) {
  9456. initData(vm);
  9457. } else {
  9458. observe(vm._data = {}, true /* asRootData */);
  9459. }
  9460. if (opts.computed) { initComputed(vm, opts.computed); }
  9461. if (opts.watch && opts.watch !== nativeWatch) {
  9462. initWatch(vm, opts.watch);
  9463. }
  9464. }
  9465. function initProps (vm, propsOptions) {
  9466. var propsData = vm.$options.propsData || {};
  9467. var props = vm._props = {};
  9468. // cache prop keys so that future props updates can iterate using Array
  9469. // instead of dynamic object key enumeration.
  9470. var keys = vm.$options._propKeys = [];
  9471. var isRoot = !vm.$parent;
  9472. // root instance props should be converted
  9473. if (!isRoot) {
  9474. toggleObserving(false);
  9475. }
  9476. var loop = function ( key ) {
  9477. keys.push(key);
  9478. var value = validateProp(key, propsOptions, propsData, vm);
  9479. /* istanbul ignore else */
  9480. if (true) {
  9481. var hyphenatedKey = hyphenate(key);
  9482. if (isReservedAttribute(hyphenatedKey) ||
  9483. config.isReservedAttr(hyphenatedKey)) {
  9484. warn(
  9485. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  9486. vm
  9487. );
  9488. }
  9489. defineReactive$$1(props, key, value, function () {
  9490. if (!isRoot && !isUpdatingChildComponent) {
  9491. {
  9492. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  9493. return
  9494. }
  9495. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  9496. if(
  9497. key === 'value' &&
  9498. Array.isArray(vm.$options.behaviors) &&
  9499. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9500. ){
  9501. return
  9502. }
  9503. if(vm._getFormData){
  9504. return
  9505. }
  9506. var $parent = vm.$parent;
  9507. while($parent){
  9508. if($parent.__next_tick_pending){
  9509. return
  9510. }
  9511. $parent = $parent.$parent;
  9512. }
  9513. }
  9514. warn(
  9515. "Avoid mutating a prop directly since the value will be " +
  9516. "overwritten whenever the parent component re-renders. " +
  9517. "Instead, use a data or computed property based on the prop's " +
  9518. "value. Prop being mutated: \"" + key + "\"",
  9519. vm
  9520. );
  9521. }
  9522. });
  9523. } else {}
  9524. // static props are already proxied on the component's prototype
  9525. // during Vue.extend(). We only need to proxy props defined at
  9526. // instantiation here.
  9527. if (!(key in vm)) {
  9528. proxy(vm, "_props", key);
  9529. }
  9530. };
  9531. for (var key in propsOptions) loop( key );
  9532. toggleObserving(true);
  9533. }
  9534. function initData (vm) {
  9535. var data = vm.$options.data;
  9536. data = vm._data = typeof data === 'function'
  9537. ? getData(data, vm)
  9538. : data || {};
  9539. if (!isPlainObject(data)) {
  9540. data = {};
  9541. true && warn(
  9542. 'data functions should return an object:\n' +
  9543. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  9544. vm
  9545. );
  9546. }
  9547. // proxy data on instance
  9548. var keys = Object.keys(data);
  9549. var props = vm.$options.props;
  9550. var methods = vm.$options.methods;
  9551. var i = keys.length;
  9552. while (i--) {
  9553. var key = keys[i];
  9554. if (true) {
  9555. if (methods && hasOwn(methods, key)) {
  9556. warn(
  9557. ("Method \"" + key + "\" has already been defined as a data property."),
  9558. vm
  9559. );
  9560. }
  9561. }
  9562. if (props && hasOwn(props, key)) {
  9563. true && warn(
  9564. "The data property \"" + key + "\" is already declared as a prop. " +
  9565. "Use prop default value instead.",
  9566. vm
  9567. );
  9568. } else if (!isReserved(key)) {
  9569. proxy(vm, "_data", key);
  9570. }
  9571. }
  9572. // observe data
  9573. observe(data, true /* asRootData */);
  9574. }
  9575. function getData (data, vm) {
  9576. // #7573 disable dep collection when invoking data getters
  9577. pushTarget();
  9578. try {
  9579. return data.call(vm, vm)
  9580. } catch (e) {
  9581. handleError(e, vm, "data()");
  9582. return {}
  9583. } finally {
  9584. popTarget();
  9585. }
  9586. }
  9587. var computedWatcherOptions = { lazy: true };
  9588. function initComputed (vm, computed) {
  9589. // $flow-disable-line
  9590. var watchers = vm._computedWatchers = Object.create(null);
  9591. // computed properties are just getters during SSR
  9592. var isSSR = isServerRendering();
  9593. for (var key in computed) {
  9594. var userDef = computed[key];
  9595. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9596. if ( true && getter == null) {
  9597. warn(
  9598. ("Getter is missing for computed property \"" + key + "\"."),
  9599. vm
  9600. );
  9601. }
  9602. if (!isSSR) {
  9603. // create internal watcher for the computed property.
  9604. watchers[key] = new Watcher(
  9605. vm,
  9606. getter || noop,
  9607. noop,
  9608. computedWatcherOptions
  9609. );
  9610. }
  9611. // component-defined computed properties are already defined on the
  9612. // component prototype. We only need to define computed properties defined
  9613. // at instantiation here.
  9614. if (!(key in vm)) {
  9615. defineComputed(vm, key, userDef);
  9616. } else if (true) {
  9617. if (key in vm.$data) {
  9618. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  9619. } else if (vm.$options.props && key in vm.$options.props) {
  9620. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  9621. }
  9622. }
  9623. }
  9624. }
  9625. function defineComputed (
  9626. target,
  9627. key,
  9628. userDef
  9629. ) {
  9630. var shouldCache = !isServerRendering();
  9631. if (typeof userDef === 'function') {
  9632. sharedPropertyDefinition.get = shouldCache
  9633. ? createComputedGetter(key)
  9634. : createGetterInvoker(userDef);
  9635. sharedPropertyDefinition.set = noop;
  9636. } else {
  9637. sharedPropertyDefinition.get = userDef.get
  9638. ? shouldCache && userDef.cache !== false
  9639. ? createComputedGetter(key)
  9640. : createGetterInvoker(userDef.get)
  9641. : noop;
  9642. sharedPropertyDefinition.set = userDef.set || noop;
  9643. }
  9644. if ( true &&
  9645. sharedPropertyDefinition.set === noop) {
  9646. sharedPropertyDefinition.set = function () {
  9647. warn(
  9648. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9649. this
  9650. );
  9651. };
  9652. }
  9653. Object.defineProperty(target, key, sharedPropertyDefinition);
  9654. }
  9655. function createComputedGetter (key) {
  9656. return function computedGetter () {
  9657. var watcher = this._computedWatchers && this._computedWatchers[key];
  9658. if (watcher) {
  9659. if (watcher.dirty) {
  9660. watcher.evaluate();
  9661. }
  9662. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9663. watcher.depend();
  9664. }
  9665. return watcher.value
  9666. }
  9667. }
  9668. }
  9669. function createGetterInvoker(fn) {
  9670. return function computedGetter () {
  9671. return fn.call(this, this)
  9672. }
  9673. }
  9674. function initMethods (vm, methods) {
  9675. var props = vm.$options.props;
  9676. for (var key in methods) {
  9677. if (true) {
  9678. if (typeof methods[key] !== 'function') {
  9679. warn(
  9680. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9681. "Did you reference the function correctly?",
  9682. vm
  9683. );
  9684. }
  9685. if (props && hasOwn(props, key)) {
  9686. warn(
  9687. ("Method \"" + key + "\" has already been defined as a prop."),
  9688. vm
  9689. );
  9690. }
  9691. if ((key in vm) && isReserved(key)) {
  9692. warn(
  9693. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9694. "Avoid defining component methods that start with _ or $."
  9695. );
  9696. }
  9697. }
  9698. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9699. }
  9700. }
  9701. function initWatch (vm, watch) {
  9702. for (var key in watch) {
  9703. var handler = watch[key];
  9704. if (Array.isArray(handler)) {
  9705. for (var i = 0; i < handler.length; i++) {
  9706. createWatcher(vm, key, handler[i]);
  9707. }
  9708. } else {
  9709. createWatcher(vm, key, handler);
  9710. }
  9711. }
  9712. }
  9713. function createWatcher (
  9714. vm,
  9715. expOrFn,
  9716. handler,
  9717. options
  9718. ) {
  9719. if (isPlainObject(handler)) {
  9720. options = handler;
  9721. handler = handler.handler;
  9722. }
  9723. if (typeof handler === 'string') {
  9724. handler = vm[handler];
  9725. }
  9726. return vm.$watch(expOrFn, handler, options)
  9727. }
  9728. function stateMixin (Vue) {
  9729. // flow somehow has problems with directly declared definition object
  9730. // when using Object.defineProperty, so we have to procedurally build up
  9731. // the object here.
  9732. var dataDef = {};
  9733. dataDef.get = function () { return this._data };
  9734. var propsDef = {};
  9735. propsDef.get = function () { return this._props };
  9736. if (true) {
  9737. dataDef.set = function () {
  9738. warn(
  9739. 'Avoid replacing instance root $data. ' +
  9740. 'Use nested data properties instead.',
  9741. this
  9742. );
  9743. };
  9744. propsDef.set = function () {
  9745. warn("$props is readonly.", this);
  9746. };
  9747. }
  9748. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9749. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9750. Vue.prototype.$set = set;
  9751. Vue.prototype.$delete = del;
  9752. Vue.prototype.$watch = function (
  9753. expOrFn,
  9754. cb,
  9755. options
  9756. ) {
  9757. var vm = this;
  9758. if (isPlainObject(cb)) {
  9759. return createWatcher(vm, expOrFn, cb, options)
  9760. }
  9761. options = options || {};
  9762. options.user = true;
  9763. var watcher = new Watcher(vm, expOrFn, cb, options);
  9764. if (options.immediate) {
  9765. try {
  9766. cb.call(vm, watcher.value);
  9767. } catch (error) {
  9768. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9769. }
  9770. }
  9771. return function unwatchFn () {
  9772. watcher.teardown();
  9773. }
  9774. };
  9775. }
  9776. /* */
  9777. var uid$3 = 0;
  9778. function initMixin (Vue) {
  9779. Vue.prototype._init = function (options) {
  9780. var vm = this;
  9781. // a uid
  9782. vm._uid = uid$3++;
  9783. var startTag, endTag;
  9784. /* istanbul ignore if */
  9785. if ( true && config.performance && mark) {
  9786. startTag = "vue-perf-start:" + (vm._uid);
  9787. endTag = "vue-perf-end:" + (vm._uid);
  9788. mark(startTag);
  9789. }
  9790. // a flag to avoid this being observed
  9791. vm._isVue = true;
  9792. // merge options
  9793. if (options && options._isComponent) {
  9794. // optimize internal component instantiation
  9795. // since dynamic options merging is pretty slow, and none of the
  9796. // internal component options needs special treatment.
  9797. initInternalComponent(vm, options);
  9798. } else {
  9799. vm.$options = mergeOptions(
  9800. resolveConstructorOptions(vm.constructor),
  9801. options || {},
  9802. vm
  9803. );
  9804. }
  9805. /* istanbul ignore else */
  9806. if (true) {
  9807. initProxy(vm);
  9808. } else {}
  9809. // expose real self
  9810. vm._self = vm;
  9811. initLifecycle(vm);
  9812. initEvents(vm);
  9813. initRender(vm);
  9814. callHook(vm, 'beforeCreate');
  9815. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9816. initState(vm);
  9817. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9818. !vm._$fallback && callHook(vm, 'created');
  9819. /* istanbul ignore if */
  9820. if ( true && config.performance && mark) {
  9821. vm._name = formatComponentName(vm, false);
  9822. mark(endTag);
  9823. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9824. }
  9825. if (vm.$options.el) {
  9826. vm.$mount(vm.$options.el);
  9827. }
  9828. };
  9829. }
  9830. function initInternalComponent (vm, options) {
  9831. var opts = vm.$options = Object.create(vm.constructor.options);
  9832. // doing this because it's faster than dynamic enumeration.
  9833. var parentVnode = options._parentVnode;
  9834. opts.parent = options.parent;
  9835. opts._parentVnode = parentVnode;
  9836. var vnodeComponentOptions = parentVnode.componentOptions;
  9837. opts.propsData = vnodeComponentOptions.propsData;
  9838. opts._parentListeners = vnodeComponentOptions.listeners;
  9839. opts._renderChildren = vnodeComponentOptions.children;
  9840. opts._componentTag = vnodeComponentOptions.tag;
  9841. if (options.render) {
  9842. opts.render = options.render;
  9843. opts.staticRenderFns = options.staticRenderFns;
  9844. }
  9845. }
  9846. function resolveConstructorOptions (Ctor) {
  9847. var options = Ctor.options;
  9848. if (Ctor.super) {
  9849. var superOptions = resolveConstructorOptions(Ctor.super);
  9850. var cachedSuperOptions = Ctor.superOptions;
  9851. if (superOptions !== cachedSuperOptions) {
  9852. // super option changed,
  9853. // need to resolve new options.
  9854. Ctor.superOptions = superOptions;
  9855. // check if there are any late-modified/attached options (#4976)
  9856. var modifiedOptions = resolveModifiedOptions(Ctor);
  9857. // update base extend options
  9858. if (modifiedOptions) {
  9859. extend(Ctor.extendOptions, modifiedOptions);
  9860. }
  9861. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9862. if (options.name) {
  9863. options.components[options.name] = Ctor;
  9864. }
  9865. }
  9866. }
  9867. return options
  9868. }
  9869. function resolveModifiedOptions (Ctor) {
  9870. var modified;
  9871. var latest = Ctor.options;
  9872. var sealed = Ctor.sealedOptions;
  9873. for (var key in latest) {
  9874. if (latest[key] !== sealed[key]) {
  9875. if (!modified) { modified = {}; }
  9876. modified[key] = latest[key];
  9877. }
  9878. }
  9879. return modified
  9880. }
  9881. function Vue (options) {
  9882. if ( true &&
  9883. !(this instanceof Vue)
  9884. ) {
  9885. warn('Vue is a constructor and should be called with the `new` keyword');
  9886. }
  9887. this._init(options);
  9888. }
  9889. initMixin(Vue);
  9890. stateMixin(Vue);
  9891. eventsMixin(Vue);
  9892. lifecycleMixin(Vue);
  9893. renderMixin(Vue);
  9894. /* */
  9895. function initUse (Vue) {
  9896. Vue.use = function (plugin) {
  9897. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9898. if (installedPlugins.indexOf(plugin) > -1) {
  9899. return this
  9900. }
  9901. // additional parameters
  9902. var args = toArray(arguments, 1);
  9903. args.unshift(this);
  9904. if (typeof plugin.install === 'function') {
  9905. plugin.install.apply(plugin, args);
  9906. } else if (typeof plugin === 'function') {
  9907. plugin.apply(null, args);
  9908. }
  9909. installedPlugins.push(plugin);
  9910. return this
  9911. };
  9912. }
  9913. /* */
  9914. function initMixin$1 (Vue) {
  9915. Vue.mixin = function (mixin) {
  9916. this.options = mergeOptions(this.options, mixin);
  9917. return this
  9918. };
  9919. }
  9920. /* */
  9921. function initExtend (Vue) {
  9922. /**
  9923. * Each instance constructor, including Vue, has a unique
  9924. * cid. This enables us to create wrapped "child
  9925. * constructors" for prototypal inheritance and cache them.
  9926. */
  9927. Vue.cid = 0;
  9928. var cid = 1;
  9929. /**
  9930. * Class inheritance
  9931. */
  9932. Vue.extend = function (extendOptions) {
  9933. extendOptions = extendOptions || {};
  9934. var Super = this;
  9935. var SuperId = Super.cid;
  9936. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9937. if (cachedCtors[SuperId]) {
  9938. return cachedCtors[SuperId]
  9939. }
  9940. var name = extendOptions.name || Super.options.name;
  9941. if ( true && name) {
  9942. validateComponentName(name);
  9943. }
  9944. var Sub = function VueComponent (options) {
  9945. this._init(options);
  9946. };
  9947. Sub.prototype = Object.create(Super.prototype);
  9948. Sub.prototype.constructor = Sub;
  9949. Sub.cid = cid++;
  9950. Sub.options = mergeOptions(
  9951. Super.options,
  9952. extendOptions
  9953. );
  9954. Sub['super'] = Super;
  9955. // For props and computed properties, we define the proxy getters on
  9956. // the Vue instances at extension time, on the extended prototype. This
  9957. // avoids Object.defineProperty calls for each instance created.
  9958. if (Sub.options.props) {
  9959. initProps$1(Sub);
  9960. }
  9961. if (Sub.options.computed) {
  9962. initComputed$1(Sub);
  9963. }
  9964. // allow further extension/mixin/plugin usage
  9965. Sub.extend = Super.extend;
  9966. Sub.mixin = Super.mixin;
  9967. Sub.use = Super.use;
  9968. // create asset registers, so extended classes
  9969. // can have their private assets too.
  9970. ASSET_TYPES.forEach(function (type) {
  9971. Sub[type] = Super[type];
  9972. });
  9973. // enable recursive self-lookup
  9974. if (name) {
  9975. Sub.options.components[name] = Sub;
  9976. }
  9977. // keep a reference to the super options at extension time.
  9978. // later at instantiation we can check if Super's options have
  9979. // been updated.
  9980. Sub.superOptions = Super.options;
  9981. Sub.extendOptions = extendOptions;
  9982. Sub.sealedOptions = extend({}, Sub.options);
  9983. // cache constructor
  9984. cachedCtors[SuperId] = Sub;
  9985. return Sub
  9986. };
  9987. }
  9988. function initProps$1 (Comp) {
  9989. var props = Comp.options.props;
  9990. for (var key in props) {
  9991. proxy(Comp.prototype, "_props", key);
  9992. }
  9993. }
  9994. function initComputed$1 (Comp) {
  9995. var computed = Comp.options.computed;
  9996. for (var key in computed) {
  9997. defineComputed(Comp.prototype, key, computed[key]);
  9998. }
  9999. }
  10000. /* */
  10001. function initAssetRegisters (Vue) {
  10002. /**
  10003. * Create asset registration methods.
  10004. */
  10005. ASSET_TYPES.forEach(function (type) {
  10006. Vue[type] = function (
  10007. id,
  10008. definition
  10009. ) {
  10010. if (!definition) {
  10011. return this.options[type + 's'][id]
  10012. } else {
  10013. /* istanbul ignore if */
  10014. if ( true && type === 'component') {
  10015. validateComponentName(id);
  10016. }
  10017. if (type === 'component' && isPlainObject(definition)) {
  10018. definition.name = definition.name || id;
  10019. definition = this.options._base.extend(definition);
  10020. }
  10021. if (type === 'directive' && typeof definition === 'function') {
  10022. definition = { bind: definition, update: definition };
  10023. }
  10024. this.options[type + 's'][id] = definition;
  10025. return definition
  10026. }
  10027. };
  10028. });
  10029. }
  10030. /* */
  10031. function getComponentName (opts) {
  10032. return opts && (opts.Ctor.options.name || opts.tag)
  10033. }
  10034. function matches (pattern, name) {
  10035. if (Array.isArray(pattern)) {
  10036. return pattern.indexOf(name) > -1
  10037. } else if (typeof pattern === 'string') {
  10038. return pattern.split(',').indexOf(name) > -1
  10039. } else if (isRegExp(pattern)) {
  10040. return pattern.test(name)
  10041. }
  10042. /* istanbul ignore next */
  10043. return false
  10044. }
  10045. function pruneCache (keepAliveInstance, filter) {
  10046. var cache = keepAliveInstance.cache;
  10047. var keys = keepAliveInstance.keys;
  10048. var _vnode = keepAliveInstance._vnode;
  10049. for (var key in cache) {
  10050. var cachedNode = cache[key];
  10051. if (cachedNode) {
  10052. var name = getComponentName(cachedNode.componentOptions);
  10053. if (name && !filter(name)) {
  10054. pruneCacheEntry(cache, key, keys, _vnode);
  10055. }
  10056. }
  10057. }
  10058. }
  10059. function pruneCacheEntry (
  10060. cache,
  10061. key,
  10062. keys,
  10063. current
  10064. ) {
  10065. var cached$$1 = cache[key];
  10066. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  10067. cached$$1.componentInstance.$destroy();
  10068. }
  10069. cache[key] = null;
  10070. remove(keys, key);
  10071. }
  10072. var patternTypes = [String, RegExp, Array];
  10073. var KeepAlive = {
  10074. name: 'keep-alive',
  10075. abstract: true,
  10076. props: {
  10077. include: patternTypes,
  10078. exclude: patternTypes,
  10079. max: [String, Number]
  10080. },
  10081. created: function created () {
  10082. this.cache = Object.create(null);
  10083. this.keys = [];
  10084. },
  10085. destroyed: function destroyed () {
  10086. for (var key in this.cache) {
  10087. pruneCacheEntry(this.cache, key, this.keys);
  10088. }
  10089. },
  10090. mounted: function mounted () {
  10091. var this$1 = this;
  10092. this.$watch('include', function (val) {
  10093. pruneCache(this$1, function (name) { return matches(val, name); });
  10094. });
  10095. this.$watch('exclude', function (val) {
  10096. pruneCache(this$1, function (name) { return !matches(val, name); });
  10097. });
  10098. },
  10099. render: function render () {
  10100. var slot = this.$slots.default;
  10101. var vnode = getFirstComponentChild(slot);
  10102. var componentOptions = vnode && vnode.componentOptions;
  10103. if (componentOptions) {
  10104. // check pattern
  10105. var name = getComponentName(componentOptions);
  10106. var ref = this;
  10107. var include = ref.include;
  10108. var exclude = ref.exclude;
  10109. if (
  10110. // not included
  10111. (include && (!name || !matches(include, name))) ||
  10112. // excluded
  10113. (exclude && name && matches(exclude, name))
  10114. ) {
  10115. return vnode
  10116. }
  10117. var ref$1 = this;
  10118. var cache = ref$1.cache;
  10119. var keys = ref$1.keys;
  10120. var key = vnode.key == null
  10121. // same constructor may get registered as different local components
  10122. // so cid alone is not enough (#3269)
  10123. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  10124. : vnode.key;
  10125. if (cache[key]) {
  10126. vnode.componentInstance = cache[key].componentInstance;
  10127. // make current key freshest
  10128. remove(keys, key);
  10129. keys.push(key);
  10130. } else {
  10131. cache[key] = vnode;
  10132. keys.push(key);
  10133. // prune oldest entry
  10134. if (this.max && keys.length > parseInt(this.max)) {
  10135. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  10136. }
  10137. }
  10138. vnode.data.keepAlive = true;
  10139. }
  10140. return vnode || (slot && slot[0])
  10141. }
  10142. };
  10143. var builtInComponents = {
  10144. KeepAlive: KeepAlive
  10145. };
  10146. /* */
  10147. function initGlobalAPI (Vue) {
  10148. // config
  10149. var configDef = {};
  10150. configDef.get = function () { return config; };
  10151. if (true) {
  10152. configDef.set = function () {
  10153. warn(
  10154. 'Do not replace the Vue.config object, set individual fields instead.'
  10155. );
  10156. };
  10157. }
  10158. Object.defineProperty(Vue, 'config', configDef);
  10159. // exposed util methods.
  10160. // NOTE: these are not considered part of the public API - avoid relying on
  10161. // them unless you are aware of the risk.
  10162. Vue.util = {
  10163. warn: warn,
  10164. extend: extend,
  10165. mergeOptions: mergeOptions,
  10166. defineReactive: defineReactive$$1
  10167. };
  10168. Vue.set = set;
  10169. Vue.delete = del;
  10170. Vue.nextTick = nextTick;
  10171. // 2.6 explicit observable API
  10172. Vue.observable = function (obj) {
  10173. observe(obj);
  10174. return obj
  10175. };
  10176. Vue.options = Object.create(null);
  10177. ASSET_TYPES.forEach(function (type) {
  10178. Vue.options[type + 's'] = Object.create(null);
  10179. });
  10180. // this is used to identify the "base" constructor to extend all plain-object
  10181. // components with in Weex's multi-instance scenarios.
  10182. Vue.options._base = Vue;
  10183. extend(Vue.options.components, builtInComponents);
  10184. initUse(Vue);
  10185. initMixin$1(Vue);
  10186. initExtend(Vue);
  10187. initAssetRegisters(Vue);
  10188. }
  10189. initGlobalAPI(Vue);
  10190. Object.defineProperty(Vue.prototype, '$isServer', {
  10191. get: isServerRendering
  10192. });
  10193. Object.defineProperty(Vue.prototype, '$ssrContext', {
  10194. get: function get () {
  10195. /* istanbul ignore next */
  10196. return this.$vnode && this.$vnode.ssrContext
  10197. }
  10198. });
  10199. // expose FunctionalRenderContext for ssr runtime helper installation
  10200. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  10201. value: FunctionalRenderContext
  10202. });
  10203. Vue.version = '2.6.11';
  10204. /**
  10205. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  10206. */
  10207. var ARRAYTYPE = '[object Array]';
  10208. var OBJECTTYPE = '[object Object]';
  10209. var NULLTYPE = '[object Null]';
  10210. var UNDEFINEDTYPE = '[object Undefined]';
  10211. // const FUNCTIONTYPE = '[object Function]'
  10212. function diff(current, pre) {
  10213. var result = {};
  10214. syncKeys(current, pre);
  10215. _diff(current, pre, '', result);
  10216. return result
  10217. }
  10218. function syncKeys(current, pre) {
  10219. if (current === pre) { return }
  10220. var rootCurrentType = type(current);
  10221. var rootPreType = type(pre);
  10222. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  10223. if(Object.keys(current).length >= Object.keys(pre).length){
  10224. for (var key in pre) {
  10225. var currentValue = current[key];
  10226. if (currentValue === undefined) {
  10227. current[key] = null;
  10228. } else {
  10229. syncKeys(currentValue, pre[key]);
  10230. }
  10231. }
  10232. }
  10233. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  10234. if (current.length >= pre.length) {
  10235. pre.forEach(function (item, index) {
  10236. syncKeys(current[index], item);
  10237. });
  10238. }
  10239. }
  10240. }
  10241. function nullOrUndefined(currentType, preType) {
  10242. if(
  10243. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  10244. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  10245. ) {
  10246. return false
  10247. }
  10248. return true
  10249. }
  10250. function _diff(current, pre, path, result) {
  10251. if (current === pre) { return }
  10252. var rootCurrentType = type(current);
  10253. var rootPreType = type(pre);
  10254. if (rootCurrentType == OBJECTTYPE) {
  10255. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  10256. setResult(result, path, current);
  10257. } else {
  10258. var loop = function ( key ) {
  10259. var currentValue = current[key];
  10260. var preValue = pre[key];
  10261. var currentType = type(currentValue);
  10262. var preType = type(preValue);
  10263. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  10264. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  10265. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10266. }
  10267. } else if (currentType == ARRAYTYPE) {
  10268. if (preType != ARRAYTYPE) {
  10269. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10270. } else {
  10271. if (currentValue.length < preValue.length) {
  10272. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10273. } else {
  10274. currentValue.forEach(function (item, index) {
  10275. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  10276. });
  10277. }
  10278. }
  10279. } else if (currentType == OBJECTTYPE) {
  10280. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  10281. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10282. } else {
  10283. for (var subKey in currentValue) {
  10284. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  10285. }
  10286. }
  10287. }
  10288. };
  10289. for (var key in current) loop( key );
  10290. }
  10291. } else if (rootCurrentType == ARRAYTYPE) {
  10292. if (rootPreType != ARRAYTYPE) {
  10293. setResult(result, path, current);
  10294. } else {
  10295. if (current.length < pre.length) {
  10296. setResult(result, path, current);
  10297. } else {
  10298. current.forEach(function (item, index) {
  10299. _diff(item, pre[index], path + '[' + index + ']', result);
  10300. });
  10301. }
  10302. }
  10303. } else {
  10304. setResult(result, path, current);
  10305. }
  10306. }
  10307. function setResult(result, k, v) {
  10308. // if (type(v) != FUNCTIONTYPE) {
  10309. result[k] = v;
  10310. // }
  10311. }
  10312. function type(obj) {
  10313. return Object.prototype.toString.call(obj)
  10314. }
  10315. /* */
  10316. function flushCallbacks$1(vm) {
  10317. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  10318. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"跑腿商家","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10319. var mpInstance = vm.$scope;
  10320. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10321. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  10322. }
  10323. var copies = vm.__next_tick_callbacks.slice(0);
  10324. vm.__next_tick_callbacks.length = 0;
  10325. for (var i = 0; i < copies.length; i++) {
  10326. copies[i]();
  10327. }
  10328. }
  10329. }
  10330. function hasRenderWatcher(vm) {
  10331. return queue.find(function (watcher) { return vm._watcher === watcher; })
  10332. }
  10333. function nextTick$1(vm, cb) {
  10334. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  10335. //2.nextTick 之前存在 render watcher
  10336. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  10337. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"跑腿商家","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  10338. var mpInstance = vm.$scope;
  10339. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10340. ']:nextVueTick');
  10341. }
  10342. return nextTick(cb, vm)
  10343. }else{
  10344. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"跑腿商家","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  10345. var mpInstance$1 = vm.$scope;
  10346. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  10347. ']:nextMPTick');
  10348. }
  10349. }
  10350. var _resolve;
  10351. if (!vm.__next_tick_callbacks) {
  10352. vm.__next_tick_callbacks = [];
  10353. }
  10354. vm.__next_tick_callbacks.push(function () {
  10355. if (cb) {
  10356. try {
  10357. cb.call(vm);
  10358. } catch (e) {
  10359. handleError(e, vm, 'nextTick');
  10360. }
  10361. } else if (_resolve) {
  10362. _resolve(vm);
  10363. }
  10364. });
  10365. // $flow-disable-line
  10366. if (!cb && typeof Promise !== 'undefined') {
  10367. return new Promise(function (resolve) {
  10368. _resolve = resolve;
  10369. })
  10370. }
  10371. }
  10372. /* */
  10373. function clearInstance(key, value) {
  10374. // 简易去除 Vue 和小程序组件实例
  10375. if (value) {
  10376. if (value._isVue || value.__v_isMPComponent) {
  10377. return {}
  10378. }
  10379. }
  10380. return value
  10381. }
  10382. function cloneWithData(vm) {
  10383. // 确保当前 vm 所有数据被同步
  10384. var ret = Object.create(null);
  10385. var dataKeys = [].concat(
  10386. Object.keys(vm._data || {}),
  10387. Object.keys(vm._computedWatchers || {}));
  10388. dataKeys.reduce(function(ret, key) {
  10389. ret[key] = vm[key];
  10390. return ret
  10391. }, ret);
  10392. // vue-composition-api
  10393. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  10394. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  10395. if (rawBindings) {
  10396. Object.keys(rawBindings).forEach(function (key) {
  10397. ret[key] = vm[key];
  10398. });
  10399. }
  10400. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  10401. Object.assign(ret, vm.$mp.data || {});
  10402. if (
  10403. Array.isArray(vm.$options.behaviors) &&
  10404. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  10405. ) { //form-field
  10406. ret['name'] = vm.name;
  10407. ret['value'] = vm.value;
  10408. }
  10409. return JSON.parse(JSON.stringify(ret, clearInstance))
  10410. }
  10411. var patch = function(oldVnode, vnode) {
  10412. var this$1 = this;
  10413. if (vnode === null) { //destroy
  10414. return
  10415. }
  10416. if (this.mpType === 'page' || this.mpType === 'component') {
  10417. var mpInstance = this.$scope;
  10418. var data = Object.create(null);
  10419. try {
  10420. data = cloneWithData(this);
  10421. } catch (err) {
  10422. console.error(err);
  10423. }
  10424. data.__webviewId__ = mpInstance.data.__webviewId__;
  10425. var mpData = Object.create(null);
  10426. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  10427. mpData[key] = mpInstance.data[key];
  10428. });
  10429. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  10430. if (Object.keys(diffData).length) {
  10431. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"跑腿商家","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10432. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  10433. ']差量更新',
  10434. JSON.stringify(diffData));
  10435. }
  10436. this.__next_tick_pending = true;
  10437. mpInstance.setData(diffData, function () {
  10438. this$1.__next_tick_pending = false;
  10439. flushCallbacks$1(this$1);
  10440. });
  10441. } else {
  10442. flushCallbacks$1(this);
  10443. }
  10444. }
  10445. };
  10446. /* */
  10447. function createEmptyRender() {
  10448. }
  10449. function mountComponent$1(
  10450. vm,
  10451. el,
  10452. hydrating
  10453. ) {
  10454. if (!vm.mpType) {//main.js 中的 new Vue
  10455. return vm
  10456. }
  10457. if (vm.mpType === 'app') {
  10458. vm.$options.render = createEmptyRender;
  10459. }
  10460. if (!vm.$options.render) {
  10461. vm.$options.render = createEmptyRender;
  10462. if (true) {
  10463. /* istanbul ignore if */
  10464. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  10465. vm.$options.el || el) {
  10466. warn(
  10467. 'You are using the runtime-only build of Vue where the template ' +
  10468. 'compiler is not available. Either pre-compile the templates into ' +
  10469. 'render functions, or use the compiler-included build.',
  10470. vm
  10471. );
  10472. } else {
  10473. warn(
  10474. 'Failed to mount component: template or render function not defined.',
  10475. vm
  10476. );
  10477. }
  10478. }
  10479. }
  10480. !vm._$fallback && callHook(vm, 'beforeMount');
  10481. var updateComponent = function () {
  10482. vm._update(vm._render(), hydrating);
  10483. };
  10484. // we set this to vm._watcher inside the watcher's constructor
  10485. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  10486. // component's mounted hook), which relies on vm._watcher being already defined
  10487. new Watcher(vm, updateComponent, noop, {
  10488. before: function before() {
  10489. if (vm._isMounted && !vm._isDestroyed) {
  10490. callHook(vm, 'beforeUpdate');
  10491. }
  10492. }
  10493. }, true /* isRenderWatcher */);
  10494. hydrating = false;
  10495. return vm
  10496. }
  10497. /* */
  10498. function renderClass (
  10499. staticClass,
  10500. dynamicClass
  10501. ) {
  10502. if (isDef(staticClass) || isDef(dynamicClass)) {
  10503. return concat(staticClass, stringifyClass(dynamicClass))
  10504. }
  10505. /* istanbul ignore next */
  10506. return ''
  10507. }
  10508. function concat (a, b) {
  10509. return a ? b ? (a + ' ' + b) : a : (b || '')
  10510. }
  10511. function stringifyClass (value) {
  10512. if (Array.isArray(value)) {
  10513. return stringifyArray(value)
  10514. }
  10515. if (isObject(value)) {
  10516. return stringifyObject(value)
  10517. }
  10518. if (typeof value === 'string') {
  10519. return value
  10520. }
  10521. /* istanbul ignore next */
  10522. return ''
  10523. }
  10524. function stringifyArray (value) {
  10525. var res = '';
  10526. var stringified;
  10527. for (var i = 0, l = value.length; i < l; i++) {
  10528. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  10529. if (res) { res += ' '; }
  10530. res += stringified;
  10531. }
  10532. }
  10533. return res
  10534. }
  10535. function stringifyObject (value) {
  10536. var res = '';
  10537. for (var key in value) {
  10538. if (value[key]) {
  10539. if (res) { res += ' '; }
  10540. res += key;
  10541. }
  10542. }
  10543. return res
  10544. }
  10545. /* */
  10546. var parseStyleText = cached(function (cssText) {
  10547. var res = {};
  10548. var listDelimiter = /;(?![^(]*\))/g;
  10549. var propertyDelimiter = /:(.+)/;
  10550. cssText.split(listDelimiter).forEach(function (item) {
  10551. if (item) {
  10552. var tmp = item.split(propertyDelimiter);
  10553. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  10554. }
  10555. });
  10556. return res
  10557. });
  10558. // normalize possible array / string values into Object
  10559. function normalizeStyleBinding (bindingStyle) {
  10560. if (Array.isArray(bindingStyle)) {
  10561. return toObject(bindingStyle)
  10562. }
  10563. if (typeof bindingStyle === 'string') {
  10564. return parseStyleText(bindingStyle)
  10565. }
  10566. return bindingStyle
  10567. }
  10568. /* */
  10569. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  10570. function getTarget(obj, path) {
  10571. var parts = path.split('.');
  10572. var key = parts[0];
  10573. if (key.indexOf('__$n') === 0) { //number index
  10574. key = parseInt(key.replace('__$n', ''));
  10575. }
  10576. if (parts.length === 1) {
  10577. return obj[key]
  10578. }
  10579. return getTarget(obj[key], parts.slice(1).join('.'))
  10580. }
  10581. function internalMixin(Vue) {
  10582. Vue.config.errorHandler = function(err, vm, info) {
  10583. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10584. console.error(err);
  10585. /* eslint-disable no-undef */
  10586. var app = typeof getApp === 'function' && getApp();
  10587. if (app && app.onError) {
  10588. app.onError(err);
  10589. }
  10590. };
  10591. var oldEmit = Vue.prototype.$emit;
  10592. Vue.prototype.$emit = function(event) {
  10593. if (this.$scope && event) {
  10594. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  10595. if (triggerEvent) {
  10596. try {
  10597. triggerEvent.call(this.$scope, event, {
  10598. __args__: toArray(arguments, 1)
  10599. });
  10600. } catch (error) {
  10601. }
  10602. }
  10603. }
  10604. return oldEmit.apply(this, arguments)
  10605. };
  10606. Vue.prototype.$nextTick = function(fn) {
  10607. return nextTick$1(this, fn)
  10608. };
  10609. MP_METHODS.forEach(function (method) {
  10610. Vue.prototype[method] = function(args) {
  10611. if (this.$scope && this.$scope[method]) {
  10612. return this.$scope[method](args)
  10613. }
  10614. // mp-alipay
  10615. if (typeof my === 'undefined') {
  10616. return
  10617. }
  10618. if (method === 'createSelectorQuery') {
  10619. /* eslint-disable no-undef */
  10620. return my.createSelectorQuery(args)
  10621. } else if (method === 'createIntersectionObserver') {
  10622. /* eslint-disable no-undef */
  10623. return my.createIntersectionObserver(args)
  10624. }
  10625. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10626. };
  10627. });
  10628. Vue.prototype.__init_provide = initProvide;
  10629. Vue.prototype.__init_injections = initInjections;
  10630. Vue.prototype.__call_hook = function(hook, args) {
  10631. var vm = this;
  10632. // #7573 disable dep collection when invoking lifecycle hooks
  10633. pushTarget();
  10634. var handlers = vm.$options[hook];
  10635. var info = hook + " hook";
  10636. var ret;
  10637. if (handlers) {
  10638. for (var i = 0, j = handlers.length; i < j; i++) {
  10639. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10640. }
  10641. }
  10642. if (vm._hasHookEvent) {
  10643. vm.$emit('hook:' + hook, args);
  10644. }
  10645. popTarget();
  10646. return ret
  10647. };
  10648. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10649. if (Array.isArray(modifiers)) {
  10650. if (modifiers.indexOf('trim') !== -1) {
  10651. value = value.trim();
  10652. }
  10653. if (modifiers.indexOf('number') !== -1) {
  10654. value = this._n(value);
  10655. }
  10656. }
  10657. if (!target) {
  10658. target = this;
  10659. }
  10660. // 解决动态属性添加
  10661. Vue.set(target, key, value);
  10662. };
  10663. Vue.prototype.__set_sync = function(target, key, value) {
  10664. if (!target) {
  10665. target = this;
  10666. }
  10667. // 解决动态属性添加
  10668. Vue.set(target, key, value);
  10669. };
  10670. Vue.prototype.__get_orig = function(item) {
  10671. if (isPlainObject(item)) {
  10672. return item['$orig'] || item
  10673. }
  10674. return item
  10675. };
  10676. Vue.prototype.__get_value = function(dataPath, target) {
  10677. return getTarget(target || this, dataPath)
  10678. };
  10679. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10680. return renderClass(staticClass, dynamicClass)
  10681. };
  10682. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10683. if (!dynamicStyle && !staticStyle) {
  10684. return ''
  10685. }
  10686. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10687. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10688. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10689. };
  10690. Vue.prototype.__map = function(val, iteratee) {
  10691. //TODO 暂不考虑 string
  10692. var ret, i, l, keys, key;
  10693. if (Array.isArray(val)) {
  10694. ret = new Array(val.length);
  10695. for (i = 0, l = val.length; i < l; i++) {
  10696. ret[i] = iteratee(val[i], i);
  10697. }
  10698. return ret
  10699. } else if (isObject(val)) {
  10700. keys = Object.keys(val);
  10701. ret = Object.create(null);
  10702. for (i = 0, l = keys.length; i < l; i++) {
  10703. key = keys[i];
  10704. ret[key] = iteratee(val[key], key, i);
  10705. }
  10706. return ret
  10707. } else if (typeof val === 'number') {
  10708. ret = new Array(val);
  10709. for (i = 0, l = val; i < l; i++) {
  10710. // 第一个参数暂时仍和小程序一致
  10711. ret[i] = iteratee(i, i);
  10712. }
  10713. return ret
  10714. }
  10715. return []
  10716. };
  10717. }
  10718. /* */
  10719. var LIFECYCLE_HOOKS$1 = [
  10720. //App
  10721. 'onLaunch',
  10722. 'onShow',
  10723. 'onHide',
  10724. 'onUniNViewMessage',
  10725. 'onPageNotFound',
  10726. 'onThemeChange',
  10727. 'onError',
  10728. 'onUnhandledRejection',
  10729. //Page
  10730. 'onInit',
  10731. 'onLoad',
  10732. // 'onShow',
  10733. 'onReady',
  10734. // 'onHide',
  10735. 'onUnload',
  10736. 'onPullDownRefresh',
  10737. 'onReachBottom',
  10738. 'onTabItemTap',
  10739. 'onAddToFavorites',
  10740. 'onShareTimeline',
  10741. 'onShareAppMessage',
  10742. 'onResize',
  10743. 'onPageScroll',
  10744. 'onNavigationBarButtonTap',
  10745. 'onBackPress',
  10746. 'onNavigationBarSearchInputChanged',
  10747. 'onNavigationBarSearchInputConfirmed',
  10748. 'onNavigationBarSearchInputClicked',
  10749. //Component
  10750. // 'onReady', // 兼容旧版本,应该移除该事件
  10751. 'onPageShow',
  10752. 'onPageHide',
  10753. 'onPageResize',
  10754. 'onUploadDouyinVideo'
  10755. ];
  10756. function lifecycleMixin$1(Vue) {
  10757. //fixed vue-class-component
  10758. var oldExtend = Vue.extend;
  10759. Vue.extend = function(extendOptions) {
  10760. extendOptions = extendOptions || {};
  10761. var methods = extendOptions.methods;
  10762. if (methods) {
  10763. Object.keys(methods).forEach(function (methodName) {
  10764. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10765. extendOptions[methodName] = methods[methodName];
  10766. delete methods[methodName];
  10767. }
  10768. });
  10769. }
  10770. return oldExtend.call(this, extendOptions)
  10771. };
  10772. var strategies = Vue.config.optionMergeStrategies;
  10773. var mergeHook = strategies.created;
  10774. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10775. strategies[hook] = mergeHook;
  10776. });
  10777. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10778. }
  10779. /* */
  10780. // install platform patch function
  10781. Vue.prototype.__patch__ = patch;
  10782. // public mount method
  10783. Vue.prototype.$mount = function(
  10784. el ,
  10785. hydrating
  10786. ) {
  10787. return mountComponent$1(this, el, hydrating)
  10788. };
  10789. lifecycleMixin$1(Vue);
  10790. internalMixin(Vue);
  10791. /* */
  10792. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10793. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10794. /***/ }),
  10795. /***/ 26:
  10796. /*!****************************************************************!*\
  10797. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/pages.json ***!
  10798. \****************************************************************/
  10799. /*! no static exports found */
  10800. /***/ (function(module, exports) {
  10801. /***/ }),
  10802. /***/ 27:
  10803. /*!************************************************************************************!*\
  10804. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  10805. \************************************************************************************/
  10806. /*! no static exports found */
  10807. /***/ (function(module, exports, __webpack_require__) {
  10808. "use strict";
  10809. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  10810. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10811. Object.defineProperty(exports, "__esModule", {
  10812. value: true
  10813. });
  10814. exports.default = void 0;
  10815. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 28));
  10816. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 30));
  10817. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  10818. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10819. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  10820. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 31));
  10821. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 32));
  10822. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 33));
  10823. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 34));
  10824. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 35));
  10825. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  10826. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10827. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10828. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  10829. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 37));
  10830. 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; } } }; }
  10831. 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); }
  10832. 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; }
  10833. 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); }; }
  10834. 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; } }
  10835. 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; }
  10836. 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; }
  10837. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  10838. function n(e) {
  10839. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  10840. }
  10841. function s(e, t, n) {
  10842. return e(n = {
  10843. path: t,
  10844. exports: {},
  10845. require: function require(e, t) {
  10846. return function () {
  10847. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  10848. }(null == t && n.path);
  10849. }
  10850. }, n.exports), n.exports;
  10851. }
  10852. var r = s(function (e, t) {
  10853. var n;
  10854. e.exports = (n = n || function (e, t) {
  10855. var n = Object.create || function () {
  10856. function e() {}
  10857. return function (t) {
  10858. var n;
  10859. return e.prototype = t, n = new e(), e.prototype = null, n;
  10860. };
  10861. }(),
  10862. s = {},
  10863. r = s.lib = {},
  10864. i = r.Base = {
  10865. extend: function extend(e) {
  10866. var t = n(this);
  10867. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  10868. t.$super.init.apply(this, arguments);
  10869. }), t.init.prototype = t, t.$super = this, t;
  10870. },
  10871. create: function create() {
  10872. var e = this.extend();
  10873. return e.init.apply(e, arguments), e;
  10874. },
  10875. init: function init() {},
  10876. mixIn: function mixIn(e) {
  10877. for (var t in e) {
  10878. e.hasOwnProperty(t) && (this[t] = e[t]);
  10879. }
  10880. e.hasOwnProperty("toString") && (this.toString = e.toString);
  10881. },
  10882. clone: function clone() {
  10883. return this.init.prototype.extend(this);
  10884. }
  10885. },
  10886. o = r.WordArray = i.extend({
  10887. init: function init(e, n) {
  10888. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  10889. },
  10890. toString: function toString(e) {
  10891. return (e || c).stringify(this);
  10892. },
  10893. concat: function concat(e) {
  10894. var t = this.words,
  10895. n = e.words,
  10896. s = this.sigBytes,
  10897. r = e.sigBytes;
  10898. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  10899. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10900. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  10901. } else for (i = 0; i < r; i += 4) {
  10902. t[s + i >>> 2] = n[i >>> 2];
  10903. }
  10904. return this.sigBytes += r, this;
  10905. },
  10906. clamp: function clamp() {
  10907. var t = this.words,
  10908. n = this.sigBytes;
  10909. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  10910. },
  10911. clone: function clone() {
  10912. var e = i.clone.call(this);
  10913. return e.words = this.words.slice(0), e;
  10914. },
  10915. random: function random(t) {
  10916. for (var n, s = [], r = function r(t) {
  10917. t = t;
  10918. var n = 987654321,
  10919. s = 4294967295;
  10920. return function () {
  10921. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  10922. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  10923. };
  10924. }, i = 0; i < t; i += 4) {
  10925. var a = r(4294967296 * (n || e.random()));
  10926. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  10927. }
  10928. return new o.init(s, t);
  10929. }
  10930. }),
  10931. a = s.enc = {},
  10932. c = a.Hex = {
  10933. stringify: function stringify(e) {
  10934. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10935. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10936. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  10937. }
  10938. return s.join("");
  10939. },
  10940. parse: function parse(e) {
  10941. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  10942. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  10943. }
  10944. return new o.init(n, t / 2);
  10945. }
  10946. },
  10947. u = a.Latin1 = {
  10948. stringify: function stringify(e) {
  10949. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10950. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10951. s.push(String.fromCharCode(i));
  10952. }
  10953. return s.join("");
  10954. },
  10955. parse: function parse(e) {
  10956. for (var t = e.length, n = [], s = 0; s < t; s++) {
  10957. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  10958. }
  10959. return new o.init(n, t);
  10960. }
  10961. },
  10962. h = a.Utf8 = {
  10963. stringify: function stringify(e) {
  10964. try {
  10965. return decodeURIComponent(escape(u.stringify(e)));
  10966. } catch (e) {
  10967. throw new Error("Malformed UTF-8 data");
  10968. }
  10969. },
  10970. parse: function parse(e) {
  10971. return u.parse(unescape(encodeURIComponent(e)));
  10972. }
  10973. },
  10974. l = r.BufferedBlockAlgorithm = i.extend({
  10975. reset: function reset() {
  10976. this._data = new o.init(), this._nDataBytes = 0;
  10977. },
  10978. _append: function _append(e) {
  10979. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  10980. },
  10981. _process: function _process(t) {
  10982. var n = this._data,
  10983. s = n.words,
  10984. r = n.sigBytes,
  10985. i = this.blockSize,
  10986. a = r / (4 * i),
  10987. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  10988. u = e.min(4 * c, r);
  10989. if (c) {
  10990. for (var h = 0; h < c; h += i) {
  10991. this._doProcessBlock(s, h);
  10992. }
  10993. var l = s.splice(0, c);
  10994. n.sigBytes -= u;
  10995. }
  10996. return new o.init(l, u);
  10997. },
  10998. clone: function clone() {
  10999. var e = i.clone.call(this);
  11000. return e._data = this._data.clone(), e;
  11001. },
  11002. _minBufferSize: 0
  11003. });
  11004. r.Hasher = l.extend({
  11005. cfg: i.extend(),
  11006. init: function init(e) {
  11007. this.cfg = this.cfg.extend(e), this.reset();
  11008. },
  11009. reset: function reset() {
  11010. l.reset.call(this), this._doReset();
  11011. },
  11012. update: function update(e) {
  11013. return this._append(e), this._process(), this;
  11014. },
  11015. finalize: function finalize(e) {
  11016. return e && this._append(e), this._doFinalize();
  11017. },
  11018. blockSize: 16,
  11019. _createHelper: function _createHelper(e) {
  11020. return function (t, n) {
  11021. return new e.init(n).finalize(t);
  11022. };
  11023. },
  11024. _createHmacHelper: function _createHmacHelper(e) {
  11025. return function (t, n) {
  11026. return new d.HMAC.init(e, n).finalize(t);
  11027. };
  11028. }
  11029. });
  11030. var d = s.algo = {};
  11031. return s;
  11032. }(Math), n);
  11033. }),
  11034. i = r,
  11035. o = (s(function (e, t) {
  11036. var n;
  11037. e.exports = (n = i, function (e) {
  11038. var t = n,
  11039. s = t.lib,
  11040. r = s.WordArray,
  11041. i = s.Hasher,
  11042. o = t.algo,
  11043. a = [];
  11044. !function () {
  11045. for (var t = 0; t < 64; t++) {
  11046. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  11047. }
  11048. }();
  11049. var c = o.MD5 = i.extend({
  11050. _doReset: function _doReset() {
  11051. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  11052. },
  11053. _doProcessBlock: function _doProcessBlock(e, t) {
  11054. for (var n = 0; n < 16; n++) {
  11055. var s = t + n,
  11056. r = e[s];
  11057. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  11058. }
  11059. var i = this._hash.words,
  11060. o = e[t + 0],
  11061. c = e[t + 1],
  11062. p = e[t + 2],
  11063. f = e[t + 3],
  11064. g = e[t + 4],
  11065. m = e[t + 5],
  11066. y = e[t + 6],
  11067. _ = e[t + 7],
  11068. w = e[t + 8],
  11069. v = e[t + 9],
  11070. S = e[t + 10],
  11071. I = e[t + 11],
  11072. b = e[t + 12],
  11073. k = e[t + 13],
  11074. T = e[t + 14],
  11075. C = e[t + 15],
  11076. P = i[0],
  11077. A = i[1],
  11078. E = i[2],
  11079. O = i[3];
  11080. P = u(P, A, E, O, o, 7, a[0]), O = u(O, P, A, E, c, 12, a[1]), E = u(E, O, P, A, p, 17, a[2]), A = u(A, E, O, P, f, 22, a[3]), P = u(P, A, E, O, g, 7, a[4]), O = u(O, P, A, E, m, 12, a[5]), E = u(E, O, P, A, y, 17, a[6]), A = u(A, E, O, P, _, 22, a[7]), P = u(P, A, E, O, w, 7, a[8]), O = u(O, P, A, E, v, 12, a[9]), E = u(E, O, P, A, S, 17, a[10]), A = u(A, E, O, P, I, 22, a[11]), P = u(P, A, E, O, b, 7, a[12]), O = u(O, P, A, E, k, 12, a[13]), E = u(E, O, P, A, T, 17, a[14]), P = h(P, A = u(A, E, O, P, C, 22, a[15]), E, O, c, 5, a[16]), O = h(O, P, A, E, y, 9, a[17]), E = h(E, O, P, A, I, 14, a[18]), A = h(A, E, O, P, o, 20, a[19]), P = h(P, A, E, O, m, 5, a[20]), O = h(O, P, A, E, S, 9, a[21]), E = h(E, O, P, A, C, 14, a[22]), A = h(A, E, O, P, g, 20, a[23]), P = h(P, A, E, O, v, 5, a[24]), O = h(O, P, A, E, T, 9, a[25]), E = h(E, O, P, A, f, 14, a[26]), A = h(A, E, O, P, w, 20, a[27]), P = h(P, A, E, O, k, 5, a[28]), O = h(O, P, A, E, p, 9, a[29]), E = h(E, O, P, A, _, 14, a[30]), P = l(P, A = h(A, E, O, P, b, 20, a[31]), E, O, m, 4, a[32]), O = l(O, P, A, E, w, 11, a[33]), E = l(E, O, P, A, I, 16, a[34]), A = l(A, E, O, P, T, 23, a[35]), P = l(P, A, E, O, c, 4, a[36]), O = l(O, P, A, E, g, 11, a[37]), E = l(E, O, P, A, _, 16, a[38]), A = l(A, E, O, P, S, 23, a[39]), P = l(P, A, E, O, k, 4, a[40]), O = l(O, P, A, E, o, 11, a[41]), E = l(E, O, P, A, f, 16, a[42]), A = l(A, E, O, P, y, 23, a[43]), P = l(P, A, E, O, v, 4, a[44]), O = l(O, P, A, E, b, 11, a[45]), E = l(E, O, P, A, C, 16, a[46]), P = d(P, A = l(A, E, O, P, p, 23, a[47]), E, O, o, 6, a[48]), O = d(O, P, A, E, _, 10, a[49]), E = d(E, O, P, A, T, 15, a[50]), A = d(A, E, O, P, m, 21, a[51]), P = d(P, A, E, O, b, 6, a[52]), O = d(O, P, A, E, f, 10, a[53]), E = d(E, O, P, A, S, 15, a[54]), A = d(A, E, O, P, c, 21, a[55]), P = d(P, A, E, O, w, 6, a[56]), O = d(O, P, A, E, C, 10, a[57]), E = d(E, O, P, A, y, 15, a[58]), A = d(A, E, O, P, k, 21, a[59]), P = d(P, A, E, O, g, 6, a[60]), O = d(O, P, A, E, I, 10, a[61]), E = d(E, O, P, A, p, 15, a[62]), A = d(A, E, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + A | 0, i[2] = i[2] + E | 0, i[3] = i[3] + O | 0;
  11081. },
  11082. _doFinalize: function _doFinalize() {
  11083. var t = this._data,
  11084. n = t.words,
  11085. s = 8 * this._nDataBytes,
  11086. r = 8 * t.sigBytes;
  11087. n[r >>> 5] |= 128 << 24 - r % 32;
  11088. var i = e.floor(s / 4294967296),
  11089. o = s;
  11090. 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();
  11091. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  11092. var h = c[u];
  11093. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  11094. }
  11095. return a;
  11096. },
  11097. clone: function clone() {
  11098. var e = i.clone.call(this);
  11099. return e._hash = this._hash.clone(), e;
  11100. }
  11101. });
  11102. function u(e, t, n, s, r, i, o) {
  11103. var a = e + (t & n | ~t & s) + r + o;
  11104. return (a << i | a >>> 32 - i) + t;
  11105. }
  11106. function h(e, t, n, s, r, i, o) {
  11107. var a = e + (t & s | n & ~s) + r + o;
  11108. return (a << i | a >>> 32 - i) + t;
  11109. }
  11110. function l(e, t, n, s, r, i, o) {
  11111. var a = e + (t ^ n ^ s) + r + o;
  11112. return (a << i | a >>> 32 - i) + t;
  11113. }
  11114. function d(e, t, n, s, r, i, o) {
  11115. var a = e + (n ^ (t | ~s)) + r + o;
  11116. return (a << i | a >>> 32 - i) + t;
  11117. }
  11118. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  11119. }(Math), n.MD5);
  11120. }), s(function (e, t) {
  11121. var n;
  11122. e.exports = (n = i, void function () {
  11123. var e = n,
  11124. t = e.lib.Base,
  11125. s = e.enc.Utf8;
  11126. e.algo.HMAC = t.extend({
  11127. init: function init(e, t) {
  11128. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  11129. var n = e.blockSize,
  11130. r = 4 * n;
  11131. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  11132. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  11133. a[u] ^= 1549556828, c[u] ^= 909522486;
  11134. }
  11135. i.sigBytes = o.sigBytes = r, this.reset();
  11136. },
  11137. reset: function reset() {
  11138. var e = this._hasher;
  11139. e.reset(), e.update(this._iKey);
  11140. },
  11141. update: function update(e) {
  11142. return this._hasher.update(e), this;
  11143. },
  11144. finalize: function finalize(e) {
  11145. var t = this._hasher,
  11146. n = t.finalize(e);
  11147. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  11148. }
  11149. });
  11150. }());
  11151. }), s(function (e, t) {
  11152. e.exports = i.HmacMD5;
  11153. })),
  11154. a = s(function (e, t) {
  11155. e.exports = i.enc.Utf8;
  11156. }),
  11157. c = s(function (e, t) {
  11158. var n;
  11159. e.exports = (n = i, function () {
  11160. var e = n,
  11161. t = e.lib.WordArray;
  11162. function s(e, n, s) {
  11163. for (var r = [], i = 0, o = 0; o < n; o++) {
  11164. if (o % 4) {
  11165. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  11166. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  11167. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  11168. }
  11169. }
  11170. return t.create(r, i);
  11171. }
  11172. e.enc.Base64 = {
  11173. stringify: function stringify(e) {
  11174. var t = e.words,
  11175. n = e.sigBytes,
  11176. s = this._map;
  11177. e.clamp();
  11178. for (var r = [], i = 0; i < n; i += 3) {
  11179. 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++) {
  11180. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  11181. }
  11182. }
  11183. var c = s.charAt(64);
  11184. if (c) for (; r.length % 4;) {
  11185. r.push(c);
  11186. }
  11187. return r.join("");
  11188. },
  11189. parse: function parse(e) {
  11190. var t = e.length,
  11191. n = this._map,
  11192. r = this._reverseMap;
  11193. if (!r) {
  11194. r = this._reverseMap = [];
  11195. for (var i = 0; i < n.length; i++) {
  11196. r[n.charCodeAt(i)] = i;
  11197. }
  11198. }
  11199. var o = n.charAt(64);
  11200. if (o) {
  11201. var a = e.indexOf(o);
  11202. -1 !== a && (t = a);
  11203. }
  11204. return s(e, t, r);
  11205. },
  11206. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  11207. };
  11208. }(), n.enc.Base64);
  11209. });
  11210. var u = "FUNCTION",
  11211. h = "OBJECT",
  11212. l = "CLIENT_DB",
  11213. d = "pending",
  11214. p = "fullfilled",
  11215. f = "rejected";
  11216. function g(e) {
  11217. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  11218. }
  11219. function m(e) {
  11220. return "object" === g(e);
  11221. }
  11222. function y(e) {
  11223. return "function" == typeof e;
  11224. }
  11225. function _(e) {
  11226. return function () {
  11227. try {
  11228. return e.apply(e, arguments);
  11229. } catch (e) {
  11230. console.error(e);
  11231. }
  11232. };
  11233. }
  11234. var w = "REJECTED",
  11235. v = "NOT_PENDING";
  11236. var S = /*#__PURE__*/function () {
  11237. function S() {
  11238. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11239. e = _ref.createPromise,
  11240. _ref$retryRule = _ref.retryRule,
  11241. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  11242. (0, _classCallCheck2.default)(this, S);
  11243. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  11244. }
  11245. (0, _createClass2.default)(S, [{
  11246. key: "needRetry",
  11247. get: function get() {
  11248. if (!this.status) return !0;
  11249. switch (this.retryRule) {
  11250. case w:
  11251. return this.status === f;
  11252. case v:
  11253. return this.status !== d;
  11254. }
  11255. }
  11256. }, {
  11257. key: "exec",
  11258. value: function exec() {
  11259. var _this = this;
  11260. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  11261. return _this.status = p, Promise.resolve(e);
  11262. }, function (e) {
  11263. return _this.status = f, Promise.reject(e);
  11264. }), this.promise) : this.promise;
  11265. }
  11266. }]);
  11267. return S;
  11268. }();
  11269. function I(e) {
  11270. return function (t) {
  11271. return new Promise(function (n, s) {
  11272. uni[e](_objectSpread(_objectSpread({}, t), {}, {
  11273. success: function success(e) {
  11274. n(e);
  11275. },
  11276. fail: function fail(e) {
  11277. s(e);
  11278. }
  11279. }));
  11280. });
  11281. };
  11282. }
  11283. function b(e) {
  11284. return e && "string" == typeof e ? JSON.parse(e) : e;
  11285. }
  11286. var k = "development" === "development",
  11287. T = "mp-weixin",
  11288. C = "true" === undefined || !0 === undefined,
  11289. P = b([]),
  11290. A = "h5" === T ? "web" : "app-plus" === T ? "app" : T,
  11291. E = b({
  11292. "address": [
  11293. "127.0.0.1",
  11294. "192.168.110.96"
  11295. ],
  11296. "debugPort": 9001,
  11297. "initialLaunchType": "local",
  11298. "servePort": 7001,
  11299. "skipFiles": [
  11300. "<node_internals>/**",
  11301. "D:/工具/HBuilderX.3.6.4.20220922/HBuilderX/plugins/unicloud/**/*.js"
  11302. ]
  11303. }
  11304. ),
  11305. O = b([{"provider":"aliyun","spaceName":"gan","spaceId":"mp-20ccbe79-10f8-41d7-a06c-c42581f351c1","clientSecret":"AfDzYAoyZm+JuU0iPWMC5A==","endpoint":"https://api.next.bspapp.com"}]) || [],
  11306. x = true;
  11307. var R = "";
  11308. try {
  11309. R = (__webpack_require__(/*! uni-stat-config */ 38).default || __webpack_require__(/*! uni-stat-config */ 38)).appid;
  11310. } catch (e) {}
  11311. var U = {};
  11312. function L(e) {
  11313. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11314. var n, s;
  11315. return n = U, s = e, Object.prototype.hasOwnProperty.call(n, s) || (U[e] = t), U[e];
  11316. }
  11317. "app" === A && (U = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  11318. var N = ["invoke", "success", "fail", "complete"],
  11319. D = L("_globalUniCloudInterceptor");
  11320. function F(e, t) {
  11321. D[e] || (D[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  11322. N.indexOf(n) > -1 && function (e, t, n) {
  11323. var s = D[e][t];
  11324. s || (s = D[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  11325. }(e, n, t[n]);
  11326. });
  11327. }
  11328. function q(e, t) {
  11329. D[e] || (D[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  11330. N.indexOf(n) > -1 && function (e, t, n) {
  11331. var s = D[e][t];
  11332. if (!s) return;
  11333. var r = s.indexOf(n);
  11334. r > -1 && s.splice(r, 1);
  11335. }(e, n, t[n]);
  11336. }) : delete D[e];
  11337. }
  11338. function M(e, t) {
  11339. return e && 0 !== e.length ? e.reduce(function (e, n) {
  11340. return e.then(function () {
  11341. return n(t);
  11342. });
  11343. }, Promise.resolve()) : Promise.resolve();
  11344. }
  11345. function K(e, t) {
  11346. return D[e] && D[e][t] || [];
  11347. }
  11348. function j(e) {
  11349. F("callObject", e);
  11350. }
  11351. var B = L("_globalUniCloudListener"),
  11352. $ = "response",
  11353. W = "needLogin",
  11354. z = "refreshToken",
  11355. J = "clientdb",
  11356. H = "cloudfunction",
  11357. G = "cloudobject";
  11358. function V(e) {
  11359. return B[e] || (B[e] = []), B[e];
  11360. }
  11361. function Q(e, t) {
  11362. var n = V(e);
  11363. n.includes(t) || n.push(t);
  11364. }
  11365. function Y(e, t) {
  11366. var n = V(e),
  11367. s = n.indexOf(t);
  11368. -1 !== s && n.splice(s, 1);
  11369. }
  11370. function X(e, t) {
  11371. var n = V(e);
  11372. for (var _e2 = 0; _e2 < n.length; _e2++) {
  11373. (0, n[_e2])(t);
  11374. }
  11375. }
  11376. var Z,
  11377. ee = !1;
  11378. function te() {
  11379. return Z || (Z = new Promise(function (e) {
  11380. ee && e(), function t() {
  11381. if ("function" == typeof getCurrentPages) {
  11382. var _t2 = getCurrentPages();
  11383. _t2 && _t2[0] && (ee = !0, e());
  11384. }
  11385. ee || setTimeout(function () {
  11386. t();
  11387. }, 30);
  11388. }();
  11389. }), Z);
  11390. }
  11391. function ne(e) {
  11392. var t = {};
  11393. for (var _n2 in e) {
  11394. var _s2 = e[_n2];
  11395. y(_s2) && (t[_n2] = _(_s2));
  11396. }
  11397. return t;
  11398. }
  11399. var se = /*#__PURE__*/function (_Error) {
  11400. (0, _inherits2.default)(se, _Error);
  11401. var _super = _createSuper(se);
  11402. function se(e) {
  11403. var _this2;
  11404. (0, _classCallCheck2.default)(this, se);
  11405. _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;
  11406. return _this2;
  11407. }
  11408. (0, _createClass2.default)(se, [{
  11409. key: "toJson",
  11410. value: function toJson() {
  11411. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  11412. if (!(e >= 10)) return e++, {
  11413. errCode: this.errCode,
  11414. errMsg: this.errMsg,
  11415. errSubject: this.errSubject,
  11416. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  11417. };
  11418. }
  11419. }]);
  11420. return se;
  11421. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  11422. var re = {
  11423. request: function request(e) {
  11424. return uni.request(e);
  11425. },
  11426. uploadFile: function uploadFile(e) {
  11427. return uni.uploadFile(e);
  11428. },
  11429. setStorageSync: function setStorageSync(e, t) {
  11430. return uni.setStorageSync(e, t);
  11431. },
  11432. getStorageSync: function getStorageSync(e) {
  11433. return uni.getStorageSync(e);
  11434. },
  11435. removeStorageSync: function removeStorageSync(e) {
  11436. return uni.removeStorageSync(e);
  11437. },
  11438. clearStorageSync: function clearStorageSync() {
  11439. return uni.clearStorageSync();
  11440. }
  11441. };
  11442. function ie() {
  11443. return {
  11444. token: re.getStorageSync("uni_id_token") || re.getStorageSync("uniIdToken"),
  11445. tokenExpired: re.getStorageSync("uni_id_token_expired")
  11446. };
  11447. }
  11448. function oe() {
  11449. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11450. e = _ref2.token,
  11451. t = _ref2.tokenExpired;
  11452. e && re.setStorageSync("uni_id_token", e), t && re.setStorageSync("uni_id_token_expired", t);
  11453. }
  11454. var ae, ce;
  11455. function ue() {
  11456. return ae || (ae = uni.getSystemInfoSync()), ae;
  11457. }
  11458. function he() {
  11459. var e, t;
  11460. try {
  11461. if (uni.getLaunchOptionsSync) {
  11462. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  11463. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  11464. _n3 = _uni$getLaunchOptions.scene,
  11465. _s3 = _uni$getLaunchOptions.channel;
  11466. e = _s3, t = _n3;
  11467. }
  11468. } catch (e) {}
  11469. return {
  11470. channel: e,
  11471. scene: t
  11472. };
  11473. }
  11474. function le() {
  11475. var e = uni.getLocale && uni.getLocale() || "en";
  11476. if (ce) return _objectSpread(_objectSpread({}, ce), {}, {
  11477. locale: e,
  11478. LOCALE: e
  11479. });
  11480. var t = ue(),
  11481. n = t.deviceId,
  11482. s = t.osName,
  11483. r = t.uniPlatform,
  11484. i = t.appId,
  11485. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  11486. for (var _e3 = 0; _e3 < o.length; _e3++) {
  11487. delete t[o[_e3]];
  11488. }
  11489. return ce = _objectSpread(_objectSpread({
  11490. PLATFORM: r,
  11491. OS: s,
  11492. APPID: i,
  11493. DEVICEID: n
  11494. }, he()), t), _objectSpread(_objectSpread({}, ce), {}, {
  11495. locale: e,
  11496. LOCALE: e
  11497. });
  11498. }
  11499. var de = {
  11500. sign: function sign(e, t) {
  11501. var n = "";
  11502. return Object.keys(e).sort().forEach(function (t) {
  11503. e[t] && (n = n + "&" + t + "=" + e[t]);
  11504. }), n = n.slice(1), o(n, t).toString();
  11505. },
  11506. wrappedRequest: function wrappedRequest(e, t) {
  11507. return new Promise(function (n, s) {
  11508. t(Object.assign(e, {
  11509. complete: function complete(e) {
  11510. e || (e = {}), k && "web" === A && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  11511. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  11512. if (!e.statusCode || e.statusCode >= 400) return s(new se({
  11513. code: "SYS_ERR",
  11514. message: e.errMsg || "request:fail",
  11515. requestId: t
  11516. }));
  11517. var r = e.data;
  11518. if (r.error) return s(new se({
  11519. code: r.error.code,
  11520. message: r.error.message,
  11521. requestId: t
  11522. }));
  11523. r.result = r.data, r.requestId = t, delete r.data, n(r);
  11524. }
  11525. }));
  11526. });
  11527. },
  11528. toBase64: function toBase64(e) {
  11529. return c.stringify(a.parse(e));
  11530. }
  11531. },
  11532. pe = {
  11533. "uniCloud.init.paramRequired": "{param} required",
  11534. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  11535. };
  11536. var _e4 = (0, _uniI18n.initVueI18n)({
  11537. "zh-Hans": {
  11538. "uniCloud.init.paramRequired": "缺少参数:{param}",
  11539. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  11540. },
  11541. "zh-Hant": {
  11542. "uniCloud.init.paramRequired": "缺少参数:{param}",
  11543. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  11544. },
  11545. en: pe,
  11546. fr: {
  11547. "uniCloud.init.paramRequired": "{param} required",
  11548. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  11549. },
  11550. es: {
  11551. "uniCloud.init.paramRequired": "{param} required",
  11552. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  11553. },
  11554. ja: pe
  11555. }, "zh-Hans"),
  11556. fe = _e4.t;
  11557. var ge = /*#__PURE__*/function () {
  11558. function ge(e) {
  11559. var _this3 = this;
  11560. (0, _classCallCheck2.default)(this, ge);
  11561. ["spaceId", "clientSecret"].forEach(function (t) {
  11562. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(fe("uniCloud.init.paramRequired", {
  11563. param: t
  11564. }));
  11565. }), this.config = Object.assign({}, {
  11566. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  11567. }, 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 = re, this._getAccessTokenPromiseHub = new S({
  11568. createPromise: function createPromise() {
  11569. return _this3.requestAuth(_this3.setupRequest({
  11570. method: "serverless.auth.user.anonymousAuthorize",
  11571. params: "{}"
  11572. }, "auth")).then(function (e) {
  11573. if (!e.result || !e.result.accessToken) throw new se({
  11574. code: "AUTH_FAILED",
  11575. message: "获取accessToken失败"
  11576. });
  11577. _this3.setAccessToken(e.result.accessToken);
  11578. });
  11579. },
  11580. retryRule: v
  11581. });
  11582. }
  11583. (0, _createClass2.default)(ge, [{
  11584. key: "hasAccessToken",
  11585. get: function get() {
  11586. return !!this.accessToken;
  11587. }
  11588. }, {
  11589. key: "setAccessToken",
  11590. value: function setAccessToken(e) {
  11591. this.accessToken = e;
  11592. }
  11593. }, {
  11594. key: "requestWrapped",
  11595. value: function requestWrapped(e) {
  11596. return de.wrappedRequest(e, this.adapter.request);
  11597. }
  11598. }, {
  11599. key: "requestAuth",
  11600. value: function requestAuth(e) {
  11601. return this.requestWrapped(e);
  11602. }
  11603. }, {
  11604. key: "request",
  11605. value: function request(e, t) {
  11606. var _this4 = this;
  11607. return Promise.resolve().then(function () {
  11608. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  11609. return new Promise(function (e, n) {
  11610. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  11611. }).then(function () {
  11612. return _this4.getAccessToken();
  11613. }).then(function () {
  11614. var t = _this4.rebuildRequest(e);
  11615. return _this4.request(t, !0);
  11616. });
  11617. }) : _this4.getAccessToken().then(function () {
  11618. var t = _this4.rebuildRequest(e);
  11619. return _this4.request(t, !0);
  11620. });
  11621. });
  11622. }
  11623. }, {
  11624. key: "rebuildRequest",
  11625. value: function rebuildRequest(e) {
  11626. var t = Object.assign({}, e);
  11627. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = de.sign(t.data, this.config.clientSecret), t;
  11628. }
  11629. }, {
  11630. key: "setupRequest",
  11631. value: function setupRequest(e, t) {
  11632. var n = Object.assign({}, e, {
  11633. spaceId: this.config.spaceId,
  11634. timestamp: Date.now()
  11635. }),
  11636. s = {
  11637. "Content-Type": "application/json"
  11638. };
  11639. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret), {
  11640. url: this.config.requestUrl,
  11641. method: "POST",
  11642. data: n,
  11643. dataType: "json",
  11644. header: s
  11645. };
  11646. }
  11647. }, {
  11648. key: "getAccessToken",
  11649. value: function getAccessToken() {
  11650. return this._getAccessTokenPromiseHub.exec();
  11651. }
  11652. }, {
  11653. key: "authorize",
  11654. value: function () {
  11655. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  11656. return _regenerator.default.wrap(function _callee$(_context) {
  11657. while (1) {
  11658. switch (_context.prev = _context.next) {
  11659. case 0:
  11660. _context.next = 2;
  11661. return this.getAccessToken();
  11662. case 2:
  11663. case "end":
  11664. return _context.stop();
  11665. }
  11666. }
  11667. }, _callee, this);
  11668. }));
  11669. function authorize() {
  11670. return _authorize.apply(this, arguments);
  11671. }
  11672. return authorize;
  11673. }()
  11674. }, {
  11675. key: "callFunction",
  11676. value: function callFunction(e) {
  11677. var t = {
  11678. method: "serverless.function.runtime.invoke",
  11679. params: JSON.stringify({
  11680. functionTarget: e.name,
  11681. functionArgs: e.data || {}
  11682. })
  11683. };
  11684. return this.request(this.setupRequest(t));
  11685. }
  11686. }, {
  11687. key: "getOSSUploadOptionsFromPath",
  11688. value: function getOSSUploadOptionsFromPath(e) {
  11689. var t = {
  11690. method: "serverless.file.resource.generateProximalSign",
  11691. params: JSON.stringify(e)
  11692. };
  11693. return this.request(this.setupRequest(t));
  11694. }
  11695. }, {
  11696. key: "uploadFileToOSS",
  11697. value: function uploadFileToOSS(_ref3) {
  11698. var _this5 = this;
  11699. var e = _ref3.url,
  11700. t = _ref3.formData,
  11701. n = _ref3.name,
  11702. s = _ref3.filePath,
  11703. r = _ref3.fileType,
  11704. i = _ref3.onUploadProgress;
  11705. return new Promise(function (o, a) {
  11706. var c = _this5.adapter.uploadFile({
  11707. url: e,
  11708. formData: t,
  11709. name: n,
  11710. filePath: s,
  11711. fileType: r,
  11712. header: {
  11713. "X-OSS-server-side-encrpytion": "AES256"
  11714. },
  11715. success: function success(e) {
  11716. e && e.statusCode < 400 ? o(e) : a(new se({
  11717. code: "UPLOAD_FAILED",
  11718. message: "文件上传失败"
  11719. }));
  11720. },
  11721. fail: function fail(e) {
  11722. a(new se({
  11723. code: e.code || "UPLOAD_FAILED",
  11724. message: e.message || e.errMsg || "文件上传失败"
  11725. }));
  11726. }
  11727. });
  11728. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  11729. i({
  11730. loaded: e.totalBytesSent,
  11731. total: e.totalBytesExpectedToSend
  11732. });
  11733. });
  11734. });
  11735. }
  11736. }, {
  11737. key: "reportOSSUpload",
  11738. value: function reportOSSUpload(e) {
  11739. var t = {
  11740. method: "serverless.file.resource.report",
  11741. params: JSON.stringify(e)
  11742. };
  11743. return this.request(this.setupRequest(t));
  11744. }
  11745. }, {
  11746. key: "uploadFile",
  11747. value: function () {
  11748. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  11749. var e, t, _ref4$fileType, n, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _e5, _;
  11750. return _regenerator.default.wrap(function _callee2$(_context2) {
  11751. while (1) {
  11752. switch (_context2.prev = _context2.next) {
  11753. case 0:
  11754. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, s = _ref4.onUploadProgress, r = _ref4.config;
  11755. if (!("string" !== g(t))) {
  11756. _context2.next = 3;
  11757. break;
  11758. }
  11759. throw new se({
  11760. code: "INVALID_PARAM",
  11761. message: "cloudPath必须为字符串类型"
  11762. });
  11763. case 3:
  11764. if (t = t.trim()) {
  11765. _context2.next = 5;
  11766. break;
  11767. }
  11768. throw new se({
  11769. code: "CLOUDPATH_REQUIRED",
  11770. message: "cloudPath不可为空"
  11771. });
  11772. case 5:
  11773. if (!/:\/\//.test(t)) {
  11774. _context2.next = 7;
  11775. break;
  11776. }
  11777. throw new se({
  11778. code: "INVALID_PARAM",
  11779. message: "cloudPath不合法"
  11780. });
  11781. case 7:
  11782. i = r && r.envType || this.config.envType;
  11783. _context2.next = 10;
  11784. return this.getOSSUploadOptionsFromPath({
  11785. env: i,
  11786. filename: t
  11787. });
  11788. case 10:
  11789. o = _context2.sent.result;
  11790. a = "https://" + o.cdnDomain + "/" + o.ossPath;
  11791. c = o.securityToken;
  11792. u = o.accessKeyId;
  11793. h = o.signature;
  11794. l = o.host;
  11795. d = o.ossPath;
  11796. p = o.id;
  11797. f = o.policy;
  11798. m = o.ossCallbackUrl;
  11799. y = {
  11800. "Cache-Control": "max-age=2592000",
  11801. "Content-Disposition": "attachment",
  11802. OSSAccessKeyId: u,
  11803. Signature: h,
  11804. host: l,
  11805. id: p,
  11806. key: d,
  11807. policy: f,
  11808. success_action_status: 200
  11809. };
  11810. if (c && (y["x-oss-security-token"] = c), m) {
  11811. _e5 = JSON.stringify({
  11812. callbackUrl: m,
  11813. callbackBody: JSON.stringify({
  11814. fileId: p,
  11815. spaceId: this.config.spaceId
  11816. }),
  11817. callbackBodyType: "application/json"
  11818. });
  11819. y.callback = de.toBase64(_e5);
  11820. }
  11821. _ = {
  11822. url: "https://" + o.host,
  11823. formData: y,
  11824. fileName: "file",
  11825. name: "file",
  11826. filePath: e,
  11827. fileType: n
  11828. };
  11829. _context2.next = 25;
  11830. return this.uploadFileToOSS(Object.assign({}, _, {
  11831. onUploadProgress: s
  11832. }));
  11833. case 25:
  11834. if (!m) {
  11835. _context2.next = 27;
  11836. break;
  11837. }
  11838. return _context2.abrupt("return", {
  11839. success: !0,
  11840. filePath: e,
  11841. fileID: a
  11842. });
  11843. case 27:
  11844. _context2.next = 29;
  11845. return this.reportOSSUpload({
  11846. id: p
  11847. });
  11848. case 29:
  11849. if (!_context2.sent.success) {
  11850. _context2.next = 31;
  11851. break;
  11852. }
  11853. return _context2.abrupt("return", {
  11854. success: !0,
  11855. filePath: e,
  11856. fileID: a
  11857. });
  11858. case 31:
  11859. throw new se({
  11860. code: "UPLOAD_FAILED",
  11861. message: "文件上传失败"
  11862. });
  11863. case 32:
  11864. case "end":
  11865. return _context2.stop();
  11866. }
  11867. }
  11868. }, _callee2, this);
  11869. }));
  11870. function uploadFile(_x) {
  11871. return _uploadFile.apply(this, arguments);
  11872. }
  11873. return uploadFile;
  11874. }()
  11875. }, {
  11876. key: "getTempFileURL",
  11877. value: function getTempFileURL() {
  11878. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11879. e = _ref5.fileList;
  11880. return new Promise(function (t, n) {
  11881. Array.isArray(e) && 0 !== e.length || n(new se({
  11882. code: "INVALID_PARAM",
  11883. message: "fileList的元素必须是非空的字符串"
  11884. })), t({
  11885. fileList: e.map(function (e) {
  11886. return {
  11887. fileID: e,
  11888. tempFileURL: e
  11889. };
  11890. })
  11891. });
  11892. });
  11893. }
  11894. }, {
  11895. key: "getFileInfo",
  11896. value: function () {
  11897. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  11898. var _ref6,
  11899. e,
  11900. t,
  11901. _args3 = arguments;
  11902. return _regenerator.default.wrap(function _callee3$(_context3) {
  11903. while (1) {
  11904. switch (_context3.prev = _context3.next) {
  11905. case 0:
  11906. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  11907. if (!(!Array.isArray(e) || 0 === e.length)) {
  11908. _context3.next = 3;
  11909. break;
  11910. }
  11911. throw new se({
  11912. code: "INVALID_PARAM",
  11913. message: "fileList的元素必须是非空的字符串"
  11914. });
  11915. case 3:
  11916. t = {
  11917. method: "serverless.file.resource.info",
  11918. params: JSON.stringify({
  11919. id: e.map(function (e) {
  11920. return e.split("?")[0];
  11921. }).join(",")
  11922. })
  11923. };
  11924. _context3.next = 6;
  11925. return this.request(this.setupRequest(t));
  11926. case 6:
  11927. _context3.t0 = _context3.sent.result;
  11928. return _context3.abrupt("return", {
  11929. fileList: _context3.t0
  11930. });
  11931. case 8:
  11932. case "end":
  11933. return _context3.stop();
  11934. }
  11935. }
  11936. }, _callee3, this);
  11937. }));
  11938. function getFileInfo() {
  11939. return _getFileInfo.apply(this, arguments);
  11940. }
  11941. return getFileInfo;
  11942. }()
  11943. }]);
  11944. return ge;
  11945. }();
  11946. var me = {
  11947. init: function init(e) {
  11948. var t = new ge(e),
  11949. n = {
  11950. signInAnonymously: function signInAnonymously() {
  11951. return t.authorize();
  11952. },
  11953. getLoginState: function getLoginState() {
  11954. return Promise.resolve(!1);
  11955. }
  11956. };
  11957. return t.auth = function () {
  11958. return n;
  11959. }, t.customAuth = t.auth, t;
  11960. }
  11961. };
  11962. var ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  11963. var _e;
  11964. !function (e) {
  11965. e.local = "local", e.none = "none", e.session = "session";
  11966. }(_e || (_e = {}));
  11967. var we = function we() {};
  11968. var ve = function ve() {
  11969. var e;
  11970. if (!Promise) {
  11971. e = function e() {}, e.promise = {};
  11972. var _t3 = function _t3() {
  11973. throw new se({
  11974. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  11975. });
  11976. };
  11977. return Object.defineProperty(e.promise, "then", {
  11978. get: _t3
  11979. }), Object.defineProperty(e.promise, "catch", {
  11980. get: _t3
  11981. }), e;
  11982. }
  11983. var t = new Promise(function (t, n) {
  11984. e = function e(_e6, s) {
  11985. return _e6 ? n(_e6) : t(s);
  11986. };
  11987. });
  11988. return e.promise = t, e;
  11989. };
  11990. function Se(e) {
  11991. return void 0 === e;
  11992. }
  11993. function Ie(e) {
  11994. return "[object Null]" === Object.prototype.toString.call(e);
  11995. }
  11996. var be;
  11997. function ke(e) {
  11998. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  11999. var n;
  12000. var _iterator = _createForOfIteratorHelper(t),
  12001. _step;
  12002. try {
  12003. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  12004. var _e7 = _step.value;
  12005. var _t4 = _e7.isMatch,
  12006. _n4 = _e7.genAdapter,
  12007. _s4 = _e7.runtime;
  12008. if (_t4()) return {
  12009. adapter: _n4(),
  12010. runtime: _s4
  12011. };
  12012. }
  12013. } catch (err) {
  12014. _iterator.e(err);
  12015. } finally {
  12016. _iterator.f();
  12017. }
  12018. }
  12019. !function (e) {
  12020. e.WEB = "web", e.WX_MP = "wx_mp";
  12021. }(be || (be = {}));
  12022. var Te = {
  12023. adapter: null,
  12024. runtime: void 0
  12025. },
  12026. Ce = ["anonymousUuidKey"];
  12027. var Pe = /*#__PURE__*/function (_we) {
  12028. (0, _inherits2.default)(Pe, _we);
  12029. var _super2 = _createSuper(Pe);
  12030. function Pe() {
  12031. var _this6;
  12032. (0, _classCallCheck2.default)(this, Pe);
  12033. _this6 = _super2.call(this), Te.adapter.root.tcbObject || (Te.adapter.root.tcbObject = {});
  12034. return _this6;
  12035. }
  12036. (0, _createClass2.default)(Pe, [{
  12037. key: "setItem",
  12038. value: function setItem(e, t) {
  12039. Te.adapter.root.tcbObject[e] = t;
  12040. }
  12041. }, {
  12042. key: "getItem",
  12043. value: function getItem(e) {
  12044. return Te.adapter.root.tcbObject[e];
  12045. }
  12046. }, {
  12047. key: "removeItem",
  12048. value: function removeItem(e) {
  12049. delete Te.adapter.root.tcbObject[e];
  12050. }
  12051. }, {
  12052. key: "clear",
  12053. value: function clear() {
  12054. delete Te.adapter.root.tcbObject;
  12055. }
  12056. }]);
  12057. return Pe;
  12058. }(we);
  12059. function Ae(e, t) {
  12060. switch (e) {
  12061. case "local":
  12062. return t.localStorage || new Pe();
  12063. case "none":
  12064. return new Pe();
  12065. default:
  12066. return t.sessionStorage || new Pe();
  12067. }
  12068. }
  12069. var Ee = /*#__PURE__*/function () {
  12070. function Ee(e) {
  12071. (0, _classCallCheck2.default)(this, Ee);
  12072. if (!this._storage) {
  12073. this._persistence = Te.adapter.primaryStorage || e.persistence, this._storage = Ae(this._persistence, Te.adapter);
  12074. var _t5 = "access_token_".concat(e.env),
  12075. _n5 = "access_token_expire_".concat(e.env),
  12076. _s5 = "refresh_token_".concat(e.env),
  12077. _r = "anonymous_uuid_".concat(e.env),
  12078. _i = "login_type_".concat(e.env),
  12079. _o = "user_info_".concat(e.env);
  12080. this.keys = {
  12081. accessTokenKey: _t5,
  12082. accessTokenExpireKey: _n5,
  12083. refreshTokenKey: _s5,
  12084. anonymousUuidKey: _r,
  12085. loginTypeKey: _i,
  12086. userInfoKey: _o
  12087. };
  12088. }
  12089. }
  12090. (0, _createClass2.default)(Ee, [{
  12091. key: "updatePersistence",
  12092. value: function updatePersistence(e) {
  12093. if (e === this._persistence) return;
  12094. var t = "local" === this._persistence;
  12095. this._persistence = e;
  12096. var n = Ae(e, Te.adapter);
  12097. for (var _e8 in this.keys) {
  12098. var _s6 = this.keys[_e8];
  12099. if (t && Ce.includes(_e8)) continue;
  12100. var _r2 = this._storage.getItem(_s6);
  12101. Se(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  12102. }
  12103. this._storage = n;
  12104. }
  12105. }, {
  12106. key: "setStore",
  12107. value: function setStore(e, t, n) {
  12108. if (!this._storage) return;
  12109. var s = {
  12110. version: n || "localCachev1",
  12111. content: t
  12112. },
  12113. r = JSON.stringify(s);
  12114. try {
  12115. this._storage.setItem(e, r);
  12116. } catch (e) {
  12117. throw e;
  12118. }
  12119. }
  12120. }, {
  12121. key: "getStore",
  12122. value: function getStore(e, t) {
  12123. try {
  12124. if (!this._storage) return;
  12125. } catch (e) {
  12126. return "";
  12127. }
  12128. t = t || "localCachev1";
  12129. var n = this._storage.getItem(e);
  12130. if (!n) return "";
  12131. if (n.indexOf(t) >= 0) {
  12132. return JSON.parse(n).content;
  12133. }
  12134. return "";
  12135. }
  12136. }, {
  12137. key: "removeStore",
  12138. value: function removeStore(e) {
  12139. this._storage.removeItem(e);
  12140. }
  12141. }]);
  12142. return Ee;
  12143. }();
  12144. var Oe = {},
  12145. xe = {};
  12146. function Re(e) {
  12147. return Oe[e];
  12148. }
  12149. var Ue = /*#__PURE__*/(0, _createClass2.default)(function Ue(e, t) {
  12150. (0, _classCallCheck2.default)(this, Ue);
  12151. this.data = t || null, this.name = e;
  12152. });
  12153. var Le = /*#__PURE__*/function (_Ue) {
  12154. (0, _inherits2.default)(Le, _Ue);
  12155. var _super3 = _createSuper(Le);
  12156. function Le(e, t) {
  12157. var _this7;
  12158. (0, _classCallCheck2.default)(this, Le);
  12159. _this7 = _super3.call(this, "error", {
  12160. error: e,
  12161. data: t
  12162. }), _this7.error = e;
  12163. return _this7;
  12164. }
  12165. return (0, _createClass2.default)(Le);
  12166. }(Ue);
  12167. var Ne = new ( /*#__PURE__*/function () {
  12168. function _class() {
  12169. (0, _classCallCheck2.default)(this, _class);
  12170. this._listeners = {};
  12171. }
  12172. (0, _createClass2.default)(_class, [{
  12173. key: "on",
  12174. value: function on(e, t) {
  12175. return function (e, t, n) {
  12176. n[e] = n[e] || [], n[e].push(t);
  12177. }(e, t, this._listeners), this;
  12178. }
  12179. }, {
  12180. key: "off",
  12181. value: function off(e, t) {
  12182. return function (e, t, n) {
  12183. if (n && n[e]) {
  12184. var _s7 = n[e].indexOf(t);
  12185. -1 !== _s7 && n[e].splice(_s7, 1);
  12186. }
  12187. }(e, t, this._listeners), this;
  12188. }
  12189. }, {
  12190. key: "fire",
  12191. value: function fire(e, t) {
  12192. if (e instanceof Le) return console.error(e.error), this;
  12193. var n = "string" == typeof e ? new Ue(e, t || {}) : e;
  12194. var s = n.name;
  12195. if (this._listens(s)) {
  12196. n.target = this;
  12197. var _e9 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  12198. var _iterator2 = _createForOfIteratorHelper(_e9),
  12199. _step2;
  12200. try {
  12201. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  12202. var _t6 = _step2.value;
  12203. _t6.call(this, n);
  12204. }
  12205. } catch (err) {
  12206. _iterator2.e(err);
  12207. } finally {
  12208. _iterator2.f();
  12209. }
  12210. }
  12211. return this;
  12212. }
  12213. }, {
  12214. key: "_listens",
  12215. value: function _listens(e) {
  12216. return this._listeners[e] && this._listeners[e].length > 0;
  12217. }
  12218. }]);
  12219. return _class;
  12220. }())();
  12221. function De(e, t) {
  12222. Ne.on(e, t);
  12223. }
  12224. function Fe(e) {
  12225. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12226. Ne.fire(e, t);
  12227. }
  12228. function qe(e, t) {
  12229. Ne.off(e, t);
  12230. }
  12231. var Me = "loginStateChanged",
  12232. Ke = "loginStateExpire",
  12233. je = "loginTypeChanged",
  12234. Be = "anonymousConverted",
  12235. $e = "refreshAccessToken";
  12236. var We;
  12237. !function (e) {
  12238. 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";
  12239. }(We || (We = {}));
  12240. var ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  12241. Je = {
  12242. "X-SDK-Version": "1.3.5"
  12243. };
  12244. function He(e, t, n) {
  12245. var s = e[t];
  12246. e[t] = function (t) {
  12247. var r = {},
  12248. i = {};
  12249. n.forEach(function (n) {
  12250. var _n$call = n.call(e, t),
  12251. s = _n$call.data,
  12252. o = _n$call.headers;
  12253. Object.assign(r, s), Object.assign(i, o);
  12254. });
  12255. var o = t.data;
  12256. return o && function () {
  12257. var e;
  12258. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e10 in r) {
  12259. o.append(_e10, r[_e10]);
  12260. }
  12261. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  12262. };
  12263. }
  12264. function Ge() {
  12265. var e = Math.random().toString(16).slice(2);
  12266. return {
  12267. data: {
  12268. seqId: e
  12269. },
  12270. headers: _objectSpread(_objectSpread({}, Je), {}, {
  12271. "x-seqid": e
  12272. })
  12273. };
  12274. }
  12275. var Ve = /*#__PURE__*/function () {
  12276. function Ve() {
  12277. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12278. (0, _classCallCheck2.default)(this, Ve);
  12279. var t;
  12280. this.config = e, this._reqClass = new Te.adapter.reqClass({
  12281. timeout: this.config.timeout,
  12282. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  12283. restrictedMethods: ["post"]
  12284. }), this._cache = Re(this.config.env), this._localCache = (t = this.config.env, xe[t]), He(this._reqClass, "post", [Ge]), He(this._reqClass, "upload", [Ge]), He(this._reqClass, "download", [Ge]);
  12285. }
  12286. (0, _createClass2.default)(Ve, [{
  12287. key: "post",
  12288. value: function () {
  12289. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  12290. return _regenerator.default.wrap(function _callee4$(_context4) {
  12291. while (1) {
  12292. switch (_context4.prev = _context4.next) {
  12293. case 0:
  12294. _context4.next = 2;
  12295. return this._reqClass.post(e);
  12296. case 2:
  12297. return _context4.abrupt("return", _context4.sent);
  12298. case 3:
  12299. case "end":
  12300. return _context4.stop();
  12301. }
  12302. }
  12303. }, _callee4, this);
  12304. }));
  12305. function post(_x2) {
  12306. return _post.apply(this, arguments);
  12307. }
  12308. return post;
  12309. }()
  12310. }, {
  12311. key: "upload",
  12312. value: function () {
  12313. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  12314. return _regenerator.default.wrap(function _callee5$(_context5) {
  12315. while (1) {
  12316. switch (_context5.prev = _context5.next) {
  12317. case 0:
  12318. _context5.next = 2;
  12319. return this._reqClass.upload(e);
  12320. case 2:
  12321. return _context5.abrupt("return", _context5.sent);
  12322. case 3:
  12323. case "end":
  12324. return _context5.stop();
  12325. }
  12326. }
  12327. }, _callee5, this);
  12328. }));
  12329. function upload(_x3) {
  12330. return _upload.apply(this, arguments);
  12331. }
  12332. return upload;
  12333. }()
  12334. }, {
  12335. key: "download",
  12336. value: function () {
  12337. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  12338. return _regenerator.default.wrap(function _callee6$(_context6) {
  12339. while (1) {
  12340. switch (_context6.prev = _context6.next) {
  12341. case 0:
  12342. _context6.next = 2;
  12343. return this._reqClass.download(e);
  12344. case 2:
  12345. return _context6.abrupt("return", _context6.sent);
  12346. case 3:
  12347. case "end":
  12348. return _context6.stop();
  12349. }
  12350. }
  12351. }, _callee6, this);
  12352. }));
  12353. function download(_x4) {
  12354. return _download.apply(this, arguments);
  12355. }
  12356. return download;
  12357. }()
  12358. }, {
  12359. key: "refreshAccessToken",
  12360. value: function () {
  12361. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  12362. var e, t;
  12363. return _regenerator.default.wrap(function _callee7$(_context7) {
  12364. while (1) {
  12365. switch (_context7.prev = _context7.next) {
  12366. case 0:
  12367. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  12368. _context7.prev = 1;
  12369. _context7.next = 4;
  12370. return this._refreshAccessTokenPromise;
  12371. case 4:
  12372. e = _context7.sent;
  12373. _context7.next = 10;
  12374. break;
  12375. case 7:
  12376. _context7.prev = 7;
  12377. _context7.t0 = _context7["catch"](1);
  12378. t = _context7.t0;
  12379. case 10:
  12380. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  12381. _context7.next = 12;
  12382. break;
  12383. }
  12384. throw t;
  12385. case 12:
  12386. return _context7.abrupt("return", e);
  12387. case 13:
  12388. case "end":
  12389. return _context7.stop();
  12390. }
  12391. }
  12392. }, _callee7, this, [[1, 7]]);
  12393. }));
  12394. function refreshAccessToken() {
  12395. return _refreshAccessToken2.apply(this, arguments);
  12396. }
  12397. return refreshAccessToken;
  12398. }()
  12399. }, {
  12400. key: "_refreshAccessToken",
  12401. value: function () {
  12402. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  12403. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e11, _e12, _t7, _s8;
  12404. return _regenerator.default.wrap(function _callee8$(_context8) {
  12405. while (1) {
  12406. switch (_context8.prev = _context8.next) {
  12407. case 0:
  12408. _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;
  12409. this._cache.removeStore(e), this._cache.removeStore(t);
  12410. i = this._cache.getStore(n);
  12411. if (i) {
  12412. _context8.next = 5;
  12413. break;
  12414. }
  12415. throw new se({
  12416. message: "未登录CloudBase"
  12417. });
  12418. case 5:
  12419. o = {
  12420. refresh_token: i
  12421. };
  12422. _context8.next = 8;
  12423. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  12424. case 8:
  12425. a = _context8.sent;
  12426. if (!a.data.code) {
  12427. _context8.next = 21;
  12428. break;
  12429. }
  12430. _e11 = a.data.code;
  12431. if (!("SIGN_PARAM_INVALID" === _e11 || "REFRESH_TOKEN_EXPIRED" === _e11 || "INVALID_REFRESH_TOKEN" === _e11)) {
  12432. _context8.next = 20;
  12433. break;
  12434. }
  12435. if (!(this._cache.getStore(s) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e11)) {
  12436. _context8.next = 19;
  12437. break;
  12438. }
  12439. _e12 = this._cache.getStore(r);
  12440. _t7 = this._cache.getStore(n);
  12441. _context8.next = 17;
  12442. return this.send("auth.signInAnonymously", {
  12443. anonymous_uuid: _e12,
  12444. refresh_token: _t7
  12445. });
  12446. case 17:
  12447. _s8 = _context8.sent;
  12448. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  12449. case 19:
  12450. Fe(Ke), this._cache.removeStore(n);
  12451. case 20:
  12452. throw new se({
  12453. code: a.data.code,
  12454. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  12455. });
  12456. case 21:
  12457. if (!a.data.access_token) {
  12458. _context8.next = 23;
  12459. break;
  12460. }
  12461. return _context8.abrupt("return", (Fe($e), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  12462. accessToken: a.data.access_token,
  12463. accessTokenExpire: a.data.access_token_expire
  12464. }));
  12465. case 23:
  12466. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  12467. case 24:
  12468. case "end":
  12469. return _context8.stop();
  12470. }
  12471. }
  12472. }, _callee8, this);
  12473. }));
  12474. function _refreshAccessToken() {
  12475. return _refreshAccessToken3.apply(this, arguments);
  12476. }
  12477. return _refreshAccessToken;
  12478. }()
  12479. }, {
  12480. key: "getAccessToken",
  12481. value: function () {
  12482. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  12483. var _this$_cache$keys2, e, t, n, s, r, i;
  12484. return _regenerator.default.wrap(function _callee9$(_context9) {
  12485. while (1) {
  12486. switch (_context9.prev = _context9.next) {
  12487. case 0:
  12488. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  12489. if (this._cache.getStore(n)) {
  12490. _context9.next = 3;
  12491. break;
  12492. }
  12493. throw new se({
  12494. message: "refresh token不存在,登录状态异常"
  12495. });
  12496. case 3:
  12497. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  12498. _context9.t0 = this._shouldRefreshAccessTokenHook;
  12499. if (!_context9.t0) {
  12500. _context9.next = 9;
  12501. break;
  12502. }
  12503. _context9.next = 8;
  12504. return this._shouldRefreshAccessTokenHook(s, r);
  12505. case 8:
  12506. _context9.t0 = !_context9.sent;
  12507. case 9:
  12508. _context9.t1 = _context9.t0;
  12509. if (!_context9.t1) {
  12510. _context9.next = 12;
  12511. break;
  12512. }
  12513. i = !1;
  12514. case 12:
  12515. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  12516. accessToken: s,
  12517. accessTokenExpire: r
  12518. });
  12519. case 13:
  12520. case "end":
  12521. return _context9.stop();
  12522. }
  12523. }
  12524. }, _callee9, this);
  12525. }));
  12526. function getAccessToken() {
  12527. return _getAccessToken.apply(this, arguments);
  12528. }
  12529. return getAccessToken;
  12530. }()
  12531. }, {
  12532. key: "request",
  12533. value: function () {
  12534. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  12535. var s, r, i, _e13, o, _e14, _e15, a, c, u, h, l, d, p, f, g;
  12536. return _regenerator.default.wrap(function _callee10$(_context10) {
  12537. while (1) {
  12538. switch (_context10.prev = _context10.next) {
  12539. case 0:
  12540. s = "x-tcb-trace_".concat(this.config.env);
  12541. r = "application/x-www-form-urlencoded";
  12542. i = _objectSpread({
  12543. action: e,
  12544. env: this.config.env,
  12545. dataVersion: "2019-08-16"
  12546. }, t);
  12547. if (!(-1 === ze.indexOf(e))) {
  12548. _context10.next = 10;
  12549. break;
  12550. }
  12551. _e13 = this._cache.keys.refreshTokenKey;
  12552. _context10.t0 = this._cache.getStore(_e13);
  12553. if (!_context10.t0) {
  12554. _context10.next = 10;
  12555. break;
  12556. }
  12557. _context10.next = 9;
  12558. return this.getAccessToken();
  12559. case 9:
  12560. i.access_token = _context10.sent.accessToken;
  12561. case 10:
  12562. if ("storage.uploadFile" === e) {
  12563. o = new FormData();
  12564. for (_e14 in o) {
  12565. o.hasOwnProperty(_e14) && void 0 !== o[_e14] && o.append(_e14, i[_e14]);
  12566. }
  12567. r = "multipart/form-data";
  12568. } else {
  12569. r = "application/json", o = {};
  12570. for (_e15 in i) {
  12571. void 0 !== i[_e15] && (o[_e15] = i[_e15]);
  12572. }
  12573. }
  12574. a = {
  12575. headers: {
  12576. "content-type": r
  12577. }
  12578. };
  12579. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  12580. c = this._localCache.getStore(s);
  12581. c && (a.headers["X-TCB-Trace"] = c);
  12582. u = t.parse, h = t.inQuery, l = t.search;
  12583. d = {
  12584. env: this.config.env
  12585. };
  12586. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  12587. p = function (e, t) {
  12588. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12589. var s = /\?/.test(t);
  12590. var r = "";
  12591. for (var _e16 in n) {
  12592. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e16, "=").concat(encodeURIComponent(n[_e16]));
  12593. }
  12594. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  12595. }(ye, "//tcb-api.tencentcloudapi.com/web", d);
  12596. l && (p += l);
  12597. _context10.next = 22;
  12598. return this.post(_objectSpread({
  12599. url: p,
  12600. data: o
  12601. }, a));
  12602. case 22:
  12603. f = _context10.sent;
  12604. g = f.header && f.header["x-tcb-trace"];
  12605. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  12606. _context10.next = 26;
  12607. break;
  12608. }
  12609. throw new se({
  12610. code: "NETWORK_ERROR",
  12611. message: "network request error"
  12612. });
  12613. case 26:
  12614. return _context10.abrupt("return", f);
  12615. case 27:
  12616. case "end":
  12617. return _context10.stop();
  12618. }
  12619. }
  12620. }, _callee10, this);
  12621. }));
  12622. function request(_x5, _x6, _x7) {
  12623. return _request.apply(this, arguments);
  12624. }
  12625. return request;
  12626. }()
  12627. }, {
  12628. key: "send",
  12629. value: function () {
  12630. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  12631. var t,
  12632. n,
  12633. _n6,
  12634. _args11 = arguments;
  12635. return _regenerator.default.wrap(function _callee11$(_context11) {
  12636. while (1) {
  12637. switch (_context11.prev = _context11.next) {
  12638. case 0:
  12639. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  12640. _context11.next = 3;
  12641. return this.request(e, t, {
  12642. onUploadProgress: t.onUploadProgress
  12643. });
  12644. case 3:
  12645. n = _context11.sent;
  12646. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === ze.indexOf(e))) {
  12647. _context11.next = 13;
  12648. break;
  12649. }
  12650. _context11.next = 7;
  12651. return this.refreshAccessToken();
  12652. case 7:
  12653. _context11.next = 9;
  12654. return this.request(e, t, {
  12655. onUploadProgress: t.onUploadProgress
  12656. });
  12657. case 9:
  12658. _n6 = _context11.sent;
  12659. if (!_n6.data.code) {
  12660. _context11.next = 12;
  12661. break;
  12662. }
  12663. throw new se({
  12664. code: _n6.data.code,
  12665. message: _n6.data.message
  12666. });
  12667. case 12:
  12668. return _context11.abrupt("return", _n6.data);
  12669. case 13:
  12670. if (!n.data.code) {
  12671. _context11.next = 15;
  12672. break;
  12673. }
  12674. throw new se({
  12675. code: n.data.code,
  12676. message: n.data.message
  12677. });
  12678. case 15:
  12679. return _context11.abrupt("return", n.data);
  12680. case 16:
  12681. case "end":
  12682. return _context11.stop();
  12683. }
  12684. }
  12685. }, _callee11, this);
  12686. }));
  12687. function send(_x8) {
  12688. return _send.apply(this, arguments);
  12689. }
  12690. return send;
  12691. }()
  12692. }, {
  12693. key: "setRefreshToken",
  12694. value: function setRefreshToken(e) {
  12695. var _this$_cache$keys3 = this._cache.keys,
  12696. t = _this$_cache$keys3.accessTokenKey,
  12697. n = _this$_cache$keys3.accessTokenExpireKey,
  12698. s = _this$_cache$keys3.refreshTokenKey;
  12699. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12700. }
  12701. }]);
  12702. return Ve;
  12703. }();
  12704. var Qe = {};
  12705. function Ye(e) {
  12706. return Qe[e];
  12707. }
  12708. var Xe = /*#__PURE__*/function () {
  12709. function Xe(e) {
  12710. (0, _classCallCheck2.default)(this, Xe);
  12711. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env);
  12712. }
  12713. (0, _createClass2.default)(Xe, [{
  12714. key: "setRefreshToken",
  12715. value: function setRefreshToken(e) {
  12716. var _this$_cache$keys4 = this._cache.keys,
  12717. t = _this$_cache$keys4.accessTokenKey,
  12718. n = _this$_cache$keys4.accessTokenExpireKey,
  12719. s = _this$_cache$keys4.refreshTokenKey;
  12720. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12721. }
  12722. }, {
  12723. key: "setAccessToken",
  12724. value: function setAccessToken(e, t) {
  12725. var _this$_cache$keys5 = this._cache.keys,
  12726. n = _this$_cache$keys5.accessTokenKey,
  12727. s = _this$_cache$keys5.accessTokenExpireKey;
  12728. this._cache.setStore(n, e), this._cache.setStore(s, t);
  12729. }
  12730. }, {
  12731. key: "refreshUserInfo",
  12732. value: function () {
  12733. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  12734. var _yield$this$_request$, e;
  12735. return _regenerator.default.wrap(function _callee12$(_context12) {
  12736. while (1) {
  12737. switch (_context12.prev = _context12.next) {
  12738. case 0:
  12739. _context12.next = 2;
  12740. return this._request.send("auth.getUserInfo", {});
  12741. case 2:
  12742. _yield$this$_request$ = _context12.sent;
  12743. e = _yield$this$_request$.data;
  12744. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  12745. case 5:
  12746. case "end":
  12747. return _context12.stop();
  12748. }
  12749. }
  12750. }, _callee12, this);
  12751. }));
  12752. function refreshUserInfo() {
  12753. return _refreshUserInfo.apply(this, arguments);
  12754. }
  12755. return refreshUserInfo;
  12756. }()
  12757. }, {
  12758. key: "setLocalUserInfo",
  12759. value: function setLocalUserInfo(e) {
  12760. var t = this._cache.keys.userInfoKey;
  12761. this._cache.setStore(t, e);
  12762. }
  12763. }]);
  12764. return Xe;
  12765. }();
  12766. var Ze = /*#__PURE__*/function () {
  12767. function Ze(e) {
  12768. (0, _classCallCheck2.default)(this, Ze);
  12769. if (!e) throw new se({
  12770. code: "PARAM_ERROR",
  12771. message: "envId is not defined"
  12772. });
  12773. this._envId = e, this._cache = Re(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  12774. }
  12775. (0, _createClass2.default)(Ze, [{
  12776. key: "linkWithTicket",
  12777. value: function linkWithTicket(e) {
  12778. if ("string" != typeof e) throw new se({
  12779. code: "PARAM_ERROR",
  12780. message: "ticket must be string"
  12781. });
  12782. return this._request.send("auth.linkWithTicket", {
  12783. ticket: e
  12784. });
  12785. }
  12786. }, {
  12787. key: "linkWithRedirect",
  12788. value: function linkWithRedirect(e) {
  12789. e.signInWithRedirect();
  12790. }
  12791. }, {
  12792. key: "updatePassword",
  12793. value: function updatePassword(e, t) {
  12794. return this._request.send("auth.updatePassword", {
  12795. oldPassword: t,
  12796. newPassword: e
  12797. });
  12798. }
  12799. }, {
  12800. key: "updateEmail",
  12801. value: function updateEmail(e) {
  12802. return this._request.send("auth.updateEmail", {
  12803. newEmail: e
  12804. });
  12805. }
  12806. }, {
  12807. key: "updateUsername",
  12808. value: function updateUsername(e) {
  12809. if ("string" != typeof e) throw new se({
  12810. code: "PARAM_ERROR",
  12811. message: "username must be a string"
  12812. });
  12813. return this._request.send("auth.updateUsername", {
  12814. username: e
  12815. });
  12816. }
  12817. }, {
  12818. key: "getLinkedUidList",
  12819. value: function () {
  12820. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  12821. var _yield$this$_request$2, e, t, n;
  12822. return _regenerator.default.wrap(function _callee13$(_context13) {
  12823. while (1) {
  12824. switch (_context13.prev = _context13.next) {
  12825. case 0:
  12826. _context13.next = 2;
  12827. return this._request.send("auth.getLinkedUidList", {});
  12828. case 2:
  12829. _yield$this$_request$2 = _context13.sent;
  12830. e = _yield$this$_request$2.data;
  12831. t = !1;
  12832. n = e.users;
  12833. return _context13.abrupt("return", (n.forEach(function (e) {
  12834. e.wxOpenId && e.wxPublicId && (t = !0);
  12835. }), {
  12836. users: n,
  12837. hasPrimaryUid: t
  12838. }));
  12839. case 7:
  12840. case "end":
  12841. return _context13.stop();
  12842. }
  12843. }
  12844. }, _callee13, this);
  12845. }));
  12846. function getLinkedUidList() {
  12847. return _getLinkedUidList.apply(this, arguments);
  12848. }
  12849. return getLinkedUidList;
  12850. }()
  12851. }, {
  12852. key: "setPrimaryUid",
  12853. value: function setPrimaryUid(e) {
  12854. return this._request.send("auth.setPrimaryUid", {
  12855. uid: e
  12856. });
  12857. }
  12858. }, {
  12859. key: "unlink",
  12860. value: function unlink(e) {
  12861. return this._request.send("auth.unlink", {
  12862. platform: e
  12863. });
  12864. }
  12865. }, {
  12866. key: "update",
  12867. value: function () {
  12868. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  12869. var t, n, s, r, i, o, _yield$this$_request$3, a;
  12870. return _regenerator.default.wrap(function _callee14$(_context14) {
  12871. while (1) {
  12872. switch (_context14.prev = _context14.next) {
  12873. case 0:
  12874. t = e.nickName;
  12875. n = e.gender;
  12876. s = e.avatarUrl;
  12877. r = e.province;
  12878. i = e.country;
  12879. o = e.city;
  12880. _context14.next = 8;
  12881. return this._request.send("auth.updateUserInfo", {
  12882. nickName: t,
  12883. gender: n,
  12884. avatarUrl: s,
  12885. province: r,
  12886. country: i,
  12887. city: o
  12888. });
  12889. case 8:
  12890. _yield$this$_request$3 = _context14.sent;
  12891. a = _yield$this$_request$3.data;
  12892. this.setLocalUserInfo(a);
  12893. case 11:
  12894. case "end":
  12895. return _context14.stop();
  12896. }
  12897. }
  12898. }, _callee14, this);
  12899. }));
  12900. function update(_x9) {
  12901. return _update.apply(this, arguments);
  12902. }
  12903. return update;
  12904. }()
  12905. }, {
  12906. key: "refresh",
  12907. value: function () {
  12908. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  12909. var _yield$this$_request$4, e;
  12910. return _regenerator.default.wrap(function _callee15$(_context15) {
  12911. while (1) {
  12912. switch (_context15.prev = _context15.next) {
  12913. case 0:
  12914. _context15.next = 2;
  12915. return this._request.send("auth.getUserInfo", {});
  12916. case 2:
  12917. _yield$this$_request$4 = _context15.sent;
  12918. e = _yield$this$_request$4.data;
  12919. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  12920. case 5:
  12921. case "end":
  12922. return _context15.stop();
  12923. }
  12924. }
  12925. }, _callee15, this);
  12926. }));
  12927. function refresh() {
  12928. return _refresh.apply(this, arguments);
  12929. }
  12930. return refresh;
  12931. }()
  12932. }, {
  12933. key: "setUserInfo",
  12934. value: function setUserInfo() {
  12935. var _this8 = this;
  12936. var e = this._cache.keys.userInfoKey,
  12937. t = this._cache.getStore(e);
  12938. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  12939. _this8[e] = t[e];
  12940. }), this.location = {
  12941. country: t.country,
  12942. province: t.province,
  12943. city: t.city
  12944. };
  12945. }
  12946. }, {
  12947. key: "setLocalUserInfo",
  12948. value: function setLocalUserInfo(e) {
  12949. var t = this._cache.keys.userInfoKey;
  12950. this._cache.setStore(t, e), this.setUserInfo();
  12951. }
  12952. }]);
  12953. return Ze;
  12954. }();
  12955. var et = /*#__PURE__*/function () {
  12956. function et(e) {
  12957. (0, _classCallCheck2.default)(this, et);
  12958. if (!e) throw new se({
  12959. code: "PARAM_ERROR",
  12960. message: "envId is not defined"
  12961. });
  12962. this._cache = Re(e);
  12963. var _this$_cache$keys6 = this._cache.keys,
  12964. t = _this$_cache$keys6.refreshTokenKey,
  12965. n = _this$_cache$keys6.accessTokenKey,
  12966. s = _this$_cache$keys6.accessTokenExpireKey,
  12967. r = this._cache.getStore(t),
  12968. i = this._cache.getStore(n),
  12969. o = this._cache.getStore(s);
  12970. this.credential = {
  12971. refreshToken: r,
  12972. accessToken: i,
  12973. accessTokenExpire: o
  12974. }, this.user = new Ze(e);
  12975. }
  12976. (0, _createClass2.default)(et, [{
  12977. key: "isAnonymousAuth",
  12978. get: function get() {
  12979. return this.loginType === We.ANONYMOUS;
  12980. }
  12981. }, {
  12982. key: "isCustomAuth",
  12983. get: function get() {
  12984. return this.loginType === We.CUSTOM;
  12985. }
  12986. }, {
  12987. key: "isWeixinAuth",
  12988. get: function get() {
  12989. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  12990. }
  12991. }, {
  12992. key: "loginType",
  12993. get: function get() {
  12994. return this._cache.getStore(this._cache.keys.loginTypeKey);
  12995. }
  12996. }]);
  12997. return et;
  12998. }();
  12999. var tt = /*#__PURE__*/function (_Xe) {
  13000. (0, _inherits2.default)(tt, _Xe);
  13001. var _super4 = _createSuper(tt);
  13002. function tt() {
  13003. (0, _classCallCheck2.default)(this, tt);
  13004. return _super4.apply(this, arguments);
  13005. }
  13006. (0, _createClass2.default)(tt, [{
  13007. key: "signIn",
  13008. value: function () {
  13009. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  13010. var _this$_cache$keys7, e, t, n, s, r, _e17;
  13011. return _regenerator.default.wrap(function _callee16$(_context16) {
  13012. while (1) {
  13013. switch (_context16.prev = _context16.next) {
  13014. case 0:
  13015. this._cache.updatePersistence("local");
  13016. _this$_cache$keys7 = this._cache.keys;
  13017. e = _this$_cache$keys7.anonymousUuidKey;
  13018. t = _this$_cache$keys7.refreshTokenKey;
  13019. n = this._cache.getStore(e) || void 0;
  13020. s = this._cache.getStore(t) || void 0;
  13021. _context16.next = 8;
  13022. return this._request.send("auth.signInAnonymously", {
  13023. anonymous_uuid: n,
  13024. refresh_token: s
  13025. });
  13026. case 8:
  13027. r = _context16.sent;
  13028. if (!(r.uuid && r.refresh_token)) {
  13029. _context16.next = 20;
  13030. break;
  13031. }
  13032. this._setAnonymousUUID(r.uuid);
  13033. this.setRefreshToken(r.refresh_token);
  13034. _context16.next = 14;
  13035. return this._request.refreshAccessToken();
  13036. case 14:
  13037. Fe(Me);
  13038. Fe(je, {
  13039. env: this.config.env,
  13040. loginType: We.ANONYMOUS,
  13041. persistence: "local"
  13042. });
  13043. _e17 = new et(this.config.env);
  13044. _context16.next = 19;
  13045. return _e17.user.refresh();
  13046. case 19:
  13047. return _context16.abrupt("return", _e17);
  13048. case 20:
  13049. throw new se({
  13050. message: "匿名登录失败"
  13051. });
  13052. case 21:
  13053. case "end":
  13054. return _context16.stop();
  13055. }
  13056. }
  13057. }, _callee16, this);
  13058. }));
  13059. function signIn() {
  13060. return _signIn.apply(this, arguments);
  13061. }
  13062. return signIn;
  13063. }()
  13064. }, {
  13065. key: "linkAndRetrieveDataWithTicket",
  13066. value: function () {
  13067. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  13068. var _this$_cache$keys8, t, n, s, r, i;
  13069. return _regenerator.default.wrap(function _callee17$(_context17) {
  13070. while (1) {
  13071. switch (_context17.prev = _context17.next) {
  13072. case 0:
  13073. _this$_cache$keys8 = this._cache.keys;
  13074. t = _this$_cache$keys8.anonymousUuidKey;
  13075. n = _this$_cache$keys8.refreshTokenKey;
  13076. s = this._cache.getStore(t);
  13077. r = this._cache.getStore(n);
  13078. _context17.next = 7;
  13079. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  13080. anonymous_uuid: s,
  13081. refresh_token: r,
  13082. ticket: e
  13083. });
  13084. case 7:
  13085. i = _context17.sent;
  13086. if (!i.refresh_token) {
  13087. _context17.next = 16;
  13088. break;
  13089. }
  13090. this._clearAnonymousUUID();
  13091. this.setRefreshToken(i.refresh_token);
  13092. _context17.next = 13;
  13093. return this._request.refreshAccessToken();
  13094. case 13:
  13095. Fe(Be, {
  13096. env: this.config.env
  13097. });
  13098. Fe(je, {
  13099. loginType: We.CUSTOM,
  13100. persistence: "local"
  13101. });
  13102. return _context17.abrupt("return", {
  13103. credential: {
  13104. refreshToken: i.refresh_token
  13105. }
  13106. });
  13107. case 16:
  13108. throw new se({
  13109. message: "匿名转化失败"
  13110. });
  13111. case 17:
  13112. case "end":
  13113. return _context17.stop();
  13114. }
  13115. }
  13116. }, _callee17, this);
  13117. }));
  13118. function linkAndRetrieveDataWithTicket(_x10) {
  13119. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  13120. }
  13121. return linkAndRetrieveDataWithTicket;
  13122. }()
  13123. }, {
  13124. key: "_setAnonymousUUID",
  13125. value: function _setAnonymousUUID(e) {
  13126. var _this$_cache$keys9 = this._cache.keys,
  13127. t = _this$_cache$keys9.anonymousUuidKey,
  13128. n = _this$_cache$keys9.loginTypeKey;
  13129. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, We.ANONYMOUS);
  13130. }
  13131. }, {
  13132. key: "_clearAnonymousUUID",
  13133. value: function _clearAnonymousUUID() {
  13134. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  13135. }
  13136. }]);
  13137. return tt;
  13138. }(Xe);
  13139. var nt = /*#__PURE__*/function (_Xe2) {
  13140. (0, _inherits2.default)(nt, _Xe2);
  13141. var _super5 = _createSuper(nt);
  13142. function nt() {
  13143. (0, _classCallCheck2.default)(this, nt);
  13144. return _super5.apply(this, arguments);
  13145. }
  13146. (0, _createClass2.default)(nt, [{
  13147. key: "signIn",
  13148. value: function () {
  13149. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  13150. var t, n;
  13151. return _regenerator.default.wrap(function _callee18$(_context18) {
  13152. while (1) {
  13153. switch (_context18.prev = _context18.next) {
  13154. case 0:
  13155. if (!("string" != typeof e)) {
  13156. _context18.next = 2;
  13157. break;
  13158. }
  13159. throw new se({
  13160. code: "PARAM_ERROR",
  13161. message: "ticket must be a string"
  13162. });
  13163. case 2:
  13164. t = this._cache.keys.refreshTokenKey;
  13165. _context18.next = 5;
  13166. return this._request.send("auth.signInWithTicket", {
  13167. ticket: e,
  13168. refresh_token: this._cache.getStore(t) || ""
  13169. });
  13170. case 5:
  13171. n = _context18.sent;
  13172. if (!n.refresh_token) {
  13173. _context18.next = 15;
  13174. break;
  13175. }
  13176. this.setRefreshToken(n.refresh_token);
  13177. _context18.next = 10;
  13178. return this._request.refreshAccessToken();
  13179. case 10:
  13180. Fe(Me);
  13181. Fe(je, {
  13182. env: this.config.env,
  13183. loginType: We.CUSTOM,
  13184. persistence: this.config.persistence
  13185. });
  13186. _context18.next = 14;
  13187. return this.refreshUserInfo();
  13188. case 14:
  13189. return _context18.abrupt("return", new et(this.config.env));
  13190. case 15:
  13191. throw new se({
  13192. message: "自定义登录失败"
  13193. });
  13194. case 16:
  13195. case "end":
  13196. return _context18.stop();
  13197. }
  13198. }
  13199. }, _callee18, this);
  13200. }));
  13201. function signIn(_x11) {
  13202. return _signIn2.apply(this, arguments);
  13203. }
  13204. return signIn;
  13205. }()
  13206. }]);
  13207. return nt;
  13208. }(Xe);
  13209. var st = /*#__PURE__*/function (_Xe3) {
  13210. (0, _inherits2.default)(st, _Xe3);
  13211. var _super6 = _createSuper(st);
  13212. function st() {
  13213. (0, _classCallCheck2.default)(this, st);
  13214. return _super6.apply(this, arguments);
  13215. }
  13216. (0, _createClass2.default)(st, [{
  13217. key: "signIn",
  13218. value: function () {
  13219. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  13220. var n, s, r, i, o;
  13221. return _regenerator.default.wrap(function _callee19$(_context19) {
  13222. while (1) {
  13223. switch (_context19.prev = _context19.next) {
  13224. case 0:
  13225. if (!("string" != typeof e)) {
  13226. _context19.next = 2;
  13227. break;
  13228. }
  13229. throw new se({
  13230. code: "PARAM_ERROR",
  13231. message: "email must be a string"
  13232. });
  13233. case 2:
  13234. n = this._cache.keys.refreshTokenKey;
  13235. _context19.next = 5;
  13236. return this._request.send("auth.signIn", {
  13237. loginType: "EMAIL",
  13238. email: e,
  13239. password: t,
  13240. refresh_token: this._cache.getStore(n) || ""
  13241. });
  13242. case 5:
  13243. s = _context19.sent;
  13244. r = s.refresh_token;
  13245. i = s.access_token;
  13246. o = s.access_token_expire;
  13247. if (!r) {
  13248. _context19.next = 22;
  13249. break;
  13250. }
  13251. this.setRefreshToken(r);
  13252. if (!(i && o)) {
  13253. _context19.next = 15;
  13254. break;
  13255. }
  13256. this.setAccessToken(i, o);
  13257. _context19.next = 17;
  13258. break;
  13259. case 15:
  13260. _context19.next = 17;
  13261. return this._request.refreshAccessToken();
  13262. case 17:
  13263. _context19.next = 19;
  13264. return this.refreshUserInfo();
  13265. case 19:
  13266. Fe(Me);
  13267. Fe(je, {
  13268. env: this.config.env,
  13269. loginType: We.EMAIL,
  13270. persistence: this.config.persistence
  13271. });
  13272. return _context19.abrupt("return", new et(this.config.env));
  13273. case 22:
  13274. throw s.code ? new se({
  13275. code: s.code,
  13276. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  13277. }) : new se({
  13278. message: "邮箱登录失败"
  13279. });
  13280. case 23:
  13281. case "end":
  13282. return _context19.stop();
  13283. }
  13284. }
  13285. }, _callee19, this);
  13286. }));
  13287. function signIn(_x12, _x13) {
  13288. return _signIn3.apply(this, arguments);
  13289. }
  13290. return signIn;
  13291. }()
  13292. }, {
  13293. key: "activate",
  13294. value: function () {
  13295. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  13296. return _regenerator.default.wrap(function _callee20$(_context20) {
  13297. while (1) {
  13298. switch (_context20.prev = _context20.next) {
  13299. case 0:
  13300. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  13301. token: e
  13302. }));
  13303. case 1:
  13304. case "end":
  13305. return _context20.stop();
  13306. }
  13307. }
  13308. }, _callee20, this);
  13309. }));
  13310. function activate(_x14) {
  13311. return _activate.apply(this, arguments);
  13312. }
  13313. return activate;
  13314. }()
  13315. }, {
  13316. key: "resetPasswordWithToken",
  13317. value: function () {
  13318. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  13319. return _regenerator.default.wrap(function _callee21$(_context21) {
  13320. while (1) {
  13321. switch (_context21.prev = _context21.next) {
  13322. case 0:
  13323. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  13324. token: e,
  13325. newPassword: t
  13326. }));
  13327. case 1:
  13328. case "end":
  13329. return _context21.stop();
  13330. }
  13331. }
  13332. }, _callee21, this);
  13333. }));
  13334. function resetPasswordWithToken(_x15, _x16) {
  13335. return _resetPasswordWithToken.apply(this, arguments);
  13336. }
  13337. return resetPasswordWithToken;
  13338. }()
  13339. }]);
  13340. return st;
  13341. }(Xe);
  13342. var rt = /*#__PURE__*/function (_Xe4) {
  13343. (0, _inherits2.default)(rt, _Xe4);
  13344. var _super7 = _createSuper(rt);
  13345. function rt() {
  13346. (0, _classCallCheck2.default)(this, rt);
  13347. return _super7.apply(this, arguments);
  13348. }
  13349. (0, _createClass2.default)(rt, [{
  13350. key: "signIn",
  13351. value: function () {
  13352. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  13353. var n, s, r, i, o;
  13354. return _regenerator.default.wrap(function _callee22$(_context22) {
  13355. while (1) {
  13356. switch (_context22.prev = _context22.next) {
  13357. case 0:
  13358. if (!("string" != typeof e)) {
  13359. _context22.next = 2;
  13360. break;
  13361. }
  13362. throw new se({
  13363. code: "PARAM_ERROR",
  13364. message: "username must be a string"
  13365. });
  13366. case 2:
  13367. "string" != typeof t && (t = "", console.warn("password is empty"));
  13368. n = this._cache.keys.refreshTokenKey;
  13369. _context22.next = 6;
  13370. return this._request.send("auth.signIn", {
  13371. loginType: We.USERNAME,
  13372. username: e,
  13373. password: t,
  13374. refresh_token: this._cache.getStore(n) || ""
  13375. });
  13376. case 6:
  13377. s = _context22.sent;
  13378. r = s.refresh_token;
  13379. i = s.access_token_expire;
  13380. o = s.access_token;
  13381. if (!r) {
  13382. _context22.next = 23;
  13383. break;
  13384. }
  13385. this.setRefreshToken(r);
  13386. if (!(o && i)) {
  13387. _context22.next = 16;
  13388. break;
  13389. }
  13390. this.setAccessToken(o, i);
  13391. _context22.next = 18;
  13392. break;
  13393. case 16:
  13394. _context22.next = 18;
  13395. return this._request.refreshAccessToken();
  13396. case 18:
  13397. _context22.next = 20;
  13398. return this.refreshUserInfo();
  13399. case 20:
  13400. Fe(Me);
  13401. Fe(je, {
  13402. env: this.config.env,
  13403. loginType: We.USERNAME,
  13404. persistence: this.config.persistence
  13405. });
  13406. return _context22.abrupt("return", new et(this.config.env));
  13407. case 23:
  13408. throw s.code ? new se({
  13409. code: s.code,
  13410. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  13411. }) : new se({
  13412. message: "用户名密码登录失败"
  13413. });
  13414. case 24:
  13415. case "end":
  13416. return _context22.stop();
  13417. }
  13418. }
  13419. }, _callee22, this);
  13420. }));
  13421. function signIn(_x17, _x18) {
  13422. return _signIn4.apply(this, arguments);
  13423. }
  13424. return signIn;
  13425. }()
  13426. }]);
  13427. return rt;
  13428. }(Xe);
  13429. var it = /*#__PURE__*/function () {
  13430. function it(e) {
  13431. (0, _classCallCheck2.default)(this, it);
  13432. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  13433. }
  13434. (0, _createClass2.default)(it, [{
  13435. key: "currentUser",
  13436. get: function get() {
  13437. var e = this.hasLoginState();
  13438. return e && e.user || null;
  13439. }
  13440. }, {
  13441. key: "loginType",
  13442. get: function get() {
  13443. return this._cache.getStore(this._cache.keys.loginTypeKey);
  13444. }
  13445. }, {
  13446. key: "anonymousAuthProvider",
  13447. value: function anonymousAuthProvider() {
  13448. return new tt(this.config);
  13449. }
  13450. }, {
  13451. key: "customAuthProvider",
  13452. value: function customAuthProvider() {
  13453. return new nt(this.config);
  13454. }
  13455. }, {
  13456. key: "emailAuthProvider",
  13457. value: function emailAuthProvider() {
  13458. return new st(this.config);
  13459. }
  13460. }, {
  13461. key: "usernameAuthProvider",
  13462. value: function usernameAuthProvider() {
  13463. return new rt(this.config);
  13464. }
  13465. }, {
  13466. key: "signInAnonymously",
  13467. value: function () {
  13468. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  13469. return _regenerator.default.wrap(function _callee23$(_context23) {
  13470. while (1) {
  13471. switch (_context23.prev = _context23.next) {
  13472. case 0:
  13473. return _context23.abrupt("return", new tt(this.config).signIn());
  13474. case 1:
  13475. case "end":
  13476. return _context23.stop();
  13477. }
  13478. }
  13479. }, _callee23, this);
  13480. }));
  13481. function signInAnonymously() {
  13482. return _signInAnonymously.apply(this, arguments);
  13483. }
  13484. return signInAnonymously;
  13485. }()
  13486. }, {
  13487. key: "signInWithEmailAndPassword",
  13488. value: function () {
  13489. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  13490. return _regenerator.default.wrap(function _callee24$(_context24) {
  13491. while (1) {
  13492. switch (_context24.prev = _context24.next) {
  13493. case 0:
  13494. return _context24.abrupt("return", new st(this.config).signIn(e, t));
  13495. case 1:
  13496. case "end":
  13497. return _context24.stop();
  13498. }
  13499. }
  13500. }, _callee24, this);
  13501. }));
  13502. function signInWithEmailAndPassword(_x19, _x20) {
  13503. return _signInWithEmailAndPassword.apply(this, arguments);
  13504. }
  13505. return signInWithEmailAndPassword;
  13506. }()
  13507. }, {
  13508. key: "signInWithUsernameAndPassword",
  13509. value: function signInWithUsernameAndPassword(e, t) {
  13510. return new rt(this.config).signIn(e, t);
  13511. }
  13512. }, {
  13513. key: "linkAndRetrieveDataWithTicket",
  13514. value: function () {
  13515. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  13516. return _regenerator.default.wrap(function _callee25$(_context25) {
  13517. while (1) {
  13518. switch (_context25.prev = _context25.next) {
  13519. case 0:
  13520. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De(Be, this._onAnonymousConverted);
  13521. _context25.next = 3;
  13522. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  13523. case 3:
  13524. return _context25.abrupt("return", _context25.sent);
  13525. case 4:
  13526. case "end":
  13527. return _context25.stop();
  13528. }
  13529. }
  13530. }, _callee25, this);
  13531. }));
  13532. function linkAndRetrieveDataWithTicket(_x21) {
  13533. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  13534. }
  13535. return linkAndRetrieveDataWithTicket;
  13536. }()
  13537. }, {
  13538. key: "signOut",
  13539. value: function () {
  13540. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  13541. var _this$_cache$keys10, e, t, n, s, r;
  13542. return _regenerator.default.wrap(function _callee26$(_context26) {
  13543. while (1) {
  13544. switch (_context26.prev = _context26.next) {
  13545. case 0:
  13546. if (!(this.loginType === We.ANONYMOUS)) {
  13547. _context26.next = 2;
  13548. break;
  13549. }
  13550. throw new se({
  13551. message: "匿名用户不支持登出操作"
  13552. });
  13553. case 2:
  13554. _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);
  13555. if (s) {
  13556. _context26.next = 5;
  13557. break;
  13558. }
  13559. return _context26.abrupt("return");
  13560. case 5:
  13561. _context26.next = 7;
  13562. return this._request.send("auth.logout", {
  13563. refresh_token: s
  13564. });
  13565. case 7:
  13566. r = _context26.sent;
  13567. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), Fe(Me), Fe(je, {
  13568. env: this.config.env,
  13569. loginType: We.NULL,
  13570. persistence: this.config.persistence
  13571. }), r));
  13572. case 9:
  13573. case "end":
  13574. return _context26.stop();
  13575. }
  13576. }
  13577. }, _callee26, this);
  13578. }));
  13579. function signOut() {
  13580. return _signOut.apply(this, arguments);
  13581. }
  13582. return signOut;
  13583. }()
  13584. }, {
  13585. key: "signUpWithEmailAndPassword",
  13586. value: function () {
  13587. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  13588. return _regenerator.default.wrap(function _callee27$(_context27) {
  13589. while (1) {
  13590. switch (_context27.prev = _context27.next) {
  13591. case 0:
  13592. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  13593. email: e,
  13594. password: t
  13595. }));
  13596. case 1:
  13597. case "end":
  13598. return _context27.stop();
  13599. }
  13600. }
  13601. }, _callee27, this);
  13602. }));
  13603. function signUpWithEmailAndPassword(_x22, _x23) {
  13604. return _signUpWithEmailAndPassword.apply(this, arguments);
  13605. }
  13606. return signUpWithEmailAndPassword;
  13607. }()
  13608. }, {
  13609. key: "sendPasswordResetEmail",
  13610. value: function () {
  13611. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  13612. return _regenerator.default.wrap(function _callee28$(_context28) {
  13613. while (1) {
  13614. switch (_context28.prev = _context28.next) {
  13615. case 0:
  13616. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  13617. email: e
  13618. }));
  13619. case 1:
  13620. case "end":
  13621. return _context28.stop();
  13622. }
  13623. }
  13624. }, _callee28, this);
  13625. }));
  13626. function sendPasswordResetEmail(_x24) {
  13627. return _sendPasswordResetEmail.apply(this, arguments);
  13628. }
  13629. return sendPasswordResetEmail;
  13630. }()
  13631. }, {
  13632. key: "onLoginStateChanged",
  13633. value: function onLoginStateChanged(e) {
  13634. var _this9 = this;
  13635. De(Me, function () {
  13636. var t = _this9.hasLoginState();
  13637. e.call(_this9, t);
  13638. });
  13639. var t = this.hasLoginState();
  13640. e.call(this, t);
  13641. }
  13642. }, {
  13643. key: "onLoginStateExpired",
  13644. value: function onLoginStateExpired(e) {
  13645. De(Ke, e.bind(this));
  13646. }
  13647. }, {
  13648. key: "onAccessTokenRefreshed",
  13649. value: function onAccessTokenRefreshed(e) {
  13650. De($e, e.bind(this));
  13651. }
  13652. }, {
  13653. key: "onAnonymousConverted",
  13654. value: function onAnonymousConverted(e) {
  13655. De(Be, e.bind(this));
  13656. }
  13657. }, {
  13658. key: "onLoginTypeChanged",
  13659. value: function onLoginTypeChanged(e) {
  13660. var _this10 = this;
  13661. De(je, function () {
  13662. var t = _this10.hasLoginState();
  13663. e.call(_this10, t);
  13664. });
  13665. }
  13666. }, {
  13667. key: "getAccessToken",
  13668. value: function () {
  13669. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  13670. return _regenerator.default.wrap(function _callee29$(_context29) {
  13671. while (1) {
  13672. switch (_context29.prev = _context29.next) {
  13673. case 0:
  13674. _context29.next = 2;
  13675. return this._request.getAccessToken();
  13676. case 2:
  13677. _context29.t0 = _context29.sent.accessToken;
  13678. _context29.t1 = this.config.env;
  13679. return _context29.abrupt("return", {
  13680. accessToken: _context29.t0,
  13681. env: _context29.t1
  13682. });
  13683. case 5:
  13684. case "end":
  13685. return _context29.stop();
  13686. }
  13687. }
  13688. }, _callee29, this);
  13689. }));
  13690. function getAccessToken() {
  13691. return _getAccessToken2.apply(this, arguments);
  13692. }
  13693. return getAccessToken;
  13694. }()
  13695. }, {
  13696. key: "hasLoginState",
  13697. value: function hasLoginState() {
  13698. var e = this._cache.keys.refreshTokenKey;
  13699. return this._cache.getStore(e) ? new et(this.config.env) : null;
  13700. }
  13701. }, {
  13702. key: "isUsernameRegistered",
  13703. value: function () {
  13704. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  13705. var _yield$this$_request$5, t;
  13706. return _regenerator.default.wrap(function _callee30$(_context30) {
  13707. while (1) {
  13708. switch (_context30.prev = _context30.next) {
  13709. case 0:
  13710. if (!("string" != typeof e)) {
  13711. _context30.next = 2;
  13712. break;
  13713. }
  13714. throw new se({
  13715. code: "PARAM_ERROR",
  13716. message: "username must be a string"
  13717. });
  13718. case 2:
  13719. _context30.next = 4;
  13720. return this._request.send("auth.isUsernameRegistered", {
  13721. username: e
  13722. });
  13723. case 4:
  13724. _yield$this$_request$5 = _context30.sent;
  13725. t = _yield$this$_request$5.data;
  13726. return _context30.abrupt("return", t && t.isRegistered);
  13727. case 7:
  13728. case "end":
  13729. return _context30.stop();
  13730. }
  13731. }
  13732. }, _callee30, this);
  13733. }));
  13734. function isUsernameRegistered(_x25) {
  13735. return _isUsernameRegistered.apply(this, arguments);
  13736. }
  13737. return isUsernameRegistered;
  13738. }()
  13739. }, {
  13740. key: "getLoginState",
  13741. value: function getLoginState() {
  13742. return Promise.resolve(this.hasLoginState());
  13743. }
  13744. }, {
  13745. key: "signInWithTicket",
  13746. value: function () {
  13747. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  13748. return _regenerator.default.wrap(function _callee31$(_context31) {
  13749. while (1) {
  13750. switch (_context31.prev = _context31.next) {
  13751. case 0:
  13752. return _context31.abrupt("return", new nt(this.config).signIn(e));
  13753. case 1:
  13754. case "end":
  13755. return _context31.stop();
  13756. }
  13757. }
  13758. }, _callee31, this);
  13759. }));
  13760. function signInWithTicket(_x26) {
  13761. return _signInWithTicket.apply(this, arguments);
  13762. }
  13763. return signInWithTicket;
  13764. }()
  13765. }, {
  13766. key: "shouldRefreshAccessToken",
  13767. value: function shouldRefreshAccessToken(e) {
  13768. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  13769. }
  13770. }, {
  13771. key: "getUserInfo",
  13772. value: function getUserInfo() {
  13773. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  13774. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  13775. requestId: e.seqId
  13776. });
  13777. });
  13778. }
  13779. }, {
  13780. key: "getAuthHeader",
  13781. value: function getAuthHeader() {
  13782. var _this$_cache$keys11 = this._cache.keys,
  13783. e = _this$_cache$keys11.refreshTokenKey,
  13784. t = _this$_cache$keys11.accessTokenKey,
  13785. n = this._cache.getStore(e);
  13786. return {
  13787. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  13788. };
  13789. }
  13790. }, {
  13791. key: "_onAnonymousConverted",
  13792. value: function _onAnonymousConverted(e) {
  13793. var t = e.data.env;
  13794. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  13795. }
  13796. }, {
  13797. key: "_onLoginTypeChanged",
  13798. value: function _onLoginTypeChanged(e) {
  13799. var _e$data = e.data,
  13800. t = _e$data.loginType,
  13801. n = _e$data.persistence,
  13802. s = _e$data.env;
  13803. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  13804. }
  13805. }]);
  13806. return it;
  13807. }();
  13808. var ot = function ot(e, t) {
  13809. t = t || ve();
  13810. var n = Ye(this.config.env),
  13811. s = e.cloudPath,
  13812. r = e.filePath,
  13813. i = e.onUploadProgress,
  13814. _e$fileType = e.fileType,
  13815. o = _e$fileType === void 0 ? "image" : _e$fileType;
  13816. return n.send("storage.getUploadMetadata", {
  13817. path: s
  13818. }).then(function (e) {
  13819. var _e$data2 = e.data,
  13820. a = _e$data2.url,
  13821. c = _e$data2.authorization,
  13822. u = _e$data2.token,
  13823. h = _e$data2.fileId,
  13824. l = _e$data2.cosFileId,
  13825. d = e.requestId,
  13826. p = {
  13827. key: s,
  13828. signature: c,
  13829. "x-cos-meta-fileid": l,
  13830. success_action_status: "201",
  13831. "x-cos-security-token": u
  13832. };
  13833. n.upload({
  13834. url: a,
  13835. data: p,
  13836. file: r,
  13837. name: s,
  13838. fileType: o,
  13839. onUploadProgress: i
  13840. }).then(function (e) {
  13841. 201 === e.statusCode ? t(null, {
  13842. fileID: h,
  13843. requestId: d
  13844. }) : t(new se({
  13845. code: "STORAGE_REQUEST_FAIL",
  13846. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  13847. }));
  13848. }).catch(function (e) {
  13849. t(e);
  13850. });
  13851. }).catch(function (e) {
  13852. t(e);
  13853. }), t.promise;
  13854. },
  13855. at = function at(e, t) {
  13856. t = t || ve();
  13857. var n = Ye(this.config.env),
  13858. s = e.cloudPath;
  13859. return n.send("storage.getUploadMetadata", {
  13860. path: s
  13861. }).then(function (e) {
  13862. t(null, e);
  13863. }).catch(function (e) {
  13864. t(e);
  13865. }), t.promise;
  13866. },
  13867. ct = function ct(_ref7, t) {
  13868. var e = _ref7.fileList;
  13869. if (t = t || ve(), !e || !Array.isArray(e)) return {
  13870. code: "INVALID_PARAM",
  13871. message: "fileList必须是非空的数组"
  13872. };
  13873. var _iterator3 = _createForOfIteratorHelper(e),
  13874. _step3;
  13875. try {
  13876. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  13877. var _t8 = _step3.value;
  13878. if (!_t8 || "string" != typeof _t8) return {
  13879. code: "INVALID_PARAM",
  13880. message: "fileList的元素必须是非空的字符串"
  13881. };
  13882. }
  13883. } catch (err) {
  13884. _iterator3.e(err);
  13885. } finally {
  13886. _iterator3.f();
  13887. }
  13888. var n = {
  13889. fileid_list: e
  13890. };
  13891. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  13892. e.code ? t(null, e) : t(null, {
  13893. fileList: e.data.delete_list,
  13894. requestId: e.requestId
  13895. });
  13896. }).catch(function (e) {
  13897. t(e);
  13898. }), t.promise;
  13899. },
  13900. ut = function ut(_ref8, t) {
  13901. var e = _ref8.fileList;
  13902. t = t || ve(), e && Array.isArray(e) || t(null, {
  13903. code: "INVALID_PARAM",
  13904. message: "fileList必须是非空的数组"
  13905. });
  13906. var n = [];
  13907. var _iterator4 = _createForOfIteratorHelper(e),
  13908. _step4;
  13909. try {
  13910. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  13911. var _s9 = _step4.value;
  13912. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  13913. code: "INVALID_PARAM",
  13914. message: "fileList的元素必须是包含fileID和maxAge的对象"
  13915. }), n.push({
  13916. fileid: _s9.fileID,
  13917. max_age: _s9.maxAge
  13918. })) : "string" == typeof _s9 ? n.push({
  13919. fileid: _s9
  13920. }) : t(null, {
  13921. code: "INVALID_PARAM",
  13922. message: "fileList的元素必须是字符串"
  13923. });
  13924. }
  13925. } catch (err) {
  13926. _iterator4.e(err);
  13927. } finally {
  13928. _iterator4.f();
  13929. }
  13930. var s = {
  13931. file_list: n
  13932. };
  13933. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  13934. e.code ? t(null, e) : t(null, {
  13935. fileList: e.data.download_list,
  13936. requestId: e.requestId
  13937. });
  13938. }).catch(function (e) {
  13939. t(e);
  13940. }), t.promise;
  13941. },
  13942. ht = /*#__PURE__*/function () {
  13943. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  13944. var e, n, s, r;
  13945. return _regenerator.default.wrap(function _callee32$(_context32) {
  13946. while (1) {
  13947. switch (_context32.prev = _context32.next) {
  13948. case 0:
  13949. e = _ref9.fileID;
  13950. _context32.next = 3;
  13951. return ut.call(this, {
  13952. fileList: [{
  13953. fileID: e,
  13954. maxAge: 600
  13955. }]
  13956. });
  13957. case 3:
  13958. n = _context32.sent.fileList[0];
  13959. if (!("SUCCESS" !== n.code)) {
  13960. _context32.next = 6;
  13961. break;
  13962. }
  13963. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  13964. e(n);
  13965. }));
  13966. case 6:
  13967. s = Ye(this.config.env);
  13968. r = n.download_url;
  13969. if (!(r = encodeURI(r), !t)) {
  13970. _context32.next = 10;
  13971. break;
  13972. }
  13973. return _context32.abrupt("return", s.download({
  13974. url: r
  13975. }));
  13976. case 10:
  13977. _context32.t0 = t;
  13978. _context32.next = 13;
  13979. return s.download({
  13980. url: r
  13981. });
  13982. case 13:
  13983. _context32.t1 = _context32.sent;
  13984. (0, _context32.t0)(_context32.t1);
  13985. case 15:
  13986. case "end":
  13987. return _context32.stop();
  13988. }
  13989. }
  13990. }, _callee32, this);
  13991. }));
  13992. return function ht(_x27, _x28) {
  13993. return _ref10.apply(this, arguments);
  13994. };
  13995. }(),
  13996. lt = function lt(_ref11, i) {
  13997. var e = _ref11.name,
  13998. t = _ref11.data,
  13999. n = _ref11.query,
  14000. s = _ref11.parse,
  14001. r = _ref11.search;
  14002. var o = i || ve();
  14003. var a;
  14004. try {
  14005. a = t ? JSON.stringify(t) : "";
  14006. } catch (e) {
  14007. return Promise.reject(e);
  14008. }
  14009. if (!e) return Promise.reject(new se({
  14010. code: "PARAM_ERROR",
  14011. message: "函数名不能为空"
  14012. }));
  14013. var c = {
  14014. inQuery: n,
  14015. parse: s,
  14016. search: r,
  14017. function_name: e,
  14018. request_data: a
  14019. };
  14020. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  14021. if (e.code) o(null, e);else {
  14022. var _t9 = e.data.response_data;
  14023. if (s) o(null, {
  14024. result: _t9,
  14025. requestId: e.requestId
  14026. });else try {
  14027. _t9 = JSON.parse(e.data.response_data), o(null, {
  14028. result: _t9,
  14029. requestId: e.requestId
  14030. });
  14031. } catch (e) {
  14032. o(new se({
  14033. message: "response data must be json"
  14034. }));
  14035. }
  14036. }
  14037. return o.promise;
  14038. }).catch(function (e) {
  14039. o(e);
  14040. }), o.promise;
  14041. },
  14042. dt = {
  14043. timeout: 15e3,
  14044. persistence: "session"
  14045. },
  14046. pt = {};
  14047. var ft = /*#__PURE__*/function () {
  14048. function ft(e) {
  14049. (0, _classCallCheck2.default)(this, ft);
  14050. this.config = e || this.config, this.authObj = void 0;
  14051. }
  14052. (0, _createClass2.default)(ft, [{
  14053. key: "init",
  14054. value: function init(e) {
  14055. switch (Te.adapter || (this.requestClient = new Te.adapter.reqClass({
  14056. timeout: e.timeout || 5e3,
  14057. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  14058. })), this.config = _objectSpread(_objectSpread({}, dt), e), !0) {
  14059. case this.config.timeout > 6e5:
  14060. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  14061. break;
  14062. case this.config.timeout < 100:
  14063. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  14064. }
  14065. return new ft(this.config);
  14066. }
  14067. }, {
  14068. key: "auth",
  14069. value: function auth() {
  14070. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14071. e = _ref12.persistence;
  14072. if (this.authObj) return this.authObj;
  14073. var t = e || Te.adapter.primaryStorage || dt.persistence;
  14074. var n;
  14075. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  14076. var t = e.env;
  14077. Oe[t] = new Ee(e), xe[t] = new Ee(_objectSpread(_objectSpread({}, e), {}, {
  14078. persistence: "local"
  14079. }));
  14080. }(this.config), n = this.config, Qe[n.env] = new Ve(n), this.authObj = new it(this.config), this.authObj;
  14081. }
  14082. }, {
  14083. key: "on",
  14084. value: function on(e, t) {
  14085. return De.apply(this, [e, t]);
  14086. }
  14087. }, {
  14088. key: "off",
  14089. value: function off(e, t) {
  14090. return qe.apply(this, [e, t]);
  14091. }
  14092. }, {
  14093. key: "callFunction",
  14094. value: function callFunction(e, t) {
  14095. return lt.apply(this, [e, t]);
  14096. }
  14097. }, {
  14098. key: "deleteFile",
  14099. value: function deleteFile(e, t) {
  14100. return ct.apply(this, [e, t]);
  14101. }
  14102. }, {
  14103. key: "getTempFileURL",
  14104. value: function getTempFileURL(e, t) {
  14105. return ut.apply(this, [e, t]);
  14106. }
  14107. }, {
  14108. key: "downloadFile",
  14109. value: function downloadFile(e, t) {
  14110. return ht.apply(this, [e, t]);
  14111. }
  14112. }, {
  14113. key: "uploadFile",
  14114. value: function uploadFile(e, t) {
  14115. return ot.apply(this, [e, t]);
  14116. }
  14117. }, {
  14118. key: "getUploadMetadata",
  14119. value: function getUploadMetadata(e, t) {
  14120. return at.apply(this, [e, t]);
  14121. }
  14122. }, {
  14123. key: "registerExtension",
  14124. value: function registerExtension(e) {
  14125. pt[e.name] = e;
  14126. }
  14127. }, {
  14128. key: "invokeExtension",
  14129. value: function () {
  14130. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  14131. var n;
  14132. return _regenerator.default.wrap(function _callee33$(_context33) {
  14133. while (1) {
  14134. switch (_context33.prev = _context33.next) {
  14135. case 0:
  14136. n = pt[e];
  14137. if (n) {
  14138. _context33.next = 3;
  14139. break;
  14140. }
  14141. throw new se({
  14142. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  14143. });
  14144. case 3:
  14145. _context33.next = 5;
  14146. return n.invoke(t, this);
  14147. case 5:
  14148. return _context33.abrupt("return", _context33.sent);
  14149. case 6:
  14150. case "end":
  14151. return _context33.stop();
  14152. }
  14153. }
  14154. }, _callee33, this);
  14155. }));
  14156. function invokeExtension(_x29, _x30) {
  14157. return _invokeExtension.apply(this, arguments);
  14158. }
  14159. return invokeExtension;
  14160. }()
  14161. }, {
  14162. key: "useAdapters",
  14163. value: function useAdapters(e) {
  14164. var _ref13 = ke(e) || {},
  14165. t = _ref13.adapter,
  14166. n = _ref13.runtime;
  14167. t && (Te.adapter = t), n && (Te.runtime = n);
  14168. }
  14169. }]);
  14170. return ft;
  14171. }();
  14172. var gt = new ft();
  14173. function mt(e, t, n) {
  14174. void 0 === n && (n = {});
  14175. var s = /\?/.test(t),
  14176. r = "";
  14177. for (var i in n) {
  14178. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  14179. }
  14180. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  14181. }
  14182. var yt = /*#__PURE__*/function () {
  14183. function yt() {
  14184. (0, _classCallCheck2.default)(this, yt);
  14185. }
  14186. (0, _createClass2.default)(yt, [{
  14187. key: "post",
  14188. value: function post(e) {
  14189. var t = e.url,
  14190. n = e.data,
  14191. s = e.headers;
  14192. return new Promise(function (e, r) {
  14193. re.request({
  14194. url: mt("https:", t),
  14195. data: n,
  14196. method: "POST",
  14197. header: s,
  14198. success: function success(t) {
  14199. e(t);
  14200. },
  14201. fail: function fail(e) {
  14202. r(e);
  14203. }
  14204. });
  14205. });
  14206. }
  14207. }, {
  14208. key: "upload",
  14209. value: function upload(e) {
  14210. return new Promise(function (t, n) {
  14211. var s = e.url,
  14212. r = e.file,
  14213. i = e.data,
  14214. o = e.headers,
  14215. a = e.fileType,
  14216. c = re.uploadFile({
  14217. url: mt("https:", s),
  14218. name: "file",
  14219. formData: Object.assign({}, i),
  14220. filePath: r,
  14221. fileType: a,
  14222. header: o,
  14223. success: function success(e) {
  14224. var n = {
  14225. statusCode: e.statusCode,
  14226. data: e.data || {}
  14227. };
  14228. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  14229. },
  14230. fail: function fail(e) {
  14231. n(new Error(e.errMsg || "uploadFile:fail"));
  14232. }
  14233. });
  14234. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  14235. e.onUploadProgress({
  14236. loaded: t.totalBytesSent,
  14237. total: t.totalBytesExpectedToSend
  14238. });
  14239. });
  14240. });
  14241. }
  14242. }]);
  14243. return yt;
  14244. }();
  14245. var _t = {
  14246. setItem: function setItem(e, t) {
  14247. re.setStorageSync(e, t);
  14248. },
  14249. getItem: function getItem(e) {
  14250. return re.getStorageSync(e);
  14251. },
  14252. removeItem: function removeItem(e) {
  14253. re.removeStorageSync(e);
  14254. },
  14255. clear: function clear() {
  14256. re.clearStorageSync();
  14257. }
  14258. };
  14259. var wt = {
  14260. genAdapter: function genAdapter() {
  14261. return {
  14262. root: {},
  14263. reqClass: yt,
  14264. localStorage: _t,
  14265. primaryStorage: "local"
  14266. };
  14267. },
  14268. isMatch: function isMatch() {
  14269. return !0;
  14270. },
  14271. runtime: "uni_app"
  14272. };
  14273. gt.useAdapters(wt);
  14274. var vt = gt,
  14275. St = vt.init;
  14276. vt.init = function (e) {
  14277. e.env = e.spaceId;
  14278. var t = St.call(this, e);
  14279. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  14280. var n = t.auth;
  14281. return t.auth = function (e) {
  14282. var t = n.call(this, e);
  14283. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  14284. var n;
  14285. t[e] = (n = t[e], function (e) {
  14286. e = e || {};
  14287. var _ne = ne(e),
  14288. t = _ne.success,
  14289. s = _ne.fail,
  14290. r = _ne.complete;
  14291. if (!(t || s || r)) return n.call(this, e);
  14292. n.call(this, e).then(function (e) {
  14293. t && t(e), r && r(e);
  14294. }, function (e) {
  14295. s && s(e), r && r(e);
  14296. });
  14297. }).bind(t);
  14298. }), t;
  14299. }, t.customAuth = t.auth, t;
  14300. };
  14301. var It = vt;
  14302. var bt = /*#__PURE__*/function (_ge) {
  14303. (0, _inherits2.default)(bt, _ge);
  14304. var _super8 = _createSuper(bt);
  14305. function bt() {
  14306. (0, _classCallCheck2.default)(this, bt);
  14307. return _super8.apply(this, arguments);
  14308. }
  14309. (0, _createClass2.default)(bt, [{
  14310. key: "getAccessToken",
  14311. value: function getAccessToken() {
  14312. var _this11 = this;
  14313. return new Promise(function (e, t) {
  14314. var n = "Anonymous_Access_token";
  14315. _this11.setAccessToken(n), e(n);
  14316. });
  14317. }
  14318. }, {
  14319. key: "setupRequest",
  14320. value: function setupRequest(e, t) {
  14321. var n = Object.assign({}, e, {
  14322. spaceId: this.config.spaceId,
  14323. timestamp: Date.now()
  14324. }),
  14325. s = {
  14326. "Content-Type": "application/json"
  14327. };
  14328. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret);
  14329. var r = le();
  14330. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  14331. var _ie = ie(),
  14332. i = _ie.token;
  14333. return s["x-client-token"] = i, {
  14334. url: this.config.requestUrl,
  14335. method: "POST",
  14336. data: n,
  14337. dataType: "json",
  14338. header: JSON.parse(JSON.stringify(s))
  14339. };
  14340. }
  14341. }, {
  14342. key: "uploadFileToOSS",
  14343. value: function uploadFileToOSS(_ref14) {
  14344. var _this12 = this;
  14345. var e = _ref14.url,
  14346. t = _ref14.formData,
  14347. n = _ref14.name,
  14348. s = _ref14.filePath,
  14349. r = _ref14.fileType,
  14350. i = _ref14.onUploadProgress;
  14351. return new Promise(function (o, a) {
  14352. var c = _this12.adapter.uploadFile({
  14353. url: e,
  14354. formData: t,
  14355. name: n,
  14356. filePath: s,
  14357. fileType: r,
  14358. success: function success(e) {
  14359. e && e.statusCode < 400 ? o(e) : a(new se({
  14360. code: "UPLOAD_FAILED",
  14361. message: "文件上传失败"
  14362. }));
  14363. },
  14364. fail: function fail(e) {
  14365. a(new se({
  14366. code: e.code || "UPLOAD_FAILED",
  14367. message: e.message || e.errMsg || "文件上传失败"
  14368. }));
  14369. }
  14370. });
  14371. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  14372. i({
  14373. loaded: e.totalBytesSent,
  14374. total: e.totalBytesExpectedToSend
  14375. });
  14376. });
  14377. });
  14378. }
  14379. }, {
  14380. key: "uploadFile",
  14381. value: function uploadFile(_ref15) {
  14382. var _this13 = this;
  14383. var e = _ref15.filePath,
  14384. t = _ref15.cloudPath,
  14385. _ref15$fileType = _ref15.fileType,
  14386. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  14387. s = _ref15.onUploadProgress;
  14388. if (!t) throw new se({
  14389. code: "CLOUDPATH_REQUIRED",
  14390. message: "cloudPath不可为空"
  14391. });
  14392. var r;
  14393. return this.getOSSUploadOptionsFromPath({
  14394. cloudPath: t
  14395. }).then(function (t) {
  14396. var _t$result = t.result,
  14397. i = _t$result.url,
  14398. o = _t$result.formData,
  14399. a = _t$result.name;
  14400. r = t.result.fileUrl;
  14401. var c = {
  14402. url: i,
  14403. formData: o,
  14404. name: a,
  14405. filePath: e,
  14406. fileType: n
  14407. };
  14408. return _this13.uploadFileToOSS(Object.assign({}, c, {
  14409. onUploadProgress: s
  14410. }));
  14411. }).then(function () {
  14412. return _this13.reportOSSUpload({
  14413. cloudPath: t
  14414. });
  14415. }).then(function (t) {
  14416. return new Promise(function (n, s) {
  14417. t.success ? n({
  14418. success: !0,
  14419. filePath: e,
  14420. fileID: r
  14421. }) : s(new se({
  14422. code: "UPLOAD_FAILED",
  14423. message: "文件上传失败"
  14424. }));
  14425. });
  14426. });
  14427. }
  14428. }, {
  14429. key: "deleteFile",
  14430. value: function deleteFile(_ref16) {
  14431. var e = _ref16.fileList;
  14432. var t = {
  14433. method: "serverless.file.resource.delete",
  14434. params: JSON.stringify({
  14435. fileList: e
  14436. })
  14437. };
  14438. return this.request(this.setupRequest(t)).then(function (e) {
  14439. if (e.success) return e.result;
  14440. throw new se({
  14441. code: "DELETE_FILE_FAILED",
  14442. message: "删除文件失败"
  14443. });
  14444. });
  14445. }
  14446. }, {
  14447. key: "getTempFileURL",
  14448. value: function getTempFileURL() {
  14449. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14450. e = _ref17.fileList;
  14451. if (!Array.isArray(e) || 0 === e.length) throw new se({
  14452. code: "INVALID_PARAM",
  14453. message: "fileList的元素必须是非空的字符串"
  14454. });
  14455. var t = {
  14456. method: "serverless.file.resource.getTempFileURL",
  14457. params: JSON.stringify({
  14458. fileList: e
  14459. })
  14460. };
  14461. return this.request(this.setupRequest(t)).then(function (e) {
  14462. if (e.success) return {
  14463. fileList: e.result.fileList.map(function (e) {
  14464. return {
  14465. fileID: e.fileID,
  14466. tempFileURL: e.tempFileURL
  14467. };
  14468. })
  14469. };
  14470. throw new se({
  14471. code: "GET_TEMP_FILE_URL_FAILED",
  14472. message: "获取临时文件链接失败"
  14473. });
  14474. });
  14475. }
  14476. }]);
  14477. return bt;
  14478. }(ge);
  14479. var kt = {
  14480. init: function init(e) {
  14481. var t = new bt(e),
  14482. n = {
  14483. signInAnonymously: function signInAnonymously() {
  14484. return t.authorize();
  14485. },
  14486. getLoginState: function getLoginState() {
  14487. return Promise.resolve(!1);
  14488. }
  14489. };
  14490. return t.auth = function () {
  14491. return n;
  14492. }, t.customAuth = t.auth, t;
  14493. }
  14494. };
  14495. function Tt(_ref18) {
  14496. var e = _ref18.data;
  14497. var t;
  14498. t = le();
  14499. var n = JSON.parse(JSON.stringify(e || {}));
  14500. if (Object.assign(n, {
  14501. clientInfo: t
  14502. }), !n.uniIdToken) {
  14503. var _ie2 = ie(),
  14504. _e18 = _ie2.token;
  14505. _e18 && (n.uniIdToken = _e18);
  14506. }
  14507. return n;
  14508. }
  14509. function Ct() {
  14510. return _Ct.apply(this, arguments);
  14511. }
  14512. function _Ct() {
  14513. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  14514. var _this26 = this;
  14515. var _ref60,
  14516. e,
  14517. t,
  14518. _this$__dev__,
  14519. n,
  14520. s,
  14521. r,
  14522. i,
  14523. o,
  14524. a,
  14525. _args6 = arguments;
  14526. return _regenerator.default.wrap(function _callee54$(_context54) {
  14527. while (1) {
  14528. switch (_context54.prev = _context54.next) {
  14529. case 0:
  14530. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  14531. _context54.next = 3;
  14532. return this.__dev__.initLocalNetwork();
  14533. case 3:
  14534. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  14535. aliyun: "aliyun",
  14536. tencent: "tcb"
  14537. }[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);
  14538. return _context54.abrupt("return", new Promise(function (t, n) {
  14539. re.request({
  14540. method: "POST",
  14541. url: o,
  14542. data: {
  14543. name: e,
  14544. platform: A,
  14545. provider: r,
  14546. spaceId: i
  14547. },
  14548. timeout: 3e3,
  14549. success: function success(e) {
  14550. t(e);
  14551. },
  14552. fail: function fail() {
  14553. t({
  14554. data: {
  14555. code: "NETWORK_ERROR",
  14556. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  14557. }
  14558. });
  14559. }
  14560. });
  14561. }).then(function () {
  14562. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14563. e = _ref61.data;
  14564. var _ref62 = e || {},
  14565. t = _ref62.code,
  14566. n = _ref62.message;
  14567. return {
  14568. code: 0 === t ? 0 : t || "SYS_ERR",
  14569. message: n || "SYS_ERR"
  14570. };
  14571. }).then(function (_ref63) {
  14572. var n = _ref63.code,
  14573. s = _ref63.message;
  14574. if (0 !== n) {
  14575. switch (n) {
  14576. case "MODULE_ENCRYPTED":
  14577. 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"));
  14578. break;
  14579. case "FUNCTION_ENCRYPTED":
  14580. 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"));
  14581. break;
  14582. case "ACTION_ENCRYPTED":
  14583. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  14584. break;
  14585. case "NETWORK_ERROR":
  14586. {
  14587. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  14588. throw console.error(_e30), new Error(_e30);
  14589. }
  14590. case "SWITCH_TO_CLOUD":
  14591. break;
  14592. default:
  14593. {
  14594. 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");
  14595. throw console.error(_e31), new Error(_e31);
  14596. }
  14597. }
  14598. return _this26._callCloudFunction({
  14599. name: e,
  14600. data: t
  14601. });
  14602. }
  14603. return new Promise(function (e, n) {
  14604. var s = Tt.call(_this26, {
  14605. data: t
  14606. });
  14607. re.request({
  14608. method: "POST",
  14609. url: a,
  14610. data: {
  14611. provider: r,
  14612. platform: A,
  14613. param: s
  14614. },
  14615. success: function success() {
  14616. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14617. t = _ref64.statusCode,
  14618. s = _ref64.data;
  14619. return !t || t >= 400 ? n(new se({
  14620. code: s.code || "SYS_ERR",
  14621. message: s.message || "request:fail"
  14622. })) : e({
  14623. result: s
  14624. });
  14625. },
  14626. fail: function fail(e) {
  14627. n(new se({
  14628. code: e.code || e.errCode || "SYS_ERR",
  14629. message: e.message || e.errMsg || "request:fail"
  14630. }));
  14631. }
  14632. });
  14633. });
  14634. }));
  14635. case 5:
  14636. case "end":
  14637. return _context54.stop();
  14638. }
  14639. }
  14640. }, _callee54, this);
  14641. }));
  14642. return _Ct.apply(this, arguments);
  14643. }
  14644. var Pt = [{
  14645. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  14646. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  14647. mode: "append"
  14648. }];
  14649. var At = /[\\^$.*+?()[\]{}|]/g,
  14650. Et = RegExp(At.source);
  14651. function Ot(e, t, n) {
  14652. return e.replace(new RegExp((s = t) && Et.test(s) ? s.replace(At, "\\$&") : s, "g"), n);
  14653. var s;
  14654. }
  14655. var xt = "none",
  14656. Rt = "request",
  14657. Ut = "response",
  14658. Lt = "both";
  14659. var Nt = /*#__PURE__*/function () {
  14660. function Nt() {
  14661. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14662. e = _ref19.secretType,
  14663. t = _ref19.uniCloudIns;
  14664. (0, _classCallCheck2.default)(this, Nt);
  14665. this.clientType = "", this.secretType = e || xt, this.uniCloudIns = t;
  14666. var _this$uniCloudIns$con = this.uniCloudIns.config,
  14667. n = _this$uniCloudIns$con.provider,
  14668. s = _this$uniCloudIns$con.spaceId;
  14669. var r;
  14670. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  14671. }
  14672. (0, _createClass2.default)(Nt, [{
  14673. key: "getSystemInfo",
  14674. value: function getSystemInfo() {
  14675. return this._systemInfo || (this._systemInfo = ue()), this._systemInfo;
  14676. }
  14677. }, {
  14678. key: "appId",
  14679. get: function get() {
  14680. return this.getSystemInfo().appId;
  14681. }
  14682. }, {
  14683. key: "deviceId",
  14684. get: function get() {
  14685. return this.getSystemInfo().deviceId;
  14686. }
  14687. }, {
  14688. key: "encryptData",
  14689. value: function () {
  14690. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  14691. return _regenerator.default.wrap(function _callee34$(_context34) {
  14692. while (1) {
  14693. switch (_context34.prev = _context34.next) {
  14694. case 0:
  14695. return _context34.abrupt("return", this.secretType === xt ? e : this.platformEncryptData(e));
  14696. case 1:
  14697. case "end":
  14698. return _context34.stop();
  14699. }
  14700. }
  14701. }, _callee34, this);
  14702. }));
  14703. function encryptData(_x31) {
  14704. return _encryptData.apply(this, arguments);
  14705. }
  14706. return encryptData;
  14707. }()
  14708. }, {
  14709. key: "decryptResult",
  14710. value: function () {
  14711. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  14712. var _ref20, t, n;
  14713. return _regenerator.default.wrap(function _callee35$(_context35) {
  14714. while (1) {
  14715. switch (_context35.prev = _context35.next) {
  14716. case 0:
  14717. if (!(this.secretType === xt)) {
  14718. _context35.next = 2;
  14719. break;
  14720. }
  14721. return _context35.abrupt("return", e);
  14722. case 2:
  14723. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  14724. return _context35.abrupt("return", t || !n ? e : this.secretType === Rt ? n : this.platformDecryptResult(e));
  14725. case 4:
  14726. case "end":
  14727. return _context35.stop();
  14728. }
  14729. }
  14730. }, _callee35, this);
  14731. }));
  14732. function decryptResult(_x32) {
  14733. return _decryptResult.apply(this, arguments);
  14734. }
  14735. return decryptResult;
  14736. }()
  14737. }, {
  14738. key: "wrapVerifyClientCallFunction",
  14739. value: function wrapVerifyClientCallFunction(e) {
  14740. var t = this;
  14741. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  14742. var _ref22,
  14743. n,
  14744. _ref22$data,
  14745. s,
  14746. r,
  14747. _args36 = arguments;
  14748. return _regenerator.default.wrap(function _callee36$(_context36) {
  14749. while (1) {
  14750. switch (_context36.prev = _context36.next) {
  14751. case 0:
  14752. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  14753. _context36.next = 3;
  14754. return t.prepare();
  14755. case 3:
  14756. _context36.next = 5;
  14757. return t.platformGetSignOption();
  14758. case 5:
  14759. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  14760. _context36.next = 8;
  14761. return e({
  14762. name: n,
  14763. data: s
  14764. });
  14765. case 8:
  14766. r = _context36.sent;
  14767. _context36.t0 = t.isClientKeyNotFound(r);
  14768. if (!_context36.t0) {
  14769. _context36.next = 19;
  14770. break;
  14771. }
  14772. _context36.next = 13;
  14773. return t.prepare({
  14774. forceUpdate: !0
  14775. });
  14776. case 13:
  14777. _context36.next = 15;
  14778. return t.platformGetSignOption();
  14779. case 15:
  14780. s._uniCloudOptions = _context36.sent;
  14781. _context36.next = 18;
  14782. return e({
  14783. name: n,
  14784. data: s
  14785. });
  14786. case 18:
  14787. r = _context36.sent;
  14788. case 19:
  14789. return _context36.abrupt("return", r);
  14790. case 20:
  14791. case "end":
  14792. return _context36.stop();
  14793. }
  14794. }
  14795. }, _callee36);
  14796. }));
  14797. }
  14798. }, {
  14799. key: "wrapEncryptDataCallFunction",
  14800. value: function wrapEncryptDataCallFunction(e) {
  14801. var t = this;
  14802. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  14803. var _ref24,
  14804. n,
  14805. _ref24$data,
  14806. s,
  14807. r,
  14808. i,
  14809. _r3,
  14810. _args37 = arguments;
  14811. return _regenerator.default.wrap(function _callee37$(_context37) {
  14812. while (1) {
  14813. switch (_context37.prev = _context37.next) {
  14814. case 0:
  14815. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  14816. _context37.next = 3;
  14817. return t.prepare();
  14818. case 3:
  14819. _context37.next = 5;
  14820. return t.encryptData(s);
  14821. case 5:
  14822. r = _context37.sent;
  14823. _context37.next = 8;
  14824. return e({
  14825. name: n,
  14826. data: r
  14827. });
  14828. case 8:
  14829. i = _context37.sent;
  14830. if (!t.isClientKeyNotFound(i)) {
  14831. _context37.next = 21;
  14832. break;
  14833. }
  14834. _context37.next = 12;
  14835. return t.prepare({
  14836. forceUpdate: !0
  14837. });
  14838. case 12:
  14839. _context37.next = 14;
  14840. return t.encryptData(s);
  14841. case 14:
  14842. _r3 = _context37.sent;
  14843. _context37.next = 17;
  14844. return t.platformGetSignOption();
  14845. case 17:
  14846. s._uniCloudOptions = _context37.sent;
  14847. _context37.next = 20;
  14848. return e({
  14849. name: n,
  14850. data: _r3
  14851. });
  14852. case 20:
  14853. i = _context37.sent;
  14854. case 21:
  14855. _context37.next = 23;
  14856. return t.decryptResult(i.result);
  14857. case 23:
  14858. i.result = _context37.sent;
  14859. return _context37.abrupt("return", i);
  14860. case 25:
  14861. case "end":
  14862. return _context37.stop();
  14863. }
  14864. }
  14865. }, _callee37);
  14866. }));
  14867. }
  14868. }]);
  14869. return Nt;
  14870. }();
  14871. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  14872. function Dt(e) {
  14873. return parseInt(e) === e;
  14874. }
  14875. function Ft(e) {
  14876. if (!Dt(e.length)) return !1;
  14877. for (var t = 0; t < e.length; t++) {
  14878. if (!Dt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  14879. }
  14880. return !0;
  14881. }
  14882. function qt(e, t) {
  14883. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  14884. if (Array.isArray(e)) {
  14885. if (!Ft(e)) throw new Error("Array contains invalid value: " + e);
  14886. return new Uint8Array(e);
  14887. }
  14888. if (Dt(e.length) && Ft(e)) return new Uint8Array(e);
  14889. throw new Error("unsupported array-like object");
  14890. }
  14891. function Mt(e) {
  14892. return new Uint8Array(e);
  14893. }
  14894. function Kt(e, t, n, s, r) {
  14895. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  14896. }
  14897. var jt,
  14898. Bt = {
  14899. toBytes: function toBytes(e) {
  14900. var t = [],
  14901. n = 0;
  14902. for (e = encodeURI(e); n < e.length;) {
  14903. var s = e.charCodeAt(n++);
  14904. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  14905. }
  14906. return qt(t);
  14907. },
  14908. fromBytes: function fromBytes(e) {
  14909. for (var t = [], n = 0; n < e.length;) {
  14910. var s = e[n];
  14911. 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);
  14912. }
  14913. return t.join("");
  14914. }
  14915. },
  14916. $t = (jt = "0123456789abcdef", {
  14917. toBytes: function toBytes(e) {
  14918. for (var t = [], n = 0; n < e.length; n += 2) {
  14919. t.push(parseInt(e.substr(n, 2), 16));
  14920. }
  14921. return t;
  14922. },
  14923. fromBytes: function fromBytes(e) {
  14924. for (var t = [], n = 0; n < e.length; n++) {
  14925. var s = e[n];
  14926. t.push(jt[(240 & s) >> 4] + jt[15 & s]);
  14927. }
  14928. return t.join("");
  14929. }
  14930. }),
  14931. Wt = {
  14932. 16: 10,
  14933. 24: 12,
  14934. 32: 14
  14935. },
  14936. zt = [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],
  14937. Jt = [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],
  14938. Ht = [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],
  14939. Gt = [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],
  14940. Vt = [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],
  14941. Qt = [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],
  14942. Yt = [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],
  14943. Xt = [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],
  14944. Zt = [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],
  14945. en = [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],
  14946. tn = [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],
  14947. nn = [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],
  14948. sn = [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],
  14949. rn = [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],
  14950. on = [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];
  14951. function an(e) {
  14952. for (var t = [], n = 0; n < e.length; n += 4) {
  14953. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  14954. }
  14955. return t;
  14956. }
  14957. var cn = /*#__PURE__*/function () {
  14958. function cn(e) {
  14959. (0, _classCallCheck2.default)(this, cn);
  14960. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  14961. Object.defineProperty(this, "key", {
  14962. value: qt(e, !0)
  14963. }), this._prepare();
  14964. }
  14965. (0, _createClass2.default)(cn, [{
  14966. key: "_prepare",
  14967. value: function _prepare() {
  14968. var e = Wt[this.key.length];
  14969. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  14970. this._Ke = [], this._Kd = [];
  14971. for (var t = 0; t <= e; t++) {
  14972. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  14973. }
  14974. var n,
  14975. s = 4 * (e + 1),
  14976. r = this.key.length / 4,
  14977. i = an(this.key);
  14978. for (t = 0; t < r; t++) {
  14979. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  14980. }
  14981. for (var o, a = 0, c = r; c < s;) {
  14982. if (o = i[r - 1], i[0] ^= Jt[o >> 16 & 255] << 24 ^ Jt[o >> 8 & 255] << 16 ^ Jt[255 & o] << 8 ^ Jt[o >> 24 & 255] ^ zt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  14983. i[t] ^= i[t - 1];
  14984. } else {
  14985. for (t = 1; t < r / 2; t++) {
  14986. i[t] ^= i[t - 1];
  14987. }
  14988. o = i[r / 2 - 1], i[r / 2] ^= Jt[255 & o] ^ Jt[o >> 8 & 255] << 8 ^ Jt[o >> 16 & 255] << 16 ^ Jt[o >> 24 & 255] << 24;
  14989. for (t = r / 2 + 1; t < r; t++) {
  14990. i[t] ^= i[t - 1];
  14991. }
  14992. }
  14993. for (t = 0; t < r && c < s;) {
  14994. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  14995. }
  14996. }
  14997. for (var u = 1; u < e; u++) {
  14998. for (var h = 0; h < 4; h++) {
  14999. o = this._Kd[u][h], this._Kd[u][h] = nn[o >> 24 & 255] ^ sn[o >> 16 & 255] ^ rn[o >> 8 & 255] ^ on[255 & o];
  15000. }
  15001. }
  15002. }
  15003. }, {
  15004. key: "encrypt",
  15005. value: function encrypt(e) {
  15006. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  15007. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  15008. s[r] ^= this._Ke[0][r];
  15009. }
  15010. for (var i = 1; i < t; i++) {
  15011. for (r = 0; r < 4; r++) {
  15012. n[r] = Gt[s[r] >> 24 & 255] ^ Vt[s[(r + 1) % 4] >> 16 & 255] ^ Qt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  15013. }
  15014. s = n.slice();
  15015. }
  15016. var o,
  15017. a = Mt(16);
  15018. for (r = 0; r < 4; r++) {
  15019. o = this._Ke[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Jt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Jt[255 & s[(r + 3) % 4]] ^ o);
  15020. }
  15021. return a;
  15022. }
  15023. }, {
  15024. key: "decrypt",
  15025. value: function decrypt(e) {
  15026. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  15027. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  15028. s[r] ^= this._Kd[0][r];
  15029. }
  15030. for (var i = 1; i < t; i++) {
  15031. for (r = 0; r < 4; r++) {
  15032. n[r] = Xt[s[r] >> 24 & 255] ^ Zt[s[(r + 3) % 4] >> 16 & 255] ^ en[s[(r + 2) % 4] >> 8 & 255] ^ tn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  15033. }
  15034. s = n.slice();
  15035. }
  15036. var o,
  15037. a = Mt(16);
  15038. for (r = 0; r < 4; r++) {
  15039. o = this._Kd[t][r], a[4 * r] = 255 & (Ht[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Ht[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Ht[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Ht[255 & s[(r + 1) % 4]] ^ o);
  15040. }
  15041. return a;
  15042. }
  15043. }]);
  15044. return cn;
  15045. }();
  15046. var un = /*#__PURE__*/function () {
  15047. function un(e) {
  15048. (0, _classCallCheck2.default)(this, un);
  15049. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  15050. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new cn(e);
  15051. }
  15052. (0, _createClass2.default)(un, [{
  15053. key: "encrypt",
  15054. value: function encrypt(e) {
  15055. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  15056. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  15057. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.encrypt(n), t, s);
  15058. }
  15059. return t;
  15060. }
  15061. }, {
  15062. key: "decrypt",
  15063. value: function decrypt(e) {
  15064. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15065. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  15066. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.decrypt(n), t, s);
  15067. }
  15068. return t;
  15069. }
  15070. }]);
  15071. return un;
  15072. }();
  15073. var hn = /*#__PURE__*/function () {
  15074. function hn(e, t) {
  15075. (0, _classCallCheck2.default)(this, hn);
  15076. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  15077. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  15078. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15079. } else t = Mt(16);
  15080. this._lastCipherblock = qt(t, !0), this._aes = new cn(e);
  15081. }
  15082. (0, _createClass2.default)(hn, [{
  15083. key: "encrypt",
  15084. value: function encrypt(e) {
  15085. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  15086. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  15087. Kt(e, n, 0, s, s + 16);
  15088. for (var r = 0; r < 16; r++) {
  15089. n[r] ^= this._lastCipherblock[r];
  15090. }
  15091. this._lastCipherblock = this._aes.encrypt(n), Kt(this._lastCipherblock, t, s);
  15092. }
  15093. return t;
  15094. }
  15095. }, {
  15096. key: "decrypt",
  15097. value: function decrypt(e) {
  15098. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15099. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  15100. Kt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  15101. for (var r = 0; r < 16; r++) {
  15102. t[s + r] = n[r] ^ this._lastCipherblock[r];
  15103. }
  15104. Kt(e, this._lastCipherblock, 0, s, s + 16);
  15105. }
  15106. return t;
  15107. }
  15108. }]);
  15109. return hn;
  15110. }();
  15111. var ln = /*#__PURE__*/function () {
  15112. function ln(e, t, n) {
  15113. (0, _classCallCheck2.default)(this, ln);
  15114. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  15115. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  15116. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  15117. } else t = Mt(16);
  15118. n || (n = 1), this.segmentSize = n, this._shiftRegister = qt(t, !0), this._aes = new cn(e);
  15119. }
  15120. (0, _createClass2.default)(ln, [{
  15121. key: "encrypt",
  15122. value: function encrypt(e) {
  15123. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  15124. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15125. t = this._aes.encrypt(this._shiftRegister);
  15126. for (var r = 0; r < this.segmentSize; r++) {
  15127. n[s + r] ^= t[r];
  15128. }
  15129. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15130. }
  15131. return n;
  15132. }
  15133. }, {
  15134. key: "decrypt",
  15135. value: function decrypt(e) {
  15136. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  15137. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15138. t = this._aes.encrypt(this._shiftRegister);
  15139. for (var r = 0; r < this.segmentSize; r++) {
  15140. n[s + r] ^= t[r];
  15141. }
  15142. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15143. }
  15144. return n;
  15145. }
  15146. }]);
  15147. return ln;
  15148. }();
  15149. var dn = /*#__PURE__*/function () {
  15150. function dn(e, t) {
  15151. (0, _classCallCheck2.default)(this, dn);
  15152. if (!(this instanceof dn)) throw Error("AES must be instanitated with `new`");
  15153. if (this.description = "Output Feedback", this.name = "ofb", t) {
  15154. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15155. } else t = Mt(16);
  15156. this._lastPrecipher = qt(t, !0), this._lastPrecipherIndex = 16, this._aes = new cn(e);
  15157. }
  15158. (0, _createClass2.default)(dn, [{
  15159. key: "encrypt",
  15160. value: function encrypt(e) {
  15161. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  15162. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  15163. }
  15164. return t;
  15165. }
  15166. }, {
  15167. key: "decrypt",
  15168. value: function decrypt(e) {
  15169. return this.encrypt(e);
  15170. }
  15171. }]);
  15172. return dn;
  15173. }();
  15174. var pn = /*#__PURE__*/function () {
  15175. function pn(e) {
  15176. (0, _classCallCheck2.default)(this, pn);
  15177. if (!(this instanceof pn)) throw Error("Counter must be instanitated with `new`");
  15178. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Mt(16), this.setValue(e)) : this.setBytes(e);
  15179. }
  15180. (0, _createClass2.default)(pn, [{
  15181. key: "setValue",
  15182. value: function setValue(e) {
  15183. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  15184. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  15185. for (var t = 15; t >= 0; --t) {
  15186. this._counter[t] = e % 256, e = parseInt(e / 256);
  15187. }
  15188. }
  15189. }, {
  15190. key: "setBytes",
  15191. value: function setBytes(e) {
  15192. if (16 != (e = qt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  15193. this._counter = e;
  15194. }
  15195. }, {
  15196. key: "increment",
  15197. value: function increment() {
  15198. for (var e = 15; e >= 0; e--) {
  15199. if (255 !== this._counter[e]) {
  15200. this._counter[e]++;
  15201. break;
  15202. }
  15203. this._counter[e] = 0;
  15204. }
  15205. }
  15206. }]);
  15207. return pn;
  15208. }();
  15209. var fn = /*#__PURE__*/function () {
  15210. function fn(e, t) {
  15211. (0, _classCallCheck2.default)(this, fn);
  15212. if (!(this instanceof fn)) throw Error("AES must be instanitated with `new`");
  15213. this.description = "Counter", this.name = "ctr", t instanceof pn || (t = new pn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new cn(e);
  15214. }
  15215. (0, _createClass2.default)(fn, [{
  15216. key: "encrypt",
  15217. value: function encrypt(e) {
  15218. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  15219. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  15220. }
  15221. return t;
  15222. }
  15223. }, {
  15224. key: "decrypt",
  15225. value: function decrypt(e) {
  15226. return this.encrypt(e);
  15227. }
  15228. }]);
  15229. return fn;
  15230. }();
  15231. var gn = {
  15232. AES: cn,
  15233. Counter: pn,
  15234. ModeOfOperation: {
  15235. ecb: un,
  15236. cbc: hn,
  15237. cfb: ln,
  15238. ofb: dn,
  15239. ctr: fn
  15240. },
  15241. utils: {
  15242. hex: $t,
  15243. utf8: Bt
  15244. },
  15245. padding: {
  15246. pkcs7: {
  15247. pad: function pad(e) {
  15248. var t = 16 - (e = qt(e, !0)).length % 16,
  15249. n = Mt(e.length + t);
  15250. Kt(e, n);
  15251. for (var s = e.length; s < n.length; s++) {
  15252. n[s] = t;
  15253. }
  15254. return n;
  15255. },
  15256. strip: function strip(e) {
  15257. if ((e = qt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  15258. var t = e[e.length - 1];
  15259. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  15260. for (var n = e.length - t, s = 0; s < t; s++) {
  15261. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  15262. }
  15263. var r = Mt(n);
  15264. return Kt(e, r, 0, 0, n), r;
  15265. }
  15266. }
  15267. },
  15268. _arrayTest: {
  15269. coerceArray: qt,
  15270. createArray: Mt,
  15271. copyArray: Kt
  15272. }
  15273. };
  15274. function mn(e, t, n) {
  15275. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15276. r = gn.utils.utf8.toBytes(n),
  15277. i = gn.utils.utf8.toBytes(e),
  15278. o = new gn.ModeOfOperation.cbc(s, r),
  15279. a = gn.padding.pkcs7.pad(i),
  15280. c = o.encrypt(a);
  15281. return uni.arrayBufferToBase64(c);
  15282. }
  15283. var yn = {
  15284. code: 2e4,
  15285. message: "System error"
  15286. },
  15287. _n = {
  15288. code: 20101,
  15289. message: "Invalid client"
  15290. },
  15291. wn = {
  15292. code: 20102,
  15293. message: "Get encrypt key failed"
  15294. },
  15295. vn = {
  15296. 10001: "Secure network is not supported on current playground or unimpsdk",
  15297. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  15298. 10009: "Encrypt payload failed",
  15299. 10010: "Decrypt response failed"
  15300. };
  15301. function Sn(e) {
  15302. var _ref25 = e || {},
  15303. t = _ref25.errSubject,
  15304. n = _ref25.subject,
  15305. s = _ref25.errCode,
  15306. r = _ref25.errMsg,
  15307. i = _ref25.code,
  15308. o = _ref25.message,
  15309. a = _ref25.cause;
  15310. return new se({
  15311. subject: t || n || "uni-secure-network",
  15312. code: s || i || yn.code,
  15313. message: r || o,
  15314. cause: a
  15315. });
  15316. }
  15317. var In,
  15318. bn,
  15319. kn = null;
  15320. var Tn = /*#__PURE__*/function (_Nt) {
  15321. (0, _inherits2.default)(Tn, _Nt);
  15322. var _super9 = _createSuper(Tn);
  15323. function Tn(e) {
  15324. var _this14;
  15325. (0, _classCallCheck2.default)(this, Tn);
  15326. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  15327. return _this14;
  15328. }
  15329. (0, _createClass2.default)(Tn, [{
  15330. key: "isLogin",
  15331. value: function isLogin() {
  15332. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  15333. }
  15334. }, {
  15335. key: "prepare",
  15336. value: function () {
  15337. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  15338. return _regenerator.default.wrap(function _callee38$(_context38) {
  15339. while (1) {
  15340. switch (_context38.prev = _context38.next) {
  15341. case 0:
  15342. if (this.isLogin()) {
  15343. _context38.next = 7;
  15344. break;
  15345. }
  15346. if (this.scopedGlobalCache.initPromise) {
  15347. _context38.next = 3;
  15348. break;
  15349. }
  15350. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  15351. case 3:
  15352. _context38.next = 5;
  15353. return this.scopedGlobalCache.initPromise;
  15354. case 5:
  15355. if (this.isLogin()) {
  15356. _context38.next = 7;
  15357. break;
  15358. }
  15359. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  15360. case 7:
  15361. case "end":
  15362. return _context38.stop();
  15363. }
  15364. }
  15365. }, _callee38, this);
  15366. }));
  15367. function prepare() {
  15368. return _prepare2.apply(this, arguments);
  15369. }
  15370. return prepare;
  15371. }()
  15372. }, {
  15373. key: "getUserEncryptKey",
  15374. value: function () {
  15375. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  15376. var _this15 = this;
  15377. var e;
  15378. return _regenerator.default.wrap(function _callee39$(_context39) {
  15379. while (1) {
  15380. switch (_context39.prev = _context39.next) {
  15381. case 0:
  15382. if (!this.userEncryptKey) {
  15383. _context39.next = 2;
  15384. break;
  15385. }
  15386. return _context39.abrupt("return", this.userEncryptKey);
  15387. case 2:
  15388. if (!(kn && kn.expireTime)) {
  15389. _context39.next = 6;
  15390. break;
  15391. }
  15392. e = Date.now();
  15393. if (!(kn.expireTime - e > 0)) {
  15394. _context39.next = 6;
  15395. break;
  15396. }
  15397. return _context39.abrupt("return", (this.userEncryptKey = kn, this.userEncryptKey));
  15398. case 6:
  15399. return _context39.abrupt("return", new Promise(function (e, t) {
  15400. uni.getUserCryptoManager().getLatestUserKey({
  15401. success: function success(t) {
  15402. kn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  15403. },
  15404. fail: function fail(e) {
  15405. t(Sn(_objectSpread(_objectSpread({}, wn), {}, {
  15406. cause: e
  15407. })));
  15408. }
  15409. });
  15410. }));
  15411. case 7:
  15412. case "end":
  15413. return _context39.stop();
  15414. }
  15415. }
  15416. }, _callee39, this);
  15417. }));
  15418. function getUserEncryptKey() {
  15419. return _getUserEncryptKey.apply(this, arguments);
  15420. }
  15421. return getUserEncryptKey;
  15422. }()
  15423. }, {
  15424. key: "getWxAppId",
  15425. value: function getWxAppId() {
  15426. return wx.getAccountInfoSync().miniProgram.appId;
  15427. }
  15428. }, {
  15429. key: "platformGetSignOption",
  15430. value: function () {
  15431. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  15432. var _yield$this$getUserEn, e, t, n;
  15433. return _regenerator.default.wrap(function _callee40$(_context40) {
  15434. while (1) {
  15435. switch (_context40.prev = _context40.next) {
  15436. case 0:
  15437. _context40.next = 2;
  15438. return this.getUserEncryptKey();
  15439. case 2:
  15440. _yield$this$getUserEn = _context40.sent;
  15441. e = _yield$this$getUserEn.encryptKey;
  15442. t = _yield$this$getUserEn.iv;
  15443. n = _yield$this$getUserEn.version;
  15444. return _context40.abrupt("return", {
  15445. verifyClientSign: mn(JSON.stringify({
  15446. data: JSON.stringify({}),
  15447. appId: this.appId,
  15448. deviceId: this.deviceId,
  15449. wxAppId: this.getWxAppId(),
  15450. simulator: "devtools" === ue().platform,
  15451. timestamp: Date.now()
  15452. }), e, t),
  15453. encryptKeyId: n,
  15454. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15455. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15456. });
  15457. case 7:
  15458. case "end":
  15459. return _context40.stop();
  15460. }
  15461. }
  15462. }, _callee40, this);
  15463. }));
  15464. function platformGetSignOption() {
  15465. return _platformGetSignOption.apply(this, arguments);
  15466. }
  15467. return platformGetSignOption;
  15468. }()
  15469. }, {
  15470. key: "platformEncryptData",
  15471. value: function () {
  15472. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  15473. var _yield$this$getUserEn2, t, n, s, r;
  15474. return _regenerator.default.wrap(function _callee41$(_context41) {
  15475. while (1) {
  15476. switch (_context41.prev = _context41.next) {
  15477. case 0:
  15478. _context41.next = 2;
  15479. return this.getUserEncryptKey();
  15480. case 2:
  15481. _yield$this$getUserEn2 = _context41.sent;
  15482. t = _yield$this$getUserEn2.encryptKey;
  15483. n = _yield$this$getUserEn2.iv;
  15484. s = _yield$this$getUserEn2.version;
  15485. r = {
  15486. secretType: this.secretType,
  15487. encryptKeyId: s,
  15488. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15489. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15490. };
  15491. return _context41.abrupt("return", this.secretType === Ut ? {
  15492. content: e,
  15493. _uniCloudOptions: r
  15494. } : {
  15495. content: mn(JSON.stringify({
  15496. data: JSON.stringify(e),
  15497. appId: this.appId,
  15498. deviceId: this.deviceId,
  15499. wxAppId: this.getWxAppId(),
  15500. simulator: "devtools" === ue().platform,
  15501. timestamp: Date.now()
  15502. }), t, n),
  15503. _uniCloudOptions: r
  15504. });
  15505. case 8:
  15506. case "end":
  15507. return _context41.stop();
  15508. }
  15509. }
  15510. }, _callee41, this);
  15511. }));
  15512. function platformEncryptData(_x33) {
  15513. return _platformEncryptData.apply(this, arguments);
  15514. }
  15515. return platformEncryptData;
  15516. }()
  15517. }, {
  15518. key: "platformDecryptResult",
  15519. value: function () {
  15520. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  15521. var t, _yield$this$getUserEn3, n, s;
  15522. return _regenerator.default.wrap(function _callee42$(_context42) {
  15523. while (1) {
  15524. switch (_context42.prev = _context42.next) {
  15525. case 0:
  15526. t = e.content;
  15527. _context42.next = 3;
  15528. return this.getUserEncryptKey();
  15529. case 3:
  15530. _yield$this$getUserEn3 = _context42.sent;
  15531. n = _yield$this$getUserEn3.encryptKey;
  15532. s = _yield$this$getUserEn3.iv;
  15533. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  15534. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  15535. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15536. i = gn.utils.utf8.toBytes(n),
  15537. o = new gn.ModeOfOperation.cbc(r, i),
  15538. a = gn.padding.pkcs7.strip(o.decrypt(s));
  15539. return gn.utils.utf8.fromBytes(a);
  15540. }(t, n, s)));
  15541. case 7:
  15542. case "end":
  15543. return _context42.stop();
  15544. }
  15545. }
  15546. }, _callee42, this);
  15547. }));
  15548. function platformDecryptResult(_x34) {
  15549. return _platformDecryptResult.apply(this, arguments);
  15550. }
  15551. return platformDecryptResult;
  15552. }()
  15553. }, {
  15554. key: "isClientKeyNotFound",
  15555. value: function isClientKeyNotFound() {
  15556. return !1;
  15557. }
  15558. }]);
  15559. return Tn;
  15560. }(Nt);
  15561. function Cn(e) {
  15562. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  15563. n = {};
  15564. var _loop = function _loop(_s10) {
  15565. var r = t[_s10];
  15566. n[r] = function () {
  15567. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  15568. t[_key] = arguments[_key];
  15569. }
  15570. return new Promise(function (n, s) {
  15571. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  15572. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15573. e = _ref26.type,
  15574. t = _ref26.data,
  15575. r = _ref26.errCode,
  15576. i = _ref26.errMsg,
  15577. o = _ref26.errSubject,
  15578. a = _ref26.message;
  15579. "success" === e ? n(t) : s(Sn({
  15580. errCode: r,
  15581. errMsg: vn[r] || i || a,
  15582. errSubject: o
  15583. }));
  15584. }])) : s(Sn({
  15585. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  15586. }));
  15587. });
  15588. };
  15589. };
  15590. for (var _s10 = 0; _s10 < t.length; _s10++) {
  15591. _loop(_s10);
  15592. }
  15593. return n;
  15594. }
  15595. var Pn = /*#__PURE__*/function (_Nt2) {
  15596. (0, _inherits2.default)(Pn, _Nt2);
  15597. var _super10 = _createSuper(Pn);
  15598. function Pn(e) {
  15599. var _this16;
  15600. (0, _classCallCheck2.default)(this, Pn);
  15601. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ue());
  15602. return _this16;
  15603. }
  15604. (0, _createClass2.default)(Pn, [{
  15605. key: "hasClientKey",
  15606. value: function () {
  15607. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  15608. return _regenerator.default.wrap(function _callee43$(_context43) {
  15609. while (1) {
  15610. switch (_context43.prev = _context43.next) {
  15611. case 0:
  15612. _context43.next = 2;
  15613. return this.appUtils.hasClientKey({
  15614. provider: this.provider,
  15615. spaceId: this.spaceId
  15616. });
  15617. case 2:
  15618. this._hasClientKey = _context43.sent;
  15619. return _context43.abrupt("return", this._hasClientKey);
  15620. case 4:
  15621. case "end":
  15622. return _context43.stop();
  15623. }
  15624. }
  15625. }, _callee43, this);
  15626. }));
  15627. function hasClientKey() {
  15628. return _hasClientKey.apply(this, arguments);
  15629. }
  15630. return hasClientKey;
  15631. }()
  15632. }, {
  15633. key: "getAppClientKey",
  15634. value: function () {
  15635. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  15636. var _yield$this$appUtils$, e, t, n, s, r;
  15637. return _regenerator.default.wrap(function _callee44$(_context44) {
  15638. while (1) {
  15639. switch (_context44.prev = _context44.next) {
  15640. case 0:
  15641. _context44.next = 2;
  15642. return this.appUtils.encryptGetClientKeyPayload({
  15643. data: JSON.stringify({})
  15644. });
  15645. case 2:
  15646. _yield$this$appUtils$ = _context44.sent;
  15647. e = _yield$this$appUtils$.data;
  15648. t = _yield$this$appUtils$.key;
  15649. _context44.next = 7;
  15650. return this.uniCloudIns.callFunction({
  15651. name: "DCloud-clientDB",
  15652. data: {
  15653. redirectTo: "encryption",
  15654. action: "getAppClientKey",
  15655. data: e,
  15656. key: t
  15657. }
  15658. });
  15659. case 7:
  15660. _context44.t0 = _context44.sent.result;
  15661. if (_context44.t0) {
  15662. _context44.next = 10;
  15663. break;
  15664. }
  15665. _context44.t0 = {};
  15666. case 10:
  15667. n = _context44.t0;
  15668. if (!(0 !== n.errCode)) {
  15669. _context44.next = 13;
  15670. break;
  15671. }
  15672. throw function (e) {
  15673. return new se({
  15674. subject: e.errSubject || "uni-secure-network",
  15675. code: e.errCode || e.code || yn.code,
  15676. message: e.errMsg || e.message
  15677. });
  15678. }(n);
  15679. case 13:
  15680. s = n.clientKey, r = n.key;
  15681. _context44.next = 16;
  15682. return this.appUtils.setClientKey({
  15683. provider: this.provider,
  15684. spaceId: this.spaceId,
  15685. clientKey: s,
  15686. key: r
  15687. });
  15688. case 16:
  15689. case "end":
  15690. return _context44.stop();
  15691. }
  15692. }
  15693. }, _callee44, this);
  15694. }));
  15695. function getAppClientKey() {
  15696. return _getAppClientKey.apply(this, arguments);
  15697. }
  15698. return getAppClientKey;
  15699. }()
  15700. }, {
  15701. key: "ensureClientKey",
  15702. value: function () {
  15703. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  15704. var _this17 = this;
  15705. var _ref27,
  15706. _ref27$forceUpdate,
  15707. e,
  15708. _args45 = arguments;
  15709. return _regenerator.default.wrap(function _callee45$(_context45) {
  15710. while (1) {
  15711. switch (_context45.prev = _context45.next) {
  15712. case 0:
  15713. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  15714. _context45.t1 = !0;
  15715. _context45.next = 4;
  15716. return this.hasClientKey();
  15717. case 4:
  15718. _context45.t2 = _context45.sent;
  15719. _context45.t0 = _context45.t1 !== _context45.t2;
  15720. if (_context45.t0) {
  15721. _context45.next = 8;
  15722. break;
  15723. }
  15724. _context45.t0 = e;
  15725. case 8:
  15726. if (!_context45.t0) {
  15727. _context45.next = 10;
  15728. break;
  15729. }
  15730. return _context45.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === d || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== f || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  15731. _this17.scopedGlobalCache.initStatus = p;
  15732. }).catch(function (e) {
  15733. throw _this17.scopedGlobalCache.initStatus = f, e;
  15734. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  15735. case 10:
  15736. case "end":
  15737. return _context45.stop();
  15738. }
  15739. }
  15740. }, _callee45, this);
  15741. }));
  15742. function ensureClientKey() {
  15743. return _ensureClientKey.apply(this, arguments);
  15744. }
  15745. return ensureClientKey;
  15746. }()
  15747. }, {
  15748. key: "prepare",
  15749. value: function () {
  15750. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  15751. var _ref28,
  15752. _ref28$forceUpdate,
  15753. e,
  15754. _args46 = arguments;
  15755. return _regenerator.default.wrap(function _callee46$(_context46) {
  15756. while (1) {
  15757. switch (_context46.prev = _context46.next) {
  15758. case 0:
  15759. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  15760. _context46.next = 3;
  15761. return this.ensureClientKey({
  15762. forceUpdate: e
  15763. });
  15764. case 3:
  15765. case "end":
  15766. return _context46.stop();
  15767. }
  15768. }
  15769. }, _callee46, this);
  15770. }));
  15771. function prepare() {
  15772. return _prepare3.apply(this, arguments);
  15773. }
  15774. return prepare;
  15775. }()
  15776. }, {
  15777. key: "platformGetSignOption",
  15778. value: function () {
  15779. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  15780. var _yield$this$appUtils$2, e, t;
  15781. return _regenerator.default.wrap(function _callee47$(_context47) {
  15782. while (1) {
  15783. switch (_context47.prev = _context47.next) {
  15784. case 0:
  15785. _context47.next = 2;
  15786. return this.appUtils.encrypt({
  15787. provider: this.provider,
  15788. spaceId: this.spaceId,
  15789. data: JSON.stringify({})
  15790. });
  15791. case 2:
  15792. _yield$this$appUtils$2 = _context47.sent;
  15793. e = _yield$this$appUtils$2.data;
  15794. t = _yield$this$appUtils$2.key;
  15795. return _context47.abrupt("return", {
  15796. verifyClientSign: e,
  15797. encryptKeyId: t
  15798. });
  15799. case 6:
  15800. case "end":
  15801. return _context47.stop();
  15802. }
  15803. }
  15804. }, _callee47, this);
  15805. }));
  15806. function platformGetSignOption() {
  15807. return _platformGetSignOption2.apply(this, arguments);
  15808. }
  15809. return platformGetSignOption;
  15810. }()
  15811. }, {
  15812. key: "platformEncryptData",
  15813. value: function () {
  15814. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  15815. var _yield$this$appUtils$3, t, n, s;
  15816. return _regenerator.default.wrap(function _callee48$(_context48) {
  15817. while (1) {
  15818. switch (_context48.prev = _context48.next) {
  15819. case 0:
  15820. _context48.next = 2;
  15821. return this.appUtils.encrypt({
  15822. provider: this.provider,
  15823. spaceId: this.spaceId,
  15824. data: JSON.stringify(e)
  15825. });
  15826. case 2:
  15827. _yield$this$appUtils$3 = _context48.sent;
  15828. t = _yield$this$appUtils$3.data;
  15829. n = _yield$this$appUtils$3.key;
  15830. s = {
  15831. secretType: this.secretType,
  15832. encryptKeyId: n
  15833. };
  15834. return _context48.abrupt("return", this.secretType === Ut ? {
  15835. content: e,
  15836. _uniCloudOptions: s
  15837. } : {
  15838. content: t,
  15839. _uniCloudOptions: s
  15840. });
  15841. case 7:
  15842. case "end":
  15843. return _context48.stop();
  15844. }
  15845. }
  15846. }, _callee48, this);
  15847. }));
  15848. function platformEncryptData(_x35) {
  15849. return _platformEncryptData2.apply(this, arguments);
  15850. }
  15851. return platformEncryptData;
  15852. }()
  15853. }, {
  15854. key: "platformDecryptResult",
  15855. value: function () {
  15856. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  15857. var t, _e$_uniCloudOptions, n, s, r;
  15858. return _regenerator.default.wrap(function _callee49$(_context49) {
  15859. while (1) {
  15860. switch (_context49.prev = _context49.next) {
  15861. case 0:
  15862. t = e.content;
  15863. _e$_uniCloudOptions = e._uniCloudOptions;
  15864. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  15865. s = n.encryptKeyId;
  15866. _context49.next = 6;
  15867. return this.appUtils.decrypt({
  15868. provider: this.provider,
  15869. spaceId: this.spaceId,
  15870. data: t,
  15871. key: s
  15872. });
  15873. case 6:
  15874. r = _context49.sent;
  15875. return _context49.abrupt("return", JSON.parse(r.data));
  15876. case 8:
  15877. case "end":
  15878. return _context49.stop();
  15879. }
  15880. }
  15881. }, _callee49, this);
  15882. }));
  15883. function platformDecryptResult(_x36) {
  15884. return _platformDecryptResult2.apply(this, arguments);
  15885. }
  15886. return platformDecryptResult;
  15887. }()
  15888. }, {
  15889. key: "isClientKeyNotFound",
  15890. value: function isClientKeyNotFound() {
  15891. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15892. var t = e.result || {};
  15893. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  15894. }
  15895. }]);
  15896. return Pn;
  15897. }(Nt);
  15898. function An() {
  15899. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15900. e = _ref29.secretType;
  15901. return e === Rt || e === Ut || e === Lt;
  15902. }
  15903. function En() {
  15904. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15905. e = _ref30.name,
  15906. _ref30$data = _ref30.data,
  15907. t = _ref30$data === void 0 ? {} : _ref30$data;
  15908. return "app" === A && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  15909. }
  15910. function On() {
  15911. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15912. e = _ref31.provider,
  15913. t = _ref31.spaceId,
  15914. n = _ref31.functionName;
  15915. var _ue = ue(),
  15916. s = _ue.appId,
  15917. r = _ue.uniPlatform,
  15918. i = _ue.osName;
  15919. var o = r;
  15920. "app" === r && (o = i);
  15921. var a = function () {
  15922. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15923. e = _ref32.provider,
  15924. t = _ref32.spaceId;
  15925. var n = P;
  15926. if (!n) return {};
  15927. e = function (e) {
  15928. return "tencent" === e ? "tcb" : e;
  15929. }(e);
  15930. var s = n.find(function (n) {
  15931. return n.provider === e && n.spaceId === t;
  15932. });
  15933. return s && s.config;
  15934. }({
  15935. provider: e,
  15936. spaceId: t
  15937. });
  15938. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  15939. var c = a.accessControl.function || {},
  15940. u = Object.keys(c);
  15941. if (0 === u.length) return !0;
  15942. var h = function (e, t) {
  15943. var n, s, r;
  15944. for (var _i2 = 0; _i2 < e.length; _i2++) {
  15945. var _o2 = e[_i2];
  15946. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  15947. return e.trim();
  15948. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  15949. }
  15950. return n || s || r;
  15951. }(u, n);
  15952. if (!h) return !1;
  15953. if ((c[h] || []).find(function () {
  15954. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15955. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  15956. })) return !0;
  15957. 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")), Sn(_n);
  15958. }
  15959. function xn(_ref33) {
  15960. var e = _ref33.functionName,
  15961. t = _ref33.result,
  15962. n = _ref33.logPvd;
  15963. if (k && this.__dev__.debugLog && t && t.requestId) {
  15964. var _s11 = JSON.stringify({
  15965. spaceId: this.config.spaceId,
  15966. functionName: e,
  15967. requestId: t.requestId
  15968. });
  15969. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  15970. }
  15971. }
  15972. function Rn(e) {
  15973. var t = e.callFunction,
  15974. n = function n(_n7) {
  15975. var _this18 = this;
  15976. var s = _n7.name;
  15977. _n7.data = Tt.call(e, {
  15978. data: _n7.data
  15979. });
  15980. var r = {
  15981. aliyun: "aliyun",
  15982. tencent: "tcb",
  15983. tcb: "tcb"
  15984. }[this.config.provider],
  15985. i = An(_n7),
  15986. o = En(_n7),
  15987. a = i || o;
  15988. return t.call(this, _n7).then(function (e) {
  15989. return e.errCode = 0, !a && xn.call(_this18, {
  15990. functionName: s,
  15991. result: e,
  15992. logPvd: r
  15993. }), Promise.resolve(e);
  15994. }, function (e) {
  15995. return !a && xn.call(_this18, {
  15996. functionName: s,
  15997. result: e,
  15998. logPvd: r
  15999. }), e && e.message && (e.message = function () {
  16000. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16001. _ref34$message = _ref34.message,
  16002. e = _ref34$message === void 0 ? "" : _ref34$message,
  16003. _ref34$extraInfo = _ref34.extraInfo,
  16004. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  16005. _ref34$formatter = _ref34.formatter,
  16006. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  16007. for (var _s12 = 0; _s12 < n.length; _s12++) {
  16008. var _n$_s = n[_s12],
  16009. _r4 = _n$_s.rule,
  16010. _i3 = _n$_s.content,
  16011. _o3 = _n$_s.mode,
  16012. _a = e.match(_r4);
  16013. if (!_a) continue;
  16014. var _c = _i3;
  16015. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  16016. _c = Ot(_c, "{$".concat(_e19, "}"), _a[_e19]);
  16017. }
  16018. for (var _e20 in t) {
  16019. _c = Ot(_c, "{".concat(_e20, "}"), t[_e20]);
  16020. }
  16021. return "replace" === _o3 ? _c : e + _c;
  16022. }
  16023. return e;
  16024. }({
  16025. message: "[".concat(_n7.name, "]: ").concat(e.message),
  16026. formatter: Pt,
  16027. extraInfo: {
  16028. functionName: s
  16029. }
  16030. })), Promise.reject(e);
  16031. });
  16032. };
  16033. e.callFunction = function (t) {
  16034. var _e$config = e.config,
  16035. s = _e$config.provider,
  16036. r = _e$config.spaceId,
  16037. i = t.name;
  16038. var o, a;
  16039. if (t.data = t.data || {}, k && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && O ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), En(t)) a = n.call(e, t);else if (function (_ref35) {
  16040. var e = _ref35.name,
  16041. _ref35$data = _ref35.data,
  16042. t = _ref35$data === void 0 ? {} : _ref35$data;
  16043. return "mp-weixin" === A && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  16044. }(t)) a = o.call(e, t);else if (An(t)) {
  16045. a = new bn({
  16046. secretType: t.secretType,
  16047. uniCloudIns: e
  16048. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  16049. } else if (On({
  16050. provider: s,
  16051. spaceId: r,
  16052. functionName: i
  16053. })) {
  16054. a = new bn({
  16055. secretType: t.secretType,
  16056. uniCloudIns: e
  16057. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  16058. } else a = o(t);
  16059. return Object.defineProperty(a, "result", {
  16060. get: function get() {
  16061. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  16062. }
  16063. }), a;
  16064. };
  16065. }
  16066. bn = "mp-weixin" !== A && "app" !== A ? /*#__PURE__*/function () {
  16067. function _class2() {
  16068. (0, _classCallCheck2.default)(this, _class2);
  16069. throw Sn({
  16070. message: "Platform ".concat(A, " is not supported by secure network")
  16071. });
  16072. }
  16073. return (0, _createClass2.default)(_class2);
  16074. }() : C ? "mp-weixin" === A ? Tn : Pn : /*#__PURE__*/function () {
  16075. function _class3() {
  16076. (0, _classCallCheck2.default)(this, _class3);
  16077. throw Sn({
  16078. message: "Platform ".concat(A, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  16079. });
  16080. }
  16081. return (0, _createClass2.default)(_class3);
  16082. }();
  16083. var Un = Symbol("CLIENT_DB_INTERNAL");
  16084. function Ln(e, t) {
  16085. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Un, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  16086. get: function get(e, n, s) {
  16087. if ("_uniClient" === n) return null;
  16088. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  16089. if (n in e || "string" != typeof n) {
  16090. var _t10 = e[n];
  16091. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  16092. }
  16093. return t.get(e, n, s);
  16094. }
  16095. });
  16096. }
  16097. function Nn(e) {
  16098. return {
  16099. on: function on(t, n) {
  16100. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  16101. },
  16102. off: function off(t, n) {
  16103. e[t] = e[t] || [];
  16104. var s = e[t].indexOf(n);
  16105. -1 !== s && e[t].splice(s, 1);
  16106. }
  16107. };
  16108. }
  16109. var Dn = ["db.Geo", "db.command", "command.aggregate"];
  16110. function Fn(e, t) {
  16111. return Dn.indexOf("".concat(e, ".").concat(t)) > -1;
  16112. }
  16113. function qn(e) {
  16114. switch (g(e)) {
  16115. case "array":
  16116. return e.map(function (e) {
  16117. return qn(e);
  16118. });
  16119. case "object":
  16120. return e._internalType === Un || Object.keys(e).forEach(function (t) {
  16121. e[t] = qn(e[t]);
  16122. }), e;
  16123. case "regexp":
  16124. return {
  16125. $regexp: {
  16126. source: e.source,
  16127. flags: e.flags
  16128. }
  16129. };
  16130. case "date":
  16131. return {
  16132. $date: e.toISOString()
  16133. };
  16134. default:
  16135. return e;
  16136. }
  16137. }
  16138. function Mn(e) {
  16139. return e && e.content && e.content.$method;
  16140. }
  16141. var Kn = /*#__PURE__*/function () {
  16142. function Kn(e, t, n) {
  16143. (0, _classCallCheck2.default)(this, Kn);
  16144. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  16145. }
  16146. (0, _createClass2.default)(Kn, [{
  16147. key: "toJSON",
  16148. value: function toJSON() {
  16149. var e = this;
  16150. var t = [e.content];
  16151. for (; e.prevStage;) {
  16152. e = e.prevStage, t.push(e.content);
  16153. }
  16154. return {
  16155. $db: t.reverse().map(function (e) {
  16156. return {
  16157. $method: e.$method,
  16158. $param: qn(e.$param)
  16159. };
  16160. })
  16161. };
  16162. }
  16163. }, {
  16164. key: "toString",
  16165. value: function toString() {
  16166. return JSON.stringify(this.toJSON());
  16167. }
  16168. }, {
  16169. key: "getAction",
  16170. value: function getAction() {
  16171. var e = this.toJSON().$db.find(function (e) {
  16172. return "action" === e.$method;
  16173. });
  16174. return e && e.$param && e.$param[0];
  16175. }
  16176. }, {
  16177. key: "getCommand",
  16178. value: function getCommand() {
  16179. return {
  16180. $db: this.toJSON().$db.filter(function (e) {
  16181. return "action" !== e.$method;
  16182. })
  16183. };
  16184. }
  16185. }, {
  16186. key: "isAggregate",
  16187. get: function get() {
  16188. var e = this;
  16189. for (; e;) {
  16190. var t = Mn(e),
  16191. _n8 = Mn(e.prevStage);
  16192. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  16193. e = e.prevStage;
  16194. }
  16195. return !1;
  16196. }
  16197. }, {
  16198. key: "isCommand",
  16199. get: function get() {
  16200. var e = this;
  16201. for (; e;) {
  16202. if ("command" === Mn(e)) return !0;
  16203. e = e.prevStage;
  16204. }
  16205. return !1;
  16206. }
  16207. }, {
  16208. key: "isAggregateCommand",
  16209. get: function get() {
  16210. var e = this;
  16211. for (; e;) {
  16212. var t = Mn(e),
  16213. _n9 = Mn(e.prevStage);
  16214. if ("aggregate" === t && "command" === _n9) return !0;
  16215. e = e.prevStage;
  16216. }
  16217. return !1;
  16218. }
  16219. }, {
  16220. key: "getNextStageFn",
  16221. value: function getNextStageFn(e) {
  16222. var t = this;
  16223. return function () {
  16224. return jn({
  16225. $method: e,
  16226. $param: qn(Array.from(arguments))
  16227. }, t, t._database);
  16228. };
  16229. }
  16230. }, {
  16231. key: "count",
  16232. get: function get() {
  16233. return this.isAggregate ? this.getNextStageFn("count") : function () {
  16234. return this._send("count", Array.from(arguments));
  16235. };
  16236. }
  16237. }, {
  16238. key: "remove",
  16239. get: function get() {
  16240. return this.isCommand ? this.getNextStageFn("remove") : function () {
  16241. return this._send("remove", Array.from(arguments));
  16242. };
  16243. }
  16244. }, {
  16245. key: "get",
  16246. value: function get() {
  16247. return this._send("get", Array.from(arguments));
  16248. }
  16249. }, {
  16250. key: "add",
  16251. get: function get() {
  16252. return this.isCommand ? this.getNextStageFn("add") : function () {
  16253. return this._send("add", Array.from(arguments));
  16254. };
  16255. }
  16256. }, {
  16257. key: "update",
  16258. value: function update() {
  16259. return this._send("update", Array.from(arguments));
  16260. }
  16261. }, {
  16262. key: "end",
  16263. value: function end() {
  16264. return this._send("end", Array.from(arguments));
  16265. }
  16266. }, {
  16267. key: "set",
  16268. get: function get() {
  16269. return this.isCommand ? this.getNextStageFn("set") : function () {
  16270. throw new Error("JQL禁止使用set方法");
  16271. };
  16272. }
  16273. }, {
  16274. key: "_send",
  16275. value: function _send(e, t) {
  16276. var n = this.getAction(),
  16277. s = this.getCommand();
  16278. if (s.$db.push({
  16279. $method: e,
  16280. $param: qn(t)
  16281. }), k) {
  16282. var _e21 = s.$db.find(function (e) {
  16283. return "collection" === e.$method;
  16284. }),
  16285. _t11 = _e21 && _e21.$param;
  16286. _t11 && 1 === _t11.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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  16287. }
  16288. return this._database._callCloudFunction({
  16289. action: n,
  16290. command: s
  16291. });
  16292. }
  16293. }]);
  16294. return Kn;
  16295. }();
  16296. function jn(e, t, n) {
  16297. return Ln(new Kn(e, t, n), {
  16298. get: function get(e, t) {
  16299. var s = "db";
  16300. return e && e.content && (s = e.content.$method), Fn(s, t) ? jn({
  16301. $method: t
  16302. }, e, n) : function () {
  16303. return jn({
  16304. $method: t,
  16305. $param: qn(Array.from(arguments))
  16306. }, e, n);
  16307. };
  16308. }
  16309. });
  16310. }
  16311. function Bn(_ref36) {
  16312. var e = _ref36.path,
  16313. t = _ref36.method;
  16314. return /*#__PURE__*/function () {
  16315. function _class4() {
  16316. (0, _classCallCheck2.default)(this, _class4);
  16317. this.param = Array.from(arguments);
  16318. }
  16319. (0, _createClass2.default)(_class4, [{
  16320. key: "toJSON",
  16321. value: function toJSON() {
  16322. return {
  16323. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  16324. return {
  16325. $method: e
  16326. };
  16327. })), [{
  16328. $method: t,
  16329. $param: this.param
  16330. }])
  16331. };
  16332. }
  16333. }, {
  16334. key: "toString",
  16335. value: function toString() {
  16336. return JSON.stringify(this.toJSON());
  16337. }
  16338. }]);
  16339. return _class4;
  16340. }();
  16341. }
  16342. function $n(e) {
  16343. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16344. return Ln(new e(t), {
  16345. get: function get(e, t) {
  16346. return Fn("db", t) ? jn({
  16347. $method: t
  16348. }, null, e) : function () {
  16349. return jn({
  16350. $method: t,
  16351. $param: qn(Array.from(arguments))
  16352. }, null, e);
  16353. };
  16354. }
  16355. });
  16356. }
  16357. var Wn = /*#__PURE__*/function (_ref37) {
  16358. (0, _inherits2.default)(Wn, _ref37);
  16359. var _super11 = _createSuper(Wn);
  16360. function Wn() {
  16361. (0, _classCallCheck2.default)(this, Wn);
  16362. return _super11.apply(this, arguments);
  16363. }
  16364. (0, _createClass2.default)(Wn, [{
  16365. key: "_parseResult",
  16366. value: function _parseResult(e) {
  16367. return this._isJQL ? e.result : e;
  16368. }
  16369. }, {
  16370. key: "_callCloudFunction",
  16371. value: function _callCloudFunction(_ref38) {
  16372. var _this19 = this;
  16373. var e = _ref38.action,
  16374. t = _ref38.command,
  16375. n = _ref38.multiCommand,
  16376. s = _ref38.queryList;
  16377. function r(e, t) {
  16378. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  16379. var _r5 = s[_n10];
  16380. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  16381. }
  16382. }
  16383. var i = this,
  16384. o = this._isJQL ? "databaseForJQL" : "database";
  16385. function a(e) {
  16386. return i._callback("error", [e]), M(K(o, "fail"), e).then(function () {
  16387. return M(K(o, "complete"), e);
  16388. }).then(function () {
  16389. return r(null, e), X($, {
  16390. type: J,
  16391. content: e
  16392. }), Promise.reject(e);
  16393. });
  16394. }
  16395. var c = M(K(o, "invoke")),
  16396. u = this._uniClient;
  16397. return c.then(function () {
  16398. return u.callFunction({
  16399. name: "DCloud-clientDB",
  16400. type: l,
  16401. data: {
  16402. action: e,
  16403. command: t,
  16404. multiCommand: n
  16405. }
  16406. });
  16407. }).then(function (e) {
  16408. var _e$result = e.result,
  16409. t = _e$result.code,
  16410. n = _e$result.message,
  16411. s = _e$result.token,
  16412. c = _e$result.tokenExpired,
  16413. _e$result$systemInfo = _e$result.systemInfo,
  16414. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  16415. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  16416. var _u$_e = u[_e22],
  16417. _t12 = _u$_e.level,
  16418. _n11 = _u$_e.message,
  16419. _s13 = _u$_e.detail,
  16420. _r6 = console["app" === A && "warn" === _t12 ? "error" : _t12] || console.log;
  16421. var _i4 = "[System Info]" + _n11;
  16422. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  16423. }
  16424. if (t) {
  16425. return a(new se({
  16426. code: t,
  16427. message: n,
  16428. requestId: e.requestId
  16429. }));
  16430. }
  16431. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (oe({
  16432. token: s,
  16433. tokenExpired: c
  16434. }), _this19._callbackAuth("refreshToken", [{
  16435. token: s,
  16436. tokenExpired: c
  16437. }]), _this19._callback("refreshToken", [{
  16438. token: s,
  16439. tokenExpired: c
  16440. }]), X(z, {
  16441. token: s,
  16442. tokenExpired: c
  16443. }));
  16444. var h = [{
  16445. prop: "affectedDocs",
  16446. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  16447. }, {
  16448. prop: "code",
  16449. tips: "code不再推荐使用,请使用errCode替代"
  16450. }, {
  16451. prop: "message",
  16452. tips: "message不再推荐使用,请使用errMsg替代"
  16453. }];
  16454. var _loop2 = function _loop2(_t13) {
  16455. var _h$_t = h[_t13],
  16456. n = _h$_t.prop,
  16457. s = _h$_t.tips;
  16458. if (n in e.result) {
  16459. var _t14 = e.result[n];
  16460. Object.defineProperty(e.result, n, {
  16461. get: function get() {
  16462. return console.warn(s), _t14;
  16463. }
  16464. });
  16465. }
  16466. };
  16467. for (var _t13 = 0; _t13 < h.length; _t13++) {
  16468. _loop2(_t13);
  16469. }
  16470. return function (e) {
  16471. return M(K(o, "success"), e).then(function () {
  16472. return M(K(o, "complete"), e);
  16473. }).then(function () {
  16474. r(e, null);
  16475. var t = i._parseResult(e);
  16476. return X($, {
  16477. type: J,
  16478. content: t
  16479. }), Promise.resolve(t);
  16480. });
  16481. }(e);
  16482. }, function (e) {
  16483. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  16484. return a(new se({
  16485. code: e.code || "SYSTEM_ERROR",
  16486. message: e.message,
  16487. requestId: e.requestId
  16488. }));
  16489. });
  16490. }
  16491. }]);
  16492. return Wn;
  16493. }( /*#__PURE__*/function () {
  16494. function _class5() {
  16495. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16496. _ref39$uniClient = _ref39.uniClient,
  16497. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  16498. _ref39$isJQL = _ref39.isJQL,
  16499. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  16500. (0, _classCallCheck2.default)(this, _class5);
  16501. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = Nn(this._authCallBacks)), this._isJQL = t, Object.assign(this, Nn(this._dbCallBacks)), this.env = Ln({}, {
  16502. get: function get(e, t) {
  16503. return {
  16504. $env: t
  16505. };
  16506. }
  16507. }), this.Geo = Ln({}, {
  16508. get: function get(e, t) {
  16509. return Bn({
  16510. path: ["Geo"],
  16511. method: t
  16512. });
  16513. }
  16514. }), this.serverDate = Bn({
  16515. path: [],
  16516. method: "serverDate"
  16517. }), this.RegExp = Bn({
  16518. path: [],
  16519. method: "RegExp"
  16520. });
  16521. }
  16522. (0, _createClass2.default)(_class5, [{
  16523. key: "getCloudEnv",
  16524. value: function getCloudEnv(e) {
  16525. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  16526. return {
  16527. $env: e.replace("$cloudEnv_", "")
  16528. };
  16529. }
  16530. }, {
  16531. key: "_callback",
  16532. value: function _callback(e, t) {
  16533. var n = this._dbCallBacks;
  16534. n[e] && n[e].forEach(function (e) {
  16535. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16536. });
  16537. }
  16538. }, {
  16539. key: "_callbackAuth",
  16540. value: function _callbackAuth(e, t) {
  16541. var n = this._authCallBacks;
  16542. n[e] && n[e].forEach(function (e) {
  16543. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16544. });
  16545. }
  16546. }, {
  16547. key: "multiSend",
  16548. value: function multiSend() {
  16549. var e = Array.from(arguments),
  16550. t = e.map(function (e) {
  16551. var t = e.getAction(),
  16552. n = e.getCommand();
  16553. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  16554. return {
  16555. action: t,
  16556. command: n
  16557. };
  16558. });
  16559. return this._callCloudFunction({
  16560. multiCommand: t,
  16561. queryList: e
  16562. });
  16563. }
  16564. }]);
  16565. return _class5;
  16566. }());
  16567. var zn = "token无效,跳转登录页面",
  16568. Jn = "token过期,跳转登录页面",
  16569. Hn = {
  16570. TOKEN_INVALID_TOKEN_EXPIRED: Jn,
  16571. TOKEN_INVALID_INVALID_CLIENTID: zn,
  16572. TOKEN_INVALID: zn,
  16573. TOKEN_INVALID_WRONG_TOKEN: zn,
  16574. TOKEN_INVALID_ANONYMOUS_USER: zn
  16575. },
  16576. Gn = {
  16577. "uni-id-token-expired": Jn,
  16578. "uni-id-check-token-failed": zn,
  16579. "uni-id-token-not-exist": zn,
  16580. "uni-id-check-device-feature-failed": zn
  16581. };
  16582. function Vn(e, t) {
  16583. var n = "";
  16584. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  16585. }
  16586. function Qn() {
  16587. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16588. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  16589. var n = [],
  16590. s = [];
  16591. return e.forEach(function (e) {
  16592. !0 === e.needLogin ? n.push(Vn(t, e.path)) : !1 === e.needLogin && s.push(Vn(t, e.path));
  16593. }), {
  16594. needLoginPage: n,
  16595. notNeedLoginPage: s
  16596. };
  16597. }
  16598. function Yn(e) {
  16599. return e.split("?")[0].replace(/^\//, "");
  16600. }
  16601. function Xn() {
  16602. return function (e) {
  16603. var t = e && e.$page && e.$page.fullPath || "";
  16604. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  16605. }(function () {
  16606. var e = getCurrentPages();
  16607. return e[e.length - 1];
  16608. }());
  16609. }
  16610. function Zn() {
  16611. return Yn(Xn());
  16612. }
  16613. function es() {
  16614. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16615. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16616. if (!e) return !1;
  16617. if (!(t && t.list && t.list.length)) return !1;
  16618. var n = t.list,
  16619. s = Yn(e);
  16620. return n.some(function (e) {
  16621. return e.pagePath === s;
  16622. });
  16623. }
  16624. var ts = !!_pages.default.uniIdRouter;
  16625. var _ref40 = function () {
  16626. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  16627. _ref21$pages = _ref21.pages,
  16628. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  16629. _ref21$subPackages = _ref21.subPackages,
  16630. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  16631. _ref21$uniIdRouter = _ref21.uniIdRouter,
  16632. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  16633. _ref21$tabBar = _ref21.tabBar,
  16634. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  16635. var i = s.loginPage,
  16636. _s$needLogin = s.needLogin,
  16637. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  16638. _s$resToLogin = s.resToLogin,
  16639. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  16640. _Qn = Qn(e),
  16641. c = _Qn.needLoginPage,
  16642. u = _Qn.notNeedLoginPage,
  16643. _ref23 = function () {
  16644. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16645. var t = [],
  16646. n = [];
  16647. return e.forEach(function (e) {
  16648. var s = e.root,
  16649. _e$pages = e.pages,
  16650. r = _e$pages === void 0 ? [] : _e$pages,
  16651. _Qn2 = Qn(r, s),
  16652. i = _Qn2.needLoginPage,
  16653. o = _Qn2.notNeedLoginPage;
  16654. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  16655. }), {
  16656. needLoginPage: t,
  16657. notNeedLoginPage: n
  16658. };
  16659. }(n),
  16660. h = _ref23.needLoginPage,
  16661. l = _ref23.notNeedLoginPage;
  16662. return {
  16663. loginPage: i,
  16664. routerNeedLogin: o,
  16665. resToLogin: a,
  16666. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  16667. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  16668. loginPageInTabBar: es(i, r)
  16669. };
  16670. }(),
  16671. ns = _ref40.loginPage,
  16672. ss = _ref40.routerNeedLogin,
  16673. rs = _ref40.resToLogin,
  16674. is = _ref40.needLoginPage,
  16675. os = _ref40.notNeedLoginPage,
  16676. as = _ref40.loginPageInTabBar;
  16677. if (is.indexOf(ns) > -1) throw new Error("Login page [".concat(ns, "] should not be \"needLogin\", please check your pages.json"));
  16678. function cs(e) {
  16679. var t = Zn();
  16680. if ("/" === e.charAt(0)) return e;
  16681. var _e$split = e.split("?"),
  16682. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  16683. n = _e$split2[0],
  16684. s = _e$split2[1],
  16685. r = n.replace(/^\//, "").split("/"),
  16686. i = t.split("/");
  16687. i.pop();
  16688. for (var _e23 = 0; _e23 < r.length; _e23++) {
  16689. var _t15 = r[_e23];
  16690. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  16691. }
  16692. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  16693. }
  16694. function us(e) {
  16695. var t = Yn(cs(e));
  16696. return !(os.indexOf(t) > -1) && (is.indexOf(t) > -1 || ss.some(function (t) {
  16697. return function (e, t) {
  16698. return new RegExp(t).test(e);
  16699. }(e, t);
  16700. }));
  16701. }
  16702. function hs(_ref41) {
  16703. var e = _ref41.redirect;
  16704. var t = Yn(e),
  16705. n = Yn(ns);
  16706. return Zn() !== n && t !== n;
  16707. }
  16708. function ls() {
  16709. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16710. e = _ref42.api,
  16711. t = _ref42.redirect;
  16712. if (!t || !hs({
  16713. redirect: t
  16714. })) return;
  16715. var n = function (e, t) {
  16716. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  16717. }(ns, t);
  16718. as ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  16719. var s = {
  16720. navigateTo: uni.navigateTo,
  16721. redirectTo: uni.redirectTo,
  16722. switchTab: uni.switchTab,
  16723. reLaunch: uni.reLaunch
  16724. };
  16725. setTimeout(function () {
  16726. s[e]({
  16727. url: n
  16728. });
  16729. });
  16730. }
  16731. function ds() {
  16732. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16733. e = _ref43.url;
  16734. var t = {
  16735. abortLoginPageJump: !1,
  16736. autoToLoginPage: !1
  16737. },
  16738. n = function () {
  16739. var _ie3 = ie(),
  16740. e = _ie3.token,
  16741. t = _ie3.tokenExpired;
  16742. var n;
  16743. if (e) {
  16744. if (t < Date.now()) {
  16745. var _e24 = "uni-id-token-expired";
  16746. n = {
  16747. errCode: _e24,
  16748. errMsg: Gn[_e24]
  16749. };
  16750. }
  16751. } else {
  16752. var _e25 = "uni-id-check-token-failed";
  16753. n = {
  16754. errCode: _e25,
  16755. errMsg: Gn[_e25]
  16756. };
  16757. }
  16758. return n;
  16759. }();
  16760. if (us(e) && n) {
  16761. n.uniIdRedirectUrl = e;
  16762. if (V(W).length > 0) return setTimeout(function () {
  16763. X(W, n);
  16764. }, 0), t.abortLoginPageJump = !0, t;
  16765. t.autoToLoginPage = !0;
  16766. }
  16767. return t;
  16768. }
  16769. function ps() {
  16770. !function () {
  16771. var e = Xn(),
  16772. _ds = ds({
  16773. url: e
  16774. }),
  16775. t = _ds.abortLoginPageJump,
  16776. n = _ds.autoToLoginPage;
  16777. t || n && ls({
  16778. api: "redirectTo",
  16779. redirect: e
  16780. });
  16781. }();
  16782. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  16783. var _loop3 = function _loop3(_t16) {
  16784. var n = e[_t16];
  16785. uni.addInterceptor(n, {
  16786. invoke: function invoke(e) {
  16787. var _ds2 = ds({
  16788. url: e.url
  16789. }),
  16790. t = _ds2.abortLoginPageJump,
  16791. s = _ds2.autoToLoginPage;
  16792. return t ? e : s ? (ls({
  16793. api: n,
  16794. redirect: cs(e.url)
  16795. }), !1) : e;
  16796. }
  16797. });
  16798. };
  16799. for (var _t16 = 0; _t16 < e.length; _t16++) {
  16800. _loop3(_t16);
  16801. }
  16802. }
  16803. function fs() {
  16804. this.onResponse(function (e) {
  16805. var t = e.type,
  16806. n = e.content;
  16807. var s = !1;
  16808. switch (t) {
  16809. case "cloudobject":
  16810. s = function (e) {
  16811. if ("object" != (0, _typeof2.default)(e)) return !1;
  16812. var _ref44 = e || {},
  16813. t = _ref44.errCode;
  16814. return t in Gn;
  16815. }(n);
  16816. break;
  16817. case "clientdb":
  16818. s = function (e) {
  16819. if ("object" != (0, _typeof2.default)(e)) return !1;
  16820. var _ref45 = e || {},
  16821. t = _ref45.errCode;
  16822. return t in Hn;
  16823. }(n);
  16824. }
  16825. s && function () {
  16826. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16827. var t = V(W);
  16828. te().then(function () {
  16829. var n = Xn();
  16830. if (n && hs({
  16831. redirect: n
  16832. })) return t.length > 0 ? X(W, Object.assign({
  16833. uniIdRedirectUrl: n
  16834. }, e)) : void (ns && ls({
  16835. api: "navigateTo",
  16836. redirect: n
  16837. }));
  16838. });
  16839. }(n);
  16840. });
  16841. }
  16842. function gs(e) {
  16843. !function (e) {
  16844. e.onResponse = function (e) {
  16845. Q($, e);
  16846. }, e.offResponse = function (e) {
  16847. Y($, e);
  16848. };
  16849. }(e), function (e) {
  16850. e.onNeedLogin = function (e) {
  16851. Q(W, e);
  16852. }, e.offNeedLogin = function (e) {
  16853. Y(W, e);
  16854. }, ts && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, te().then(function () {
  16855. ps.call(e);
  16856. }), rs && fs.call(e)));
  16857. }(e), function (e) {
  16858. e.onRefreshToken = function (e) {
  16859. Q(z, e);
  16860. }, e.offRefreshToken = function (e) {
  16861. Y(z, e);
  16862. };
  16863. }(e);
  16864. }
  16865. var ms;
  16866. var ys = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  16867. _s = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  16868. function ws() {
  16869. var e = ie().token || "",
  16870. t = e.split(".");
  16871. if (!e || 3 !== t.length) return {
  16872. uid: null,
  16873. role: [],
  16874. permission: [],
  16875. tokenExpired: 0
  16876. };
  16877. var n;
  16878. try {
  16879. n = JSON.parse((s = t[1], decodeURIComponent(ms(s).split("").map(function (e) {
  16880. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  16881. }).join(""))));
  16882. } catch (e) {
  16883. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  16884. }
  16885. var s;
  16886. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  16887. }
  16888. ms = "function" != typeof atob ? function (e) {
  16889. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !_s.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  16890. var t;
  16891. e += "==".slice(2 - (3 & e.length));
  16892. for (var n, s, r = "", i = 0; i < e.length;) {
  16893. t = ys.indexOf(e.charAt(i++)) << 18 | ys.indexOf(e.charAt(i++)) << 12 | (n = ys.indexOf(e.charAt(i++))) << 6 | (s = ys.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);
  16894. }
  16895. return r;
  16896. } : atob;
  16897. var vs = s(function (e, t) {
  16898. Object.defineProperty(t, "__esModule", {
  16899. value: !0
  16900. });
  16901. var n = "chooseAndUploadFile:ok",
  16902. s = "chooseAndUploadFile:fail";
  16903. function r(e, t) {
  16904. return e.tempFiles.forEach(function (e, n) {
  16905. 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("."));
  16906. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  16907. return e.path;
  16908. })), e;
  16909. }
  16910. function i(e, t, _ref46) {
  16911. var s = _ref46.onChooseFile,
  16912. r = _ref46.onUploadProgress;
  16913. return t.then(function (e) {
  16914. if (s) {
  16915. var _t17 = s(e);
  16916. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  16917. return void 0 === t ? e : t;
  16918. });
  16919. }
  16920. return e;
  16921. }).then(function (t) {
  16922. return !1 === t ? {
  16923. errMsg: n,
  16924. tempFilePaths: [],
  16925. tempFiles: []
  16926. } : function (e, t) {
  16927. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  16928. var r = arguments.length > 3 ? arguments[3] : undefined;
  16929. (t = Object.assign({}, t)).errMsg = n;
  16930. var i = t.tempFiles,
  16931. o = i.length;
  16932. var a = 0;
  16933. return new Promise(function (n) {
  16934. for (; a < s;) {
  16935. c();
  16936. }
  16937. function c() {
  16938. var s = a++;
  16939. if (s >= o) return void (!i.find(function (e) {
  16940. return !e.url && !e.errMsg;
  16941. }) && n(t));
  16942. var u = i[s];
  16943. e.uploadFile({
  16944. filePath: u.path,
  16945. cloudPath: u.cloudPath,
  16946. fileType: u.fileType,
  16947. onUploadProgress: function onUploadProgress(e) {
  16948. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  16949. }
  16950. }).then(function (e) {
  16951. u.url = e.fileID, s < o && c();
  16952. }).catch(function (e) {
  16953. u.errMsg = e.errMsg || e.message, s < o && c();
  16954. });
  16955. }
  16956. });
  16957. }(e, t, 5, r);
  16958. });
  16959. }
  16960. t.initChooseAndUploadFile = function (e) {
  16961. return function () {
  16962. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  16963. type: "all"
  16964. };
  16965. return "image" === t.type ? i(e, function (e) {
  16966. var t = e.count,
  16967. n = e.sizeType,
  16968. _e$sourceType = e.sourceType,
  16969. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  16970. o = e.extension;
  16971. return new Promise(function (e, a) {
  16972. uni.chooseImage({
  16973. count: t,
  16974. sizeType: n,
  16975. sourceType: i,
  16976. extension: o,
  16977. success: function success(t) {
  16978. e(r(t, "image"));
  16979. },
  16980. fail: function fail(e) {
  16981. a({
  16982. errMsg: e.errMsg.replace("chooseImage:fail", s)
  16983. });
  16984. }
  16985. });
  16986. });
  16987. }(t), t) : "video" === t.type ? i(e, function (e) {
  16988. var t = e.camera,
  16989. n = e.compressed,
  16990. i = e.maxDuration,
  16991. _e$sourceType2 = e.sourceType,
  16992. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  16993. a = e.extension;
  16994. return new Promise(function (e, c) {
  16995. uni.chooseVideo({
  16996. camera: t,
  16997. compressed: n,
  16998. maxDuration: i,
  16999. sourceType: o,
  17000. extension: a,
  17001. success: function success(t) {
  17002. var n = t.tempFilePath,
  17003. s = t.duration,
  17004. i = t.size,
  17005. o = t.height,
  17006. a = t.width;
  17007. e(r({
  17008. errMsg: "chooseVideo:ok",
  17009. tempFilePaths: [n],
  17010. tempFiles: [{
  17011. name: t.tempFile && t.tempFile.name || "",
  17012. path: n,
  17013. size: i,
  17014. type: t.tempFile && t.tempFile.type || "",
  17015. width: a,
  17016. height: o,
  17017. duration: s,
  17018. fileType: "video",
  17019. cloudPath: ""
  17020. }]
  17021. }, "video"));
  17022. },
  17023. fail: function fail(e) {
  17024. c({
  17025. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  17026. });
  17027. }
  17028. });
  17029. });
  17030. }(t), t) : i(e, function (e) {
  17031. var t = e.count,
  17032. n = e.extension;
  17033. return new Promise(function (e, i) {
  17034. var o = uni.chooseFile;
  17035. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  17036. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  17037. });
  17038. o({
  17039. type: "all",
  17040. count: t,
  17041. extension: n,
  17042. success: function success(t) {
  17043. e(r(t));
  17044. },
  17045. fail: function fail(e) {
  17046. i({
  17047. errMsg: e.errMsg.replace("chooseFile:fail", s)
  17048. });
  17049. }
  17050. });
  17051. });
  17052. }(t), t);
  17053. };
  17054. };
  17055. }),
  17056. Ss = n(vs);
  17057. var Is = "manual";
  17058. function bs(e) {
  17059. return {
  17060. props: {
  17061. localdata: {
  17062. type: Array,
  17063. default: function _default() {
  17064. return [];
  17065. }
  17066. },
  17067. options: {
  17068. type: [Object, Array],
  17069. default: function _default() {
  17070. return {};
  17071. }
  17072. },
  17073. spaceInfo: {
  17074. type: Object,
  17075. default: function _default() {
  17076. return {};
  17077. }
  17078. },
  17079. collection: {
  17080. type: [String, Array],
  17081. default: ""
  17082. },
  17083. action: {
  17084. type: String,
  17085. default: ""
  17086. },
  17087. field: {
  17088. type: String,
  17089. default: ""
  17090. },
  17091. orderby: {
  17092. type: String,
  17093. default: ""
  17094. },
  17095. where: {
  17096. type: [String, Object],
  17097. default: ""
  17098. },
  17099. pageData: {
  17100. type: String,
  17101. default: "add"
  17102. },
  17103. pageCurrent: {
  17104. type: Number,
  17105. default: 1
  17106. },
  17107. pageSize: {
  17108. type: Number,
  17109. default: 20
  17110. },
  17111. getcount: {
  17112. type: [Boolean, String],
  17113. default: !1
  17114. },
  17115. gettree: {
  17116. type: [Boolean, String],
  17117. default: !1
  17118. },
  17119. gettreepath: {
  17120. type: [Boolean, String],
  17121. default: !1
  17122. },
  17123. startwith: {
  17124. type: String,
  17125. default: ""
  17126. },
  17127. limitlevel: {
  17128. type: Number,
  17129. default: 10
  17130. },
  17131. groupby: {
  17132. type: String,
  17133. default: ""
  17134. },
  17135. groupField: {
  17136. type: String,
  17137. default: ""
  17138. },
  17139. distinct: {
  17140. type: [Boolean, String],
  17141. default: !1
  17142. },
  17143. foreignKey: {
  17144. type: String,
  17145. default: ""
  17146. },
  17147. loadtime: {
  17148. type: String,
  17149. default: "auto"
  17150. },
  17151. manual: {
  17152. type: Boolean,
  17153. default: !1
  17154. }
  17155. },
  17156. data: function data() {
  17157. return {
  17158. mixinDatacomLoading: !1,
  17159. mixinDatacomHasMore: !1,
  17160. mixinDatacomResData: [],
  17161. mixinDatacomErrorMessage: "",
  17162. mixinDatacomPage: {}
  17163. };
  17164. },
  17165. created: function created() {
  17166. var _this20 = this;
  17167. this.mixinDatacomPage = {
  17168. current: this.pageCurrent,
  17169. size: this.pageSize,
  17170. count: 0
  17171. }, this.$watch(function () {
  17172. var e = [];
  17173. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  17174. e.push(_this20[t]);
  17175. }), e;
  17176. }, function (e, t) {
  17177. if (_this20.loadtime === Is) return;
  17178. var n = !1;
  17179. var s = [];
  17180. for (var _r7 = 2; _r7 < e.length; _r7++) {
  17181. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  17182. }
  17183. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  17184. });
  17185. },
  17186. methods: {
  17187. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  17188. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  17189. var _this21 = this;
  17190. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17191. _ref47$getone = _ref47.getone,
  17192. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  17193. t = _ref47.success,
  17194. n = _ref47.fail;
  17195. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  17196. _this21.mixinDatacomLoading = !1;
  17197. var _n$result = n.result,
  17198. s = _n$result.data,
  17199. r = _n$result.count;
  17200. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  17201. var i = e ? s.length ? s[0] : void 0 : s;
  17202. _this21.mixinDatacomResData = i, t && t(i);
  17203. }).catch(function (e) {
  17204. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  17205. }));
  17206. },
  17207. mixinDatacomGet: function mixinDatacomGet() {
  17208. var _n12;
  17209. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17210. var n = e.database(this.spaceInfo);
  17211. var s = t.action || this.action;
  17212. s && (n = n.action(s));
  17213. var r = t.collection || this.collection;
  17214. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  17215. var i = t.where || this.where;
  17216. i && Object.keys(i).length && (n = n.where(i));
  17217. var o = t.field || this.field;
  17218. o && (n = n.field(o));
  17219. var a = t.foreignKey || this.foreignKey;
  17220. a && (n = n.foreignKey(a));
  17221. var c = t.groupby || this.groupby;
  17222. c && (n = n.groupBy(c));
  17223. var u = t.groupField || this.groupField;
  17224. u && (n = n.groupField(u));
  17225. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  17226. var h = t.orderby || this.orderby;
  17227. h && (n = n.orderBy(h));
  17228. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  17229. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  17230. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  17231. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  17232. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  17233. m = {
  17234. getCount: p
  17235. },
  17236. y = {
  17237. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  17238. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  17239. };
  17240. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  17241. }
  17242. }
  17243. };
  17244. }
  17245. function ks(e) {
  17246. return function (t) {
  17247. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17248. n = function (e) {
  17249. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17250. 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;
  17251. }({
  17252. customUI: !1,
  17253. loadingOptions: {
  17254. title: "加载中...",
  17255. mask: !0
  17256. },
  17257. errorOptions: {
  17258. type: "modal",
  17259. retry: !1
  17260. }
  17261. }, n);
  17262. var _n13 = n,
  17263. s = _n13.customUI,
  17264. r = _n13.loadingOptions,
  17265. i = _n13.errorOptions,
  17266. o = _n13.parseSystemError,
  17267. a = !s;
  17268. return new Proxy({}, {
  17269. get: function get(s, c) {
  17270. return function () {
  17271. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17272. e = _ref48.fn,
  17273. t = _ref48.interceptorName,
  17274. n = _ref48.getCallbackArgs;
  17275. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  17276. var _len2,
  17277. s,
  17278. _key2,
  17279. r,
  17280. i,
  17281. o,
  17282. _args = arguments;
  17283. return _regenerator.default.wrap(function _callee50$(_context50) {
  17284. while (1) {
  17285. switch (_context50.prev = _context50.next) {
  17286. case 0:
  17287. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  17288. s[_key2] = _args[_key2];
  17289. }
  17290. r = n ? n({
  17291. params: s
  17292. }) : {};
  17293. _context50.prev = 2;
  17294. _context50.next = 5;
  17295. return M(K(t, "invoke"), _objectSpread({}, r));
  17296. case 5:
  17297. _context50.next = 7;
  17298. return e.apply(void 0, s);
  17299. case 7:
  17300. i = _context50.sent;
  17301. _context50.next = 10;
  17302. return M(K(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  17303. result: i
  17304. }));
  17305. case 10:
  17306. return _context50.abrupt("return", i);
  17307. case 13:
  17308. _context50.prev = 13;
  17309. _context50.t0 = _context50["catch"](2);
  17310. o = _context50.t0;
  17311. _context50.next = 18;
  17312. return M(K(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  17313. error: o
  17314. }));
  17315. case 18:
  17316. throw o;
  17317. case 19:
  17318. _context50.prev = 19;
  17319. _context50.next = 22;
  17320. return M(K(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  17321. error: o
  17322. }) : _objectSpread(_objectSpread({}, r), {}, {
  17323. result: i
  17324. }));
  17325. case 22:
  17326. return _context50.finish(19);
  17327. case 23:
  17328. case "end":
  17329. return _context50.stop();
  17330. }
  17331. }
  17332. }, _callee50, null, [[2, 13, 19, 23]]);
  17333. }));
  17334. }({
  17335. fn: function () {
  17336. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  17337. var l,
  17338. _len3,
  17339. u,
  17340. _key3,
  17341. d,
  17342. p,
  17343. _ref50,
  17344. f,
  17345. g,
  17346. m,
  17347. y,
  17348. _e26,
  17349. _yield,
  17350. _t18,
  17351. _n14,
  17352. _args4 = arguments;
  17353. return _regenerator.default.wrap(function _callee52$(_context52) {
  17354. while (1) {
  17355. switch (_context52.prev = _context52.next) {
  17356. case 0:
  17357. a && uni.showLoading({
  17358. title: r.title,
  17359. mask: r.mask
  17360. });
  17361. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  17362. u[_key3] = _args4[_key3];
  17363. }
  17364. d = {
  17365. name: t,
  17366. type: h,
  17367. data: {
  17368. method: c,
  17369. params: u
  17370. }
  17371. };
  17372. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  17373. var n = t.data.method,
  17374. s = e.secretMethods || {},
  17375. r = s[n] || s["*"];
  17376. r && (t.secretType = r);
  17377. }(n, d);
  17378. p = !1;
  17379. _context52.prev = 5;
  17380. _context52.next = 8;
  17381. return e.callFunction(d);
  17382. case 8:
  17383. l = _context52.sent;
  17384. _context52.next = 14;
  17385. break;
  17386. case 11:
  17387. _context52.prev = 11;
  17388. _context52.t0 = _context52["catch"](5);
  17389. p = !0, l = {
  17390. result: new se(_context52.t0)
  17391. };
  17392. case 14:
  17393. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  17394. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (oe(y), X(z, _objectSpread({}, y))), g)) {
  17395. _context52.next = 39;
  17396. break;
  17397. }
  17398. _e26 = m;
  17399. if (!(p && o)) {
  17400. _context52.next = 24;
  17401. break;
  17402. }
  17403. _context52.next = 20;
  17404. return o({
  17405. objectName: t,
  17406. methodName: c,
  17407. params: u,
  17408. errSubject: f,
  17409. errCode: g,
  17410. errMsg: m
  17411. });
  17412. case 20:
  17413. _context52.t1 = _context52.sent.errMsg;
  17414. if (_context52.t1) {
  17415. _context52.next = 23;
  17416. break;
  17417. }
  17418. _context52.t1 = m;
  17419. case 23:
  17420. _e26 = _context52.t1;
  17421. case 24:
  17422. if (!a) {
  17423. _context52.next = 37;
  17424. break;
  17425. }
  17426. if (!("toast" === i.type)) {
  17427. _context52.next = 29;
  17428. break;
  17429. }
  17430. uni.showToast({
  17431. title: _e26,
  17432. icon: "none"
  17433. });
  17434. _context52.next = 37;
  17435. break;
  17436. case 29:
  17437. if (!("modal" !== i.type)) {
  17438. _context52.next = 31;
  17439. break;
  17440. }
  17441. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  17442. case 31:
  17443. _context52.next = 33;
  17444. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  17445. var _ref52,
  17446. e,
  17447. t,
  17448. n,
  17449. s,
  17450. r,
  17451. _args2 = arguments;
  17452. return _regenerator.default.wrap(function _callee51$(_context51) {
  17453. while (1) {
  17454. switch (_context51.prev = _context51.next) {
  17455. case 0:
  17456. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  17457. return _context51.abrupt("return", new Promise(function (i, o) {
  17458. uni.showModal({
  17459. title: e,
  17460. content: t,
  17461. showCancel: n,
  17462. cancelText: s,
  17463. confirmText: r,
  17464. success: function success(e) {
  17465. i(e);
  17466. },
  17467. fail: function fail() {
  17468. i({
  17469. confirm: !1,
  17470. cancel: !0
  17471. });
  17472. }
  17473. });
  17474. }));
  17475. case 2:
  17476. case "end":
  17477. return _context51.stop();
  17478. }
  17479. }
  17480. }, _callee51);
  17481. }))({
  17482. title: "提示",
  17483. content: _e26,
  17484. showCancel: i.retry,
  17485. cancelText: "取消",
  17486. confirmText: i.retry ? "重试" : "确定"
  17487. });
  17488. case 33:
  17489. _yield = _context52.sent;
  17490. _t18 = _yield.confirm;
  17491. if (!(i.retry && _t18)) {
  17492. _context52.next = 37;
  17493. break;
  17494. }
  17495. return _context52.abrupt("return", s.apply(void 0, u));
  17496. case 37:
  17497. _n14 = new se({
  17498. subject: f,
  17499. code: g,
  17500. message: m,
  17501. requestId: l.requestId
  17502. });
  17503. throw _n14.detail = l.result, X($, {
  17504. type: G,
  17505. content: _n14
  17506. }), _n14;
  17507. case 39:
  17508. return _context52.abrupt("return", (X($, {
  17509. type: G,
  17510. content: l.result
  17511. }), l.result));
  17512. case 40:
  17513. case "end":
  17514. return _context52.stop();
  17515. }
  17516. }
  17517. }, _callee52, null, [[5, 11]]);
  17518. }));
  17519. function s() {
  17520. return _s14.apply(this, arguments);
  17521. }
  17522. return s;
  17523. }(),
  17524. interceptorName: "callObject",
  17525. getCallbackArgs: function getCallbackArgs() {
  17526. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17527. e = _ref53.params;
  17528. return {
  17529. objectName: t,
  17530. methodName: c,
  17531. params: e
  17532. };
  17533. }
  17534. });
  17535. }
  17536. });
  17537. };
  17538. }
  17539. function Ts(e) {
  17540. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  17541. }
  17542. function Cs() {
  17543. return _Cs.apply(this, arguments);
  17544. }
  17545. function _Cs() {
  17546. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  17547. var _ref65,
  17548. e,
  17549. _ref65$callLoginByWei,
  17550. t,
  17551. n,
  17552. s,
  17553. r,
  17554. _args7 = arguments;
  17555. return _regenerator.default.wrap(function _callee55$(_context55) {
  17556. while (1) {
  17557. switch (_context55.prev = _context55.next) {
  17558. case 0:
  17559. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  17560. n = Ts(this);
  17561. if (!("mp-weixin" !== A)) {
  17562. _context55.next = 4;
  17563. break;
  17564. }
  17565. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(A, "`"));
  17566. case 4:
  17567. if (!(e && t)) {
  17568. _context55.next = 6;
  17569. break;
  17570. }
  17571. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  17572. case 6:
  17573. if (!e) {
  17574. _context55.next = 8;
  17575. break;
  17576. }
  17577. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  17578. case 8:
  17579. _context55.next = 10;
  17580. return new Promise(function (e, t) {
  17581. uni.login({
  17582. success: function success(t) {
  17583. e(t.code);
  17584. },
  17585. fail: function fail(e) {
  17586. t(new Error(e.errMsg));
  17587. }
  17588. });
  17589. });
  17590. case 10:
  17591. s = _context55.sent;
  17592. r = this.importObject("uni-id-co", {
  17593. customUI: !0
  17594. });
  17595. _context55.next = 14;
  17596. return r.secureNetworkHandshakeByWeixin({
  17597. code: s,
  17598. callLoginByWeixin: t
  17599. });
  17600. case 14:
  17601. n.mpWeixinCode = s;
  17602. return _context55.abrupt("return", {
  17603. code: s
  17604. });
  17605. case 16:
  17606. case "end":
  17607. return _context55.stop();
  17608. }
  17609. }
  17610. }, _callee55, this);
  17611. }));
  17612. return _Cs.apply(this, arguments);
  17613. }
  17614. function Ps(_x37) {
  17615. return _Ps.apply(this, arguments);
  17616. }
  17617. function _Ps() {
  17618. _Ps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  17619. var t;
  17620. return _regenerator.default.wrap(function _callee56$(_context56) {
  17621. while (1) {
  17622. switch (_context56.prev = _context56.next) {
  17623. case 0:
  17624. t = Ts(this);
  17625. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  17626. case 2:
  17627. case "end":
  17628. return _context56.stop();
  17629. }
  17630. }
  17631. }, _callee56, this);
  17632. }));
  17633. return _Ps.apply(this, arguments);
  17634. }
  17635. function As(e) {
  17636. return function () {
  17637. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17638. t = _ref54.openid,
  17639. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  17640. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  17641. return Ps.call(e, {
  17642. openid: t,
  17643. callLoginByWeixin: n
  17644. });
  17645. };
  17646. }
  17647. var Es = /*#__PURE__*/function (_ref55) {
  17648. (0, _inherits2.default)(Es, _ref55);
  17649. var _super12 = _createSuper(Es);
  17650. function Es() {
  17651. var _this22;
  17652. (0, _classCallCheck2.default)(this, Es);
  17653. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  17654. return _this22;
  17655. }
  17656. (0, _createClass2.default)(Es, [{
  17657. key: "init",
  17658. value: function init() {
  17659. var _this23 = this;
  17660. return Promise.all([I("getSystemInfo")(), I("getPushClientId")()]).then(function () {
  17661. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  17662. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  17663. _ref57$ = _ref57[0];
  17664. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  17665. var e = _ref57$.appId,
  17666. _ref57$2 = _ref57[1];
  17667. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  17668. var t = _ref57$2.cid;
  17669. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  17670. if (!t) throw new Error("Invalid push client id");
  17671. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  17672. }, function (e) {
  17673. throw _this23.emit("error", e), _this23.close(), e;
  17674. });
  17675. }
  17676. }, {
  17677. key: "open",
  17678. value: function () {
  17679. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  17680. return _regenerator.default.wrap(function _callee53$(_context53) {
  17681. while (1) {
  17682. switch (_context53.prev = _context53.next) {
  17683. case 0:
  17684. return _context53.abrupt("return", this.init());
  17685. case 1:
  17686. case "end":
  17687. return _context53.stop();
  17688. }
  17689. }
  17690. }, _callee53, this);
  17691. }));
  17692. function open() {
  17693. return _open.apply(this, arguments);
  17694. }
  17695. return open;
  17696. }()
  17697. }, {
  17698. key: "_isUniCloudSSE",
  17699. value: function _isUniCloudSSE(e) {
  17700. if ("receive" !== e.type) return !1;
  17701. var t = e && e.data && e.data.payload;
  17702. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  17703. }
  17704. }, {
  17705. key: "_receivePushMessage",
  17706. value: function _receivePushMessage(e) {
  17707. if (!this._isUniCloudSSE(e)) return;
  17708. var t = e && e.data && e.data.payload,
  17709. n = t.action,
  17710. s = t.messageId,
  17711. r = t.message;
  17712. this._payloadQueue.push({
  17713. action: n,
  17714. messageId: s,
  17715. message: r
  17716. }), this._consumMessage();
  17717. }
  17718. }, {
  17719. key: "_consumMessage",
  17720. value: function _consumMessage() {
  17721. var _this24 = this;
  17722. for (;;) {
  17723. var _e27 = this._payloadQueue.find(function (e) {
  17724. return e.messageId === _this24._currentMessageId + 1;
  17725. });
  17726. if (!_e27) break;
  17727. this._currentMessageId++, this._parseMessagePayload(_e27);
  17728. }
  17729. }
  17730. }, {
  17731. key: "_parseMessagePayload",
  17732. value: function _parseMessagePayload(e) {
  17733. var t = e.action,
  17734. n = e.messageId,
  17735. s = e.message;
  17736. "end" === t ? this._end({
  17737. messageId: n,
  17738. message: s
  17739. }) : "message" === t && this._appendMessage({
  17740. messageId: n,
  17741. message: s
  17742. });
  17743. }
  17744. }, {
  17745. key: "_appendMessage",
  17746. value: function _appendMessage() {
  17747. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17748. e = _ref58.messageId,
  17749. t = _ref58.message;
  17750. this.emit("message", t);
  17751. }
  17752. }, {
  17753. key: "_end",
  17754. value: function _end() {
  17755. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17756. e = _ref59.messageId,
  17757. t = _ref59.message;
  17758. this.emit("end", t), this.close();
  17759. }
  17760. }, {
  17761. key: "_initMessageListener",
  17762. value: function _initMessageListener() {
  17763. uni.onPushMessage(this._uniPushMessageCallback);
  17764. }
  17765. }, {
  17766. key: "_destroy",
  17767. value: function _destroy() {
  17768. uni.offPushMessage(this._uniPushMessageCallback);
  17769. }
  17770. }, {
  17771. key: "toJSON",
  17772. value: function toJSON() {
  17773. return {
  17774. appId: this._appId,
  17775. pushClientId: this._pushClientId,
  17776. seqId: this._seqId
  17777. };
  17778. }
  17779. }, {
  17780. key: "close",
  17781. value: function close() {
  17782. this._destroy(), this.emit("close");
  17783. }
  17784. }]);
  17785. return Es;
  17786. }( /*#__PURE__*/function () {
  17787. function _class6() {
  17788. (0, _classCallCheck2.default)(this, _class6);
  17789. this._callback = {};
  17790. }
  17791. (0, _createClass2.default)(_class6, [{
  17792. key: "addListener",
  17793. value: function addListener(e, t) {
  17794. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  17795. }
  17796. }, {
  17797. key: "on",
  17798. value: function on(e, t) {
  17799. return this.addListener(e, t);
  17800. }
  17801. }, {
  17802. key: "removeListener",
  17803. value: function removeListener(e, t) {
  17804. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  17805. var n = this._callback[e];
  17806. if (!n) return;
  17807. var s = function (e, t) {
  17808. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  17809. if (e[_n15] === t) return _n15;
  17810. }
  17811. return -1;
  17812. }(n, t);
  17813. n.splice(s, 1);
  17814. }
  17815. }, {
  17816. key: "off",
  17817. value: function off(e, t) {
  17818. return this.removeListener(e, t);
  17819. }
  17820. }, {
  17821. key: "removeAllListener",
  17822. value: function removeAllListener(e) {
  17823. delete this._callback[e];
  17824. }
  17825. }, {
  17826. key: "emit",
  17827. value: function emit(e) {
  17828. var n = this._callback[e];
  17829. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  17830. t[_key4 - 1] = arguments[_key4];
  17831. }
  17832. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  17833. n[_e28].apply(n, t);
  17834. }
  17835. }
  17836. }]);
  17837. return _class6;
  17838. }());
  17839. function Os(_x38, _x39) {
  17840. return _Os.apply(this, arguments);
  17841. }
  17842. function _Os() {
  17843. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  17844. var n, _e32, s;
  17845. return _regenerator.default.wrap(function _callee57$(_context57) {
  17846. while (1) {
  17847. switch (_context57.prev = _context57.next) {
  17848. case 0:
  17849. n = "http://".concat(e, ":").concat(t, "/system/ping");
  17850. _context57.prev = 1;
  17851. _context57.next = 4;
  17852. return s = {
  17853. url: n,
  17854. timeout: 500
  17855. }, new Promise(function (e, t) {
  17856. re.request(_objectSpread(_objectSpread({}, s), {}, {
  17857. success: function success(t) {
  17858. e(t);
  17859. },
  17860. fail: function fail(e) {
  17861. t(e);
  17862. }
  17863. }));
  17864. });
  17865. case 4:
  17866. _e32 = _context57.sent;
  17867. return _context57.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  17868. case 8:
  17869. _context57.prev = 8;
  17870. _context57.t0 = _context57["catch"](1);
  17871. return _context57.abrupt("return", !1);
  17872. case 11:
  17873. case "end":
  17874. return _context57.stop();
  17875. }
  17876. }
  17877. }, _callee57, null, [[1, 8]]);
  17878. }));
  17879. return _Os.apply(this, arguments);
  17880. }
  17881. function xs(_x40) {
  17882. return _xs.apply(this, arguments);
  17883. }
  17884. function _xs() {
  17885. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  17886. var _ue2, _e33, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  17887. return _regenerator.default.wrap(function _callee59$(_context59) {
  17888. while (1) {
  17889. switch (_context59.prev = _context59.next) {
  17890. case 0:
  17891. if (k) {
  17892. _context59.next = 2;
  17893. break;
  17894. }
  17895. return _context59.abrupt("return", Promise.resolve());
  17896. case 2:
  17897. if ("app" === A) {
  17898. _ue2 = ue(), _e33 = _ue2.osName, _t20 = _ue2.osVersion;
  17899. "ios" === _e33 && function (e) {
  17900. if (!e || "string" != typeof e) return 0;
  17901. var t = e.match(/^(\d+)./);
  17902. return t && t[1] ? parseInt(t[1]) : 0;
  17903. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  17904. }
  17905. t = e.__dev__;
  17906. if (t.debugInfo) {
  17907. _context59.next = 6;
  17908. break;
  17909. }
  17910. return _context59.abrupt("return");
  17911. case 6:
  17912. _t$debugInfo = t.debugInfo;
  17913. n = _t$debugInfo.address;
  17914. s = _t$debugInfo.servePort;
  17915. _context59.next = 11;
  17916. return function () {
  17917. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  17918. var n, _s15, _r8;
  17919. return _regenerator.default.wrap(function _callee58$(_context58) {
  17920. while (1) {
  17921. switch (_context58.prev = _context58.next) {
  17922. case 0:
  17923. _s15 = 0;
  17924. case 1:
  17925. if (!(_s15 < e.length)) {
  17926. _context58.next = 11;
  17927. break;
  17928. }
  17929. _r8 = e[_s15];
  17930. _context58.next = 5;
  17931. return Os(_r8, t);
  17932. case 5:
  17933. if (!_context58.sent) {
  17934. _context58.next = 8;
  17935. break;
  17936. }
  17937. n = _r8;
  17938. return _context58.abrupt("break", 11);
  17939. case 8:
  17940. _s15++;
  17941. _context58.next = 1;
  17942. break;
  17943. case 11:
  17944. return _context58.abrupt("return", {
  17945. address: n,
  17946. port: t
  17947. });
  17948. case 12:
  17949. case "end":
  17950. return _context58.stop();
  17951. }
  17952. }
  17953. }, _callee58);
  17954. }));
  17955. return function (_x41, _x42) {
  17956. return _ref66.apply(this, arguments);
  17957. };
  17958. }()(n, s);
  17959. case 11:
  17960. _yield2 = _context59.sent;
  17961. r = _yield2.address;
  17962. if (!r) {
  17963. _context59.next = 15;
  17964. break;
  17965. }
  17966. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  17967. case 15:
  17968. i = console["app" === A ? "error" : "warn"];
  17969. o = "";
  17970. 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" === A && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === A.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  17971. _context59.next = 19;
  17972. break;
  17973. }
  17974. throw new Error(o);
  17975. case 19:
  17976. i(o);
  17977. case 20:
  17978. case "end":
  17979. return _context59.stop();
  17980. }
  17981. }
  17982. }, _callee59);
  17983. }));
  17984. return _xs.apply(this, arguments);
  17985. }
  17986. function Rs(e) {
  17987. e._initPromiseHub || (e._initPromiseHub = new S({
  17988. createPromise: function createPromise() {
  17989. var t = Promise.resolve();
  17990. var n;
  17991. n = 1, t = new Promise(function (e) {
  17992. setTimeout(function () {
  17993. e();
  17994. }, n);
  17995. });
  17996. var s = e.auth();
  17997. return t.then(function () {
  17998. return s.getLoginState();
  17999. }).then(function (e) {
  18000. return e ? Promise.resolve() : s.signInAnonymously();
  18001. });
  18002. }
  18003. }));
  18004. }
  18005. var Us = {
  18006. tcb: It,
  18007. tencent: It,
  18008. aliyun: me,
  18009. private: kt
  18010. };
  18011. var Ls = new ( /*#__PURE__*/function () {
  18012. function _class7() {
  18013. (0, _classCallCheck2.default)(this, _class7);
  18014. }
  18015. (0, _createClass2.default)(_class7, [{
  18016. key: "init",
  18017. value: function init(e) {
  18018. var t = {};
  18019. var n = Us[e.provider];
  18020. if (!n) throw new Error("未提供正确的provider参数");
  18021. t = n.init(e), k && function (e) {
  18022. if (!k) return;
  18023. var t = {};
  18024. e.__dev__ = t, t.debugLog = k && ("web" === A && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === A);
  18025. var n = E;
  18026. n && !n.code && (t.debugInfo = n);
  18027. var s = new S({
  18028. createPromise: function createPromise() {
  18029. return xs(e);
  18030. }
  18031. });
  18032. t.initLocalNetwork = function () {
  18033. return s.exec();
  18034. };
  18035. }(t), Rs(t), Rn(t), function (e) {
  18036. var t = e.uploadFile;
  18037. e.uploadFile = function (e) {
  18038. return t.call(this, e);
  18039. };
  18040. }(t), function (e) {
  18041. e.database = function (t) {
  18042. if (t && Object.keys(t).length > 0) return e.init(t).database();
  18043. if (this._database) return this._database;
  18044. var n = $n(Wn, {
  18045. uniClient: e
  18046. });
  18047. return this._database = n, n;
  18048. }, e.databaseForJQL = function (t) {
  18049. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  18050. if (this._databaseForJQL) return this._databaseForJQL;
  18051. var n = $n(Wn, {
  18052. uniClient: e,
  18053. isJQL: !0
  18054. });
  18055. return this._databaseForJQL = n, n;
  18056. };
  18057. }(t), function (e) {
  18058. e.getCurrentUserInfo = ws, e.chooseAndUploadFile = Ss.initChooseAndUploadFile(e), Object.assign(e, {
  18059. get mixinDatacom() {
  18060. return bs(e);
  18061. }
  18062. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = As(e), e.importObject = ks(e);
  18063. }(t);
  18064. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  18065. if (!t[e]) return;
  18066. var n = t[e];
  18067. t[e] = function () {
  18068. return n.apply(t, Array.from(arguments));
  18069. }, t[e] = function (e, t) {
  18070. return function (n) {
  18071. var _this25 = this;
  18072. var s = !1;
  18073. if ("callFunction" === t) {
  18074. var _e29 = n && n.type || u;
  18075. s = _e29 !== u;
  18076. }
  18077. var r = "callFunction" === t && !s,
  18078. i = this._initPromiseHub.exec();
  18079. n = n || {};
  18080. var _ne2 = ne(n),
  18081. o = _ne2.success,
  18082. a = _ne2.fail,
  18083. c = _ne2.complete,
  18084. h = i.then(function () {
  18085. return s ? Promise.resolve() : M(K(t, "invoke"), n);
  18086. }).then(function () {
  18087. return e.call(_this25, n);
  18088. }).then(function (e) {
  18089. return s ? Promise.resolve(e) : M(K(t, "success"), e).then(function () {
  18090. return M(K(t, "complete"), e);
  18091. }).then(function () {
  18092. return r && X($, {
  18093. type: H,
  18094. content: e
  18095. }), Promise.resolve(e);
  18096. });
  18097. }, function (e) {
  18098. return s ? Promise.reject(e) : M(K(t, "fail"), e).then(function () {
  18099. return M(K(t, "complete"), e);
  18100. }).then(function () {
  18101. return X($, {
  18102. type: H,
  18103. content: e
  18104. }), Promise.reject(e);
  18105. });
  18106. });
  18107. if (!(o || a || c)) return h;
  18108. h.then(function (e) {
  18109. o && o(e), c && c(e), r && X($, {
  18110. type: H,
  18111. content: e
  18112. });
  18113. }, function (e) {
  18114. a && a(e), c && c(e), r && X($, {
  18115. type: H,
  18116. content: e
  18117. });
  18118. });
  18119. };
  18120. }(t[e], e).bind(t);
  18121. }), t.init = this.init, t;
  18122. }
  18123. }]);
  18124. return _class7;
  18125. }())();
  18126. (function () {
  18127. var e = O;
  18128. var t = {};
  18129. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  18130. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  18131. var _n16;
  18132. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  18133. Ls[e] = function () {
  18134. return console.error(_n16), Promise.reject(new se({
  18135. code: "SYS_ERR",
  18136. message: _n16
  18137. }));
  18138. };
  18139. });
  18140. }
  18141. Object.assign(Ls, {
  18142. get mixinDatacom() {
  18143. return bs(Ls);
  18144. }
  18145. }), gs(Ls), Ls.addInterceptor = F, Ls.removeInterceptor = q, Ls.interceptObject = j, k && "web" === A && (window.uniCloud = Ls);
  18146. })();
  18147. var Ns = Ls;
  18148. exports.default = Ns;
  18149. /* 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"]))
  18150. /***/ }),
  18151. /***/ 28:
  18152. /*!************************************************************************************************!*\
  18153. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  18154. \************************************************************************************************/
  18155. /*! no static exports found */
  18156. /***/ (function(module, exports, __webpack_require__) {
  18157. // TODO(Babel 8): Remove this file.
  18158. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 29)();
  18159. module.exports = runtime;
  18160. /***/ }),
  18161. /***/ 29:
  18162. /*!*******************************************************************!*\
  18163. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  18164. \*******************************************************************/
  18165. /*! no static exports found */
  18166. /***/ (function(module, exports, __webpack_require__) {
  18167. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18168. function _regeneratorRuntime() {
  18169. "use strict";
  18170. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  18171. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  18172. return exports;
  18173. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18174. var exports = {},
  18175. Op = Object.prototype,
  18176. hasOwn = Op.hasOwnProperty,
  18177. defineProperty = Object.defineProperty || function (obj, key, desc) {
  18178. obj[key] = desc.value;
  18179. },
  18180. $Symbol = "function" == typeof Symbol ? Symbol : {},
  18181. iteratorSymbol = $Symbol.iterator || "@@iterator",
  18182. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  18183. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  18184. function define(obj, key, value) {
  18185. return Object.defineProperty(obj, key, {
  18186. value: value,
  18187. enumerable: !0,
  18188. configurable: !0,
  18189. writable: !0
  18190. }), obj[key];
  18191. }
  18192. try {
  18193. define({}, "");
  18194. } catch (err) {
  18195. define = function define(obj, key, value) {
  18196. return obj[key] = value;
  18197. };
  18198. }
  18199. function wrap(innerFn, outerFn, self, tryLocsList) {
  18200. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  18201. generator = Object.create(protoGenerator.prototype),
  18202. context = new Context(tryLocsList || []);
  18203. return defineProperty(generator, "_invoke", {
  18204. value: makeInvokeMethod(innerFn, self, context)
  18205. }), generator;
  18206. }
  18207. function tryCatch(fn, obj, arg) {
  18208. try {
  18209. return {
  18210. type: "normal",
  18211. arg: fn.call(obj, arg)
  18212. };
  18213. } catch (err) {
  18214. return {
  18215. type: "throw",
  18216. arg: err
  18217. };
  18218. }
  18219. }
  18220. exports.wrap = wrap;
  18221. var ContinueSentinel = {};
  18222. function Generator() {}
  18223. function GeneratorFunction() {}
  18224. function GeneratorFunctionPrototype() {}
  18225. var IteratorPrototype = {};
  18226. define(IteratorPrototype, iteratorSymbol, function () {
  18227. return this;
  18228. });
  18229. var getProto = Object.getPrototypeOf,
  18230. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  18231. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  18232. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  18233. function defineIteratorMethods(prototype) {
  18234. ["next", "throw", "return"].forEach(function (method) {
  18235. define(prototype, method, function (arg) {
  18236. return this._invoke(method, arg);
  18237. });
  18238. });
  18239. }
  18240. function AsyncIterator(generator, PromiseImpl) {
  18241. function invoke(method, arg, resolve, reject) {
  18242. var record = tryCatch(generator[method], generator, arg);
  18243. if ("throw" !== record.type) {
  18244. var result = record.arg,
  18245. value = result.value;
  18246. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  18247. invoke("next", value, resolve, reject);
  18248. }, function (err) {
  18249. invoke("throw", err, resolve, reject);
  18250. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  18251. result.value = unwrapped, resolve(result);
  18252. }, function (error) {
  18253. return invoke("throw", error, resolve, reject);
  18254. });
  18255. }
  18256. reject(record.arg);
  18257. }
  18258. var previousPromise;
  18259. defineProperty(this, "_invoke", {
  18260. value: function value(method, arg) {
  18261. function callInvokeWithMethodAndArg() {
  18262. return new PromiseImpl(function (resolve, reject) {
  18263. invoke(method, arg, resolve, reject);
  18264. });
  18265. }
  18266. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  18267. }
  18268. });
  18269. }
  18270. function makeInvokeMethod(innerFn, self, context) {
  18271. var state = "suspendedStart";
  18272. return function (method, arg) {
  18273. if ("executing" === state) throw new Error("Generator is already running");
  18274. if ("completed" === state) {
  18275. if ("throw" === method) throw arg;
  18276. return doneResult();
  18277. }
  18278. for (context.method = method, context.arg = arg;;) {
  18279. var delegate = context.delegate;
  18280. if (delegate) {
  18281. var delegateResult = maybeInvokeDelegate(delegate, context);
  18282. if (delegateResult) {
  18283. if (delegateResult === ContinueSentinel) continue;
  18284. return delegateResult;
  18285. }
  18286. }
  18287. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  18288. if ("suspendedStart" === state) throw state = "completed", context.arg;
  18289. context.dispatchException(context.arg);
  18290. } else "return" === context.method && context.abrupt("return", context.arg);
  18291. state = "executing";
  18292. var record = tryCatch(innerFn, self, context);
  18293. if ("normal" === record.type) {
  18294. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  18295. return {
  18296. value: record.arg,
  18297. done: context.done
  18298. };
  18299. }
  18300. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  18301. }
  18302. };
  18303. }
  18304. function maybeInvokeDelegate(delegate, context) {
  18305. var methodName = context.method,
  18306. method = delegate.iterator[methodName];
  18307. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  18308. var record = tryCatch(method, delegate.iterator, context.arg);
  18309. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  18310. var info = record.arg;
  18311. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  18312. }
  18313. function pushTryEntry(locs) {
  18314. var entry = {
  18315. tryLoc: locs[0]
  18316. };
  18317. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  18318. }
  18319. function resetTryEntry(entry) {
  18320. var record = entry.completion || {};
  18321. record.type = "normal", delete record.arg, entry.completion = record;
  18322. }
  18323. function Context(tryLocsList) {
  18324. this.tryEntries = [{
  18325. tryLoc: "root"
  18326. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  18327. }
  18328. function values(iterable) {
  18329. if (iterable) {
  18330. var iteratorMethod = iterable[iteratorSymbol];
  18331. if (iteratorMethod) return iteratorMethod.call(iterable);
  18332. if ("function" == typeof iterable.next) return iterable;
  18333. if (!isNaN(iterable.length)) {
  18334. var i = -1,
  18335. next = function next() {
  18336. for (; ++i < iterable.length;) {
  18337. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  18338. }
  18339. return next.value = undefined, next.done = !0, next;
  18340. };
  18341. return next.next = next;
  18342. }
  18343. }
  18344. return {
  18345. next: doneResult
  18346. };
  18347. }
  18348. function doneResult() {
  18349. return {
  18350. value: undefined,
  18351. done: !0
  18352. };
  18353. }
  18354. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  18355. value: GeneratorFunctionPrototype,
  18356. configurable: !0
  18357. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  18358. value: GeneratorFunction,
  18359. configurable: !0
  18360. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  18361. var ctor = "function" == typeof genFun && genFun.constructor;
  18362. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  18363. }, exports.mark = function (genFun) {
  18364. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  18365. }, exports.awrap = function (arg) {
  18366. return {
  18367. __await: arg
  18368. };
  18369. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  18370. return this;
  18371. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  18372. void 0 === PromiseImpl && (PromiseImpl = Promise);
  18373. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  18374. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  18375. return result.done ? result.value : iter.next();
  18376. });
  18377. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  18378. return this;
  18379. }), define(Gp, "toString", function () {
  18380. return "[object Generator]";
  18381. }), exports.keys = function (val) {
  18382. var object = Object(val),
  18383. keys = [];
  18384. for (var key in object) {
  18385. keys.push(key);
  18386. }
  18387. return keys.reverse(), function next() {
  18388. for (; keys.length;) {
  18389. var key = keys.pop();
  18390. if (key in object) return next.value = key, next.done = !1, next;
  18391. }
  18392. return next.done = !0, next;
  18393. };
  18394. }, exports.values = values, Context.prototype = {
  18395. constructor: Context,
  18396. reset: function reset(skipTempReset) {
  18397. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  18398. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  18399. }
  18400. },
  18401. stop: function stop() {
  18402. this.done = !0;
  18403. var rootRecord = this.tryEntries[0].completion;
  18404. if ("throw" === rootRecord.type) throw rootRecord.arg;
  18405. return this.rval;
  18406. },
  18407. dispatchException: function dispatchException(exception) {
  18408. if (this.done) throw exception;
  18409. var context = this;
  18410. function handle(loc, caught) {
  18411. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  18412. }
  18413. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18414. var entry = this.tryEntries[i],
  18415. record = entry.completion;
  18416. if ("root" === entry.tryLoc) return handle("end");
  18417. if (entry.tryLoc <= this.prev) {
  18418. var hasCatch = hasOwn.call(entry, "catchLoc"),
  18419. hasFinally = hasOwn.call(entry, "finallyLoc");
  18420. if (hasCatch && hasFinally) {
  18421. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  18422. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  18423. } else if (hasCatch) {
  18424. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  18425. } else {
  18426. if (!hasFinally) throw new Error("try statement without catch or finally");
  18427. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  18428. }
  18429. }
  18430. }
  18431. },
  18432. abrupt: function abrupt(type, arg) {
  18433. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18434. var entry = this.tryEntries[i];
  18435. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  18436. var finallyEntry = entry;
  18437. break;
  18438. }
  18439. }
  18440. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  18441. var record = finallyEntry ? finallyEntry.completion : {};
  18442. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  18443. },
  18444. complete: function complete(record, afterLoc) {
  18445. if ("throw" === record.type) throw record.arg;
  18446. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  18447. },
  18448. finish: function finish(finallyLoc) {
  18449. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18450. var entry = this.tryEntries[i];
  18451. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  18452. }
  18453. },
  18454. "catch": function _catch(tryLoc) {
  18455. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18456. var entry = this.tryEntries[i];
  18457. if (entry.tryLoc === tryLoc) {
  18458. var record = entry.completion;
  18459. if ("throw" === record.type) {
  18460. var thrown = record.arg;
  18461. resetTryEntry(entry);
  18462. }
  18463. return thrown;
  18464. }
  18465. }
  18466. throw new Error("illegal catch attempt");
  18467. },
  18468. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  18469. return this.delegate = {
  18470. iterator: values(iterable),
  18471. resultName: resultName,
  18472. nextLoc: nextLoc
  18473. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  18474. }
  18475. }, exports;
  18476. }
  18477. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18478. /***/ }),
  18479. /***/ 3:
  18480. /*!***********************************!*\
  18481. !*** (webpack)/buildin/global.js ***!
  18482. \***********************************/
  18483. /*! no static exports found */
  18484. /***/ (function(module, exports) {
  18485. var g;
  18486. // This works in non-strict mode
  18487. g = (function() {
  18488. return this;
  18489. })();
  18490. try {
  18491. // This works if eval is allowed (see CSP)
  18492. g = g || new Function("return this")();
  18493. } catch (e) {
  18494. // This works if the window reference is available
  18495. if (typeof window === "object") g = window;
  18496. }
  18497. // g can still be undefined, but nothing to do about it...
  18498. // We return undefined, instead of nothing here, so it's
  18499. // easier to handle this case. if(!global) { ...}
  18500. module.exports = g;
  18501. /***/ }),
  18502. /***/ 30:
  18503. /*!**********************************************************************!*\
  18504. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  18505. \**********************************************************************/
  18506. /*! no static exports found */
  18507. /***/ (function(module, exports) {
  18508. function _assertThisInitialized(self) {
  18509. if (self === void 0) {
  18510. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  18511. }
  18512. return self;
  18513. }
  18514. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18515. /***/ }),
  18516. /***/ 31:
  18517. /*!*****************************************************************!*\
  18518. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  18519. \*****************************************************************/
  18520. /*! no static exports found */
  18521. /***/ (function(module, exports) {
  18522. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  18523. try {
  18524. var info = gen[key](arg);
  18525. var value = info.value;
  18526. } catch (error) {
  18527. reject(error);
  18528. return;
  18529. }
  18530. if (info.done) {
  18531. resolve(value);
  18532. } else {
  18533. Promise.resolve(value).then(_next, _throw);
  18534. }
  18535. }
  18536. function _asyncToGenerator(fn) {
  18537. return function () {
  18538. var self = this,
  18539. args = arguments;
  18540. return new Promise(function (resolve, reject) {
  18541. var gen = fn.apply(self, args);
  18542. function _next(value) {
  18543. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  18544. }
  18545. function _throw(err) {
  18546. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  18547. }
  18548. _next(undefined);
  18549. });
  18550. };
  18551. }
  18552. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18553. /***/ }),
  18554. /***/ 32:
  18555. /*!*********************************************************!*\
  18556. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  18557. \*********************************************************/
  18558. /*! no static exports found */
  18559. /***/ (function(module, exports, __webpack_require__) {
  18560. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18561. function _inherits(subClass, superClass) {
  18562. if (typeof superClass !== "function" && superClass !== null) {
  18563. throw new TypeError("Super expression must either be null or a function");
  18564. }
  18565. subClass.prototype = Object.create(superClass && superClass.prototype, {
  18566. constructor: {
  18567. value: subClass,
  18568. writable: true,
  18569. configurable: true
  18570. }
  18571. });
  18572. Object.defineProperty(subClass, "prototype", {
  18573. writable: false
  18574. });
  18575. if (superClass) setPrototypeOf(subClass, superClass);
  18576. }
  18577. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18578. /***/ }),
  18579. /***/ 33:
  18580. /*!**************************************************************************!*\
  18581. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  18582. \**************************************************************************/
  18583. /*! no static exports found */
  18584. /***/ (function(module, exports, __webpack_require__) {
  18585. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18586. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 30);
  18587. function _possibleConstructorReturn(self, call) {
  18588. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  18589. return call;
  18590. } else if (call !== void 0) {
  18591. throw new TypeError("Derived constructors may only return object or undefined");
  18592. }
  18593. return assertThisInitialized(self);
  18594. }
  18595. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18596. /***/ }),
  18597. /***/ 34:
  18598. /*!***************************************************************!*\
  18599. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  18600. \***************************************************************/
  18601. /*! no static exports found */
  18602. /***/ (function(module, exports) {
  18603. function _getPrototypeOf(o) {
  18604. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  18605. return o.__proto__ || Object.getPrototypeOf(o);
  18606. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18607. return _getPrototypeOf(o);
  18608. }
  18609. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18610. /***/ }),
  18611. /***/ 35:
  18612. /*!****************************************************************!*\
  18613. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  18614. \****************************************************************/
  18615. /*! no static exports found */
  18616. /***/ (function(module, exports, __webpack_require__) {
  18617. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 34);
  18618. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18619. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 36);
  18620. var construct = __webpack_require__(/*! ./construct.js */ 15);
  18621. function _wrapNativeSuper(Class) {
  18622. var _cache = typeof Map === "function" ? new Map() : undefined;
  18623. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  18624. if (Class === null || !isNativeFunction(Class)) return Class;
  18625. if (typeof Class !== "function") {
  18626. throw new TypeError("Super expression must either be null or a function");
  18627. }
  18628. if (typeof _cache !== "undefined") {
  18629. if (_cache.has(Class)) return _cache.get(Class);
  18630. _cache.set(Class, Wrapper);
  18631. }
  18632. function Wrapper() {
  18633. return construct(Class, arguments, getPrototypeOf(this).constructor);
  18634. }
  18635. Wrapper.prototype = Object.create(Class.prototype, {
  18636. constructor: {
  18637. value: Wrapper,
  18638. enumerable: false,
  18639. writable: true,
  18640. configurable: true
  18641. }
  18642. });
  18643. return setPrototypeOf(Wrapper, Class);
  18644. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18645. return _wrapNativeSuper(Class);
  18646. }
  18647. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18648. /***/ }),
  18649. /***/ 36:
  18650. /*!*****************************************************************!*\
  18651. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  18652. \*****************************************************************/
  18653. /*! no static exports found */
  18654. /***/ (function(module, exports) {
  18655. function _isNativeFunction(fn) {
  18656. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  18657. }
  18658. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18659. /***/ }),
  18660. /***/ 37:
  18661. /*!*********************************************************************************************!*\
  18662. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/pages.json?{"type":"origin-pages-json"} ***!
  18663. \*********************************************************************************************/
  18664. /*! no static exports found */
  18665. /***/ (function(module, exports, __webpack_require__) {
  18666. "use strict";
  18667. Object.defineProperty(exports, "__esModule", {
  18668. value: true
  18669. });
  18670. exports.default = void 0;
  18671. var _default = {
  18672. "pages": [{
  18673. "path": "pages/index/mindex/mindex",
  18674. "style": {
  18675. "navigationBarTitleText": "%index.home%",
  18676. "navigationStyle": "custom",
  18677. "enablePullDownRefresh": true
  18678. }
  18679. }, {
  18680. "path": "pages/UserCenter/UserCenter",
  18681. "style": {
  18682. "navigationBarTitleText": "%index.User%",
  18683. "navigationStyle": "custom",
  18684. "enablePullDownRefresh": false
  18685. }
  18686. }, {
  18687. "path": "pages/OrderList/pinglun",
  18688. "style": {
  18689. "navigationBarTitleText": "%index.pinglun%",
  18690. "enablePullDownRefresh": false,
  18691. "navigationStyle": "custom"
  18692. }
  18693. }, {
  18694. "path": "pages/pinglun/pingLunList",
  18695. "style": {
  18696. "navigationBarTitleText": "%index.pinglunlb%",
  18697. "enablePullDownRefresh": false,
  18698. "navigationStyle": "custom"
  18699. }
  18700. }, {
  18701. "path": "pages/OrderList/OrderDetail",
  18702. "style": {
  18703. "navigationBarTitleText": "%index.orderxq%",
  18704. "enablePullDownRefresh": false,
  18705. "navigationStyle": "custom"
  18706. }
  18707. }, {
  18708. "path": "pages/UserCenter/LoginView",
  18709. "style": {
  18710. "navigationBarTitleText": "%index.dengluzhuce%",
  18711. "enablePullDownRefresh": false,
  18712. "navigationStyle": "custom"
  18713. }
  18714. }, {
  18715. "path": "pages/company/companysvList",
  18716. "style": {
  18717. "navigationBarTitleText": "%index.qiyefuwu%",
  18718. "enablePullDownRefresh": false,
  18719. "navigationStyle": "custom"
  18720. }
  18721. }, {
  18722. "path": "pages/kefuzhongxin/fuwuleixing",
  18723. "style": {
  18724. "navigationBarTitleText": "%index.kefuzhx%",
  18725. "enablePullDownRefresh": false,
  18726. "navigationStyle": "custom"
  18727. }
  18728. }, {
  18729. "path": "pages/kefuzhongxin/fuwuqingdan",
  18730. "style": {
  18731. "navigationBarTitleText": "%index.kefuzhx%",
  18732. "enablePullDownRefresh": false,
  18733. "navigationStyle": "custom"
  18734. }
  18735. }, {
  18736. "path": "pages/kefuzhongxin/kehufuwu",
  18737. "style": {
  18738. "navigationBarTitleText": "%index.kefuzhx%",
  18739. "enablePullDownRefresh": false,
  18740. "navigationStyle": "custom"
  18741. }
  18742. }, {
  18743. "path": "pages/shanpinxungou/shangjia/shangjia",
  18744. "style": {
  18745. "navigationBarTitleText": "%index.mendianliebiao%",
  18746. "enablePullDownRefresh": true,
  18747. "navigationStyle": "custom"
  18748. }
  18749. }, {
  18750. "path": "pages/shanpinxungou/shangjia/shangjiaxiangqing",
  18751. "style": {
  18752. "navigationBarTitleText": "",
  18753. "navigationStyle": "custom"
  18754. }
  18755. }, {
  18756. "path": "pages/shanpinxungou/shangpin/shangpinxiangqing",
  18757. "style": {
  18758. "navigationBarTitleText": "%index.goodsxq%",
  18759. "navigationStyle": "custom"
  18760. }
  18761. }, {
  18762. "path": "pages/UserCenter/map/map",
  18763. "style": {
  18764. "navigationBarTitleText": "%index.dizhixuanz%",
  18765. "enablePullDownRefresh": false,
  18766. "navigationStyle": "custom"
  18767. }
  18768. }, {
  18769. "path": "pages/shanpinxungou/shangpin/shangpinList/shangpinList",
  18770. "style": {
  18771. "enablePullDownRefresh": true,
  18772. "navigationBarTitleText": "%index.goodslist%",
  18773. "navigationStyle": "custom"
  18774. }
  18775. }, {
  18776. "path": "pages/UserCenter/mendian/wodemendian",
  18777. "style": {
  18778. "navigationBarTitleText": "%index.wodemendian%",
  18779. "navigationStyle": "custom"
  18780. }
  18781. }, {
  18782. "path": "pages/UserCenter/mendian/addmendian",
  18783. "style": {
  18784. "navigationBarTitleText": "%index.mendianguanli%",
  18785. "enablePullDownRefresh": false,
  18786. "navigationStyle": "custom"
  18787. }
  18788. }, {
  18789. "path": "pages/UserCenter/mendian/mendianSPFenlei",
  18790. "style": {
  18791. "navigationBarTitleText": "%index.goodsfenlei%",
  18792. "enablePullDownRefresh": false,
  18793. "navigationStyle": "custom"
  18794. }
  18795. }, {
  18796. "path": "pages/UserCenter/mendian/addmendianSP",
  18797. "style": {
  18798. "navigationBarTitleText": "%index.shangpinedit%",
  18799. "enablePullDownRefresh": false,
  18800. "navigationStyle": "custom"
  18801. }
  18802. }, {
  18803. "path": "pages/UserCenter/userMsgMenager",
  18804. "style": {
  18805. "navigationBarTitleText": "%index.usermsg%",
  18806. "enablePullDownRefresh": false,
  18807. "navigationStyle": "custom"
  18808. }
  18809. }, {
  18810. "path": "pages/OrderList/mendianOeder",
  18811. "style": {
  18812. "navigationBarTitleText": "%index.mendianorder%",
  18813. "enablePullDownRefresh": true,
  18814. "navigationStyle": "custom"
  18815. }
  18816. }, {
  18817. "path": "pages/UserCenter/huiyuan/huiyuan",
  18818. "style": {
  18819. "navigationBarTitleText": "%index.huiyuanzhx%",
  18820. "enablePullDownRefresh": false,
  18821. "navigationStyle": "custom"
  18822. }
  18823. }, {
  18824. "path": "pages/UserCenter/yonghushezhi/duoyuyan",
  18825. "style": {
  18826. "navigationBarTitleText": "%index.yuyanxuanz%",
  18827. "enablePullDownRefresh": false,
  18828. "navigationStyle": "custom"
  18829. }
  18830. }, {
  18831. "path": "pages/UserCenter/yonghushezhi/bangzhu",
  18832. "style": {
  18833. "navigationBarTitleText": "%index.bangzhu%",
  18834. "enablePullDownRefresh": false,
  18835. "navigationStyle": "custom"
  18836. }
  18837. }, {
  18838. "path": "pages/UserCenter/yonghushezhi/shezhi",
  18839. "style": {
  18840. "navigationBarTitleText": "%index.setting%",
  18841. "enablePullDownRefresh": false,
  18842. "navigationStyle": "custom"
  18843. }
  18844. }, {
  18845. "path": "pages/UserCenter/yonghushezhi/bangzhuxq",
  18846. "style": {
  18847. "navigationBarTitleText": "%index.bangzhu%",
  18848. "enablePullDownRefresh": false,
  18849. "navigationStyle": "custom"
  18850. }
  18851. }, {
  18852. "path": "pages/shanpinxungou/shangjia/gengduozhixun",
  18853. "style": {
  18854. "navigationBarTitleText": "",
  18855. "enablePullDownRefresh": false,
  18856. "navigationStyle": "custom"
  18857. }
  18858. }, {
  18859. "path": "pages/OrderList/buy/hongbaokq",
  18860. "style": {
  18861. "navigationBarTitleText": "红包卡券",
  18862. "enablePullDownRefresh": false,
  18863. "navigationStyle": "custom"
  18864. }
  18865. }, {
  18866. "path": "pages/UserCenter/mendian/xuanzemendian",
  18867. "style": {
  18868. "navigationBarTitleText": "",
  18869. "enablePullDownRefresh": false,
  18870. "navigationStyle": "custom"
  18871. }
  18872. }],
  18873. "tabBar": {
  18874. "color": "#7A7E83",
  18875. "selectedColor": "#E02F73",
  18876. "borderStyle": "black",
  18877. "fontSize": "12px",
  18878. "backgroundColor": "#F8F8F8",
  18879. "list": [{
  18880. "pagePath": "pages/index/mindex/mindex",
  18881. "text": "%index.order%",
  18882. "iconPath": "static/images/dingdan1@3x.png",
  18883. "selectedIconPath": "static/images/dingdan@3x.png"
  18884. }, {
  18885. "pagePath": "pages/UserCenter/mendian/wodemendian",
  18886. "text": "%index.wodemendian%",
  18887. "iconPath": "static/images/shouye1@3x.png",
  18888. "selectedIconPath": "static/images/shouye@3x.png"
  18889. }, {
  18890. "pagePath": "pages/UserCenter/UserCenter",
  18891. "text": "%index.huiyuanzhx%",
  18892. "iconPath": "static/images/huiyuan1@3x.png",
  18893. "selectedIconPath": "static/images/huiyuan@3x.png"
  18894. }]
  18895. },
  18896. "globalStyle": {
  18897. "navigationBarTextStyle": "black",
  18898. "navigationBarTitleText": "uni-app",
  18899. "navigationBarBackgroundColor": "#F8F8F8",
  18900. "backgroundColor": "#F8F8F8"
  18901. }
  18902. };
  18903. exports.default = _default;
  18904. /***/ }),
  18905. /***/ 38:
  18906. /*!********************************************************************************!*\
  18907. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/pages.json?{"type":"stat"} ***!
  18908. \********************************************************************************/
  18909. /*! no static exports found */
  18910. /***/ (function(module, exports, __webpack_require__) {
  18911. "use strict";
  18912. Object.defineProperty(exports, "__esModule", {
  18913. value: true
  18914. });
  18915. exports.default = void 0;
  18916. var _default = {
  18917. "appid": "__UNI__1C3B7BE"
  18918. };
  18919. exports.default = _default;
  18920. /***/ }),
  18921. /***/ 398:
  18922. /*!**********************************************************************************************************************!*\
  18923. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  18924. \**********************************************************************************************************************/
  18925. /*! no static exports found */
  18926. /***/ (function(module, exports, __webpack_require__) {
  18927. "use strict";
  18928. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  18929. Object.defineProperty(exports, "__esModule", {
  18930. value: true
  18931. });
  18932. exports.default = void 0;
  18933. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 399));
  18934. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 400));
  18935. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 401));
  18936. var _default = {
  18937. en: _en.default,
  18938. 'zh-Hans': _zhHans.default,
  18939. 'zh-Hant': _zhHant.default
  18940. };
  18941. exports.default = _default;
  18942. /***/ }),
  18943. /***/ 399:
  18944. /*!*********************************************************************************************************************!*\
  18945. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  18946. \*********************************************************************************************************************/
  18947. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  18948. /***/ (function(module) {
  18949. 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\"}");
  18950. /***/ }),
  18951. /***/ 4:
  18952. /*!**********************************************************************!*\
  18953. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  18954. \**********************************************************************/
  18955. /*! no static exports found */
  18956. /***/ (function(module, exports) {
  18957. function _interopRequireDefault(obj) {
  18958. return obj && obj.__esModule ? obj : {
  18959. "default": obj
  18960. };
  18961. }
  18962. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18963. /***/ }),
  18964. /***/ 400:
  18965. /*!**************************************************************************************************************************!*\
  18966. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  18967. \**************************************************************************************************************************/
  18968. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  18969. /***/ (function(module) {
  18970. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  18971. /***/ }),
  18972. /***/ 401:
  18973. /*!**************************************************************************************************************************!*\
  18974. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  18975. \**************************************************************************************************************************/
  18976. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  18977. /***/ (function(module) {
  18978. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  18979. /***/ }),
  18980. /***/ 423:
  18981. /*!*********************************************************************************************************!*\
  18982. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-popup/components/uni-popup/popup.js ***!
  18983. \*********************************************************************************************************/
  18984. /*! no static exports found */
  18985. /***/ (function(module, exports, __webpack_require__) {
  18986. "use strict";
  18987. Object.defineProperty(exports, "__esModule", {
  18988. value: true
  18989. });
  18990. exports.default = void 0;
  18991. var _default = {
  18992. data: function data() {
  18993. return {};
  18994. },
  18995. created: function created() {
  18996. this.popup = this.getParent();
  18997. },
  18998. methods: {
  18999. /**
  19000. * 获取父元素实例
  19001. */
  19002. getParent: function getParent() {
  19003. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'uniPopup';
  19004. var parent = this.$parent;
  19005. var parentName = parent.$options.name;
  19006. while (parentName !== name) {
  19007. parent = parent.$parent;
  19008. if (!parent) return false;
  19009. parentName = parent.$options.name;
  19010. }
  19011. return parent;
  19012. }
  19013. }
  19014. };
  19015. exports.default = _default;
  19016. /***/ }),
  19017. /***/ 424:
  19018. /*!**************************************************************************************************************!*\
  19019. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-popup/components/uni-popup/i18n/index.js ***!
  19020. \**************************************************************************************************************/
  19021. /*! no static exports found */
  19022. /***/ (function(module, exports, __webpack_require__) {
  19023. "use strict";
  19024. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19025. Object.defineProperty(exports, "__esModule", {
  19026. value: true
  19027. });
  19028. exports.default = void 0;
  19029. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 425));
  19030. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 426));
  19031. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 427));
  19032. var _default = {
  19033. en: _en.default,
  19034. 'zh-Hans': _zhHans.default,
  19035. 'zh-Hant': _zhHant.default
  19036. };
  19037. exports.default = _default;
  19038. /***/ }),
  19039. /***/ 425:
  19040. /*!*************************************************************************************************************!*\
  19041. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-popup/components/uni-popup/i18n/en.json ***!
  19042. \*************************************************************************************************************/
  19043. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  19044. /***/ (function(module) {
  19045. module.exports = JSON.parse("{\"uni-popup.cancel\":\"cancel\",\"uni-popup.ok\":\"ok\",\"uni-popup.placeholder\":\"pleace enter\",\"uni-popup.title\":\"Hint\",\"uni-popup.shareTitle\":\"Share to\"}");
  19046. /***/ }),
  19047. /***/ 426:
  19048. /*!******************************************************************************************************************!*\
  19049. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json ***!
  19050. \******************************************************************************************************************/
  19051. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  19052. /***/ (function(module) {
  19053. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"确定\",\"uni-popup.placeholder\":\"请输入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  19054. /***/ }),
  19055. /***/ 427:
  19056. /*!******************************************************************************************************************!*\
  19057. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json ***!
  19058. \******************************************************************************************************************/
  19059. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  19060. /***/ (function(module) {
  19061. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"確定\",\"uni-popup.placeholder\":\"請輸入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  19062. /***/ }),
  19063. /***/ 44:
  19064. /*!**********************************************************************************************************!*\
  19065. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  19066. \**********************************************************************************************************/
  19067. /*! exports provided: default */
  19068. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19069. "use strict";
  19070. __webpack_require__.r(__webpack_exports__);
  19071. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  19072. /* globals __VUE_SSR_CONTEXT__ */
  19073. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  19074. // This module is a runtime utility for cleaner component module output and will
  19075. // be included in the final webpack user bundle.
  19076. function normalizeComponent (
  19077. scriptExports,
  19078. render,
  19079. staticRenderFns,
  19080. functionalTemplate,
  19081. injectStyles,
  19082. scopeId,
  19083. moduleIdentifier, /* server only */
  19084. shadowMode, /* vue-cli only */
  19085. components, // fixed by xxxxxx auto components
  19086. renderjs // fixed by xxxxxx renderjs
  19087. ) {
  19088. // Vue.extend constructor export interop
  19089. var options = typeof scriptExports === 'function'
  19090. ? scriptExports.options
  19091. : scriptExports
  19092. // fixed by xxxxxx auto components
  19093. if (components) {
  19094. if (!options.components) {
  19095. options.components = {}
  19096. }
  19097. var hasOwn = Object.prototype.hasOwnProperty
  19098. for (var name in components) {
  19099. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  19100. options.components[name] = components[name]
  19101. }
  19102. }
  19103. }
  19104. // fixed by xxxxxx renderjs
  19105. if (renderjs) {
  19106. if(typeof renderjs.beforeCreate === 'function'){
  19107. renderjs.beforeCreate = [renderjs.beforeCreate]
  19108. }
  19109. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  19110. this[renderjs.__module] = this
  19111. });
  19112. (options.mixins || (options.mixins = [])).push(renderjs)
  19113. }
  19114. // render functions
  19115. if (render) {
  19116. options.render = render
  19117. options.staticRenderFns = staticRenderFns
  19118. options._compiled = true
  19119. }
  19120. // functional template
  19121. if (functionalTemplate) {
  19122. options.functional = true
  19123. }
  19124. // scopedId
  19125. if (scopeId) {
  19126. options._scopeId = 'data-v-' + scopeId
  19127. }
  19128. var hook
  19129. if (moduleIdentifier) { // server build
  19130. hook = function (context) {
  19131. // 2.3 injection
  19132. context =
  19133. context || // cached call
  19134. (this.$vnode && this.$vnode.ssrContext) || // stateful
  19135. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  19136. // 2.2 with runInNewContext: true
  19137. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  19138. context = __VUE_SSR_CONTEXT__
  19139. }
  19140. // inject component styles
  19141. if (injectStyles) {
  19142. injectStyles.call(this, context)
  19143. }
  19144. // register component module identifier for async chunk inferrence
  19145. if (context && context._registeredComponents) {
  19146. context._registeredComponents.add(moduleIdentifier)
  19147. }
  19148. }
  19149. // used by ssr in case component is cached and beforeCreate
  19150. // never gets called
  19151. options._ssrRegister = hook
  19152. } else if (injectStyles) {
  19153. hook = shadowMode
  19154. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  19155. : injectStyles
  19156. }
  19157. if (hook) {
  19158. if (options.functional) {
  19159. // for template-only hot-reload because in that case the render fn doesn't
  19160. // go through the normalizer
  19161. options._injectStyles = hook
  19162. // register for functioal component in vue file
  19163. var originalRender = options.render
  19164. options.render = function renderWithStyleInjection (h, context) {
  19165. hook.call(context)
  19166. return originalRender(h, context)
  19167. }
  19168. } else {
  19169. // inject component registration as beforeCreate hook
  19170. var existing = options.beforeCreate
  19171. options.beforeCreate = existing
  19172. ? [].concat(existing, hook)
  19173. : [hook]
  19174. }
  19175. }
  19176. return {
  19177. exports: scriptExports,
  19178. options: options
  19179. }
  19180. }
  19181. /***/ }),
  19182. /***/ 449:
  19183. /*!************************************************************************************************************************!*\
  19184. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js ***!
  19185. \************************************************************************************************************************/
  19186. /*! no static exports found */
  19187. /***/ (function(module, exports, __webpack_require__) {
  19188. "use strict";
  19189. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19190. Object.defineProperty(exports, "__esModule", {
  19191. value: true
  19192. });
  19193. exports.default = void 0;
  19194. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 450));
  19195. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 451));
  19196. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 452));
  19197. var _default = {
  19198. en: _en.default,
  19199. 'zh-Hans': _zhHans.default,
  19200. 'zh-Hant': _zhHant.default
  19201. };
  19202. exports.default = _default;
  19203. /***/ }),
  19204. /***/ 45:
  19205. /*!*********************************************************************!*\
  19206. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/locale/index.js ***!
  19207. \*********************************************************************/
  19208. /*! no static exports found */
  19209. /***/ (function(module, exports, __webpack_require__) {
  19210. "use strict";
  19211. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19212. Object.defineProperty(exports, "__esModule", {
  19213. value: true
  19214. });
  19215. exports.default = void 0;
  19216. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 46));
  19217. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 47));
  19218. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 48));
  19219. var _ja = _interopRequireDefault(__webpack_require__(/*! ./ja.json */ 49));
  19220. var _default = {
  19221. ja: _ja.default,
  19222. 'zh-Hans': _zhHans.default,
  19223. 'zh-Hant': _zhHant.default,
  19224. en: _en.default
  19225. };
  19226. exports.default = _default;
  19227. /***/ }),
  19228. /***/ 450:
  19229. /*!***********************************************************************************************************************!*\
  19230. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json ***!
  19231. \***********************************************************************************************************************/
  19232. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  19233. /***/ (function(module) {
  19234. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  19235. /***/ }),
  19236. /***/ 451:
  19237. /*!****************************************************************************************************************************!*\
  19238. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json ***!
  19239. \****************************************************************************************************************************/
  19240. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  19241. /***/ (function(module) {
  19242. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  19243. /***/ }),
  19244. /***/ 452:
  19245. /*!****************************************************************************************************************************!*\
  19246. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json ***!
  19247. \****************************************************************************************************************************/
  19248. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  19249. /***/ (function(module) {
  19250. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  19251. /***/ }),
  19252. /***/ 46:
  19253. /*!********************************************************************!*\
  19254. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/locale/en.json ***!
  19255. \********************************************************************/
  19256. /*! exports provided: locale.auto, locale.en, locale.zh-hans, locale.zh-hant, locale.ja, index.title, index.home, index.component, index.api, index.schema, index.demo, index.demo-description, index.detail, index.language, index.language-info, index.system-language, index.application-language, index.language-change-confirm, api.message, schema.name, schema.add, schema.add-success, default */
  19257. /***/ (function(module) {
  19258. module.exports = JSON.parse("{\"locale.auto\":\"System\",\"locale.en\":\"English\",\"locale.zh-hans\":\"简体中文\",\"locale.zh-hant\":\"繁体中文\",\"locale.ja\":\"日语\",\"index.title\":\"Hello i18n\",\"index.home\":\"Home\",\"index.component\":\"Component\",\"index.api\":\"API\",\"index.schema\":\"Schema\",\"index.demo\":\"uni-app globalization\",\"index.demo-description\":\"Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema\",\"index.detail\":\"Detail\",\"index.language\":\"Language\",\"index.language-info\":\"Settings\",\"index.system-language\":\"System language\",\"index.application-language\":\"Application language\",\"index.language-change-confirm\":\"Applying this setting will restart the app\",\"api.message\":\"Message\",\"schema.name\":\"Name\",\"schema.add\":\"Add\",\"schema.add-success\":\"Add success\"}");
  19259. /***/ }),
  19260. /***/ 47:
  19261. /*!*************************************************************************!*\
  19262. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/locale/zh-Hans.json ***!
  19263. \*************************************************************************/
  19264. /*! exports provided: locale.auto, locale.en, locale.zh-hans, locale.zh-hant, locale.ja, locale.yny, locale.huobidw, index.title, index.liebiaogengxin, index.home, index.order, index.orderxq, index.mendianorder, order.danhao, order.jiner, order.zhuangtai, order.tuikuan, order.quxiaodingdan, order.quzhifu, order.quanbudd, order.daifukuan, order.daishouli, order.daishouhuo, order.daishiyong, order.peisongzhong, order.yiwancheng, order.shouhou, order.shouli, order.chuchan, order.peisongquchan, order.daichuchan, order.chaoshifuk, order.xiugaidingdan, order.fabiaopinglun, order.shenqingtuikuan, order.tongyituik, order.jujuetuiK, order.lianxishj, order.shoujianren, order.lianxidianhua, order.yuyueshijian, order.mendiandiz, order.shangpinxj, order.peisongfei, order.dingdanjin, order.dingdanxx, order.zhifufangshi, order.xiadanshijian, order.jinkuaichuc, order.yishouli, order.shenhetg, order.shangjiajuj, order.peisong, order.ziqu, order.daiqucan, order.shdz, order.hqyfsb, order.gong, order.jian, order.zhifutishi, order.xuanzezhif, order.weizhifu, order.kefujs, order.zuofei, order.shifouqx, order.quxiao, order.queding, order.daifukshij, order.shifoushenq, order.dingdantk, order.jinkuaisd, order.Xfenzhongsd, order.zanwuyhkq, order.beizhu, order.srddbz, order.youhuijine, order.zhifujine, order.querendd, order.yizhifu, gouwu.gouwuche, gouwu.gwckongong, gouwu.shifouqkgwc, gouwu.jiarugouwc, index.peisongdizhi, index.xiadanzhifu, index.User, index.dengluzhuce, index.usermsg, index.huanying, index.shoujihao, index.yanzhengma, index.qsrzhanghao, index.qsrmima, index.xiugaimima, index.huoquyzm, index.djjwty, index.yonghuxiey, index.yinsizc, index.gjqhxz, index.huiyuanzhx, index.youhuiq, index.wkyyouhuiq, index.yuyanxuanz, index.bangzhu, index.setting, index.shouhuodz, index.xinzengshdz, index.xiangxidz, index.qsrxiangxidz, index.lianxiren, index.qsrlianxiren, index.xiansheng, index.nvshi, index.tijiao, index.sanchu, index.waisongyuanfw, index.qiyefuwu, comp.qiyejs, comp.qiyegw, comp.shangjiarz, comp.zhmwmy, comp.rementj, comp.juli, comp.gengduozx, comp.chakanpl, comp.gengduoyh, comp.guanlifenl, comp.xinzengsp, comp.bianjidp, comp.mendiandd, comp.yuexiao, comp.qujiesuan, comp.qingxuanzgg, comp.guige, comp.danxuan, comp.duoxuan, comp.kexuan, comp.bixuan, comp.mianfei, comp.tianjiaguige, comp.qianshurggmc, comp.qianshurzjje, comp.guanbi, comp.queren, comp.tongzhi, comp.qrscgg, comp.qdybctpm, comp.lijigoumai, comp.weixgsp, comp.qingxzsp, comp.xincanting, index.kefuzhx, index.mendianliebiao, index.xuanzemendian, index.wodemendian, index.mendianguanli, index.goodsfenlei, index.xuanzspfl, index.shangpinedit, index.yonghupingl, index.shouchang, index.zhuji, index.hongbaokq, index.goodslist, index.goodsxq, index.manX, index.qisong, shangpin.shoujia, shangpin.xiaoji, index.pinglun, index.pinglunlb, index.dizhixuanz, index.search, index.searchgoods, index.zonghepf, index.qingshuru, index.nimingpj, pinglun.zxpinglun, pinglun.zzpinglun, pinglun.nmpinglun, pinglun.suoyoupingf, shouye.meishiwaisong, shouye.jqxsms, shouye.waimaizq, shouye.dizhiXzhe, shouye.tangshi, shouye.tangshidand, shouye.gezhongyinpi, shouye.changyinxr, shouye.remenbangd, shouye.shangpinrem, shouye.jingzhixwc, shouye.pinzhish, goods.meishiss, goods.shousuojl, goods.remenss, goods.shousoreci, mend.mendianmc, mend.qingshurdm, mend.kefudianhua, mend.qingshurkfdh, mend.xukezhenghao, mend.jingyingxkzh, mend.mendianleix, mend.qingxuanmendianlx, mend.fuwuleix, mend.qingxuanfuwulx, mend.mendianweiz, mend.qisongjine, mend.qingsrwszd, mend.mendiantp, mend.qingxzdz, mend.shangccg, mend.dianjibj, mend.tianjiafl, mend.qingshurflmc, mend.shangpinmc, mend.qingshurspmc, mend.shangpinjj, mend.qingshurspjj, mend.shangpinjg, mend.shangpinsj, mend.shangpintp, mend.shifoushouli, mend.shifwanch, mend.dingdancc, mend.shifouks, mend.dingdanps, mend.shifou, mend.dingdddzq, mend.shifouty, mend.ddtksq, mend.shifoujuj, mend.gengduozx, mend.qingtianx, huiy.goumjswty, user.qingshuryhnc, user.qingtianxndyx, user.tuichudl, user.zhuxiaozhh, user.yinsizhc, user.yishizxbb, user.dangqianbb, user.huoquzxbb, user.querentcdq, user.shifougengxin, user.xiazaizhong, user.kaishixiaz, user.xiazaijindu, user.anzhuangsbcs, user.wodezuji, user.wodeshouc, index.component, index.api, index.schema, index.demo, index.demo-description, index.detail, index.language, index.language-info, index.system-language, index.application-language, index.language-change-confirm, index.toplanmuT, index.remenct, api.message, schema.name, schema.add, schema.add-success, api.nqdbddh, api.wangluoshibai, api.dingweishibai, api.dengluchengg, api.denglusb, api.denglushibai, api.dengluyanzsb, api.shengchengz, api.changanshib, api.baochuncg, api.baochunsb, default */
  19265. /***/ (function(module) {
  19266. module.exports = JSON.parse("{\"locale.auto\":\"系统\",\"locale.en\":\"English\",\"locale.zh-hans\":\"简体中文\",\"locale.zh-hant\":\"繁体中文\",\"locale.ja\":\"日语\",\"locale.yny\":\"越南语\",\"locale.huobidw\":\"¥\",\"index.title\":\"Hello i18n\",\"index.liebiaogengxin\":\"为您更新了列表\",\"index.home\":\"主页\",\"index.order\":\"订单\",\"index.orderxq\":\"订单详情\",\"index.mendianorder\":\"门店订单\",\"order.danhao\":\"单号\",\"order.jiner\":\"金额\",\"order.zhuangtai\":\"状态\",\"order.tuikuan\":\"退款\",\"order.quxiaodingdan\":\"取消订单\",\"order.quzhifu\":\"去支付\",\"order.quanbudd\":\"全部订单\",\"order.daifukuan\":\"待付款\",\"order.daishouli\":\"待受理\",\"order.daishouhuo\":\"待收货\",\"order.daishiyong\":\"待取餐\",\"order.peisongzhong\":\"配送中\",\"order.yiwancheng\":\"已完成\",\"order.shouhou\":\"退款/售后\",\"order.shouli\":\"受理\",\"order.chuchan\":\"出餐\",\"order.peisongquchan\":\"配送/取餐\",\"order.daichuchan\":\"待出餐\",\"order.chaoshifuk\":\"超时未付款,订单将自动取消\",\"order.xiugaidingdan\":\"修改订单\",\"order.fabiaopinglun\":\"发表评论\",\"order.shenqingtuikuan\":\"申请退款\",\"order.tongyituik\":\"同意退款\",\"order.jujuetuiK\":\"拒绝退款\",\"order.lianxishj\":\"联系商家\",\"order.shoujianren\":\"收件人\",\"order.lianxidianhua\":\"联系电话\",\"order.yuyueshijian\":\"预约时间\",\"order.mendiandiz\":\"门店地址\",\"order.shangpinxj\":\"商品合计\",\"order.peisongfei\":\"配送费\",\"order.dingdanjin\":\"订单金额\",\"order.dingdanxx\":\"订单信息\",\"order.zhifufangshi\":\"支付方式\",\"order.xiadanshijian\":\"下单时间\",\"order.jinkuaichuc\":\"尽快出餐\",\"order.yishouli\":\"已受理\",\"order.shenhetg\":\"审核通过\",\"order.shangjiajuj\":\"商家拒绝\",\"order.peisong\":\"配送\",\"order.ziqu\":\"自取\",\"order.daiqucan\":\"待取餐\",\"order.shdz\":\"请选择收货信息\",\"order.hqyfsb\":\"获取运费失败,请重新选择收货地址\",\"order.gong\":\"共\",\"order.jian\":\"件\",\"order.zhifutishi\":\"支付后,将为您尽快送达!\",\"order.xuanzezhif\":\"请选择支付方式\",\"order.weizhifu\":\"未支付\",\"order.kefujs\":\"客服介入\",\"order.zuofei\":\"作废\",\"order.shifouqx\":\"是否取消\",\"order.quxiao\":\"取消\",\"order.queding\":\"确定\",\"order.daifukshij\":\"待付款,剩余:\",\"order.shifoushenq\":\"是否申请\",\"order.dingdantk\":\"订单退款\",\"order.jinkuaisd\":\"尽快送达\",\"order.Xfenzhongsd\":\"X分钟送达\",\"order.zanwuyhkq\":\"暂无可用优惠卡券\",\"order.beizhu\":\"备注\",\"order.srddbz\":\"请输入订单备注...\",\"order.youhuijine\":\"优惠金额\",\"order.zhifujine\":\"支付金额\",\"order.querendd\":\"确认订单\",\"order.yizhifu\":\"已支付\",\"gouwu.gouwuche\":\"购物车\",\"gouwu.gwckongong\":\"购物车空空的,快去选购吧!\",\"gouwu.shifouqkgwc\":\"是否清空购物车?\",\"gouwu.jiarugouwc\":\"加入购物车\",\"index.peisongdizhi\":\"配送地址\",\"index.xiadanzhifu\":\"订单结算\",\"index.User\":\"我的\",\"index.dengluzhuce\":\"登录\",\"index.usermsg\":\"用户信息\",\"index.huanying\":\"欢迎来到跑腿王\",\"index.shoujihao\":\"请输入手机号\",\"index.yanzhengma\":\"请输入验证码\",\"index.qsrzhanghao\":\"请输入账号\",\"index.qsrmima\":\"请输入密码\",\"index.xiugaimima\":\"修改密码\",\"index.huoquyzm\":\"获取验证码\",\"index.djjwty\":\"点击“登录/注册”即为同意\",\"index.yonghuxiey\":\"《用户协议》\",\"index.yinsizc\":\"《隐私政策》\",\"index.gjqhxz\":\"请选择国家区号\",\"index.huiyuanzhx\":\"会员中心\",\"index.youhuiq\":\"优惠券\",\"index.wkyyouhuiq\":\"暂无可用优惠券\",\"index.yuyanxuanz\":\"语言选择\",\"index.bangzhu\":\"帮助\",\"index.setting\":\"设置\",\"index.shouhuodz\":\"收货地址\",\"index.xinzengshdz\":\"新增收货地址\",\"index.xiangxidz\":\"详细地址\",\"index.qsrxiangxidz\":\"请输入详细地址/门牌号\",\"index.lianxiren\":\"联系人\",\"index.qsrlianxiren\":\"请输入联系人姓名\",\"index.xiansheng\":\"先生\",\"index.nvshi\":\"女士\",\"index.tijiao\":\"提交\",\"index.sanchu\":\"删除\",\"index.waisongyuanfw\":\"外送员服务\",\"index.qiyefuwu\":\"企业服务\",\"comp.qiyejs\":\"企业介绍\",\"comp.qiyegw\":\"企业官网\",\"comp.shangjiarz\":\"商家入驻\",\"comp.zhmwmy\":\"招募外卖员\",\"comp.rementj\":\"热门推荐\",\"comp.juli\":\"距离\",\"comp.gengduozx\":\"更多资讯\",\"comp.chakanpl\":\"查看评论\",\"comp.gengduoyh\":\"更多优惠\",\"comp.guanlifenl\":\"管理分类\",\"comp.xinzengsp\":\"新增商品\",\"comp.bianjidp\":\"编辑店铺\",\"comp.mendiandd\":\"门店订单\",\"comp.yuexiao\":\"月销\",\"comp.qujiesuan\":\"去结算\",\"comp.qingxuanzgg\":\"请选择规格\",\"comp.guige\":\"规格\",\"comp.danxuan\":\"单选\",\"comp.duoxuan\":\"多选\",\"comp.kexuan\":\"可选\",\"comp.bixuan\":\"必选\",\"comp.mianfei\":\"免费\",\"comp.tianjiaguige\":\"添加规格\",\"comp.qianshurggmc\":\"请输入规格名称\",\"comp.qianshurzjje\":\"请输入增加金额\",\"comp.guanbi\":\"关闭\",\"comp.queren\":\"确认\",\"comp.tongzhi\":\"通知\",\"comp.qrscgg\":\"是否删除最后一组规格!\",\"comp.qdybctpm\":\"确定要保存图片吗?\",\"comp.lijigoumai\":\"立即购买\",\"comp.weixgsp\":\"未选购商品\",\"comp.qingxzsp\":\"请选择商品\",\"comp.xincanting\":\"新餐厅\",\"index.kefuzhx\":\"客服中心\",\"index.mendianliebiao\":\"门店列表\",\"index.xuanzemendian\":\"选择门店\",\"index.wodemendian\":\"我的门店\",\"index.mendianguanli\":\"门店管理\",\"index.goodsfenlei\":\"商品分类\",\"index.xuanzspfl\":\"请选择商品分类\",\"index.shangpinedit\":\"商品编辑\",\"index.yonghupingl\":\"用户评论\",\"index.shouchang\":\"收藏\",\"index.zhuji\":\"足迹\",\"index.hongbaokq\":\"红包卡券\",\"index.goodslist\":\"商品列表\",\"index.goodsxq\":\"商品详情\",\"index.manX\":\"满\",\"index.qisong\":\"起送\",\"shangpin.shoujia\":\"售价\",\"shangpin.xiaoji\":\"小计\",\"index.pinglun\":\"评论\",\"index.pinglunlb\":\"评论列表\",\"index.dizhixuanz\":\"位置选择\",\"index.search\":\"搜素\",\"index.searchgoods\":\"搜索美食\",\"index.zonghepf\":\"综合评分\",\"index.qingshuru\":\"请输入...\",\"index.nimingpj\":\"匿名评价\",\"pinglun.zxpinglun\":\"最新评论\",\"pinglun.zzpinglun\":\"最早评论\",\"pinglun.nmpinglun\":\"匿名评论\",\"pinglun.suoyoupingf\":\"所有评分\",\"shouye.meishiwaisong\":\"美食外送\",\"shouye.jqxsms\":\"尽情享受美食\",\"shouye.waimaizq\":\"外卖自取\",\"shouye.dizhiXzhe\":\"不用排队\",\"shouye.tangshi\":\"堂食\",\"shouye.tangshidand\":\"单点餐牌低至75折\",\"shouye.gezhongyinpi\":\"夏日冰饮\",\"shouye.changyinxr\":\"畅爽一夏\",\"shouye.remenbangd\":\"热门榜单\",\"shouye.shangpinrem\":\"商品热卖中\",\"shouye.jingzhixwc\":\"精致下午茶\",\"shouye.pinzhish\":\"品质生活\",\"goods.meishiss\":\"美食搜索\",\"goods.shousuojl\":\"搜索记录\",\"goods.remenss\":\"热门搜索\",\"goods.shousoreci\":\"'卤味','鸡排','香酥鸡','粥','冰饮','铁板饭','盖浇饭','牛排','炸鸡','烤鸭'\",\"mend.mendianmc\":\"门店名称\",\"mend.qingshurdm\":\"请输入店名\",\"mend.kefudianhua\":\"客服电话\",\"mend.qingshurkfdh\":\"请输入客服电话\",\"mend.xukezhenghao\":\"许可证号\",\"mend.jingyingxkzh\":\"经营许可证号\",\"mend.mendianleix\":\"门店类型\",\"mend.qingxuanmendianlx\":\"请选择门店类型\",\"mend.fuwuleix\":\"服务类型\",\"mend.qingxuanfuwulx\":\"请选择服务类型\",\"mend.mendianweiz\":\"门店位置\",\"mend.qisongjine\":\"起送金额\",\"mend.qingsrwszd\":\"请输入外送最低金额\",\"mend.mendiantp\":\"门店图片\",\"mend.qingxzdz\":\"请选择地址\",\"mend.shangccg\":\"上传成功\",\"mend.dianjibj\":\"点击编辑\",\"mend.tianjiafl\":\"添加分类\",\"mend.qingshurflmc\":\"请输入分类名称\",\"mend.shangpinmc\":\"商品名称\",\"mend.qingshurspmc\":\"请输入商品名称\",\"mend.shangpinjj\":\"商品简介\",\"mend.qingshurspjj\":\"请输入商品简介\",\"mend.shangpinjg\":\"商品价格\",\"mend.shangpinsj\":\"请输入商品售价\",\"mend.shangpintp\":\"商品图片\",\"mend.shifoushouli\":\"是否受理\",\"mend.shifwanch\":\"是否完成\",\"mend.dingdancc\":\"订单出餐\",\"mend.shifouks\":\"是否开始\",\"mend.dingdanps\":\"订单配送\",\"mend.shifou\":\"是否\",\"mend.dingdddzq\":\"订单等待自取\",\"mend.shifouty\":\"是否同意\",\"mend.ddtksq\":\"订单退款申请\",\"mend.shifoujuj\":\"是否拒绝\",\"mend.gengduozx\":\"更多资讯\",\"mend.qingtianx\":\"请选择图片\",\"huiy.goumjswty\":\"购买即视为同意<<会员规则说明>>\",\"user.qingshuryhnc\":\"请输入用户昵称\",\"user.qingtianxndyx\":\"请填写您的E-MAIL\",\"user.tuichudl\":\"退出登录\",\"user.zhuxiaozhh\":\"注销账号\",\"user.yinsizhc\":\"隐私政策\",\"user.yishizxbb\":\"已是最新版本\",\"user.dangqianbb\":\"当前版本\",\"user.huoquzxbb\":\"获取最新版本\",\"user.querentcdq\":\"是否退出当前账号?\",\"user.shifougengxin\":\"是否更新到最新版本?\",\"user.xiazaizhong\":\"下载中,请勿退出\",\"user.kaishixiaz\":\"开始下载了\",\"user.xiazaijindu\":\"下载进度\",\"user.anzhuangsbcs\":\"安装失败,请稍候重试\",\"user.wodezuji\":\"我的足迹\",\"user.wodeshouc\":\"我的收藏\",\"index.component\":\"组件\",\"index.api\":\"API\",\"index.schema\":\"Schema\",\"index.demo\":\"uni-app 国际化演示\",\"index.demo-description\":\"包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API、Schema\",\"index.detail\":\"详情\",\"index.language\":\"语言\",\"index.language-info\":\"语言信息\",\"index.system-language\":\"系统语言\",\"index.application-language\":\"应用语言\",\"index.language-change-confirm\":\"应用此设置将重启App\",\"index.toplanmuT\":\"在家吃遍全世界\",\"index.remenct\":\"热门餐厅\",\"api.message\":\"提示\",\"schema.name\":\"姓名\",\"schema.add\":\"新增\",\"schema.add-success\":\"新增成功\",\"api.nqdbddh\":\"您确定拔打电话吗?\",\"api.wangluoshibai\":\"获取数据失败,请检查网络!\",\"api.dingweishibai\":\"获取位置失败!\",\"api.dengluchengg\":\"登录成功!\",\"api.denglusb\":\"登录失败!\",\"api.denglushibai\":\"登录失败,请检查网络!\",\"api.dengluyanzsb\":\"账户或验证码错误!\",\"api.shengchengz\":\"生成中...\",\"api.changanshib\":\"长按识别\",\"api.baochuncg\":\"保存成功,快去分享到朋友圈吧~\",\"api.baochunsb\":\"保存失败~\"}");
  19267. /***/ }),
  19268. /***/ 48:
  19269. /*!*************************************************************************!*\
  19270. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/locale/zh-Hant.json ***!
  19271. \*************************************************************************/
  19272. /*! exports provided: locale.auto, locale.en, locale.zh-hans, locale.zh-hant, locale.ja, index.title, index.home, index.component, index.api, index.schema, index.demo, index.demo-description, index.detail, index.language, index.language-info, index.system-language, index.application-language, index.language-change-confirm, api.message, schema.name, schema.add, schema.add-success, default */
  19273. /***/ (function(module) {
  19274. module.exports = JSON.parse("{\"locale.auto\":\"系統\",\"locale.en\":\"English\",\"locale.zh-hans\":\"简体中文\",\"locale.zh-hant\":\"繁體中文\",\"locale.ja\":\"日语\",\"index.title\":\"Hello i18n\",\"index.home\":\"主頁\",\"index.component\":\"組件\",\"index.api\":\"API\",\"index.schema\":\"Schema\",\"index.demo\":\"uni-app 國際化演示\",\"index.demo-description\":\"包含 uni-framework、manifest.json、pages.json、tabbar、頁面、組件、API、Schema\",\"index.detail\":\"詳情\",\"index.language\":\"語言\",\"index.language-info\":\"語言信息\",\"index.system-language\":\"系統語言\",\"index.application-language\":\"應用語言\",\"index.language-change-confirm\":\"應用此設置將重啟App\",\"api.message\":\"提示\",\"schema.name\":\"姓名\",\"schema.add\":\"新增\",\"schema.add-success\":\"新增成功\"}");
  19275. /***/ }),
  19276. /***/ 49:
  19277. /*!********************************************************************!*\
  19278. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/locale/ja.json ***!
  19279. \********************************************************************/
  19280. /*! exports provided: locale.auto, locale.en, locale.zh-hans, locale.zh-hant, locale.ja, index.title, index.home, index.component, index.api, index.schema, index.demo, index.demo-description, index.detail, index.language, index.language-info, index.system-language, index.application-language, index.language-change-confirm, api.message, schema.add, schema.add-success, default */
  19281. /***/ (function(module) {
  19282. module.exports = JSON.parse("{\"locale.auto\":\"システム\",\"locale.en\":\"英語\",\"locale.zh-hans\":\"简体中文\",\"locale.zh-hant\":\"繁体中文\",\"locale.ja\":\"日语\",\"index.title\":\"Hello i18n\",\"index.home\":\"ホーム\",\"index.component\":\"コンポーネント\",\"index.api\":\"API\",\"index.schema\":\"Schema\",\"index.demo\":\"uni-app globalization\",\"index.demo-description\":\"ユニフレームワーク、manifest.json、pages.json、タブバー、ページ、コンポーネント、APIを含める、Schema\",\"index.detail\":\"詳細\",\"index.language\":\"言語\",\"index.language-info\":\"設定\",\"index.system-language\":\"システム言語\",\"index.application-language\":\"アプリケーション言語\",\"index.language-change-confirm\":\"この設定を適用すると、アプリが再起動します\",\"api.message\":\"メッセージ\",\"schema.add\":\"追加\",\"schema.add-success\":\"成功を追加\"}");
  19283. /***/ }),
  19284. /***/ 495:
  19285. /*!*********************************************************************************************************!*\
  19286. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  19287. \*********************************************************************************************************/
  19288. /*! no static exports found */
  19289. /***/ (function(module, exports, __webpack_require__) {
  19290. "use strict";
  19291. Object.defineProperty(exports, "__esModule", {
  19292. value: true
  19293. });
  19294. exports.default = void 0;
  19295. var _default = {
  19296. "id": "2852637",
  19297. "name": "uniui图标库",
  19298. "font_family": "uniicons",
  19299. "css_prefix_text": "uniui-",
  19300. "description": "",
  19301. "glyphs": [{
  19302. "icon_id": "25027049",
  19303. "name": "yanse",
  19304. "font_class": "color",
  19305. "unicode": "e6cf",
  19306. "unicode_decimal": 59087
  19307. }, {
  19308. "icon_id": "25027048",
  19309. "name": "wallet",
  19310. "font_class": "wallet",
  19311. "unicode": "e6b1",
  19312. "unicode_decimal": 59057
  19313. }, {
  19314. "icon_id": "25015720",
  19315. "name": "settings-filled",
  19316. "font_class": "settings-filled",
  19317. "unicode": "e6ce",
  19318. "unicode_decimal": 59086
  19319. }, {
  19320. "icon_id": "25015434",
  19321. "name": "shimingrenzheng-filled",
  19322. "font_class": "auth-filled",
  19323. "unicode": "e6cc",
  19324. "unicode_decimal": 59084
  19325. }, {
  19326. "icon_id": "24934246",
  19327. "name": "shop-filled",
  19328. "font_class": "shop-filled",
  19329. "unicode": "e6cd",
  19330. "unicode_decimal": 59085
  19331. }, {
  19332. "icon_id": "24934159",
  19333. "name": "staff-filled-01",
  19334. "font_class": "staff-filled",
  19335. "unicode": "e6cb",
  19336. "unicode_decimal": 59083
  19337. }, {
  19338. "icon_id": "24932461",
  19339. "name": "VIP-filled",
  19340. "font_class": "vip-filled",
  19341. "unicode": "e6c6",
  19342. "unicode_decimal": 59078
  19343. }, {
  19344. "icon_id": "24932462",
  19345. "name": "plus_circle_fill",
  19346. "font_class": "plus-filled",
  19347. "unicode": "e6c7",
  19348. "unicode_decimal": 59079
  19349. }, {
  19350. "icon_id": "24932463",
  19351. "name": "folder_add-filled",
  19352. "font_class": "folder-add-filled",
  19353. "unicode": "e6c8",
  19354. "unicode_decimal": 59080
  19355. }, {
  19356. "icon_id": "24932464",
  19357. "name": "yanse-filled",
  19358. "font_class": "color-filled",
  19359. "unicode": "e6c9",
  19360. "unicode_decimal": 59081
  19361. }, {
  19362. "icon_id": "24932465",
  19363. "name": "tune-filled",
  19364. "font_class": "tune-filled",
  19365. "unicode": "e6ca",
  19366. "unicode_decimal": 59082
  19367. }, {
  19368. "icon_id": "24932455",
  19369. "name": "a-rilidaka-filled",
  19370. "font_class": "calendar-filled",
  19371. "unicode": "e6c0",
  19372. "unicode_decimal": 59072
  19373. }, {
  19374. "icon_id": "24932456",
  19375. "name": "notification-filled",
  19376. "font_class": "notification-filled",
  19377. "unicode": "e6c1",
  19378. "unicode_decimal": 59073
  19379. }, {
  19380. "icon_id": "24932457",
  19381. "name": "wallet-filled",
  19382. "font_class": "wallet-filled",
  19383. "unicode": "e6c2",
  19384. "unicode_decimal": 59074
  19385. }, {
  19386. "icon_id": "24932458",
  19387. "name": "paihangbang-filled",
  19388. "font_class": "medal-filled",
  19389. "unicode": "e6c3",
  19390. "unicode_decimal": 59075
  19391. }, {
  19392. "icon_id": "24932459",
  19393. "name": "gift-filled",
  19394. "font_class": "gift-filled",
  19395. "unicode": "e6c4",
  19396. "unicode_decimal": 59076
  19397. }, {
  19398. "icon_id": "24932460",
  19399. "name": "fire-filled",
  19400. "font_class": "fire-filled",
  19401. "unicode": "e6c5",
  19402. "unicode_decimal": 59077
  19403. }, {
  19404. "icon_id": "24928001",
  19405. "name": "refreshempty",
  19406. "font_class": "refreshempty",
  19407. "unicode": "e6bf",
  19408. "unicode_decimal": 59071
  19409. }, {
  19410. "icon_id": "24926853",
  19411. "name": "location-ellipse",
  19412. "font_class": "location-filled",
  19413. "unicode": "e6af",
  19414. "unicode_decimal": 59055
  19415. }, {
  19416. "icon_id": "24926735",
  19417. "name": "person-filled",
  19418. "font_class": "person-filled",
  19419. "unicode": "e69d",
  19420. "unicode_decimal": 59037
  19421. }, {
  19422. "icon_id": "24926703",
  19423. "name": "personadd-filled",
  19424. "font_class": "personadd-filled",
  19425. "unicode": "e698",
  19426. "unicode_decimal": 59032
  19427. }, {
  19428. "icon_id": "24923351",
  19429. "name": "back",
  19430. "font_class": "back",
  19431. "unicode": "e6b9",
  19432. "unicode_decimal": 59065
  19433. }, {
  19434. "icon_id": "24923352",
  19435. "name": "forward",
  19436. "font_class": "forward",
  19437. "unicode": "e6ba",
  19438. "unicode_decimal": 59066
  19439. }, {
  19440. "icon_id": "24923353",
  19441. "name": "arrowthinright",
  19442. "font_class": "arrow-right",
  19443. "unicode": "e6bb",
  19444. "unicode_decimal": 59067
  19445. }, {
  19446. "icon_id": "24923353",
  19447. "name": "arrowthinright",
  19448. "font_class": "arrowthinright",
  19449. "unicode": "e6bb",
  19450. "unicode_decimal": 59067
  19451. }, {
  19452. "icon_id": "24923354",
  19453. "name": "arrowthinleft",
  19454. "font_class": "arrow-left",
  19455. "unicode": "e6bc",
  19456. "unicode_decimal": 59068
  19457. }, {
  19458. "icon_id": "24923354",
  19459. "name": "arrowthinleft",
  19460. "font_class": "arrowthinleft",
  19461. "unicode": "e6bc",
  19462. "unicode_decimal": 59068
  19463. }, {
  19464. "icon_id": "24923355",
  19465. "name": "arrowthinup",
  19466. "font_class": "arrow-up",
  19467. "unicode": "e6bd",
  19468. "unicode_decimal": 59069
  19469. }, {
  19470. "icon_id": "24923355",
  19471. "name": "arrowthinup",
  19472. "font_class": "arrowthinup",
  19473. "unicode": "e6bd",
  19474. "unicode_decimal": 59069
  19475. }, {
  19476. "icon_id": "24923356",
  19477. "name": "arrowthindown",
  19478. "font_class": "arrow-down",
  19479. "unicode": "e6be",
  19480. "unicode_decimal": 59070
  19481. }, {
  19482. "icon_id": "24923356",
  19483. "name": "arrowthindown",
  19484. "font_class": "arrowthindown",
  19485. "unicode": "e6be",
  19486. "unicode_decimal": 59070
  19487. }, {
  19488. "icon_id": "24923349",
  19489. "name": "arrowdown",
  19490. "font_class": "bottom",
  19491. "unicode": "e6b8",
  19492. "unicode_decimal": 59064
  19493. }, {
  19494. "icon_id": "24923349",
  19495. "name": "arrowdown",
  19496. "font_class": "arrowdown",
  19497. "unicode": "e6b8",
  19498. "unicode_decimal": 59064
  19499. }, {
  19500. "icon_id": "24923346",
  19501. "name": "arrowright",
  19502. "font_class": "right",
  19503. "unicode": "e6b5",
  19504. "unicode_decimal": 59061
  19505. }, {
  19506. "icon_id": "24923346",
  19507. "name": "arrowright",
  19508. "font_class": "arrowright",
  19509. "unicode": "e6b5",
  19510. "unicode_decimal": 59061
  19511. }, {
  19512. "icon_id": "24923347",
  19513. "name": "arrowup",
  19514. "font_class": "top",
  19515. "unicode": "e6b6",
  19516. "unicode_decimal": 59062
  19517. }, {
  19518. "icon_id": "24923347",
  19519. "name": "arrowup",
  19520. "font_class": "arrowup",
  19521. "unicode": "e6b6",
  19522. "unicode_decimal": 59062
  19523. }, {
  19524. "icon_id": "24923348",
  19525. "name": "arrowleft",
  19526. "font_class": "left",
  19527. "unicode": "e6b7",
  19528. "unicode_decimal": 59063
  19529. }, {
  19530. "icon_id": "24923348",
  19531. "name": "arrowleft",
  19532. "font_class": "arrowleft",
  19533. "unicode": "e6b7",
  19534. "unicode_decimal": 59063
  19535. }, {
  19536. "icon_id": "24923334",
  19537. "name": "eye",
  19538. "font_class": "eye",
  19539. "unicode": "e651",
  19540. "unicode_decimal": 58961
  19541. }, {
  19542. "icon_id": "24923335",
  19543. "name": "eye-filled",
  19544. "font_class": "eye-filled",
  19545. "unicode": "e66a",
  19546. "unicode_decimal": 58986
  19547. }, {
  19548. "icon_id": "24923336",
  19549. "name": "eye-slash",
  19550. "font_class": "eye-slash",
  19551. "unicode": "e6b3",
  19552. "unicode_decimal": 59059
  19553. }, {
  19554. "icon_id": "24923337",
  19555. "name": "eye-slash-filled",
  19556. "font_class": "eye-slash-filled",
  19557. "unicode": "e6b4",
  19558. "unicode_decimal": 59060
  19559. }, {
  19560. "icon_id": "24923305",
  19561. "name": "info-filled",
  19562. "font_class": "info-filled",
  19563. "unicode": "e649",
  19564. "unicode_decimal": 58953
  19565. }, {
  19566. "icon_id": "24923299",
  19567. "name": "reload-01",
  19568. "font_class": "reload",
  19569. "unicode": "e6b2",
  19570. "unicode_decimal": 59058
  19571. }, {
  19572. "icon_id": "24923195",
  19573. "name": "mic_slash_fill",
  19574. "font_class": "micoff-filled",
  19575. "unicode": "e6b0",
  19576. "unicode_decimal": 59056
  19577. }, {
  19578. "icon_id": "24923165",
  19579. "name": "map-pin-ellipse",
  19580. "font_class": "map-pin-ellipse",
  19581. "unicode": "e6ac",
  19582. "unicode_decimal": 59052
  19583. }, {
  19584. "icon_id": "24923166",
  19585. "name": "map-pin",
  19586. "font_class": "map-pin",
  19587. "unicode": "e6ad",
  19588. "unicode_decimal": 59053
  19589. }, {
  19590. "icon_id": "24923167",
  19591. "name": "location",
  19592. "font_class": "location",
  19593. "unicode": "e6ae",
  19594. "unicode_decimal": 59054
  19595. }, {
  19596. "icon_id": "24923064",
  19597. "name": "starhalf",
  19598. "font_class": "starhalf",
  19599. "unicode": "e683",
  19600. "unicode_decimal": 59011
  19601. }, {
  19602. "icon_id": "24923065",
  19603. "name": "star",
  19604. "font_class": "star",
  19605. "unicode": "e688",
  19606. "unicode_decimal": 59016
  19607. }, {
  19608. "icon_id": "24923066",
  19609. "name": "star-filled",
  19610. "font_class": "star-filled",
  19611. "unicode": "e68f",
  19612. "unicode_decimal": 59023
  19613. }, {
  19614. "icon_id": "24899646",
  19615. "name": "a-rilidaka",
  19616. "font_class": "calendar",
  19617. "unicode": "e6a0",
  19618. "unicode_decimal": 59040
  19619. }, {
  19620. "icon_id": "24899647",
  19621. "name": "fire",
  19622. "font_class": "fire",
  19623. "unicode": "e6a1",
  19624. "unicode_decimal": 59041
  19625. }, {
  19626. "icon_id": "24899648",
  19627. "name": "paihangbang",
  19628. "font_class": "medal",
  19629. "unicode": "e6a2",
  19630. "unicode_decimal": 59042
  19631. }, {
  19632. "icon_id": "24899649",
  19633. "name": "font",
  19634. "font_class": "font",
  19635. "unicode": "e6a3",
  19636. "unicode_decimal": 59043
  19637. }, {
  19638. "icon_id": "24899650",
  19639. "name": "gift",
  19640. "font_class": "gift",
  19641. "unicode": "e6a4",
  19642. "unicode_decimal": 59044
  19643. }, {
  19644. "icon_id": "24899651",
  19645. "name": "link",
  19646. "font_class": "link",
  19647. "unicode": "e6a5",
  19648. "unicode_decimal": 59045
  19649. }, {
  19650. "icon_id": "24899652",
  19651. "name": "notification",
  19652. "font_class": "notification",
  19653. "unicode": "e6a6",
  19654. "unicode_decimal": 59046
  19655. }, {
  19656. "icon_id": "24899653",
  19657. "name": "staff",
  19658. "font_class": "staff",
  19659. "unicode": "e6a7",
  19660. "unicode_decimal": 59047
  19661. }, {
  19662. "icon_id": "24899654",
  19663. "name": "VIP",
  19664. "font_class": "vip",
  19665. "unicode": "e6a8",
  19666. "unicode_decimal": 59048
  19667. }, {
  19668. "icon_id": "24899655",
  19669. "name": "folder_add",
  19670. "font_class": "folder-add",
  19671. "unicode": "e6a9",
  19672. "unicode_decimal": 59049
  19673. }, {
  19674. "icon_id": "24899656",
  19675. "name": "tune",
  19676. "font_class": "tune",
  19677. "unicode": "e6aa",
  19678. "unicode_decimal": 59050
  19679. }, {
  19680. "icon_id": "24899657",
  19681. "name": "shimingrenzheng",
  19682. "font_class": "auth",
  19683. "unicode": "e6ab",
  19684. "unicode_decimal": 59051
  19685. }, {
  19686. "icon_id": "24899565",
  19687. "name": "person",
  19688. "font_class": "person",
  19689. "unicode": "e699",
  19690. "unicode_decimal": 59033
  19691. }, {
  19692. "icon_id": "24899566",
  19693. "name": "email-filled",
  19694. "font_class": "email-filled",
  19695. "unicode": "e69a",
  19696. "unicode_decimal": 59034
  19697. }, {
  19698. "icon_id": "24899567",
  19699. "name": "phone-filled",
  19700. "font_class": "phone-filled",
  19701. "unicode": "e69b",
  19702. "unicode_decimal": 59035
  19703. }, {
  19704. "icon_id": "24899568",
  19705. "name": "phone",
  19706. "font_class": "phone",
  19707. "unicode": "e69c",
  19708. "unicode_decimal": 59036
  19709. }, {
  19710. "icon_id": "24899570",
  19711. "name": "email",
  19712. "font_class": "email",
  19713. "unicode": "e69e",
  19714. "unicode_decimal": 59038
  19715. }, {
  19716. "icon_id": "24899571",
  19717. "name": "personadd",
  19718. "font_class": "personadd",
  19719. "unicode": "e69f",
  19720. "unicode_decimal": 59039
  19721. }, {
  19722. "icon_id": "24899558",
  19723. "name": "chatboxes-filled",
  19724. "font_class": "chatboxes-filled",
  19725. "unicode": "e692",
  19726. "unicode_decimal": 59026
  19727. }, {
  19728. "icon_id": "24899559",
  19729. "name": "contact",
  19730. "font_class": "contact",
  19731. "unicode": "e693",
  19732. "unicode_decimal": 59027
  19733. }, {
  19734. "icon_id": "24899560",
  19735. "name": "chatbubble-filled",
  19736. "font_class": "chatbubble-filled",
  19737. "unicode": "e694",
  19738. "unicode_decimal": 59028
  19739. }, {
  19740. "icon_id": "24899561",
  19741. "name": "contact-filled",
  19742. "font_class": "contact-filled",
  19743. "unicode": "e695",
  19744. "unicode_decimal": 59029
  19745. }, {
  19746. "icon_id": "24899562",
  19747. "name": "chatboxes",
  19748. "font_class": "chatboxes",
  19749. "unicode": "e696",
  19750. "unicode_decimal": 59030
  19751. }, {
  19752. "icon_id": "24899563",
  19753. "name": "chatbubble",
  19754. "font_class": "chatbubble",
  19755. "unicode": "e697",
  19756. "unicode_decimal": 59031
  19757. }, {
  19758. "icon_id": "24881290",
  19759. "name": "upload-filled",
  19760. "font_class": "upload-filled",
  19761. "unicode": "e68e",
  19762. "unicode_decimal": 59022
  19763. }, {
  19764. "icon_id": "24881292",
  19765. "name": "upload",
  19766. "font_class": "upload",
  19767. "unicode": "e690",
  19768. "unicode_decimal": 59024
  19769. }, {
  19770. "icon_id": "24881293",
  19771. "name": "weixin",
  19772. "font_class": "weixin",
  19773. "unicode": "e691",
  19774. "unicode_decimal": 59025
  19775. }, {
  19776. "icon_id": "24881274",
  19777. "name": "compose",
  19778. "font_class": "compose",
  19779. "unicode": "e67f",
  19780. "unicode_decimal": 59007
  19781. }, {
  19782. "icon_id": "24881275",
  19783. "name": "qq",
  19784. "font_class": "qq",
  19785. "unicode": "e680",
  19786. "unicode_decimal": 59008
  19787. }, {
  19788. "icon_id": "24881276",
  19789. "name": "download-filled",
  19790. "font_class": "download-filled",
  19791. "unicode": "e681",
  19792. "unicode_decimal": 59009
  19793. }, {
  19794. "icon_id": "24881277",
  19795. "name": "pengyouquan",
  19796. "font_class": "pyq",
  19797. "unicode": "e682",
  19798. "unicode_decimal": 59010
  19799. }, {
  19800. "icon_id": "24881279",
  19801. "name": "sound",
  19802. "font_class": "sound",
  19803. "unicode": "e684",
  19804. "unicode_decimal": 59012
  19805. }, {
  19806. "icon_id": "24881280",
  19807. "name": "trash-filled",
  19808. "font_class": "trash-filled",
  19809. "unicode": "e685",
  19810. "unicode_decimal": 59013
  19811. }, {
  19812. "icon_id": "24881281",
  19813. "name": "sound-filled",
  19814. "font_class": "sound-filled",
  19815. "unicode": "e686",
  19816. "unicode_decimal": 59014
  19817. }, {
  19818. "icon_id": "24881282",
  19819. "name": "trash",
  19820. "font_class": "trash",
  19821. "unicode": "e687",
  19822. "unicode_decimal": 59015
  19823. }, {
  19824. "icon_id": "24881284",
  19825. "name": "videocam-filled",
  19826. "font_class": "videocam-filled",
  19827. "unicode": "e689",
  19828. "unicode_decimal": 59017
  19829. }, {
  19830. "icon_id": "24881285",
  19831. "name": "spinner-cycle",
  19832. "font_class": "spinner-cycle",
  19833. "unicode": "e68a",
  19834. "unicode_decimal": 59018
  19835. }, {
  19836. "icon_id": "24881286",
  19837. "name": "weibo",
  19838. "font_class": "weibo",
  19839. "unicode": "e68b",
  19840. "unicode_decimal": 59019
  19841. }, {
  19842. "icon_id": "24881288",
  19843. "name": "videocam",
  19844. "font_class": "videocam",
  19845. "unicode": "e68c",
  19846. "unicode_decimal": 59020
  19847. }, {
  19848. "icon_id": "24881289",
  19849. "name": "download",
  19850. "font_class": "download",
  19851. "unicode": "e68d",
  19852. "unicode_decimal": 59021
  19853. }, {
  19854. "icon_id": "24879601",
  19855. "name": "help",
  19856. "font_class": "help",
  19857. "unicode": "e679",
  19858. "unicode_decimal": 59001
  19859. }, {
  19860. "icon_id": "24879602",
  19861. "name": "navigate-filled",
  19862. "font_class": "navigate-filled",
  19863. "unicode": "e67a",
  19864. "unicode_decimal": 59002
  19865. }, {
  19866. "icon_id": "24879603",
  19867. "name": "plusempty",
  19868. "font_class": "plusempty",
  19869. "unicode": "e67b",
  19870. "unicode_decimal": 59003
  19871. }, {
  19872. "icon_id": "24879604",
  19873. "name": "smallcircle",
  19874. "font_class": "smallcircle",
  19875. "unicode": "e67c",
  19876. "unicode_decimal": 59004
  19877. }, {
  19878. "icon_id": "24879605",
  19879. "name": "minus-filled",
  19880. "font_class": "minus-filled",
  19881. "unicode": "e67d",
  19882. "unicode_decimal": 59005
  19883. }, {
  19884. "icon_id": "24879606",
  19885. "name": "micoff",
  19886. "font_class": "micoff",
  19887. "unicode": "e67e",
  19888. "unicode_decimal": 59006
  19889. }, {
  19890. "icon_id": "24879588",
  19891. "name": "closeempty",
  19892. "font_class": "closeempty",
  19893. "unicode": "e66c",
  19894. "unicode_decimal": 58988
  19895. }, {
  19896. "icon_id": "24879589",
  19897. "name": "clear",
  19898. "font_class": "clear",
  19899. "unicode": "e66d",
  19900. "unicode_decimal": 58989
  19901. }, {
  19902. "icon_id": "24879590",
  19903. "name": "navigate",
  19904. "font_class": "navigate",
  19905. "unicode": "e66e",
  19906. "unicode_decimal": 58990
  19907. }, {
  19908. "icon_id": "24879591",
  19909. "name": "minus",
  19910. "font_class": "minus",
  19911. "unicode": "e66f",
  19912. "unicode_decimal": 58991
  19913. }, {
  19914. "icon_id": "24879592",
  19915. "name": "image",
  19916. "font_class": "image",
  19917. "unicode": "e670",
  19918. "unicode_decimal": 58992
  19919. }, {
  19920. "icon_id": "24879593",
  19921. "name": "mic",
  19922. "font_class": "mic",
  19923. "unicode": "e671",
  19924. "unicode_decimal": 58993
  19925. }, {
  19926. "icon_id": "24879594",
  19927. "name": "paperplane",
  19928. "font_class": "paperplane",
  19929. "unicode": "e672",
  19930. "unicode_decimal": 58994
  19931. }, {
  19932. "icon_id": "24879595",
  19933. "name": "close",
  19934. "font_class": "close",
  19935. "unicode": "e673",
  19936. "unicode_decimal": 58995
  19937. }, {
  19938. "icon_id": "24879596",
  19939. "name": "help-filled",
  19940. "font_class": "help-filled",
  19941. "unicode": "e674",
  19942. "unicode_decimal": 58996
  19943. }, {
  19944. "icon_id": "24879597",
  19945. "name": "plus-filled",
  19946. "font_class": "paperplane-filled",
  19947. "unicode": "e675",
  19948. "unicode_decimal": 58997
  19949. }, {
  19950. "icon_id": "24879598",
  19951. "name": "plus",
  19952. "font_class": "plus",
  19953. "unicode": "e676",
  19954. "unicode_decimal": 58998
  19955. }, {
  19956. "icon_id": "24879599",
  19957. "name": "mic-filled",
  19958. "font_class": "mic-filled",
  19959. "unicode": "e677",
  19960. "unicode_decimal": 58999
  19961. }, {
  19962. "icon_id": "24879600",
  19963. "name": "image-filled",
  19964. "font_class": "image-filled",
  19965. "unicode": "e678",
  19966. "unicode_decimal": 59000
  19967. }, {
  19968. "icon_id": "24855900",
  19969. "name": "locked-filled",
  19970. "font_class": "locked-filled",
  19971. "unicode": "e668",
  19972. "unicode_decimal": 58984
  19973. }, {
  19974. "icon_id": "24855901",
  19975. "name": "info",
  19976. "font_class": "info",
  19977. "unicode": "e669",
  19978. "unicode_decimal": 58985
  19979. }, {
  19980. "icon_id": "24855903",
  19981. "name": "locked",
  19982. "font_class": "locked",
  19983. "unicode": "e66b",
  19984. "unicode_decimal": 58987
  19985. }, {
  19986. "icon_id": "24855884",
  19987. "name": "camera-filled",
  19988. "font_class": "camera-filled",
  19989. "unicode": "e658",
  19990. "unicode_decimal": 58968
  19991. }, {
  19992. "icon_id": "24855885",
  19993. "name": "chat-filled",
  19994. "font_class": "chat-filled",
  19995. "unicode": "e659",
  19996. "unicode_decimal": 58969
  19997. }, {
  19998. "icon_id": "24855886",
  19999. "name": "camera",
  20000. "font_class": "camera",
  20001. "unicode": "e65a",
  20002. "unicode_decimal": 58970
  20003. }, {
  20004. "icon_id": "24855887",
  20005. "name": "circle",
  20006. "font_class": "circle",
  20007. "unicode": "e65b",
  20008. "unicode_decimal": 58971
  20009. }, {
  20010. "icon_id": "24855888",
  20011. "name": "checkmarkempty",
  20012. "font_class": "checkmarkempty",
  20013. "unicode": "e65c",
  20014. "unicode_decimal": 58972
  20015. }, {
  20016. "icon_id": "24855889",
  20017. "name": "chat",
  20018. "font_class": "chat",
  20019. "unicode": "e65d",
  20020. "unicode_decimal": 58973
  20021. }, {
  20022. "icon_id": "24855890",
  20023. "name": "circle-filled",
  20024. "font_class": "circle-filled",
  20025. "unicode": "e65e",
  20026. "unicode_decimal": 58974
  20027. }, {
  20028. "icon_id": "24855891",
  20029. "name": "flag",
  20030. "font_class": "flag",
  20031. "unicode": "e65f",
  20032. "unicode_decimal": 58975
  20033. }, {
  20034. "icon_id": "24855892",
  20035. "name": "flag-filled",
  20036. "font_class": "flag-filled",
  20037. "unicode": "e660",
  20038. "unicode_decimal": 58976
  20039. }, {
  20040. "icon_id": "24855893",
  20041. "name": "gear-filled",
  20042. "font_class": "gear-filled",
  20043. "unicode": "e661",
  20044. "unicode_decimal": 58977
  20045. }, {
  20046. "icon_id": "24855894",
  20047. "name": "home",
  20048. "font_class": "home",
  20049. "unicode": "e662",
  20050. "unicode_decimal": 58978
  20051. }, {
  20052. "icon_id": "24855895",
  20053. "name": "home-filled",
  20054. "font_class": "home-filled",
  20055. "unicode": "e663",
  20056. "unicode_decimal": 58979
  20057. }, {
  20058. "icon_id": "24855896",
  20059. "name": "gear",
  20060. "font_class": "gear",
  20061. "unicode": "e664",
  20062. "unicode_decimal": 58980
  20063. }, {
  20064. "icon_id": "24855897",
  20065. "name": "smallcircle-filled",
  20066. "font_class": "smallcircle-filled",
  20067. "unicode": "e665",
  20068. "unicode_decimal": 58981
  20069. }, {
  20070. "icon_id": "24855898",
  20071. "name": "map-filled",
  20072. "font_class": "map-filled",
  20073. "unicode": "e666",
  20074. "unicode_decimal": 58982
  20075. }, {
  20076. "icon_id": "24855899",
  20077. "name": "map",
  20078. "font_class": "map",
  20079. "unicode": "e667",
  20080. "unicode_decimal": 58983
  20081. }, {
  20082. "icon_id": "24855825",
  20083. "name": "refresh-filled",
  20084. "font_class": "refresh-filled",
  20085. "unicode": "e656",
  20086. "unicode_decimal": 58966
  20087. }, {
  20088. "icon_id": "24855826",
  20089. "name": "refresh",
  20090. "font_class": "refresh",
  20091. "unicode": "e657",
  20092. "unicode_decimal": 58967
  20093. }, {
  20094. "icon_id": "24855808",
  20095. "name": "cloud-upload",
  20096. "font_class": "cloud-upload",
  20097. "unicode": "e645",
  20098. "unicode_decimal": 58949
  20099. }, {
  20100. "icon_id": "24855809",
  20101. "name": "cloud-download-filled",
  20102. "font_class": "cloud-download-filled",
  20103. "unicode": "e646",
  20104. "unicode_decimal": 58950
  20105. }, {
  20106. "icon_id": "24855810",
  20107. "name": "cloud-download",
  20108. "font_class": "cloud-download",
  20109. "unicode": "e647",
  20110. "unicode_decimal": 58951
  20111. }, {
  20112. "icon_id": "24855811",
  20113. "name": "cloud-upload-filled",
  20114. "font_class": "cloud-upload-filled",
  20115. "unicode": "e648",
  20116. "unicode_decimal": 58952
  20117. }, {
  20118. "icon_id": "24855813",
  20119. "name": "redo",
  20120. "font_class": "redo",
  20121. "unicode": "e64a",
  20122. "unicode_decimal": 58954
  20123. }, {
  20124. "icon_id": "24855814",
  20125. "name": "images-filled",
  20126. "font_class": "images-filled",
  20127. "unicode": "e64b",
  20128. "unicode_decimal": 58955
  20129. }, {
  20130. "icon_id": "24855815",
  20131. "name": "undo-filled",
  20132. "font_class": "undo-filled",
  20133. "unicode": "e64c",
  20134. "unicode_decimal": 58956
  20135. }, {
  20136. "icon_id": "24855816",
  20137. "name": "more",
  20138. "font_class": "more",
  20139. "unicode": "e64d",
  20140. "unicode_decimal": 58957
  20141. }, {
  20142. "icon_id": "24855817",
  20143. "name": "more-filled",
  20144. "font_class": "more-filled",
  20145. "unicode": "e64e",
  20146. "unicode_decimal": 58958
  20147. }, {
  20148. "icon_id": "24855818",
  20149. "name": "undo",
  20150. "font_class": "undo",
  20151. "unicode": "e64f",
  20152. "unicode_decimal": 58959
  20153. }, {
  20154. "icon_id": "24855819",
  20155. "name": "images",
  20156. "font_class": "images",
  20157. "unicode": "e650",
  20158. "unicode_decimal": 58960
  20159. }, {
  20160. "icon_id": "24855821",
  20161. "name": "paperclip",
  20162. "font_class": "paperclip",
  20163. "unicode": "e652",
  20164. "unicode_decimal": 58962
  20165. }, {
  20166. "icon_id": "24855822",
  20167. "name": "settings",
  20168. "font_class": "settings",
  20169. "unicode": "e653",
  20170. "unicode_decimal": 58963
  20171. }, {
  20172. "icon_id": "24855823",
  20173. "name": "search",
  20174. "font_class": "search",
  20175. "unicode": "e654",
  20176. "unicode_decimal": 58964
  20177. }, {
  20178. "icon_id": "24855824",
  20179. "name": "redo-filled",
  20180. "font_class": "redo-filled",
  20181. "unicode": "e655",
  20182. "unicode_decimal": 58965
  20183. }, {
  20184. "icon_id": "24841702",
  20185. "name": "list",
  20186. "font_class": "list",
  20187. "unicode": "e644",
  20188. "unicode_decimal": 58948
  20189. }, {
  20190. "icon_id": "24841489",
  20191. "name": "mail-open-filled",
  20192. "font_class": "mail-open-filled",
  20193. "unicode": "e63a",
  20194. "unicode_decimal": 58938
  20195. }, {
  20196. "icon_id": "24841491",
  20197. "name": "hand-thumbsdown-filled",
  20198. "font_class": "hand-down-filled",
  20199. "unicode": "e63c",
  20200. "unicode_decimal": 58940
  20201. }, {
  20202. "icon_id": "24841492",
  20203. "name": "hand-thumbsdown",
  20204. "font_class": "hand-down",
  20205. "unicode": "e63d",
  20206. "unicode_decimal": 58941
  20207. }, {
  20208. "icon_id": "24841493",
  20209. "name": "hand-thumbsup-filled",
  20210. "font_class": "hand-up-filled",
  20211. "unicode": "e63e",
  20212. "unicode_decimal": 58942
  20213. }, {
  20214. "icon_id": "24841494",
  20215. "name": "hand-thumbsup",
  20216. "font_class": "hand-up",
  20217. "unicode": "e63f",
  20218. "unicode_decimal": 58943
  20219. }, {
  20220. "icon_id": "24841496",
  20221. "name": "heart-filled",
  20222. "font_class": "heart-filled",
  20223. "unicode": "e641",
  20224. "unicode_decimal": 58945
  20225. }, {
  20226. "icon_id": "24841498",
  20227. "name": "mail-open",
  20228. "font_class": "mail-open",
  20229. "unicode": "e643",
  20230. "unicode_decimal": 58947
  20231. }, {
  20232. "icon_id": "24841488",
  20233. "name": "heart",
  20234. "font_class": "heart",
  20235. "unicode": "e639",
  20236. "unicode_decimal": 58937
  20237. }, {
  20238. "icon_id": "24839963",
  20239. "name": "loop",
  20240. "font_class": "loop",
  20241. "unicode": "e633",
  20242. "unicode_decimal": 58931
  20243. }, {
  20244. "icon_id": "24839866",
  20245. "name": "pulldown",
  20246. "font_class": "pulldown",
  20247. "unicode": "e632",
  20248. "unicode_decimal": 58930
  20249. }, {
  20250. "icon_id": "24813798",
  20251. "name": "scan",
  20252. "font_class": "scan",
  20253. "unicode": "e62a",
  20254. "unicode_decimal": 58922
  20255. }, {
  20256. "icon_id": "24813786",
  20257. "name": "bars",
  20258. "font_class": "bars",
  20259. "unicode": "e627",
  20260. "unicode_decimal": 58919
  20261. }, {
  20262. "icon_id": "24813788",
  20263. "name": "cart-filled",
  20264. "font_class": "cart-filled",
  20265. "unicode": "e629",
  20266. "unicode_decimal": 58921
  20267. }, {
  20268. "icon_id": "24813790",
  20269. "name": "checkbox",
  20270. "font_class": "checkbox",
  20271. "unicode": "e62b",
  20272. "unicode_decimal": 58923
  20273. }, {
  20274. "icon_id": "24813791",
  20275. "name": "checkbox-filled",
  20276. "font_class": "checkbox-filled",
  20277. "unicode": "e62c",
  20278. "unicode_decimal": 58924
  20279. }, {
  20280. "icon_id": "24813794",
  20281. "name": "shop",
  20282. "font_class": "shop",
  20283. "unicode": "e62f",
  20284. "unicode_decimal": 58927
  20285. }, {
  20286. "icon_id": "24813795",
  20287. "name": "headphones",
  20288. "font_class": "headphones",
  20289. "unicode": "e630",
  20290. "unicode_decimal": 58928
  20291. }, {
  20292. "icon_id": "24813796",
  20293. "name": "cart",
  20294. "font_class": "cart",
  20295. "unicode": "e631",
  20296. "unicode_decimal": 58929
  20297. }]
  20298. };
  20299. exports.default = _default;
  20300. /***/ }),
  20301. /***/ 5:
  20302. /*!**************************************************************!*\
  20303. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  20304. \**************************************************************/
  20305. /*! no static exports found */
  20306. /***/ (function(module, exports, __webpack_require__) {
  20307. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  20308. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  20309. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  20310. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  20311. function _slicedToArray(arr, i) {
  20312. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  20313. }
  20314. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20315. /***/ }),
  20316. /***/ 50:
  20317. /*!****************************************************************************!*\
  20318. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/utils/request/index.js ***!
  20319. \****************************************************************************/
  20320. /*! no static exports found */
  20321. /***/ (function(module, exports, __webpack_require__) {
  20322. "use strict";
  20323. /* WEBPACK VAR INJECTION */(function(uni) {
  20324. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20325. Object.defineProperty(exports, "__esModule", {
  20326. value: true
  20327. });
  20328. exports.http = void 0;
  20329. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 28));
  20330. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 31));
  20331. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  20332. var _request = _interopRequireDefault(__webpack_require__(/*! ./request */ 51));
  20333. var _login = __webpack_require__(/*! @/pages/api/login */ 52);
  20334. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.config */ 53));
  20335. 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; }
  20336. 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; }
  20337. //import mHelper from '@/utils/helper';
  20338. //mport store from '@/store';
  20339. var http = new _request.default();
  20340. // request全局参数设置
  20341. exports.http = http;
  20342. http.setConfig(function (config) {
  20343. /* 设置全局配置 */
  20344. config.baseUrl = _index.default.baseUrl; /* 根域名不同 */
  20345. var systemInfo = uni.getSystemInfoSync();
  20346. var systemInfoHeaders = {
  20347. 'device-name': systemInfo.brand,
  20348. // 设备名称
  20349. width: systemInfo.screenWidth,
  20350. // 屏幕宽度
  20351. height: systemInfo.screenHeight,
  20352. // 屏幕高度
  20353. os: systemInfo.platform,
  20354. // 客户端平台
  20355. 'os-version': systemInfo.system // 操作系统版本
  20356. };
  20357. config.header = _objectSpread(_objectSpread({}, config.header), systemInfoHeaders);
  20358. return config;
  20359. });
  20360. var isRefreshing = false;
  20361. var requests = [];
  20362. http.interceptor.request(function (config) {
  20363. /* 请求之前拦截器 */
  20364. //config.header['token'] = uni.getStorageSync('token');
  20365. // 单商户
  20366. // config.header['merchant-id'] = uni.getStorageSync('merchantId') || 1;
  20367. return config;
  20368. }, function (error) {
  20369. return Promise.reject(error);
  20370. });
  20371. // 刷新refreshToken
  20372. function handleRefreshToken(_x) {
  20373. return _handleRefreshToken.apply(this, arguments);
  20374. }
  20375. function _handleRefreshToken() {
  20376. _handleRefreshToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(refresh_token) {
  20377. var params;
  20378. return _regenerator.default.wrap(function _callee3$(_context3) {
  20379. while (1) {
  20380. switch (_context3.prev = _context3.next) {
  20381. case 0:
  20382. params = {}; //params.group = mHelper.platformGroupFilter();
  20383. params.refresh_token = refresh_token;
  20384. _context3.next = 4;
  20385. return http.post(_login.refreshToken, params).then( /*#__PURE__*/function () {
  20386. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(r) {
  20387. return _regenerator.default.wrap(function _callee2$(_context2) {
  20388. while (1) {
  20389. switch (_context2.prev = _context2.next) {
  20390. case 0:
  20391. //store.commit('login', r);
  20392. isRefreshing = false;
  20393. case 1:
  20394. case "end":
  20395. return _context2.stop();
  20396. }
  20397. }
  20398. }, _callee2);
  20399. }));
  20400. return function (_x3) {
  20401. return _ref2.apply(this, arguments);
  20402. };
  20403. }());
  20404. case 4:
  20405. case "end":
  20406. return _context3.stop();
  20407. }
  20408. }
  20409. }, _callee3);
  20410. }));
  20411. return _handleRefreshToken.apply(this, arguments);
  20412. }
  20413. http.interceptor.response( /*#__PURE__*/function () {
  20414. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(response) {
  20415. return _regenerator.default.wrap(function _callee$(_context) {
  20416. while (1) {
  20417. switch (_context.prev = _context.next) {
  20418. case 0:
  20419. _context.t0 = response.data.code;
  20420. _context.next = _context.t0 === 200 ? 3 : _context.t0 === 400 ? 4 : _context.t0 === 401 ? 6 : _context.t0 === 405 ? 11 : _context.t0 === 404 ? 12 : _context.t0 === 888 ? 13 : _context.t0 === 429 ? 14 : _context.t0 === 500 ? 15 : 16;
  20421. break;
  20422. case 3:
  20423. return _context.abrupt("return", response.data.data);
  20424. case 4:
  20425. return _context.abrupt("return", Promise.reject(response.data.msg));
  20426. case 6:
  20427. console.log("accessToken401");
  20428. uni.removeStorageSync('accessToken');
  20429. //await store.commit('logout');
  20430. uni.showModal({
  20431. content: '会话已过期,是否跳转登录页面?',
  20432. success: function success(confirmRes) {
  20433. if (confirmRes.confirm) {
  20434. mHelper.backToLogin();
  20435. throw response.data.message;
  20436. }
  20437. }
  20438. });
  20439. throw response.data.message;
  20440. case 11:
  20441. return _context.abrupt("return", Promise.reject(response.data.msg));
  20442. case 12:
  20443. return _context.abrupt("return", Promise.reject(response.data.msg));
  20444. case 13:
  20445. window.location.href = response.data;
  20446. case 14:
  20447. return _context.abrupt("return", Promise.reject(response.data.msg));
  20448. case 15:
  20449. return _context.abrupt("return", Promise.reject(response.data.msg));
  20450. case 16:
  20451. return _context.abrupt("return", Promise.reject(response.data.msg));
  20452. case 17:
  20453. case "end":
  20454. return _context.stop();
  20455. }
  20456. }
  20457. }, _callee);
  20458. }));
  20459. return function (_x2) {
  20460. return _ref.apply(this, arguments);
  20461. };
  20462. }(), function (error) {
  20463. return Promise.reject(error);
  20464. });
  20465. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  20466. /***/ }),
  20467. /***/ 51:
  20468. /*!******************************************************************************!*\
  20469. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/utils/request/request.js ***!
  20470. \******************************************************************************/
  20471. /*! no static exports found */
  20472. /***/ (function(module, exports, __webpack_require__) {
  20473. "use strict";
  20474. /* WEBPACK VAR INJECTION */(function(uni) {
  20475. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20476. Object.defineProperty(exports, "__esModule", {
  20477. value: true
  20478. });
  20479. exports.default = void 0;
  20480. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 28));
  20481. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 31));
  20482. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  20483. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  20484. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  20485. 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; }
  20486. 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; }
  20487. /**
  20488. * Request 1.0.6
  20489. * @Class Request
  20490. * @description luch-request 1.0.6 http请求插件
  20491. * @Author lu-ch
  20492. * @Date 2020-03-17
  20493. * @Email webwork.s@qq.com
  20494. * http://ext.dcloud.net.cn/plugin?id=392
  20495. */
  20496. //import store from '@/store';
  20497. //import mHelper from '@/utils/helper';
  20498. var Request = /*#__PURE__*/function () {
  20499. function Request() {
  20500. var _this = this;
  20501. (0, _classCallCheck2.default)(this, Request);
  20502. (0, _defineProperty2.default)(this, "config", {
  20503. baseUrl: '',
  20504. header: {
  20505. 'content-type': 'application/json'
  20506. },
  20507. method: 'GET',
  20508. dataType: 'json',
  20509. responseType: 'text',
  20510. custom: {}
  20511. });
  20512. (0, _defineProperty2.default)(this, "interceptor", {
  20513. /**
  20514. * @param {Request~requestCallback} cb - 请求之前拦截,接收一个函数(config, cancel)=> {return config}。第一个参数为全局config,第二个参数为函数,调用则取消本次请求。
  20515. */
  20516. request: function request(cb) {
  20517. if (cb) {
  20518. _this.requestBeforeFun = cb;
  20519. }
  20520. },
  20521. /**
  20522. * @param {Request~responseCallback} cb 响应拦截器,对响应数据做点什么
  20523. * @param {Request~responseErrCallback} ecb 响应拦截器,对响应错误做点什么
  20524. */
  20525. response: function response(cb, ecb) {
  20526. if (cb) {
  20527. _this.requestComFun = cb;
  20528. }
  20529. if (ecb) {
  20530. _this.requestComFail = ecb;
  20531. }
  20532. }
  20533. });
  20534. }
  20535. (0, _createClass2.default)(Request, [{
  20536. key: "requestBeforeFun",
  20537. value: function requestBeforeFun(config) {
  20538. return config;
  20539. }
  20540. }, {
  20541. key: "requestComFun",
  20542. value: function requestComFun(response) {
  20543. return response;
  20544. }
  20545. }, {
  20546. key: "requestComFail",
  20547. value: function requestComFail(response) {
  20548. return response;
  20549. }
  20550. /**
  20551. * 自定义验证器,如果返回true 则进入响应拦截器的响应成功函数(resolve),否则进入响应拦截器的响应错误函数(reject)
  20552. * @param { Number } statusCode - 请求响应体statusCode(只读)
  20553. * @return { Boolean } 如果为true,则 resolve, 否则 reject
  20554. */
  20555. }, {
  20556. key: "validateStatus",
  20557. value: function validateStatus(statusCode) {
  20558. return statusCode === 200;
  20559. }
  20560. /**
  20561. * @Function
  20562. * @param {Request~setConfigCallback} f - 设置全局默认配置
  20563. */
  20564. }, {
  20565. key: "setConfig",
  20566. value: function setConfig(f) {
  20567. this.config = f(this.config);
  20568. }
  20569. /**
  20570. * @Function
  20571. * @param {Object} options - 请求配置项
  20572. * @prop {String} options.url - 请求路径
  20573. * @prop {Object} options.data - 请求参数
  20574. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  20575. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  20576. * @prop {Object} [options.header = config.header] - 请求header
  20577. * @prop {Object} [options.method = config.method] - 请求方法
  20578. * @returns {Promise<unknown>}
  20579. */
  20580. }, {
  20581. key: "request",
  20582. value: function () {
  20583. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  20584. var _this2 = this;
  20585. var options,
  20586. _args = arguments;
  20587. return _regenerator.default.wrap(function _callee$(_context) {
  20588. while (1) {
  20589. switch (_context.prev = _context.next) {
  20590. case 0:
  20591. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  20592. options.baseUrl = this.config.baseUrl;
  20593. options.dataType = options.dataType || this.config.dataType;
  20594. options.responseType = options.responseType || this.config.responseType;
  20595. options.url = options.url || '';
  20596. options.data = options.data || {};
  20597. options.params = options.params || {};
  20598. options.header = options.header || this.config.header;
  20599. options.method = options.method || this.config.method;
  20600. options.custom = _objectSpread(_objectSpread({}, this.config.custom), options.custom || {});
  20601. options.getTask = options.getTask || this.config.getTask;
  20602. return _context.abrupt("return", new Promise(function (resolve, reject) {
  20603. var next = true;
  20604. var cancel = function cancel() {
  20605. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'handle cancel';
  20606. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : options;
  20607. var err = {
  20608. errMsg: t,
  20609. config: config
  20610. };
  20611. reject(err);
  20612. next = false;
  20613. };
  20614. var handleRe = _objectSpread({}, _this2.requestBeforeFun(options, cancel));
  20615. var _config = _objectSpread({}, handleRe);
  20616. if (!next) return;
  20617. var requestTask = uni.request({
  20618. url: Request.mergeUrl(_config.url, _config.baseUrl, _config.params),
  20619. data: _config.data,
  20620. header: _config.header,
  20621. method: _config.method,
  20622. dataType: _config.dataType,
  20623. responseType: _config.responseType,
  20624. complete: function complete(response) {
  20625. response.config = handleRe;
  20626. if (_this2.validateStatus(response.statusCode)) {
  20627. // 成功
  20628. //response = this.requestComFun(response);
  20629. resolve(response);
  20630. } else {
  20631. /*
  20632. if(response.statusCode===401){
  20633. uni.removeStorageSync('accessToken');
  20634. store.commit('logout');
  20635. uni.showModal({
  20636. content: '会话已过期,是否跳转登录页面?',
  20637. success: confirmRes => {
  20638. if (confirmRes.confirm) {
  20639. mHelper.backToLogin();
  20640. throw response.data.message;
  20641. }
  20642. }
  20643. });
  20644. }
  20645. */
  20646. reject(response);
  20647. }
  20648. }
  20649. });
  20650. if (handleRe.getTask) {
  20651. handleRe.getTask(requestTask, handleRe);
  20652. }
  20653. }));
  20654. case 12:
  20655. case "end":
  20656. return _context.stop();
  20657. }
  20658. }
  20659. }, _callee, this);
  20660. }));
  20661. function request() {
  20662. return _request.apply(this, arguments);
  20663. }
  20664. return request;
  20665. }()
  20666. }, {
  20667. key: "get",
  20668. value: function get(url) {
  20669. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20670. var istoken = arguments.length > 2 ? arguments[2] : undefined;
  20671. if (istoken == true) {
  20672. this.config.header['token'] = uni.getStorageSync('token');
  20673. }
  20674. var options = {};
  20675. options.params = params;
  20676. return this.request(_objectSpread({
  20677. url: url,
  20678. method: 'GET'
  20679. }, options));
  20680. }
  20681. }, {
  20682. key: "post",
  20683. value: function post(url, data, isToken) {
  20684. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  20685. console.log(isToken);
  20686. if (isToken) {
  20687. this.config.header['token'] = uni.getStorageSync('token');
  20688. }
  20689. console.log(data);
  20690. return this.request(_objectSpread({
  20691. url: url,
  20692. data: data,
  20693. method: 'POST'
  20694. }, options));
  20695. }
  20696. }, {
  20697. key: "put",
  20698. value: function put(url, data) {
  20699. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20700. return this.request(_objectSpread({
  20701. url: url,
  20702. data: data,
  20703. method: 'PUT'
  20704. }, options));
  20705. }
  20706. }, {
  20707. key: "delete",
  20708. value: function _delete(url, data) {
  20709. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20710. return this.request(_objectSpread({
  20711. url: url,
  20712. data: data,
  20713. method: 'DELETE'
  20714. }, options));
  20715. }
  20716. }, {
  20717. key: "connect",
  20718. value: function connect(url, data) {
  20719. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20720. return this.request(_objectSpread({
  20721. url: url,
  20722. data: data,
  20723. method: 'CONNECT'
  20724. }, options));
  20725. }
  20726. }, {
  20727. key: "head",
  20728. value: function head(url, data) {
  20729. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20730. return this.request(_objectSpread({
  20731. url: url,
  20732. data: data,
  20733. method: 'HEAD'
  20734. }, options));
  20735. }
  20736. }, {
  20737. key: "options",
  20738. value: function options(url, data) {
  20739. var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20740. return this.request(_objectSpread({
  20741. url: url,
  20742. data: data,
  20743. method: 'OPTIONS'
  20744. }, _options));
  20745. }
  20746. }, {
  20747. key: "trace",
  20748. value: function trace(url, data) {
  20749. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20750. return this.request(_objectSpread({
  20751. url: url,
  20752. data: data,
  20753. method: 'TRACE'
  20754. }, options));
  20755. }
  20756. }, {
  20757. key: "upload",
  20758. value: function upload(url, _ref) {
  20759. var _this3 = this;
  20760. var filePath = _ref.filePath,
  20761. name = _ref.name,
  20762. header = _ref.header,
  20763. _ref$formData = _ref.formData,
  20764. formData = _ref$formData === void 0 ? {} : _ref$formData,
  20765. _ref$custom = _ref.custom,
  20766. custom = _ref$custom === void 0 ? {} : _ref$custom,
  20767. _ref$params = _ref.params,
  20768. params = _ref$params === void 0 ? {} : _ref$params,
  20769. getTask = _ref.getTask;
  20770. return new Promise(function (resolve, reject) {
  20771. var next = true;
  20772. var globalHeader = _objectSpread({}, _this3.config.header);
  20773. delete globalHeader['content-type'];
  20774. delete globalHeader['Content-Type'];
  20775. var pubConfig = {
  20776. baseUrl: _this3.config.baseUrl,
  20777. url: url,
  20778. filePath: filePath,
  20779. method: 'UPLOAD',
  20780. name: name,
  20781. header: header || globalHeader,
  20782. formData: formData,
  20783. params: params,
  20784. custom: _objectSpread(_objectSpread({}, _this3.config.custom), custom),
  20785. getTask: getTask || _this3.config.getTask
  20786. };
  20787. var cancel = function cancel() {
  20788. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'handle cancel';
  20789. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pubConfig;
  20790. var err = {
  20791. errMsg: t,
  20792. config: config
  20793. };
  20794. reject(err);
  20795. next = false;
  20796. };
  20797. var handleRe = _objectSpread({}, _this3.requestBeforeFun(pubConfig, cancel));
  20798. var _config = {
  20799. url: Request.mergeUrl(handleRe.url, handleRe.baseUrl, handleRe.params),
  20800. filePath: handleRe.filePath,
  20801. name: handleRe.name,
  20802. header: handleRe.header,
  20803. formData: handleRe.formData,
  20804. complete: function complete(response) {
  20805. response.config = handleRe;
  20806. if (typeof response.data === 'string') {
  20807. response.data = JSON.parse(response.data);
  20808. }
  20809. if (_this3.validateStatus(response.statusCode)) {
  20810. // 成功
  20811. response = _this3.requestComFun(response);
  20812. resolve(response);
  20813. } else {
  20814. response = _this3.requestComFail(response);
  20815. reject(response);
  20816. }
  20817. }
  20818. };
  20819. if (!next) return;
  20820. var requestTask = uni.uploadFile(_config);
  20821. if (handleRe.getTask) {
  20822. handleRe.getTask(requestTask, handleRe);
  20823. }
  20824. });
  20825. }
  20826. }, {
  20827. key: "download",
  20828. value: function download(url) {
  20829. var _this4 = this;
  20830. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20831. return new Promise(function (resolve, reject) {
  20832. var next = true;
  20833. var pubConfig = {
  20834. baseUrl: _this4.config.baseUrl,
  20835. url: url,
  20836. method: 'DOWNLOAD',
  20837. header: options.header || _this4.config.header,
  20838. params: options.params || {},
  20839. custom: _objectSpread(_objectSpread({}, _this4.config.custom), options.custom || {}),
  20840. getTask: options.getTask || _this4.config.getTask
  20841. };
  20842. var cancel = function cancel() {
  20843. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'handle cancel';
  20844. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pubConfig;
  20845. var err = {
  20846. errMsg: t,
  20847. config: config
  20848. };
  20849. reject(err);
  20850. next = false;
  20851. };
  20852. var handleRe = _objectSpread({}, _this4.requestBeforeFun(pubConfig, cancel));
  20853. if (!next) return;
  20854. var requestTask = uni.downloadFile({
  20855. url: Request.mergeUrl(handleRe.url, handleRe.baseUrl, handleRe.params),
  20856. header: handleRe.header,
  20857. complete: function complete(response) {
  20858. response.config = handleRe;
  20859. if (_this4.validateStatus(response.statusCode)) {
  20860. // 成功
  20861. response = _this4.requestComFun(response);
  20862. resolve(response);
  20863. } else {
  20864. response = _this4.requestComFail(response);
  20865. reject(response);
  20866. }
  20867. }
  20868. });
  20869. if (handleRe.getTask) {
  20870. handleRe.getTask(requestTask, handleRe);
  20871. }
  20872. });
  20873. }
  20874. }], [{
  20875. key: "posUrl",
  20876. value: function posUrl(url) {
  20877. /* 判断url是否为绝对路径 */
  20878. return /(http|https):\/\/([\w.]+\/?)\S*/.test(url);
  20879. }
  20880. }, {
  20881. key: "mergeUrl",
  20882. value: function mergeUrl(url, baseUrl, params) {
  20883. var mergeUrl = Request.posUrl(url) ? url : "".concat(baseUrl).concat(url);
  20884. if (Object.keys(params).length !== 0) {
  20885. var paramsH = Request.addQueryString(params);
  20886. mergeUrl += mergeUrl.includes('?') ? "&".concat(paramsH) : "?".concat(paramsH);
  20887. }
  20888. return mergeUrl;
  20889. }
  20890. }, {
  20891. key: "addQueryString",
  20892. value: function addQueryString(params) {
  20893. var paramsData = '';
  20894. Object.keys(params).forEach(function (key) {
  20895. paramsData += key + '=' + encodeURIComponent(params[key]) + '&';
  20896. });
  20897. return paramsData.substring(0, paramsData.length - 1);
  20898. }
  20899. }]);
  20900. return Request;
  20901. }();
  20902. /**
  20903. * setConfig回调
  20904. * @return {Object} - 返回操作后的config
  20905. * @callback Request~setConfigCallback
  20906. * @param {Object} config - 全局默认config
  20907. */
  20908. /**
  20909. * 请求拦截器回调
  20910. * @return {Object} - 返回操作后的config
  20911. * @callback Request~requestCallback
  20912. * @param {Object} config - 全局config
  20913. * @param {Function} [cancel] - 取消请求钩子,调用会取消本次请求
  20914. */
  20915. /**
  20916. * 响应拦截器回调
  20917. * @return {Object} - 返回操作后的response
  20918. * @callback Request~responseCallback
  20919. * @param {Object} response - 请求结果 response
  20920. */
  20921. /**
  20922. * 响应错误拦截器回调
  20923. * @return {Object} - 返回操作后的response
  20924. * @callback Request~responseErrCallback
  20925. * @param {Object} response - 请求结果 response
  20926. */
  20927. exports.default = Request;
  20928. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  20929. /***/ }),
  20930. /***/ 510:
  20931. /*!*************************************************************************!*\
  20932. !*** ./node_modules/@dcloudio/uni-cli-shared/components/ad.mixin.mp.js ***!
  20933. \*************************************************************************/
  20934. /*! exports provided: default */
  20935. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20936. "use strict";
  20937. __webpack_require__.r(__webpack_exports__);
  20938. /* WEBPACK VAR INJECTION */(function(wx, uniCloud) {const EventType = {
  20939. Load: 'load',
  20940. Close: 'close',
  20941. Error: 'error'
  20942. }
  20943. /* harmony default export */ __webpack_exports__["default"] = ({
  20944. props: {
  20945. options: {
  20946. type: [Object, Array],
  20947. default () {
  20948. return {}
  20949. }
  20950. },
  20951. adpid: {
  20952. type: [Number, String],
  20953. default: ''
  20954. },
  20955. unitId: {
  20956. type: [Number, String],
  20957. default: ''
  20958. },
  20959. preload: {
  20960. type: [Boolean, String],
  20961. default: true
  20962. },
  20963. loadnext: {
  20964. type: [Boolean, String],
  20965. default: false
  20966. },
  20967. urlCallback: {
  20968. type: Object,
  20969. default () {
  20970. return {}
  20971. }
  20972. }
  20973. },
  20974. data () {
  20975. return {
  20976. loading: false,
  20977. errorMessage: null
  20978. }
  20979. },
  20980. created () {
  20981. this._ad = null
  20982. setTimeout(() => {
  20983. if (this.preload && this._canCreateAd()) {
  20984. this.load()
  20985. }
  20986. }, 100)
  20987. },
  20988. methods: {
  20989. load () {
  20990. if (this.loading) {
  20991. return
  20992. }
  20993. this._startLoading()
  20994. setTimeout(() => {
  20995. this._onmpload()
  20996. }, 3000)
  20997. },
  20998. show () {
  20999. this.errorMessage = null
  21000. this._ad = this.selectComponent('.uniad-plugin')
  21001. if (this._hasCallback()) {
  21002. const userCryptoManager = wx.getUserCryptoManager()
  21003. userCryptoManager.getLatestUserKey({
  21004. success: ({
  21005. encryptKey,
  21006. iv,
  21007. version,
  21008. expireTime
  21009. }) => {
  21010. this._ad.show({
  21011. userId: this.urlCallback.userId || '',
  21012. extra: this.urlCallback.extra || '',
  21013. encryptKey,
  21014. iv,
  21015. version,
  21016. expireTime
  21017. })
  21018. },
  21019. fail: (err) => {
  21020. this._dispatchEvent(EventType.Error, err)
  21021. }
  21022. })
  21023. } else {
  21024. this._ad.show()
  21025. }
  21026. },
  21027. _onclick () {
  21028. this.show()
  21029. },
  21030. _startLoading () {
  21031. this.loading = true
  21032. this.errorMessage = null
  21033. },
  21034. _canCreateAd () {
  21035. let result = false
  21036. if (typeof this.adpid === 'string' && this.adpid.length > 0) {
  21037. result = true
  21038. } else if (typeof this.adpid === 'number') {
  21039. result = true
  21040. }
  21041. return result
  21042. },
  21043. _hasCallback () {
  21044. return (typeof this.urlCallback === 'object' && Object.keys(this.urlCallback).length > 0)
  21045. },
  21046. _onmpload (e) {
  21047. this.loading = false
  21048. this._dispatchEvent(EventType.Load, {})
  21049. },
  21050. _onmpclose (e) {
  21051. this._dispatchEvent(EventType.Close, e.detail)
  21052. if (e.detail.adsdata) {
  21053. const adv = e.detail.adv
  21054. const adsdata = e.detail.adsdata
  21055. const version = e.detail.version
  21056. /* eslint-disable no-undef */
  21057. uniCloud.callFunction({
  21058. name: 'uniAdCallback',
  21059. data: {
  21060. adv: adv,
  21061. adsdata: adsdata,
  21062. version: version
  21063. },
  21064. secretType: 'both',
  21065. success: (res) => {
  21066. },
  21067. fail: (err) => {
  21068. this._dispatchEvent(EventType.Error, err)
  21069. }
  21070. })
  21071. delete e.detail.adv
  21072. delete e.detail.adsdata
  21073. delete e.detail.version
  21074. }
  21075. },
  21076. _onmperror (e) {
  21077. this.loading = false
  21078. this.errorMessage = JSON.stringify(e.detail)
  21079. this._dispatchEvent(EventType.Error, e.detail)
  21080. },
  21081. _dispatchEvent (type, data) {
  21082. this.$emit(type, {
  21083. detail: data
  21084. })
  21085. }
  21086. }
  21087. });
  21088. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 27)["default"]))
  21089. /***/ }),
  21090. /***/ 516:
  21091. /*!*****************************************************************************************************************************!*\
  21092. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  21093. \*****************************************************************************************************************************/
  21094. /*! no static exports found */
  21095. /***/ (function(module, exports, __webpack_require__) {
  21096. "use strict";
  21097. /* WEBPACK VAR INJECTION */(function(uni) {
  21098. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21099. Object.defineProperty(exports, "__esModule", {
  21100. value: true
  21101. });
  21102. exports.createAnimation = createAnimation;
  21103. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  21104. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21105. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21106. 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; }
  21107. 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; }
  21108. // const defaultOption = {
  21109. // duration: 300,
  21110. // timingFunction: 'linear',
  21111. // delay: 0,
  21112. // transformOrigin: '50% 50% 0'
  21113. // }
  21114. var MPAnimation = /*#__PURE__*/function () {
  21115. function MPAnimation(options, _this) {
  21116. (0, _classCallCheck2.default)(this, MPAnimation);
  21117. this.options = options;
  21118. // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
  21119. this.animation = uni.createAnimation(_objectSpread({}, options));
  21120. this.currentStepAnimates = {};
  21121. this.next = 0;
  21122. this.$ = _this;
  21123. }
  21124. (0, _createClass2.default)(MPAnimation, [{
  21125. key: "_nvuePushAnimates",
  21126. value: function _nvuePushAnimates(type, args) {
  21127. var aniObj = this.currentStepAnimates[this.next];
  21128. var styles = {};
  21129. if (!aniObj) {
  21130. styles = {
  21131. styles: {},
  21132. config: {}
  21133. };
  21134. } else {
  21135. styles = aniObj;
  21136. }
  21137. if (animateTypes1.includes(type)) {
  21138. if (!styles.styles.transform) {
  21139. styles.styles.transform = '';
  21140. }
  21141. var unit = '';
  21142. if (type === 'rotate') {
  21143. unit = 'deg';
  21144. }
  21145. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  21146. } else {
  21147. styles.styles[type] = "".concat(args);
  21148. }
  21149. this.currentStepAnimates[this.next] = styles;
  21150. }
  21151. }, {
  21152. key: "_animateRun",
  21153. value: function _animateRun() {
  21154. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  21155. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21156. var ref = this.$.$refs['ani'].ref;
  21157. if (!ref) return;
  21158. return new Promise(function (resolve, reject) {
  21159. nvueAnimation.transition(ref, _objectSpread({
  21160. styles: styles
  21161. }, config), function (res) {
  21162. resolve();
  21163. });
  21164. });
  21165. }
  21166. }, {
  21167. key: "_nvueNextAnimate",
  21168. value: function _nvueNextAnimate(animates) {
  21169. var _this2 = this;
  21170. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  21171. var fn = arguments.length > 2 ? arguments[2] : undefined;
  21172. var obj = animates[step];
  21173. if (obj) {
  21174. var styles = obj.styles,
  21175. config = obj.config;
  21176. this._animateRun(styles, config).then(function () {
  21177. step += 1;
  21178. _this2._nvueNextAnimate(animates, step, fn);
  21179. });
  21180. } else {
  21181. this.currentStepAnimates = {};
  21182. typeof fn === 'function' && fn();
  21183. this.isEnd = true;
  21184. }
  21185. }
  21186. }, {
  21187. key: "step",
  21188. value: function step() {
  21189. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  21190. this.animation.step(config);
  21191. return this;
  21192. }
  21193. }, {
  21194. key: "run",
  21195. value: function run(fn) {
  21196. this.$.animationData = this.animation.export();
  21197. this.$.timer = setTimeout(function () {
  21198. typeof fn === 'function' && fn();
  21199. }, this.$.durationTime);
  21200. }
  21201. }]);
  21202. return MPAnimation;
  21203. }();
  21204. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  21205. var animateTypes2 = ['opacity', 'backgroundColor'];
  21206. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  21207. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  21208. MPAnimation.prototype[type] = function () {
  21209. var _this$animation;
  21210. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  21211. return this;
  21212. };
  21213. });
  21214. function createAnimation(option, _this) {
  21215. if (!_this) return;
  21216. clearTimeout(_this.timer);
  21217. return new MPAnimation(option, _this);
  21218. }
  21219. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21220. /***/ }),
  21221. /***/ 52:
  21222. /*!************************************************************************!*\
  21223. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/pages/api/login.js ***!
  21224. \************************************************************************/
  21225. /*! no static exports found */
  21226. /***/ (function(module, exports, __webpack_require__) {
  21227. "use strict";
  21228. Object.defineProperty(exports, "__esModule", {
  21229. value: true
  21230. });
  21231. exports.updataUserMsg = exports.smsCode = exports.refreshToken = exports.logout = exports.loginByzhmm = exports.loginBySmsCode = exports.getversion = exports.getUserMsg = void 0;
  21232. /**
  21233. *@des 登录注册相关接口
  21234. *@author 237524947@qq.com
  21235. *@blog https://gitee.com/zscat/mallplus/wikis/pages/preview?sort_id=1703736&doc_id=326093
  21236. *@date 2019/11/15 15:14:47
  21237. *@param login.js
  21238. */
  21239. //获取版本号
  21240. var getversion = '/system/version/getversion';
  21241. //会员手机验证码登录注册
  21242. exports.getversion = getversion;
  21243. var loginBySmsCode = '/infouser/user/lodeing';
  21244. //会员账号密码登录
  21245. exports.loginBySmsCode = loginBySmsCode;
  21246. var loginByzhmm = '/infouser/user/syslodeing';
  21247. // 获取手机验证码
  21248. exports.loginByzhmm = loginByzhmm;
  21249. var smsCode = '/infouser/user/getcode?';
  21250. // 退出登录
  21251. exports.smsCode = smsCode;
  21252. var logout = '/logout';
  21253. // 刷新token
  21254. exports.logout = logout;
  21255. var refreshToken = '/infouser/user/gettoken';
  21256. // 获取用户信息
  21257. exports.refreshToken = refreshToken;
  21258. var getUserMsg = '/infouser/user/getuserinfo';
  21259. exports.getUserMsg = getUserMsg;
  21260. var updataUserMsg = '/infouser/user/setuser';
  21261. exports.updataUserMsg = updataUserMsg;
  21262. /***/ }),
  21263. /***/ 53:
  21264. /*!****************************************************************************!*\
  21265. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/config/index.config.js ***!
  21266. \****************************************************************************/
  21267. /*! no static exports found */
  21268. /***/ (function(module, exports, __webpack_require__) {
  21269. "use strict";
  21270. Object.defineProperty(exports, "__esModule", {
  21271. value: true
  21272. });
  21273. exports.default = void 0;
  21274. var CONFIG = {
  21275. // 开发环境配置
  21276. development: {
  21277. assetsPath: '/static',
  21278. // 静态资源路径
  21279. qqMapKey: '',
  21280. // baseUrl: ' http://192.168.1.242:8080',
  21281. // hostUrl: ' http://192.168.1.242:8080', // H5地址(前端运行地址)
  21282. baseUrl: ' http://203.175.169.46:8080',
  21283. // 后台接口请求地址
  21284. hostUrl: ' http://203.175.169.46:8080',
  21285. // H5地址(前端运行地址)
  21286. websocketUrl: '',
  21287. // websocket服务端地址
  21288. weixinAppId: '',
  21289. // 微信公众号appid
  21290. storeId: 0 //
  21291. },
  21292. // 生产环境配置
  21293. production: {
  21294. qqMapKey: '',
  21295. assetsPath: '/static',
  21296. // 静态资源路径
  21297. baseUrl: ' http://203.175.169.46:8080',
  21298. // 后台接口请求地址
  21299. hostUrl: ' http://203.175.169.46:8080',
  21300. // H5地址(前端运行地址)
  21301. websocketUrl: '',
  21302. // websocket服务端地址
  21303. weixinAppId: '',
  21304. // 微信公众号appid
  21305. storeId: 0 //
  21306. }
  21307. };
  21308. var _default = CONFIG["development"];
  21309. exports.default = _default;
  21310. /***/ }),
  21311. /***/ 54:
  21312. /*!*************************************************************************!*\
  21313. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/utils/tool/index.js ***!
  21314. \*************************************************************************/
  21315. /*! no static exports found */
  21316. /***/ (function(module, exports, __webpack_require__) {
  21317. "use strict";
  21318. Object.defineProperty(exports, "__esModule", {
  21319. value: true
  21320. });
  21321. exports.default = void 0;
  21322. // tool/index.js
  21323. var _default = {
  21324. defaultImage: '/static/logo.png',
  21325. makeImageUrl: function makeImageUrl(intUrl) {
  21326. if (undefined == intUrl || null == intUrl || '==intUrl') {
  21327. return '/static/logo.png';
  21328. }
  21329. if ('/static/logo.png' == intUrl) {
  21330. return intUrl;
  21331. }
  21332. return 'http://203.175.169.46:8080' + intUrl;
  21333. }
  21334. };
  21335. exports.default = _default;
  21336. /***/ }),
  21337. /***/ 55:
  21338. /*!****************************************************!*\
  21339. !*** ./node_modules/vue-i18n/dist/vue-i18n.esm.js ***!
  21340. \****************************************************/
  21341. /*! exports provided: default */
  21342. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21343. "use strict";
  21344. __webpack_require__.r(__webpack_exports__);
  21345. /*!
  21346. * vue-i18n v8.28.2
  21347. * (c) 2022 kazuya kawaguchi
  21348. * Released under the MIT License.
  21349. */
  21350. /* */
  21351. /**
  21352. * constants
  21353. */
  21354. var numberFormatKeys = [
  21355. 'compactDisplay',
  21356. 'currency',
  21357. 'currencyDisplay',
  21358. 'currencySign',
  21359. 'localeMatcher',
  21360. 'notation',
  21361. 'numberingSystem',
  21362. 'signDisplay',
  21363. 'style',
  21364. 'unit',
  21365. 'unitDisplay',
  21366. 'useGrouping',
  21367. 'minimumIntegerDigits',
  21368. 'minimumFractionDigits',
  21369. 'maximumFractionDigits',
  21370. 'minimumSignificantDigits',
  21371. 'maximumSignificantDigits'
  21372. ];
  21373. var dateTimeFormatKeys = [
  21374. 'dateStyle',
  21375. 'timeStyle',
  21376. 'calendar',
  21377. 'localeMatcher',
  21378. "hour12",
  21379. "hourCycle",
  21380. "timeZone",
  21381. "formatMatcher",
  21382. 'weekday',
  21383. 'era',
  21384. 'year',
  21385. 'month',
  21386. 'day',
  21387. 'hour',
  21388. 'minute',
  21389. 'second',
  21390. 'timeZoneName' ];
  21391. /**
  21392. * utilities
  21393. */
  21394. function warn (msg, err) {
  21395. if (typeof console !== 'undefined') {
  21396. console.warn('[vue-i18n] ' + msg);
  21397. /* istanbul ignore if */
  21398. if (err) {
  21399. console.warn(err.stack);
  21400. }
  21401. }
  21402. }
  21403. function error (msg, err) {
  21404. if (typeof console !== 'undefined') {
  21405. console.error('[vue-i18n] ' + msg);
  21406. /* istanbul ignore if */
  21407. if (err) {
  21408. console.error(err.stack);
  21409. }
  21410. }
  21411. }
  21412. var isArray = Array.isArray;
  21413. function isObject (obj) {
  21414. return obj !== null && typeof obj === 'object'
  21415. }
  21416. function isBoolean (val) {
  21417. return typeof val === 'boolean'
  21418. }
  21419. function isString (val) {
  21420. return typeof val === 'string'
  21421. }
  21422. var toString = Object.prototype.toString;
  21423. var OBJECT_STRING = '[object Object]';
  21424. function isPlainObject (obj) {
  21425. return toString.call(obj) === OBJECT_STRING
  21426. }
  21427. function isNull (val) {
  21428. return val === null || val === undefined
  21429. }
  21430. function isFunction (val) {
  21431. return typeof val === 'function'
  21432. }
  21433. function parseArgs () {
  21434. var args = [], len = arguments.length;
  21435. while ( len-- ) args[ len ] = arguments[ len ];
  21436. var locale = null;
  21437. var params = null;
  21438. if (args.length === 1) {
  21439. if (isObject(args[0]) || isArray(args[0])) {
  21440. params = args[0];
  21441. } else if (typeof args[0] === 'string') {
  21442. locale = args[0];
  21443. }
  21444. } else if (args.length === 2) {
  21445. if (typeof args[0] === 'string') {
  21446. locale = args[0];
  21447. }
  21448. /* istanbul ignore if */
  21449. if (isObject(args[1]) || isArray(args[1])) {
  21450. params = args[1];
  21451. }
  21452. }
  21453. return { locale: locale, params: params }
  21454. }
  21455. function looseClone (obj) {
  21456. return JSON.parse(JSON.stringify(obj))
  21457. }
  21458. function remove (arr, item) {
  21459. if (arr.delete(item)) {
  21460. return arr
  21461. }
  21462. }
  21463. function arrayFrom (arr) {
  21464. var ret = [];
  21465. arr.forEach(function (a) { return ret.push(a); });
  21466. return ret
  21467. }
  21468. function includes (arr, item) {
  21469. return !!~arr.indexOf(item)
  21470. }
  21471. var hasOwnProperty = Object.prototype.hasOwnProperty;
  21472. function hasOwn (obj, key) {
  21473. return hasOwnProperty.call(obj, key)
  21474. }
  21475. function merge (target) {
  21476. var arguments$1 = arguments;
  21477. var output = Object(target);
  21478. for (var i = 1; i < arguments.length; i++) {
  21479. var source = arguments$1[i];
  21480. if (source !== undefined && source !== null) {
  21481. var key = (void 0);
  21482. for (key in source) {
  21483. if (hasOwn(source, key)) {
  21484. if (isObject(source[key])) {
  21485. output[key] = merge(output[key], source[key]);
  21486. } else {
  21487. output[key] = source[key];
  21488. }
  21489. }
  21490. }
  21491. }
  21492. }
  21493. return output
  21494. }
  21495. function looseEqual (a, b) {
  21496. if (a === b) { return true }
  21497. var isObjectA = isObject(a);
  21498. var isObjectB = isObject(b);
  21499. if (isObjectA && isObjectB) {
  21500. try {
  21501. var isArrayA = isArray(a);
  21502. var isArrayB = isArray(b);
  21503. if (isArrayA && isArrayB) {
  21504. return a.length === b.length && a.every(function (e, i) {
  21505. return looseEqual(e, b[i])
  21506. })
  21507. } else if (!isArrayA && !isArrayB) {
  21508. var keysA = Object.keys(a);
  21509. var keysB = Object.keys(b);
  21510. return keysA.length === keysB.length && keysA.every(function (key) {
  21511. return looseEqual(a[key], b[key])
  21512. })
  21513. } else {
  21514. /* istanbul ignore next */
  21515. return false
  21516. }
  21517. } catch (e) {
  21518. /* istanbul ignore next */
  21519. return false
  21520. }
  21521. } else if (!isObjectA && !isObjectB) {
  21522. return String(a) === String(b)
  21523. } else {
  21524. return false
  21525. }
  21526. }
  21527. /**
  21528. * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.
  21529. * @param rawText The raw input from the user that should be escaped.
  21530. */
  21531. function escapeHtml(rawText) {
  21532. return rawText
  21533. .replace(/</g, '&lt;')
  21534. .replace(/>/g, '&gt;')
  21535. .replace(/"/g, '&quot;')
  21536. .replace(/'/g, '&apos;')
  21537. }
  21538. /**
  21539. * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.
  21540. * This method performs an in-place operation on the params object.
  21541. *
  21542. * @param {any} params Parameters as provided from `parseArgs().params`.
  21543. * May be either an array of strings or a string->any map.
  21544. *
  21545. * @returns The manipulated `params` object.
  21546. */
  21547. function escapeParams(params) {
  21548. if(params != null) {
  21549. Object.keys(params).forEach(function (key) {
  21550. if(typeof(params[key]) == 'string') {
  21551. params[key] = escapeHtml(params[key]);
  21552. }
  21553. });
  21554. }
  21555. return params
  21556. }
  21557. /* */
  21558. function extend (Vue) {
  21559. if (!Vue.prototype.hasOwnProperty('$i18n')) {
  21560. // $FlowFixMe
  21561. Object.defineProperty(Vue.prototype, '$i18n', {
  21562. get: function get () { return this._i18n }
  21563. });
  21564. }
  21565. Vue.prototype.$t = function (key) {
  21566. var values = [], len = arguments.length - 1;
  21567. while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
  21568. var i18n = this.$i18n;
  21569. return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))
  21570. };
  21571. Vue.prototype.$tc = function (key, choice) {
  21572. var values = [], len = arguments.length - 2;
  21573. while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
  21574. var i18n = this.$i18n;
  21575. return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))
  21576. };
  21577. Vue.prototype.$te = function (key, locale) {
  21578. var i18n = this.$i18n;
  21579. return i18n._te(key, i18n.locale, i18n._getMessages(), locale)
  21580. };
  21581. Vue.prototype.$d = function (value) {
  21582. var ref;
  21583. var args = [], len = arguments.length - 1;
  21584. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  21585. return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))
  21586. };
  21587. Vue.prototype.$n = function (value) {
  21588. var ref;
  21589. var args = [], len = arguments.length - 1;
  21590. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  21591. return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))
  21592. };
  21593. }
  21594. /* */
  21595. /**
  21596. * Mixin
  21597. *
  21598. * If `bridge` mode, empty mixin is returned,
  21599. * else regulary mixin implementation is returned.
  21600. */
  21601. function defineMixin (bridge) {
  21602. if ( bridge === void 0 ) bridge = false;
  21603. function mounted () {
  21604. if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {
  21605. this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);
  21606. }
  21607. }
  21608. return bridge
  21609. ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation
  21610. : { // regulary
  21611. beforeCreate: function beforeCreate () {
  21612. var options = this.$options;
  21613. options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);
  21614. if (options.i18n) {
  21615. if (options.i18n instanceof VueI18n) {
  21616. // init locale messages via custom blocks
  21617. if ((options.__i18nBridge || options.__i18n)) {
  21618. try {
  21619. var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};
  21620. var _i18n = options.__i18nBridge || options.__i18n;
  21621. _i18n.forEach(function (resource) {
  21622. localeMessages = merge(localeMessages, JSON.parse(resource));
  21623. });
  21624. Object.keys(localeMessages).forEach(function (locale) {
  21625. options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);
  21626. });
  21627. } catch (e) {
  21628. if (true) {
  21629. error("Cannot parse locale messages via custom blocks.", e);
  21630. }
  21631. }
  21632. }
  21633. this._i18n = options.i18n;
  21634. this._i18nWatcher = this._i18n.watchI18nData();
  21635. } else if (isPlainObject(options.i18n)) {
  21636. var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n
  21637. ? this.$root.$i18n
  21638. : null;
  21639. // component local i18n
  21640. if (rootI18n) {
  21641. options.i18n.root = this.$root;
  21642. options.i18n.formatter = rootI18n.formatter;
  21643. options.i18n.fallbackLocale = rootI18n.fallbackLocale;
  21644. options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;
  21645. options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;
  21646. options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;
  21647. options.i18n.pluralizationRules = rootI18n.pluralizationRules;
  21648. options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;
  21649. }
  21650. // init locale messages via custom blocks
  21651. if ((options.__i18nBridge || options.__i18n)) {
  21652. try {
  21653. var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};
  21654. var _i18n$1 = options.__i18nBridge || options.__i18n;
  21655. _i18n$1.forEach(function (resource) {
  21656. localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));
  21657. });
  21658. options.i18n.messages = localeMessages$1;
  21659. } catch (e) {
  21660. if (true) {
  21661. warn("Cannot parse locale messages via custom blocks.", e);
  21662. }
  21663. }
  21664. }
  21665. var ref = options.i18n;
  21666. var sharedMessages = ref.sharedMessages;
  21667. if (sharedMessages && isPlainObject(sharedMessages)) {
  21668. options.i18n.messages = merge(options.i18n.messages, sharedMessages);
  21669. }
  21670. this._i18n = new VueI18n(options.i18n);
  21671. this._i18nWatcher = this._i18n.watchI18nData();
  21672. if (options.i18n.sync === undefined || !!options.i18n.sync) {
  21673. this._localeWatcher = this.$i18n.watchLocale();
  21674. }
  21675. if (rootI18n) {
  21676. rootI18n.onComponentInstanceCreated(this._i18n);
  21677. }
  21678. } else {
  21679. if (true) {
  21680. warn("Cannot be interpreted 'i18n' option.");
  21681. }
  21682. }
  21683. } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
  21684. // root i18n
  21685. this._i18n = this.$root.$i18n;
  21686. } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
  21687. // parent i18n
  21688. this._i18n = options.parent.$i18n;
  21689. }
  21690. },
  21691. beforeMount: function beforeMount () {
  21692. var options = this.$options;
  21693. options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);
  21694. if (options.i18n) {
  21695. if (options.i18n instanceof VueI18n) {
  21696. // init locale messages via custom blocks
  21697. this._i18n.subscribeDataChanging(this);
  21698. this._subscribing = true;
  21699. } else if (isPlainObject(options.i18n)) {
  21700. this._i18n.subscribeDataChanging(this);
  21701. this._subscribing = true;
  21702. } else {
  21703. if (true) {
  21704. warn("Cannot be interpreted 'i18n' option.");
  21705. }
  21706. }
  21707. } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
  21708. this._i18n.subscribeDataChanging(this);
  21709. this._subscribing = true;
  21710. } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
  21711. this._i18n.subscribeDataChanging(this);
  21712. this._subscribing = true;
  21713. }
  21714. },
  21715. mounted: mounted,
  21716. beforeDestroy: function beforeDestroy () {
  21717. if (!this._i18n) { return }
  21718. var self = this;
  21719. this.$nextTick(function () {
  21720. if (self._subscribing) {
  21721. self._i18n.unsubscribeDataChanging(self);
  21722. delete self._subscribing;
  21723. }
  21724. if (self._i18nWatcher) {
  21725. self._i18nWatcher();
  21726. self._i18n.destroyVM();
  21727. delete self._i18nWatcher;
  21728. }
  21729. if (self._localeWatcher) {
  21730. self._localeWatcher();
  21731. delete self._localeWatcher;
  21732. }
  21733. });
  21734. }
  21735. }
  21736. }
  21737. /* */
  21738. var interpolationComponent = {
  21739. name: 'i18n',
  21740. functional: true,
  21741. props: {
  21742. tag: {
  21743. type: [String, Boolean, Object],
  21744. default: 'span'
  21745. },
  21746. path: {
  21747. type: String,
  21748. required: true
  21749. },
  21750. locale: {
  21751. type: String
  21752. },
  21753. places: {
  21754. type: [Array, Object]
  21755. }
  21756. },
  21757. render: function render (h, ref) {
  21758. var data = ref.data;
  21759. var parent = ref.parent;
  21760. var props = ref.props;
  21761. var slots = ref.slots;
  21762. var $i18n = parent.$i18n;
  21763. if (!$i18n) {
  21764. if (true) {
  21765. warn('Cannot find VueI18n instance!');
  21766. }
  21767. return
  21768. }
  21769. var path = props.path;
  21770. var locale = props.locale;
  21771. var places = props.places;
  21772. var params = slots();
  21773. var children = $i18n.i(
  21774. path,
  21775. locale,
  21776. onlyHasDefaultPlace(params) || places
  21777. ? useLegacyPlaces(params.default, places)
  21778. : params
  21779. );
  21780. var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';
  21781. return tag ? h(tag, data, children) : children
  21782. }
  21783. };
  21784. function onlyHasDefaultPlace (params) {
  21785. var prop;
  21786. for (prop in params) {
  21787. if (prop !== 'default') { return false }
  21788. }
  21789. return Boolean(prop)
  21790. }
  21791. function useLegacyPlaces (children, places) {
  21792. var params = places ? createParamsFromPlaces(places) : {};
  21793. if (!children) { return params }
  21794. // Filter empty text nodes
  21795. children = children.filter(function (child) {
  21796. return child.tag || child.text.trim() !== ''
  21797. });
  21798. var everyPlace = children.every(vnodeHasPlaceAttribute);
  21799. if ( true && everyPlace) {
  21800. warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');
  21801. }
  21802. return children.reduce(
  21803. everyPlace ? assignChildPlace : assignChildIndex,
  21804. params
  21805. )
  21806. }
  21807. function createParamsFromPlaces (places) {
  21808. if (true) {
  21809. warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');
  21810. }
  21811. return Array.isArray(places)
  21812. ? places.reduce(assignChildIndex, {})
  21813. : Object.assign({}, places)
  21814. }
  21815. function assignChildPlace (params, child) {
  21816. if (child.data && child.data.attrs && child.data.attrs.place) {
  21817. params[child.data.attrs.place] = child;
  21818. }
  21819. return params
  21820. }
  21821. function assignChildIndex (params, child, index) {
  21822. params[index] = child;
  21823. return params
  21824. }
  21825. function vnodeHasPlaceAttribute (vnode) {
  21826. return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)
  21827. }
  21828. /* */
  21829. var numberComponent = {
  21830. name: 'i18n-n',
  21831. functional: true,
  21832. props: {
  21833. tag: {
  21834. type: [String, Boolean, Object],
  21835. default: 'span'
  21836. },
  21837. value: {
  21838. type: Number,
  21839. required: true
  21840. },
  21841. format: {
  21842. type: [String, Object]
  21843. },
  21844. locale: {
  21845. type: String
  21846. }
  21847. },
  21848. render: function render (h, ref) {
  21849. var props = ref.props;
  21850. var parent = ref.parent;
  21851. var data = ref.data;
  21852. var i18n = parent.$i18n;
  21853. if (!i18n) {
  21854. if (true) {
  21855. warn('Cannot find VueI18n instance!');
  21856. }
  21857. return null
  21858. }
  21859. var key = null;
  21860. var options = null;
  21861. if (isString(props.format)) {
  21862. key = props.format;
  21863. } else if (isObject(props.format)) {
  21864. if (props.format.key) {
  21865. key = props.format.key;
  21866. }
  21867. // Filter out number format options only
  21868. options = Object.keys(props.format).reduce(function (acc, prop) {
  21869. var obj;
  21870. if (includes(numberFormatKeys, prop)) {
  21871. return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))
  21872. }
  21873. return acc
  21874. }, null);
  21875. }
  21876. var locale = props.locale || i18n.locale;
  21877. var parts = i18n._ntp(props.value, locale, key, options);
  21878. var values = parts.map(function (part, index) {
  21879. var obj;
  21880. var slot = data.scopedSlots && data.scopedSlots[part.type];
  21881. return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value
  21882. });
  21883. var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';
  21884. return tag
  21885. ? h(tag, {
  21886. attrs: data.attrs,
  21887. 'class': data['class'],
  21888. staticClass: data.staticClass
  21889. }, values)
  21890. : values
  21891. }
  21892. };
  21893. /* */
  21894. function bind (el, binding, vnode) {
  21895. if (!assert(el, vnode)) { return }
  21896. t(el, binding, vnode);
  21897. }
  21898. function update (el, binding, vnode, oldVNode) {
  21899. if (!assert(el, vnode)) { return }
  21900. var i18n = vnode.context.$i18n;
  21901. if (localeEqual(el, vnode) &&
  21902. (looseEqual(binding.value, binding.oldValue) &&
  21903. looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }
  21904. t(el, binding, vnode);
  21905. }
  21906. function unbind (el, binding, vnode, oldVNode) {
  21907. var vm = vnode.context;
  21908. if (!vm) {
  21909. warn('Vue instance does not exists in VNode context');
  21910. return
  21911. }
  21912. var i18n = vnode.context.$i18n || {};
  21913. if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {
  21914. el.textContent = '';
  21915. }
  21916. el._vt = undefined;
  21917. delete el['_vt'];
  21918. el._locale = undefined;
  21919. delete el['_locale'];
  21920. el._localeMessage = undefined;
  21921. delete el['_localeMessage'];
  21922. }
  21923. function assert (el, vnode) {
  21924. var vm = vnode.context;
  21925. if (!vm) {
  21926. warn('Vue instance does not exists in VNode context');
  21927. return false
  21928. }
  21929. if (!vm.$i18n) {
  21930. warn('VueI18n instance does not exists in Vue instance');
  21931. return false
  21932. }
  21933. return true
  21934. }
  21935. function localeEqual (el, vnode) {
  21936. var vm = vnode.context;
  21937. return el._locale === vm.$i18n.locale
  21938. }
  21939. function t (el, binding, vnode) {
  21940. var ref$1, ref$2;
  21941. var value = binding.value;
  21942. var ref = parseValue(value);
  21943. var path = ref.path;
  21944. var locale = ref.locale;
  21945. var args = ref.args;
  21946. var choice = ref.choice;
  21947. if (!path && !locale && !args) {
  21948. warn('value type not supported');
  21949. return
  21950. }
  21951. if (!path) {
  21952. warn('`path` is required in v-t directive');
  21953. return
  21954. }
  21955. var vm = vnode.context;
  21956. if (choice != null) {
  21957. el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));
  21958. } else {
  21959. el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));
  21960. }
  21961. el._locale = vm.$i18n.locale;
  21962. el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);
  21963. }
  21964. function parseValue (value) {
  21965. var path;
  21966. var locale;
  21967. var args;
  21968. var choice;
  21969. if (isString(value)) {
  21970. path = value;
  21971. } else if (isPlainObject(value)) {
  21972. path = value.path;
  21973. locale = value.locale;
  21974. args = value.args;
  21975. choice = value.choice;
  21976. }
  21977. return { path: path, locale: locale, args: args, choice: choice }
  21978. }
  21979. function makeParams (locale, args) {
  21980. var params = [];
  21981. locale && params.push(locale);
  21982. if (args && (Array.isArray(args) || isPlainObject(args))) {
  21983. params.push(args);
  21984. }
  21985. return params
  21986. }
  21987. var Vue;
  21988. function install (_Vue, options) {
  21989. if ( options === void 0 ) options = { bridge: false };
  21990. /* istanbul ignore if */
  21991. if ( true && install.installed && _Vue === Vue) {
  21992. warn('already installed.');
  21993. return
  21994. }
  21995. install.installed = true;
  21996. Vue = _Vue;
  21997. var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;
  21998. /* istanbul ignore if */
  21999. if ( true && version < 2) {
  22000. warn(("vue-i18n (" + (install.version) + ") need to use Vue 2.0 or later (Vue: " + (Vue.version) + ")."));
  22001. return
  22002. }
  22003. extend(Vue);
  22004. Vue.mixin(defineMixin(options.bridge));
  22005. Vue.directive('t', { bind: bind, update: update, unbind: unbind });
  22006. Vue.component(interpolationComponent.name, interpolationComponent);
  22007. Vue.component(numberComponent.name, numberComponent);
  22008. // use simple mergeStrategies to prevent i18n instance lose '__proto__'
  22009. var strats = Vue.config.optionMergeStrategies;
  22010. strats.i18n = function (parentVal, childVal) {
  22011. return childVal === undefined
  22012. ? parentVal
  22013. : childVal
  22014. };
  22015. }
  22016. /* */
  22017. var BaseFormatter = function BaseFormatter () {
  22018. this._caches = Object.create(null);
  22019. };
  22020. BaseFormatter.prototype.interpolate = function interpolate (message, values) {
  22021. if (!values) {
  22022. return [message]
  22023. }
  22024. var tokens = this._caches[message];
  22025. if (!tokens) {
  22026. tokens = parse(message);
  22027. this._caches[message] = tokens;
  22028. }
  22029. return compile(tokens, values)
  22030. };
  22031. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  22032. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  22033. function parse (format) {
  22034. var tokens = [];
  22035. var position = 0;
  22036. var text = '';
  22037. while (position < format.length) {
  22038. var char = format[position++];
  22039. if (char === '{') {
  22040. if (text) {
  22041. tokens.push({ type: 'text', value: text });
  22042. }
  22043. text = '';
  22044. var sub = '';
  22045. char = format[position++];
  22046. while (char !== undefined && char !== '}') {
  22047. sub += char;
  22048. char = format[position++];
  22049. }
  22050. var isClosed = char === '}';
  22051. var type = RE_TOKEN_LIST_VALUE.test(sub)
  22052. ? 'list'
  22053. : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)
  22054. ? 'named'
  22055. : 'unknown';
  22056. tokens.push({ value: sub, type: type });
  22057. } else if (char === '%') {
  22058. // when found rails i18n syntax, skip text capture
  22059. if (format[(position)] !== '{') {
  22060. text += char;
  22061. }
  22062. } else {
  22063. text += char;
  22064. }
  22065. }
  22066. text && tokens.push({ type: 'text', value: text });
  22067. return tokens
  22068. }
  22069. function compile (tokens, values) {
  22070. var compiled = [];
  22071. var index = 0;
  22072. var mode = Array.isArray(values)
  22073. ? 'list'
  22074. : isObject(values)
  22075. ? 'named'
  22076. : 'unknown';
  22077. if (mode === 'unknown') { return compiled }
  22078. while (index < tokens.length) {
  22079. var token = tokens[index];
  22080. switch (token.type) {
  22081. case 'text':
  22082. compiled.push(token.value);
  22083. break
  22084. case 'list':
  22085. compiled.push(values[parseInt(token.value, 10)]);
  22086. break
  22087. case 'named':
  22088. if (mode === 'named') {
  22089. compiled.push((values)[token.value]);
  22090. } else {
  22091. if (true) {
  22092. warn(("Type of token '" + (token.type) + "' and format of value '" + mode + "' don't match!"));
  22093. }
  22094. }
  22095. break
  22096. case 'unknown':
  22097. if (true) {
  22098. warn("Detect 'unknown' type of token!");
  22099. }
  22100. break
  22101. }
  22102. index++;
  22103. }
  22104. return compiled
  22105. }
  22106. /* */
  22107. /**
  22108. * Path parser
  22109. * - Inspired:
  22110. * Vue.js Path parser
  22111. */
  22112. // actions
  22113. var APPEND = 0;
  22114. var PUSH = 1;
  22115. var INC_SUB_PATH_DEPTH = 2;
  22116. var PUSH_SUB_PATH = 3;
  22117. // states
  22118. var BEFORE_PATH = 0;
  22119. var IN_PATH = 1;
  22120. var BEFORE_IDENT = 2;
  22121. var IN_IDENT = 3;
  22122. var IN_SUB_PATH = 4;
  22123. var IN_SINGLE_QUOTE = 5;
  22124. var IN_DOUBLE_QUOTE = 6;
  22125. var AFTER_PATH = 7;
  22126. var ERROR = 8;
  22127. var pathStateMachine = [];
  22128. pathStateMachine[BEFORE_PATH] = {
  22129. 'ws': [BEFORE_PATH],
  22130. 'ident': [IN_IDENT, APPEND],
  22131. '[': [IN_SUB_PATH],
  22132. 'eof': [AFTER_PATH]
  22133. };
  22134. pathStateMachine[IN_PATH] = {
  22135. 'ws': [IN_PATH],
  22136. '.': [BEFORE_IDENT],
  22137. '[': [IN_SUB_PATH],
  22138. 'eof': [AFTER_PATH]
  22139. };
  22140. pathStateMachine[BEFORE_IDENT] = {
  22141. 'ws': [BEFORE_IDENT],
  22142. 'ident': [IN_IDENT, APPEND],
  22143. '0': [IN_IDENT, APPEND],
  22144. 'number': [IN_IDENT, APPEND]
  22145. };
  22146. pathStateMachine[IN_IDENT] = {
  22147. 'ident': [IN_IDENT, APPEND],
  22148. '0': [IN_IDENT, APPEND],
  22149. 'number': [IN_IDENT, APPEND],
  22150. 'ws': [IN_PATH, PUSH],
  22151. '.': [BEFORE_IDENT, PUSH],
  22152. '[': [IN_SUB_PATH, PUSH],
  22153. 'eof': [AFTER_PATH, PUSH]
  22154. };
  22155. pathStateMachine[IN_SUB_PATH] = {
  22156. "'": [IN_SINGLE_QUOTE, APPEND],
  22157. '"': [IN_DOUBLE_QUOTE, APPEND],
  22158. '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],
  22159. ']': [IN_PATH, PUSH_SUB_PATH],
  22160. 'eof': ERROR,
  22161. 'else': [IN_SUB_PATH, APPEND]
  22162. };
  22163. pathStateMachine[IN_SINGLE_QUOTE] = {
  22164. "'": [IN_SUB_PATH, APPEND],
  22165. 'eof': ERROR,
  22166. 'else': [IN_SINGLE_QUOTE, APPEND]
  22167. };
  22168. pathStateMachine[IN_DOUBLE_QUOTE] = {
  22169. '"': [IN_SUB_PATH, APPEND],
  22170. 'eof': ERROR,
  22171. 'else': [IN_DOUBLE_QUOTE, APPEND]
  22172. };
  22173. /**
  22174. * Check if an expression is a literal value.
  22175. */
  22176. var literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
  22177. function isLiteral (exp) {
  22178. return literalValueRE.test(exp)
  22179. }
  22180. /**
  22181. * Strip quotes from a string
  22182. */
  22183. function stripQuotes (str) {
  22184. var a = str.charCodeAt(0);
  22185. var b = str.charCodeAt(str.length - 1);
  22186. return a === b && (a === 0x22 || a === 0x27)
  22187. ? str.slice(1, -1)
  22188. : str
  22189. }
  22190. /**
  22191. * Determine the type of a character in a keypath.
  22192. */
  22193. function getPathCharType (ch) {
  22194. if (ch === undefined || ch === null) { return 'eof' }
  22195. var code = ch.charCodeAt(0);
  22196. switch (code) {
  22197. case 0x5B: // [
  22198. case 0x5D: // ]
  22199. case 0x2E: // .
  22200. case 0x22: // "
  22201. case 0x27: // '
  22202. return ch
  22203. case 0x5F: // _
  22204. case 0x24: // $
  22205. case 0x2D: // -
  22206. return 'ident'
  22207. case 0x09: // Tab
  22208. case 0x0A: // Newline
  22209. case 0x0D: // Return
  22210. case 0xA0: // No-break space
  22211. case 0xFEFF: // Byte Order Mark
  22212. case 0x2028: // Line Separator
  22213. case 0x2029: // Paragraph Separator
  22214. return 'ws'
  22215. }
  22216. return 'ident'
  22217. }
  22218. /**
  22219. * Format a subPath, return its plain form if it is
  22220. * a literal string or number. Otherwise prepend the
  22221. * dynamic indicator (*).
  22222. */
  22223. function formatSubPath (path) {
  22224. var trimmed = path.trim();
  22225. // invalid leading 0
  22226. if (path.charAt(0) === '0' && isNaN(path)) { return false }
  22227. return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed
  22228. }
  22229. /**
  22230. * Parse a string path into an array of segments
  22231. */
  22232. function parse$1 (path) {
  22233. var keys = [];
  22234. var index = -1;
  22235. var mode = BEFORE_PATH;
  22236. var subPathDepth = 0;
  22237. var c;
  22238. var key;
  22239. var newChar;
  22240. var type;
  22241. var transition;
  22242. var action;
  22243. var typeMap;
  22244. var actions = [];
  22245. actions[PUSH] = function () {
  22246. if (key !== undefined) {
  22247. keys.push(key);
  22248. key = undefined;
  22249. }
  22250. };
  22251. actions[APPEND] = function () {
  22252. if (key === undefined) {
  22253. key = newChar;
  22254. } else {
  22255. key += newChar;
  22256. }
  22257. };
  22258. actions[INC_SUB_PATH_DEPTH] = function () {
  22259. actions[APPEND]();
  22260. subPathDepth++;
  22261. };
  22262. actions[PUSH_SUB_PATH] = function () {
  22263. if (subPathDepth > 0) {
  22264. subPathDepth--;
  22265. mode = IN_SUB_PATH;
  22266. actions[APPEND]();
  22267. } else {
  22268. subPathDepth = 0;
  22269. if (key === undefined) { return false }
  22270. key = formatSubPath(key);
  22271. if (key === false) {
  22272. return false
  22273. } else {
  22274. actions[PUSH]();
  22275. }
  22276. }
  22277. };
  22278. function maybeUnescapeQuote () {
  22279. var nextChar = path[index + 1];
  22280. if ((mode === IN_SINGLE_QUOTE && nextChar === "'") ||
  22281. (mode === IN_DOUBLE_QUOTE && nextChar === '"')) {
  22282. index++;
  22283. newChar = '\\' + nextChar;
  22284. actions[APPEND]();
  22285. return true
  22286. }
  22287. }
  22288. while (mode !== null) {
  22289. index++;
  22290. c = path[index];
  22291. if (c === '\\' && maybeUnescapeQuote()) {
  22292. continue
  22293. }
  22294. type = getPathCharType(c);
  22295. typeMap = pathStateMachine[mode];
  22296. transition = typeMap[type] || typeMap['else'] || ERROR;
  22297. if (transition === ERROR) {
  22298. return // parse error
  22299. }
  22300. mode = transition[0];
  22301. action = actions[transition[1]];
  22302. if (action) {
  22303. newChar = transition[2];
  22304. newChar = newChar === undefined
  22305. ? c
  22306. : newChar;
  22307. if (action() === false) {
  22308. return
  22309. }
  22310. }
  22311. if (mode === AFTER_PATH) {
  22312. return keys
  22313. }
  22314. }
  22315. }
  22316. var I18nPath = function I18nPath () {
  22317. this._cache = Object.create(null);
  22318. };
  22319. /**
  22320. * External parse that check for a cache hit first
  22321. */
  22322. I18nPath.prototype.parsePath = function parsePath (path) {
  22323. var hit = this._cache[path];
  22324. if (!hit) {
  22325. hit = parse$1(path);
  22326. if (hit) {
  22327. this._cache[path] = hit;
  22328. }
  22329. }
  22330. return hit || []
  22331. };
  22332. /**
  22333. * Get path value from path string
  22334. */
  22335. I18nPath.prototype.getPathValue = function getPathValue (obj, path) {
  22336. if (!isObject(obj)) { return null }
  22337. var paths = this.parsePath(path);
  22338. if (paths.length === 0) {
  22339. return null
  22340. } else {
  22341. var length = paths.length;
  22342. var last = obj;
  22343. var i = 0;
  22344. while (i < length) {
  22345. var value = last[paths[i]];
  22346. if (value === undefined || value === null) {
  22347. return null
  22348. }
  22349. last = value;
  22350. i++;
  22351. }
  22352. return last
  22353. }
  22354. };
  22355. /* */
  22356. var htmlTagMatcher = /<\/?[\w\s="/.':;#-\/]+>/;
  22357. var linkKeyMatcher = /(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g;
  22358. var linkKeyPrefixMatcher = /^@(?:\.([a-zA-Z]+))?:/;
  22359. var bracketsMatcher = /[()]/g;
  22360. var defaultModifiers = {
  22361. 'upper': function (str) { return str.toLocaleUpperCase(); },
  22362. 'lower': function (str) { return str.toLocaleLowerCase(); },
  22363. 'capitalize': function (str) { return ("" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }
  22364. };
  22365. var defaultFormatter = new BaseFormatter();
  22366. var VueI18n = function VueI18n (options) {
  22367. var this$1 = this;
  22368. if ( options === void 0 ) options = {};
  22369. // Auto install if it is not done yet and `window` has `Vue`.
  22370. // To allow users to avoid auto-installation in some cases,
  22371. // this code should be placed here. See #290
  22372. /* istanbul ignore if */
  22373. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  22374. install(window.Vue);
  22375. }
  22376. var locale = options.locale || 'en-US';
  22377. var fallbackLocale = options.fallbackLocale === false
  22378. ? false
  22379. : options.fallbackLocale || 'en-US';
  22380. var messages = options.messages || {};
  22381. var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};
  22382. var numberFormats = options.numberFormats || {};
  22383. this._vm = null;
  22384. this._formatter = options.formatter || defaultFormatter;
  22385. this._modifiers = options.modifiers || {};
  22386. this._missing = options.missing || null;
  22387. this._root = options.root || null;
  22388. this._sync = options.sync === undefined ? true : !!options.sync;
  22389. this._fallbackRoot = options.fallbackRoot === undefined
  22390. ? true
  22391. : !!options.fallbackRoot;
  22392. this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined
  22393. ? true
  22394. : !!options.fallbackRootWithEmptyString;
  22395. this._formatFallbackMessages = options.formatFallbackMessages === undefined
  22396. ? false
  22397. : !!options.formatFallbackMessages;
  22398. this._silentTranslationWarn = options.silentTranslationWarn === undefined
  22399. ? false
  22400. : options.silentTranslationWarn;
  22401. this._silentFallbackWarn = options.silentFallbackWarn === undefined
  22402. ? false
  22403. : !!options.silentFallbackWarn;
  22404. this._dateTimeFormatters = {};
  22405. this._numberFormatters = {};
  22406. this._path = new I18nPath();
  22407. this._dataListeners = new Set();
  22408. this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;
  22409. this._preserveDirectiveContent = options.preserveDirectiveContent === undefined
  22410. ? false
  22411. : !!options.preserveDirectiveContent;
  22412. this.pluralizationRules = options.pluralizationRules || {};
  22413. this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';
  22414. this._postTranslation = options.postTranslation || null;
  22415. this._escapeParameterHtml = options.escapeParameterHtml || false;
  22416. if ('__VUE_I18N_BRIDGE__' in options) {
  22417. this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;
  22418. }
  22419. /**
  22420. * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`
  22421. * @param choicesLength {number} an overall amount of available choices
  22422. * @returns a final choice index
  22423. */
  22424. this.getChoiceIndex = function (choice, choicesLength) {
  22425. var thisPrototype = Object.getPrototypeOf(this$1);
  22426. if (thisPrototype && thisPrototype.getChoiceIndex) {
  22427. var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);
  22428. return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)
  22429. }
  22430. // Default (old) getChoiceIndex implementation - english-compatible
  22431. var defaultImpl = function (_choice, _choicesLength) {
  22432. _choice = Math.abs(_choice);
  22433. if (_choicesLength === 2) {
  22434. return _choice
  22435. ? _choice > 1
  22436. ? 1
  22437. : 0
  22438. : 1
  22439. }
  22440. return _choice ? Math.min(_choice, 2) : 0
  22441. };
  22442. if (this$1.locale in this$1.pluralizationRules) {
  22443. return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])
  22444. } else {
  22445. return defaultImpl(choice, choicesLength)
  22446. }
  22447. };
  22448. this._exist = function (message, key) {
  22449. if (!message || !key) { return false }
  22450. if (!isNull(this$1._path.getPathValue(message, key))) { return true }
  22451. // fallback for flat key
  22452. if (message[key]) { return true }
  22453. return false
  22454. };
  22455. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  22456. Object.keys(messages).forEach(function (locale) {
  22457. this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
  22458. });
  22459. }
  22460. this._initVM({
  22461. locale: locale,
  22462. fallbackLocale: fallbackLocale,
  22463. messages: messages,
  22464. dateTimeFormats: dateTimeFormats,
  22465. numberFormats: numberFormats
  22466. });
  22467. };
  22468. var prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };
  22469. VueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {
  22470. var paths = [];
  22471. var fn = function (level, locale, message, paths) {
  22472. if (isPlainObject(message)) {
  22473. Object.keys(message).forEach(function (key) {
  22474. var val = message[key];
  22475. if (isPlainObject(val)) {
  22476. paths.push(key);
  22477. paths.push('.');
  22478. fn(level, locale, val, paths);
  22479. paths.pop();
  22480. paths.pop();
  22481. } else {
  22482. paths.push(key);
  22483. fn(level, locale, val, paths);
  22484. paths.pop();
  22485. }
  22486. });
  22487. } else if (isArray(message)) {
  22488. message.forEach(function (item, index) {
  22489. if (isPlainObject(item)) {
  22490. paths.push(("[" + index + "]"));
  22491. paths.push('.');
  22492. fn(level, locale, item, paths);
  22493. paths.pop();
  22494. paths.pop();
  22495. } else {
  22496. paths.push(("[" + index + "]"));
  22497. fn(level, locale, item, paths);
  22498. paths.pop();
  22499. }
  22500. });
  22501. } else if (isString(message)) {
  22502. var ret = htmlTagMatcher.test(message);
  22503. if (ret) {
  22504. var msg = "Detected HTML in message '" + message + "' of keypath '" + (paths.join('')) + "' at '" + locale + "'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";
  22505. if (level === 'warn') {
  22506. warn(msg);
  22507. } else if (level === 'error') {
  22508. error(msg);
  22509. }
  22510. }
  22511. }
  22512. };
  22513. fn(level, locale, message, paths);
  22514. };
  22515. VueI18n.prototype._initVM = function _initVM (data) {
  22516. var silent = Vue.config.silent;
  22517. Vue.config.silent = true;
  22518. this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });
  22519. Vue.config.silent = silent;
  22520. };
  22521. VueI18n.prototype.destroyVM = function destroyVM () {
  22522. this._vm.$destroy();
  22523. };
  22524. VueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {
  22525. this._dataListeners.add(vm);
  22526. };
  22527. VueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {
  22528. remove(this._dataListeners, vm);
  22529. };
  22530. VueI18n.prototype.watchI18nData = function watchI18nData () {
  22531. var this$1 = this;
  22532. return this._vm.$watch('$data', function () {
  22533. var listeners = arrayFrom(this$1._dataListeners);
  22534. var i = listeners.length;
  22535. while(i--) {
  22536. Vue.nextTick(function () {
  22537. listeners[i] && listeners[i].$forceUpdate();
  22538. });
  22539. }
  22540. }, { deep: true })
  22541. };
  22542. VueI18n.prototype.watchLocale = function watchLocale (composer) {
  22543. if (!composer) {
  22544. /* istanbul ignore if */
  22545. if (!this._sync || !this._root) { return null }
  22546. var target = this._vm;
  22547. return this._root.$i18n.vm.$watch('locale', function (val) {
  22548. target.$set(target, 'locale', val);
  22549. target.$forceUpdate();
  22550. }, { immediate: true })
  22551. } else {
  22552. // deal with vue-i18n-bridge
  22553. if (!this.__VUE_I18N_BRIDGE__) { return null }
  22554. var self = this;
  22555. var target$1 = this._vm;
  22556. return this.vm.$watch('locale', function (val) {
  22557. target$1.$set(target$1, 'locale', val);
  22558. if (self.__VUE_I18N_BRIDGE__ && composer) {
  22559. composer.locale.value = val;
  22560. }
  22561. target$1.$forceUpdate();
  22562. }, { immediate: true })
  22563. }
  22564. };
  22565. VueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {
  22566. if (this._componentInstanceCreatedListener) {
  22567. this._componentInstanceCreatedListener(newI18n, this);
  22568. }
  22569. };
  22570. prototypeAccessors.vm.get = function () { return this._vm };
  22571. prototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };
  22572. prototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };
  22573. prototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };
  22574. prototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };
  22575. prototypeAccessors.locale.get = function () { return this._vm.locale };
  22576. prototypeAccessors.locale.set = function (locale) {
  22577. this._vm.$set(this._vm, 'locale', locale);
  22578. };
  22579. prototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };
  22580. prototypeAccessors.fallbackLocale.set = function (locale) {
  22581. this._localeChainCache = {};
  22582. this._vm.$set(this._vm, 'fallbackLocale', locale);
  22583. };
  22584. prototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };
  22585. prototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };
  22586. prototypeAccessors.missing.get = function () { return this._missing };
  22587. prototypeAccessors.missing.set = function (handler) { this._missing = handler; };
  22588. prototypeAccessors.formatter.get = function () { return this._formatter };
  22589. prototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };
  22590. prototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };
  22591. prototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };
  22592. prototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };
  22593. prototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };
  22594. prototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };
  22595. prototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };
  22596. prototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };
  22597. prototypeAccessors.warnHtmlInMessage.set = function (level) {
  22598. var this$1 = this;
  22599. var orgLevel = this._warnHtmlInMessage;
  22600. this._warnHtmlInMessage = level;
  22601. if (orgLevel !== level && (level === 'warn' || level === 'error')) {
  22602. var messages = this._getMessages();
  22603. Object.keys(messages).forEach(function (locale) {
  22604. this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
  22605. });
  22606. }
  22607. };
  22608. prototypeAccessors.postTranslation.get = function () { return this._postTranslation };
  22609. prototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };
  22610. prototypeAccessors.sync.get = function () { return this._sync };
  22611. prototypeAccessors.sync.set = function (val) { this._sync = val; };
  22612. VueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };
  22613. VueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };
  22614. VueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };
  22615. VueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {
  22616. if (!isNull(result)) { return result }
  22617. if (this._missing) {
  22618. var missingRet = this._missing.apply(null, [locale, key, vm, values]);
  22619. if (isString(missingRet)) {
  22620. return missingRet
  22621. }
  22622. } else {
  22623. if ( true && !this._isSilentTranslationWarn(key)) {
  22624. warn(
  22625. "Cannot translate the value of keypath '" + key + "'. " +
  22626. 'Use the value of keypath as default.'
  22627. );
  22628. }
  22629. }
  22630. if (this._formatFallbackMessages) {
  22631. var parsedArgs = parseArgs.apply(void 0, values);
  22632. return this._render(key, interpolateMode, parsedArgs.params, key)
  22633. } else {
  22634. return key
  22635. }
  22636. };
  22637. VueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {
  22638. return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot
  22639. };
  22640. VueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {
  22641. return this._silentFallbackWarn instanceof RegExp
  22642. ? this._silentFallbackWarn.test(key)
  22643. : this._silentFallbackWarn
  22644. };
  22645. VueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {
  22646. return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)
  22647. };
  22648. VueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {
  22649. return this._silentTranslationWarn instanceof RegExp
  22650. ? this._silentTranslationWarn.test(key)
  22651. : this._silentTranslationWarn
  22652. };
  22653. VueI18n.prototype._interpolate = function _interpolate (
  22654. locale,
  22655. message,
  22656. key,
  22657. host,
  22658. interpolateMode,
  22659. values,
  22660. visitedLinkStack
  22661. ) {
  22662. if (!message) { return null }
  22663. var pathRet = this._path.getPathValue(message, key);
  22664. if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }
  22665. var ret;
  22666. if (isNull(pathRet)) {
  22667. /* istanbul ignore else */
  22668. if (isPlainObject(message)) {
  22669. ret = message[key];
  22670. if (!(isString(ret) || isFunction(ret))) {
  22671. if ( true && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {
  22672. warn(("Value of key '" + key + "' is not a string or function !"));
  22673. }
  22674. return null
  22675. }
  22676. } else {
  22677. return null
  22678. }
  22679. } else {
  22680. /* istanbul ignore else */
  22681. if (isString(pathRet) || isFunction(pathRet)) {
  22682. ret = pathRet;
  22683. } else {
  22684. if ( true && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {
  22685. warn(("Value of key '" + key + "' is not a string or function!"));
  22686. }
  22687. return null
  22688. }
  22689. }
  22690. // Check for the existence of links within the translated string
  22691. if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {
  22692. ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);
  22693. }
  22694. return this._render(ret, interpolateMode, values, key)
  22695. };
  22696. VueI18n.prototype._link = function _link (
  22697. locale,
  22698. message,
  22699. str,
  22700. host,
  22701. interpolateMode,
  22702. values,
  22703. visitedLinkStack
  22704. ) {
  22705. var ret = str;
  22706. // Match all the links within the local
  22707. // We are going to replace each of
  22708. // them with its translation
  22709. var matches = ret.match(linkKeyMatcher);
  22710. // eslint-disable-next-line no-autofix/prefer-const
  22711. for (var idx in matches) {
  22712. // ie compatible: filter custom array
  22713. // prototype method
  22714. if (!matches.hasOwnProperty(idx)) {
  22715. continue
  22716. }
  22717. var link = matches[idx];
  22718. var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);
  22719. var linkPrefix = linkKeyPrefixMatches[0];
  22720. var formatterName = linkKeyPrefixMatches[1];
  22721. // Remove the leading @:, @.case: and the brackets
  22722. var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');
  22723. if (includes(visitedLinkStack, linkPlaceholder)) {
  22724. if (true) {
  22725. warn(("Circular reference found. \"" + link + "\" is already visited in the chain of " + (visitedLinkStack.reverse().join(' <- '))));
  22726. }
  22727. return ret
  22728. }
  22729. visitedLinkStack.push(linkPlaceholder);
  22730. // Translate the link
  22731. var translated = this._interpolate(
  22732. locale, message, linkPlaceholder, host,
  22733. interpolateMode === 'raw' ? 'string' : interpolateMode,
  22734. interpolateMode === 'raw' ? undefined : values,
  22735. visitedLinkStack
  22736. );
  22737. if (this._isFallbackRoot(translated)) {
  22738. if ( true && !this._isSilentTranslationWarn(linkPlaceholder)) {
  22739. warn(("Fall back to translate the link placeholder '" + linkPlaceholder + "' with root locale."));
  22740. }
  22741. /* istanbul ignore if */
  22742. if (!this._root) { throw Error('unexpected error') }
  22743. var root = this._root.$i18n;
  22744. translated = root._translate(
  22745. root._getMessages(), root.locale, root.fallbackLocale,
  22746. linkPlaceholder, host, interpolateMode, values
  22747. );
  22748. }
  22749. translated = this._warnDefault(
  22750. locale, linkPlaceholder, translated, host,
  22751. isArray(values) ? values : [values],
  22752. interpolateMode
  22753. );
  22754. if (this._modifiers.hasOwnProperty(formatterName)) {
  22755. translated = this._modifiers[formatterName](translated);
  22756. } else if (defaultModifiers.hasOwnProperty(formatterName)) {
  22757. translated = defaultModifiers[formatterName](translated);
  22758. }
  22759. visitedLinkStack.pop();
  22760. // Replace the link with the translated
  22761. ret = !translated ? ret : ret.replace(link, translated);
  22762. }
  22763. return ret
  22764. };
  22765. VueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {
  22766. var this$1 = this;
  22767. var _list = isArray(values) ? values : [];
  22768. var _named = isObject(values) ? values : {};
  22769. var list = function (index) { return _list[index]; };
  22770. var named = function (key) { return _named[key]; };
  22771. var messages = this._getMessages();
  22772. var locale = this.locale;
  22773. return {
  22774. list: list,
  22775. named: named,
  22776. values: values,
  22777. formatter: formatter,
  22778. path: path,
  22779. messages: messages,
  22780. locale: locale,
  22781. linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }
  22782. }
  22783. };
  22784. VueI18n.prototype._render = function _render (message, interpolateMode, values, path) {
  22785. if (isFunction(message)) {
  22786. return message(
  22787. this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)
  22788. )
  22789. }
  22790. var ret = this._formatter.interpolate(message, values, path);
  22791. // If the custom formatter refuses to work - apply the default one
  22792. if (!ret) {
  22793. ret = defaultFormatter.interpolate(message, values, path);
  22794. }
  22795. // if interpolateMode is **not** 'string' ('row'),
  22796. // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter
  22797. return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret
  22798. };
  22799. VueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {
  22800. var follow = false;
  22801. if (!includes(chain, item)) {
  22802. follow = true;
  22803. if (item) {
  22804. follow = item[item.length - 1] !== '!';
  22805. item = item.replace(/!/g, '');
  22806. chain.push(item);
  22807. if (blocks && blocks[item]) {
  22808. follow = blocks[item];
  22809. }
  22810. }
  22811. }
  22812. return follow
  22813. };
  22814. VueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {
  22815. var follow;
  22816. var tokens = locale.split('-');
  22817. do {
  22818. var item = tokens.join('-');
  22819. follow = this._appendItemToChain(chain, item, blocks);
  22820. tokens.splice(-1, 1);
  22821. } while (tokens.length && (follow === true))
  22822. return follow
  22823. };
  22824. VueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {
  22825. var follow = true;
  22826. for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {
  22827. var locale = block[i];
  22828. if (isString(locale)) {
  22829. follow = this._appendLocaleToChain(chain, locale, blocks);
  22830. }
  22831. }
  22832. return follow
  22833. };
  22834. VueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {
  22835. if (start === '') { return [] }
  22836. if (!this._localeChainCache) {
  22837. this._localeChainCache = {};
  22838. }
  22839. var chain = this._localeChainCache[start];
  22840. if (!chain) {
  22841. if (!fallbackLocale) {
  22842. fallbackLocale = this.fallbackLocale;
  22843. }
  22844. chain = [];
  22845. // first block defined by start
  22846. var block = [start];
  22847. // while any intervening block found
  22848. while (isArray(block)) {
  22849. block = this._appendBlockToChain(
  22850. chain,
  22851. block,
  22852. fallbackLocale
  22853. );
  22854. }
  22855. // last block defined by default
  22856. var defaults;
  22857. if (isArray(fallbackLocale)) {
  22858. defaults = fallbackLocale;
  22859. } else if (isObject(fallbackLocale)) {
  22860. /* $FlowFixMe */
  22861. if (fallbackLocale['default']) {
  22862. defaults = fallbackLocale['default'];
  22863. } else {
  22864. defaults = null;
  22865. }
  22866. } else {
  22867. defaults = fallbackLocale;
  22868. }
  22869. // convert defaults to array
  22870. if (isString(defaults)) {
  22871. block = [defaults];
  22872. } else {
  22873. block = defaults;
  22874. }
  22875. if (block) {
  22876. this._appendBlockToChain(
  22877. chain,
  22878. block,
  22879. null
  22880. );
  22881. }
  22882. this._localeChainCache[start] = chain;
  22883. }
  22884. return chain
  22885. };
  22886. VueI18n.prototype._translate = function _translate (
  22887. messages,
  22888. locale,
  22889. fallback,
  22890. key,
  22891. host,
  22892. interpolateMode,
  22893. args
  22894. ) {
  22895. var chain = this._getLocaleChain(locale, fallback);
  22896. var res;
  22897. for (var i = 0; i < chain.length; i++) {
  22898. var step = chain[i];
  22899. res =
  22900. this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);
  22901. if (!isNull(res)) {
  22902. if (step !== locale && "development" !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  22903. warn(("Fall back to translate the keypath '" + key + "' with '" + step + "' locale."));
  22904. }
  22905. return res
  22906. }
  22907. }
  22908. return null
  22909. };
  22910. VueI18n.prototype._t = function _t (key, _locale, messages, host) {
  22911. var ref;
  22912. var values = [], len = arguments.length - 4;
  22913. while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];
  22914. if (!key) { return '' }
  22915. var parsedArgs = parseArgs.apply(void 0, values);
  22916. if(this._escapeParameterHtml) {
  22917. parsedArgs.params = escapeParams(parsedArgs.params);
  22918. }
  22919. var locale = parsedArgs.locale || _locale;
  22920. var ret = this._translate(
  22921. messages, locale, this.fallbackLocale, key,
  22922. host, 'string', parsedArgs.params
  22923. );
  22924. if (this._isFallbackRoot(ret)) {
  22925. if ( true && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  22926. warn(("Fall back to translate the keypath '" + key + "' with root locale."));
  22927. }
  22928. /* istanbul ignore if */
  22929. if (!this._root) { throw Error('unexpected error') }
  22930. return (ref = this._root).$t.apply(ref, [ key ].concat( values ))
  22931. } else {
  22932. ret = this._warnDefault(locale, key, ret, host, values, 'string');
  22933. if (this._postTranslation && ret !== null && ret !== undefined) {
  22934. ret = this._postTranslation(ret, key);
  22935. }
  22936. return ret
  22937. }
  22938. };
  22939. VueI18n.prototype.t = function t (key) {
  22940. var ref;
  22941. var values = [], len = arguments.length - 1;
  22942. while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
  22943. return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))
  22944. };
  22945. VueI18n.prototype._i = function _i (key, locale, messages, host, values) {
  22946. var ret =
  22947. this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);
  22948. if (this._isFallbackRoot(ret)) {
  22949. if ( true && !this._isSilentTranslationWarn(key)) {
  22950. warn(("Fall back to interpolate the keypath '" + key + "' with root locale."));
  22951. }
  22952. if (!this._root) { throw Error('unexpected error') }
  22953. return this._root.$i18n.i(key, locale, values)
  22954. } else {
  22955. return this._warnDefault(locale, key, ret, host, [values], 'raw')
  22956. }
  22957. };
  22958. VueI18n.prototype.i = function i (key, locale, values) {
  22959. /* istanbul ignore if */
  22960. if (!key) { return '' }
  22961. if (!isString(locale)) {
  22962. locale = this.locale;
  22963. }
  22964. return this._i(key, locale, this._getMessages(), null, values)
  22965. };
  22966. VueI18n.prototype._tc = function _tc (
  22967. key,
  22968. _locale,
  22969. messages,
  22970. host,
  22971. choice
  22972. ) {
  22973. var ref;
  22974. var values = [], len = arguments.length - 5;
  22975. while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];
  22976. if (!key) { return '' }
  22977. if (choice === undefined) {
  22978. choice = 1;
  22979. }
  22980. var predefined = { 'count': choice, 'n': choice };
  22981. var parsedArgs = parseArgs.apply(void 0, values);
  22982. parsedArgs.params = Object.assign(predefined, parsedArgs.params);
  22983. values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];
  22984. return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)
  22985. };
  22986. VueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {
  22987. /* istanbul ignore if */
  22988. if (!message || !isString(message)) { return null }
  22989. var choices = message.split('|');
  22990. choice = this.getChoiceIndex(choice, choices.length);
  22991. if (!choices[choice]) { return message }
  22992. return choices[choice].trim()
  22993. };
  22994. VueI18n.prototype.tc = function tc (key, choice) {
  22995. var ref;
  22996. var values = [], len = arguments.length - 2;
  22997. while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
  22998. return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))
  22999. };
  23000. VueI18n.prototype._te = function _te (key, locale, messages) {
  23001. var args = [], len = arguments.length - 3;
  23002. while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];
  23003. var _locale = parseArgs.apply(void 0, args).locale || locale;
  23004. return this._exist(messages[_locale], key)
  23005. };
  23006. VueI18n.prototype.te = function te (key, locale) {
  23007. return this._te(key, this.locale, this._getMessages(), locale)
  23008. };
  23009. VueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {
  23010. return looseClone(this._vm.messages[locale] || {})
  23011. };
  23012. VueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {
  23013. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  23014. this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
  23015. }
  23016. this._vm.$set(this._vm.messages, locale, message);
  23017. };
  23018. VueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {
  23019. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  23020. this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
  23021. }
  23022. this._vm.$set(this._vm.messages, locale, merge(
  23023. typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length
  23024. ? Object.assign({}, this._vm.messages[locale])
  23025. : {},
  23026. message
  23027. ));
  23028. };
  23029. VueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {
  23030. return looseClone(this._vm.dateTimeFormats[locale] || {})
  23031. };
  23032. VueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {
  23033. this._vm.$set(this._vm.dateTimeFormats, locale, format);
  23034. this._clearDateTimeFormat(locale, format);
  23035. };
  23036. VueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {
  23037. this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));
  23038. this._clearDateTimeFormat(locale, format);
  23039. };
  23040. VueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {
  23041. // eslint-disable-next-line no-autofix/prefer-const
  23042. for (var key in format) {
  23043. var id = locale + "__" + key;
  23044. if (!this._dateTimeFormatters.hasOwnProperty(id)) {
  23045. continue
  23046. }
  23047. delete this._dateTimeFormatters[id];
  23048. }
  23049. };
  23050. VueI18n.prototype._localizeDateTime = function _localizeDateTime (
  23051. value,
  23052. locale,
  23053. fallback,
  23054. dateTimeFormats,
  23055. key,
  23056. options
  23057. ) {
  23058. var _locale = locale;
  23059. var formats = dateTimeFormats[_locale];
  23060. var chain = this._getLocaleChain(locale, fallback);
  23061. for (var i = 0; i < chain.length; i++) {
  23062. var current = _locale;
  23063. var step = chain[i];
  23064. formats = dateTimeFormats[step];
  23065. _locale = step;
  23066. // fallback locale
  23067. if (isNull(formats) || isNull(formats[key])) {
  23068. if (step !== locale && "development" !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  23069. warn(("Fall back to '" + step + "' datetime formats from '" + current + "' datetime formats."));
  23070. }
  23071. } else {
  23072. break
  23073. }
  23074. }
  23075. if (isNull(formats) || isNull(formats[key])) {
  23076. return null
  23077. } else {
  23078. var format = formats[key];
  23079. var formatter;
  23080. if (options) {
  23081. formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));
  23082. } else {
  23083. var id = _locale + "__" + key;
  23084. formatter = this._dateTimeFormatters[id];
  23085. if (!formatter) {
  23086. formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);
  23087. }
  23088. }
  23089. return formatter.format(value)
  23090. }
  23091. };
  23092. VueI18n.prototype._d = function _d (value, locale, key, options) {
  23093. /* istanbul ignore if */
  23094. if ( true && !VueI18n.availabilities.dateTimeFormat) {
  23095. warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');
  23096. return ''
  23097. }
  23098. if (!key) {
  23099. var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);
  23100. return dtf.format(value)
  23101. }
  23102. var ret =
  23103. this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);
  23104. if (this._isFallbackRoot(ret)) {
  23105. if ( true && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  23106. warn(("Fall back to datetime localization of root: key '" + key + "'."));
  23107. }
  23108. /* istanbul ignore if */
  23109. if (!this._root) { throw Error('unexpected error') }
  23110. return this._root.$i18n.d(value, key, locale)
  23111. } else {
  23112. return ret || ''
  23113. }
  23114. };
  23115. VueI18n.prototype.d = function d (value) {
  23116. var args = [], len = arguments.length - 1;
  23117. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  23118. var locale = this.locale;
  23119. var key = null;
  23120. var options = null;
  23121. if (args.length === 1) {
  23122. if (isString(args[0])) {
  23123. key = args[0];
  23124. } else if (isObject(args[0])) {
  23125. if (args[0].locale) {
  23126. locale = args[0].locale;
  23127. }
  23128. if (args[0].key) {
  23129. key = args[0].key;
  23130. }
  23131. }
  23132. options = Object.keys(args[0]).reduce(function (acc, key) {
  23133. var obj;
  23134. if (includes(dateTimeFormatKeys, key)) {
  23135. return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))
  23136. }
  23137. return acc
  23138. }, null);
  23139. } else if (args.length === 2) {
  23140. if (isString(args[0])) {
  23141. key = args[0];
  23142. }
  23143. if (isString(args[1])) {
  23144. locale = args[1];
  23145. }
  23146. }
  23147. return this._d(value, locale, key, options)
  23148. };
  23149. VueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {
  23150. return looseClone(this._vm.numberFormats[locale] || {})
  23151. };
  23152. VueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {
  23153. this._vm.$set(this._vm.numberFormats, locale, format);
  23154. this._clearNumberFormat(locale, format);
  23155. };
  23156. VueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {
  23157. this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));
  23158. this._clearNumberFormat(locale, format);
  23159. };
  23160. VueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {
  23161. // eslint-disable-next-line no-autofix/prefer-const
  23162. for (var key in format) {
  23163. var id = locale + "__" + key;
  23164. if (!this._numberFormatters.hasOwnProperty(id)) {
  23165. continue
  23166. }
  23167. delete this._numberFormatters[id];
  23168. }
  23169. };
  23170. VueI18n.prototype._getNumberFormatter = function _getNumberFormatter (
  23171. value,
  23172. locale,
  23173. fallback,
  23174. numberFormats,
  23175. key,
  23176. options
  23177. ) {
  23178. var _locale = locale;
  23179. var formats = numberFormats[_locale];
  23180. var chain = this._getLocaleChain(locale, fallback);
  23181. for (var i = 0; i < chain.length; i++) {
  23182. var current = _locale;
  23183. var step = chain[i];
  23184. formats = numberFormats[step];
  23185. _locale = step;
  23186. // fallback locale
  23187. if (isNull(formats) || isNull(formats[key])) {
  23188. if (step !== locale && "development" !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  23189. warn(("Fall back to '" + step + "' number formats from '" + current + "' number formats."));
  23190. }
  23191. } else {
  23192. break
  23193. }
  23194. }
  23195. if (isNull(formats) || isNull(formats[key])) {
  23196. return null
  23197. } else {
  23198. var format = formats[key];
  23199. var formatter;
  23200. if (options) {
  23201. // If options specified - create one time number formatter
  23202. formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));
  23203. } else {
  23204. var id = _locale + "__" + key;
  23205. formatter = this._numberFormatters[id];
  23206. if (!formatter) {
  23207. formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);
  23208. }
  23209. }
  23210. return formatter
  23211. }
  23212. };
  23213. VueI18n.prototype._n = function _n (value, locale, key, options) {
  23214. /* istanbul ignore if */
  23215. if (!VueI18n.availabilities.numberFormat) {
  23216. if (true) {
  23217. warn('Cannot format a Number value due to not supported Intl.NumberFormat.');
  23218. }
  23219. return ''
  23220. }
  23221. if (!key) {
  23222. var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
  23223. return nf.format(value)
  23224. }
  23225. var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
  23226. var ret = formatter && formatter.format(value);
  23227. if (this._isFallbackRoot(ret)) {
  23228. if ( true && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {
  23229. warn(("Fall back to number localization of root: key '" + key + "'."));
  23230. }
  23231. /* istanbul ignore if */
  23232. if (!this._root) { throw Error('unexpected error') }
  23233. return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))
  23234. } else {
  23235. return ret || ''
  23236. }
  23237. };
  23238. VueI18n.prototype.n = function n (value) {
  23239. var args = [], len = arguments.length - 1;
  23240. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  23241. var locale = this.locale;
  23242. var key = null;
  23243. var options = null;
  23244. if (args.length === 1) {
  23245. if (isString(args[0])) {
  23246. key = args[0];
  23247. } else if (isObject(args[0])) {
  23248. if (args[0].locale) {
  23249. locale = args[0].locale;
  23250. }
  23251. if (args[0].key) {
  23252. key = args[0].key;
  23253. }
  23254. // Filter out number format options only
  23255. options = Object.keys(args[0]).reduce(function (acc, key) {
  23256. var obj;
  23257. if (includes(numberFormatKeys, key)) {
  23258. return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))
  23259. }
  23260. return acc
  23261. }, null);
  23262. }
  23263. } else if (args.length === 2) {
  23264. if (isString(args[0])) {
  23265. key = args[0];
  23266. }
  23267. if (isString(args[1])) {
  23268. locale = args[1];
  23269. }
  23270. }
  23271. return this._n(value, locale, key, options)
  23272. };
  23273. VueI18n.prototype._ntp = function _ntp (value, locale, key, options) {
  23274. /* istanbul ignore if */
  23275. if (!VueI18n.availabilities.numberFormat) {
  23276. if (true) {
  23277. warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');
  23278. }
  23279. return []
  23280. }
  23281. if (!key) {
  23282. var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
  23283. return nf.formatToParts(value)
  23284. }
  23285. var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
  23286. var ret = formatter && formatter.formatToParts(value);
  23287. if (this._isFallbackRoot(ret)) {
  23288. if ( true && !this._isSilentTranslationWarn(key)) {
  23289. warn(("Fall back to format number to parts of root: key '" + key + "' ."));
  23290. }
  23291. /* istanbul ignore if */
  23292. if (!this._root) { throw Error('unexpected error') }
  23293. return this._root.$i18n._ntp(value, locale, key, options)
  23294. } else {
  23295. return ret || []
  23296. }
  23297. };
  23298. Object.defineProperties( VueI18n.prototype, prototypeAccessors );
  23299. var availabilities;
  23300. // $FlowFixMe
  23301. Object.defineProperty(VueI18n, 'availabilities', {
  23302. get: function get () {
  23303. if (!availabilities) {
  23304. var intlDefined = typeof Intl !== 'undefined';
  23305. availabilities = {
  23306. dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
  23307. numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
  23308. };
  23309. }
  23310. return availabilities
  23311. }
  23312. });
  23313. VueI18n.install = install;
  23314. VueI18n.version = '8.28.2';
  23315. /* harmony default export */ __webpack_exports__["default"] = (VueI18n);
  23316. /***/ }),
  23317. /***/ 6:
  23318. /*!***************************************************************!*\
  23319. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  23320. \***************************************************************/
  23321. /*! no static exports found */
  23322. /***/ (function(module, exports) {
  23323. function _arrayWithHoles(arr) {
  23324. if (Array.isArray(arr)) return arr;
  23325. }
  23326. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23327. /***/ }),
  23328. /***/ 62:
  23329. /*!************************************************************************!*\
  23330. !*** D:/workspace/HBuilder/shangjia/Paotuishangjia/pages/api/basic.js ***!
  23331. \************************************************************************/
  23332. /*! no static exports found */
  23333. /***/ (function(module, exports, __webpack_require__) {
  23334. "use strict";
  23335. Object.defineProperty(exports, "__esModule", {
  23336. value: true
  23337. });
  23338. exports.setorderuzt = exports.searchGoods = exports.regionList = exports.querybaseinfoset = exports.pushMsg = exports.provinceList = exports.getyunfei = exports.getviplist = exports.getuserfootlist = exports.getstoreorderlist = exports.getserverlist = exports.getorderxq = exports.getorderList = exports.getmendianshangpinList = exports.getmendianshangpinFL = exports.getmendianlist = exports.getmendianfenlei = exports.getmendianDetail = exports.getmdrevew = exports.gethelpxq = exports.gethelplist = exports.getcollectlist = exports.getaddressxq = exports.getaddressList = exports.getMymendianlist = exports.getLocationAddr = exports.cityList = exports.adduservip = exports.addrevew = exports.addorder = exports.addmendianshangpin = exports.addmendianfenlei = exports.addmendian = exports.addcollect = exports.UploadImage = exports.GoodsDetail = exports.ADDaddress = void 0;
  23339. /**
  23340. *@des 公用基础
  23341. *@author 237524947@qq.com
  23342. *@blog https://gitee.com/zscat/mallplus/wikis/pages/preview?sort_id=1703736&doc_id=326093
  23343. *@date 2019/11/19 14:56:57
  23344. *@param registerByPass
  23345. */
  23346. //上传图片
  23347. var UploadImage = '/utils/Upload';
  23348. exports.UploadImage = UploadImage;
  23349. var querybaseinfoset = '/querybaseinfoset';
  23350. // 获取省市区列表
  23351. exports.querybaseinfoset = querybaseinfoset;
  23352. var provinceList = '/queryallprovinces';
  23353. exports.provinceList = provinceList;
  23354. var cityList = '/querycitybyprovinceid';
  23355. exports.cityList = cityList;
  23356. var regionList = '/querydistrictbycityid';
  23357. //经纬度获取地址信息
  23358. exports.regionList = regionList;
  23359. var getLocationAddr = '/utils/getLocationAddr?';
  23360. //添加门店
  23361. exports.getLocationAddr = getLocationAddr;
  23362. var addmendian = '/chanting/store/addmendian';
  23363. //获取门店分类列表
  23364. exports.addmendian = addmendian;
  23365. var getmendianfenlei = '/fenlei/type/list';
  23366. //获取门店列表
  23367. exports.getmendianfenlei = getmendianfenlei;
  23368. var getmendianlist = '/chanting/store/getstorelist?';
  23369. exports.getmendianlist = getmendianlist;
  23370. var getserverlist = '/chanting/store/getserverlist';
  23371. exports.getserverlist = getserverlist;
  23372. var getuserfootlist = '/system/order/getuserfootlist';
  23373. //获取门店列表
  23374. exports.getuserfootlist = getuserfootlist;
  23375. var getMymendianlist = '/chanting/store/getmystorelist';
  23376. //门店详情
  23377. exports.getMymendianlist = getMymendianlist;
  23378. var getmendianDetail = '/chanting/store/getstore';
  23379. //门店商品分类
  23380. exports.getmendianDetail = getmendianDetail;
  23381. var getmendianshangpinFL = '/system/fenlei/getfenlei';
  23382. //添加编辑分类
  23383. exports.getmendianshangpinFL = getmendianshangpinFL;
  23384. var addmendianfenlei = '/system/fenlei/addfenlei';
  23385. //门店商品分类对应商品列表
  23386. exports.addmendianfenlei = addmendianfenlei;
  23387. var getmendianshangpinList = '/chanting/food/getidlist';
  23388. //添加编辑商品
  23389. exports.getmendianshangpinList = getmendianshangpinList;
  23390. var addmendianshangpin = '/chanting/food/setposfood';
  23391. // 收藏店铺
  23392. exports.addmendianshangpin = addmendianshangpin;
  23393. var addcollect = '/system/collect/addcollect';
  23394. exports.addcollect = addcollect;
  23395. var getcollectlist = '/system/collect/getcollectlist';
  23396. //推送消息
  23397. exports.getcollectlist = getcollectlist;
  23398. var pushMsg = '/utils/addpush';
  23399. //查询商品
  23400. exports.pushMsg = pushMsg;
  23401. var searchGoods = '/chanting/food/getfoodlist';
  23402. //商品详情
  23403. exports.searchGoods = searchGoods;
  23404. var GoodsDetail = '/chanting/food/getfood';
  23405. //订单管理
  23406. exports.GoodsDetail = GoodsDetail;
  23407. var addorder = '/system/order/addorder';
  23408. exports.addorder = addorder;
  23409. var getorderList = '/system/order/getorderlist';
  23410. exports.getorderList = getorderList;
  23411. var getstoreorderlist = '/system/order/getstoreorderlist';
  23412. exports.getstoreorderlist = getstoreorderlist;
  23413. var setorderuzt = '/system/order/setorderuzt';
  23414. exports.setorderuzt = setorderuzt;
  23415. var getorderxq = '/system/order/getorderxq';
  23416. exports.getorderxq = getorderxq;
  23417. var getyunfei = '/utils/getyunfei';
  23418. //订单评论
  23419. exports.getyunfei = getyunfei;
  23420. var addrevew = '/system/review/addrevew';
  23421. exports.addrevew = addrevew;
  23422. var getmdrevew = '/system/review/getmdrevew';
  23423. //用户收货地址管理
  23424. exports.getmdrevew = getmdrevew;
  23425. var ADDaddress = '/system/address/address';
  23426. exports.ADDaddress = ADDaddress;
  23427. var getaddressList = '/system/address/getaddress';
  23428. exports.getaddressList = getaddressList;
  23429. var getaddressxq = '/system/address/getaddressxq';
  23430. //会员管理
  23431. exports.getaddressxq = getaddressxq;
  23432. var getviplist = '/system/membership/getviplist';
  23433. exports.getviplist = getviplist;
  23434. var adduservip = '/system/vipuser/adduservip';
  23435. //帮助
  23436. exports.adduservip = adduservip;
  23437. var gethelplist = '/system/help/gethelplist';
  23438. exports.gethelplist = gethelplist;
  23439. var gethelpxq = '/system/help/gethelpxq';
  23440. exports.gethelpxq = gethelpxq;
  23441. /***/ }),
  23442. /***/ 7:
  23443. /*!*********************************************************************!*\
  23444. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  23445. \*********************************************************************/
  23446. /*! no static exports found */
  23447. /***/ (function(module, exports) {
  23448. function _iterableToArrayLimit(arr, i) {
  23449. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  23450. if (null != _i) {
  23451. var _s,
  23452. _e,
  23453. _x,
  23454. _r,
  23455. _arr = [],
  23456. _n = !0,
  23457. _d = !1;
  23458. try {
  23459. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  23460. if (Object(_i) !== _i) return;
  23461. _n = !1;
  23462. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  23463. ;
  23464. }
  23465. } catch (err) {
  23466. _d = !0, _e = err;
  23467. } finally {
  23468. try {
  23469. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  23470. } finally {
  23471. if (_d) throw _e;
  23472. }
  23473. }
  23474. return _arr;
  23475. }
  23476. }
  23477. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23478. /***/ }),
  23479. /***/ 8:
  23480. /*!***************************************************************************!*\
  23481. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  23482. \***************************************************************************/
  23483. /*! no static exports found */
  23484. /***/ (function(module, exports, __webpack_require__) {
  23485. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  23486. function _unsupportedIterableToArray(o, minLen) {
  23487. if (!o) return;
  23488. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  23489. var n = Object.prototype.toString.call(o).slice(8, -1);
  23490. if (n === "Object" && o.constructor) n = o.constructor.name;
  23491. if (n === "Map" || n === "Set") return Array.from(o);
  23492. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  23493. }
  23494. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23495. /***/ }),
  23496. /***/ 9:
  23497. /*!*****************************************************************!*\
  23498. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  23499. \*****************************************************************/
  23500. /*! no static exports found */
  23501. /***/ (function(module, exports) {
  23502. function _arrayLikeToArray(arr, len) {
  23503. if (len == null || len > arr.length) len = arr.length;
  23504. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  23505. arr2[i] = arr[i];
  23506. }
  23507. return arr2;
  23508. }
  23509. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23510. /***/ })
  23511. }]);
  23512. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map