vendor.js 1.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(Parent, args, Class) {
  133. if (isNativeReflectConstruct()) {
  134. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  135. } else {
  136. module.exports = _construct = function _construct(Parent, args, Class) {
  137. var a = [null];
  138. a.push.apply(a, args);
  139. var Constructor = Function.bind.apply(Parent, a);
  140. var instance = new Constructor();
  141. if (Class) setPrototypeOf(instance, Class.prototype);
  142. return instance;
  143. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  144. }
  145. return _construct.apply(null, arguments);
  146. }
  147. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  148. /***/ }),
  149. /***/ 16:
  150. /*!***************************************************************!*\
  151. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  152. \***************************************************************/
  153. /*! no static exports found */
  154. /***/ (function(module, exports) {
  155. function _setPrototypeOf(o, p) {
  156. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  157. o.__proto__ = p;
  158. return o;
  159. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  160. return _setPrototypeOf(o, p);
  161. }
  162. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  163. /***/ }),
  164. /***/ 17:
  165. /*!*************************************************************************!*\
  166. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  167. \*************************************************************************/
  168. /*! no static exports found */
  169. /***/ (function(module, exports) {
  170. function _isNativeReflectConstruct() {
  171. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  172. if (Reflect.construct.sham) return false;
  173. if (typeof Proxy === "function") return true;
  174. try {
  175. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  176. return true;
  177. } catch (e) {
  178. return false;
  179. }
  180. }
  181. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  182. /***/ }),
  183. /***/ 18:
  184. /*!******************************************************************!*\
  185. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  186. \******************************************************************/
  187. /*! no static exports found */
  188. /***/ (function(module, exports, __webpack_require__) {
  189. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  190. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  191. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  192. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  193. function _toConsumableArray(arr) {
  194. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  195. }
  196. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  197. /***/ }),
  198. /***/ 19:
  199. /*!******************************************************************!*\
  200. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  201. \******************************************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  205. function _arrayWithoutHoles(arr) {
  206. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  207. }
  208. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  209. /***/ }),
  210. /***/ 2:
  211. /*!************************************************************!*\
  212. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  213. \************************************************************/
  214. /*! no static exports found */
  215. /***/ (function(module, exports, __webpack_require__) {
  216. "use strict";
  217. /* WEBPACK VAR INJECTION */(function(wx, global) {
  218. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  219. Object.defineProperty(exports, "__esModule", {
  220. value: true
  221. });
  222. exports.createApp = createApp;
  223. exports.createComponent = createComponent;
  224. exports.createPage = createPage;
  225. exports.createPlugin = createPlugin;
  226. exports.createSubpackageApp = createSubpackageApp;
  227. exports.default = void 0;
  228. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  229. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  230. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  231. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  232. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  233. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  234. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  235. 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; }
  236. 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; }
  237. var realAtob;
  238. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  239. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  240. if (typeof atob !== 'function') {
  241. realAtob = function realAtob(str) {
  242. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  243. if (!b64re.test(str)) {
  244. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  245. }
  246. // Adding the padding if missing, for semplicity
  247. str += '=='.slice(2 - (str.length & 3));
  248. var bitmap;
  249. var result = '';
  250. var r1;
  251. var r2;
  252. var i = 0;
  253. for (; i < str.length;) {
  254. 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++)));
  255. 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);
  256. }
  257. return result;
  258. };
  259. } else {
  260. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  261. realAtob = atob;
  262. }
  263. function b64DecodeUnicode(str) {
  264. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  265. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  266. }).join(''));
  267. }
  268. function getCurrentUserInfo() {
  269. var token = wx.getStorageSync('uni_id_token') || '';
  270. var tokenArr = token.split('.');
  271. if (!token || tokenArr.length !== 3) {
  272. return {
  273. uid: null,
  274. role: [],
  275. permission: [],
  276. tokenExpired: 0
  277. };
  278. }
  279. var userInfo;
  280. try {
  281. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  282. } catch (error) {
  283. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  284. }
  285. userInfo.tokenExpired = userInfo.exp * 1000;
  286. delete userInfo.exp;
  287. delete userInfo.iat;
  288. return userInfo;
  289. }
  290. function uniIdMixin(Vue) {
  291. Vue.prototype.uniIDHasRole = function (roleId) {
  292. var _getCurrentUserInfo = getCurrentUserInfo(),
  293. role = _getCurrentUserInfo.role;
  294. return role.indexOf(roleId) > -1;
  295. };
  296. Vue.prototype.uniIDHasPermission = function (permissionId) {
  297. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  298. permission = _getCurrentUserInfo2.permission;
  299. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  300. };
  301. Vue.prototype.uniIDTokenValid = function () {
  302. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  303. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  304. return tokenExpired > Date.now();
  305. };
  306. }
  307. var _toString = Object.prototype.toString;
  308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  309. function isFn(fn) {
  310. return typeof fn === 'function';
  311. }
  312. function isStr(str) {
  313. return typeof str === 'string';
  314. }
  315. function isObject(obj) {
  316. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  317. }
  318. function isPlainObject(obj) {
  319. return _toString.call(obj) === '[object Object]';
  320. }
  321. function hasOwn(obj, key) {
  322. return hasOwnProperty.call(obj, key);
  323. }
  324. function noop() {}
  325. /**
  326. * Create a cached version of a pure function.
  327. */
  328. function cached(fn) {
  329. var cache = Object.create(null);
  330. return function cachedFn(str) {
  331. var hit = cache[str];
  332. return hit || (cache[str] = fn(str));
  333. };
  334. }
  335. /**
  336. * Camelize a hyphen-delimited string.
  337. */
  338. var camelizeRE = /-(\w)/g;
  339. var camelize = cached(function (str) {
  340. return str.replace(camelizeRE, function (_, c) {
  341. return c ? c.toUpperCase() : '';
  342. });
  343. });
  344. function sortObject(obj) {
  345. var sortObj = {};
  346. if (isPlainObject(obj)) {
  347. Object.keys(obj).sort().forEach(function (key) {
  348. sortObj[key] = obj[key];
  349. });
  350. }
  351. return !Object.keys(sortObj) ? obj : sortObj;
  352. }
  353. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  354. var globalInterceptors = {};
  355. var scopedInterceptors = {};
  356. function mergeHook(parentVal, childVal) {
  357. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  358. return res ? dedupeHooks(res) : res;
  359. }
  360. function dedupeHooks(hooks) {
  361. var res = [];
  362. for (var i = 0; i < hooks.length; i++) {
  363. if (res.indexOf(hooks[i]) === -1) {
  364. res.push(hooks[i]);
  365. }
  366. }
  367. return res;
  368. }
  369. function removeHook(hooks, hook) {
  370. var index = hooks.indexOf(hook);
  371. if (index !== -1) {
  372. hooks.splice(index, 1);
  373. }
  374. }
  375. function mergeInterceptorHook(interceptor, option) {
  376. Object.keys(option).forEach(function (hook) {
  377. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  378. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  379. }
  380. });
  381. }
  382. function removeInterceptorHook(interceptor, option) {
  383. if (!interceptor || !option) {
  384. return;
  385. }
  386. Object.keys(option).forEach(function (hook) {
  387. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  388. removeHook(interceptor[hook], option[hook]);
  389. }
  390. });
  391. }
  392. function addInterceptor(method, option) {
  393. if (typeof method === 'string' && isPlainObject(option)) {
  394. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  395. } else if (isPlainObject(method)) {
  396. mergeInterceptorHook(globalInterceptors, method);
  397. }
  398. }
  399. function removeInterceptor(method, option) {
  400. if (typeof method === 'string') {
  401. if (isPlainObject(option)) {
  402. removeInterceptorHook(scopedInterceptors[method], option);
  403. } else {
  404. delete scopedInterceptors[method];
  405. }
  406. } else if (isPlainObject(method)) {
  407. removeInterceptorHook(globalInterceptors, method);
  408. }
  409. }
  410. function wrapperHook(hook, params) {
  411. return function (data) {
  412. return hook(data, params) || data;
  413. };
  414. }
  415. function isPromise(obj) {
  416. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  417. }
  418. function queue(hooks, data, params) {
  419. var promise = false;
  420. for (var i = 0; i < hooks.length; i++) {
  421. var hook = hooks[i];
  422. if (promise) {
  423. promise = Promise.resolve(wrapperHook(hook, params));
  424. } else {
  425. var res = hook(data, params);
  426. if (isPromise(res)) {
  427. promise = Promise.resolve(res);
  428. }
  429. if (res === false) {
  430. return {
  431. then: function then() {}
  432. };
  433. }
  434. }
  435. }
  436. return promise || {
  437. then: function then(callback) {
  438. return callback(data);
  439. }
  440. };
  441. }
  442. function wrapperOptions(interceptor) {
  443. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  444. ['success', 'fail', 'complete'].forEach(function (name) {
  445. if (Array.isArray(interceptor[name])) {
  446. var oldCallback = options[name];
  447. options[name] = function callbackInterceptor(res) {
  448. queue(interceptor[name], res, options).then(function (res) {
  449. /* eslint-disable no-mixed-operators */
  450. return isFn(oldCallback) && oldCallback(res) || res;
  451. });
  452. };
  453. }
  454. });
  455. return options;
  456. }
  457. function wrapperReturnValue(method, returnValue) {
  458. var returnValueHooks = [];
  459. if (Array.isArray(globalInterceptors.returnValue)) {
  460. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  461. }
  462. var interceptor = scopedInterceptors[method];
  463. if (interceptor && Array.isArray(interceptor.returnValue)) {
  464. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  465. }
  466. returnValueHooks.forEach(function (hook) {
  467. returnValue = hook(returnValue) || returnValue;
  468. });
  469. return returnValue;
  470. }
  471. function getApiInterceptorHooks(method) {
  472. var interceptor = Object.create(null);
  473. Object.keys(globalInterceptors).forEach(function (hook) {
  474. if (hook !== 'returnValue') {
  475. interceptor[hook] = globalInterceptors[hook].slice();
  476. }
  477. });
  478. var scopedInterceptor = scopedInterceptors[method];
  479. if (scopedInterceptor) {
  480. Object.keys(scopedInterceptor).forEach(function (hook) {
  481. if (hook !== 'returnValue') {
  482. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  483. }
  484. });
  485. }
  486. return interceptor;
  487. }
  488. function invokeApi(method, api, options) {
  489. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  490. params[_key - 3] = arguments[_key];
  491. }
  492. var interceptor = getApiInterceptorHooks(method);
  493. if (interceptor && Object.keys(interceptor).length) {
  494. if (Array.isArray(interceptor.invoke)) {
  495. var res = queue(interceptor.invoke, options);
  496. return res.then(function (options) {
  497. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  498. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  499. });
  500. } else {
  501. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  502. }
  503. }
  504. return api.apply(void 0, [options].concat(params));
  505. }
  506. var promiseInterceptor = {
  507. returnValue: function returnValue(res) {
  508. if (!isPromise(res)) {
  509. return res;
  510. }
  511. return new Promise(function (resolve, reject) {
  512. res.then(function (res) {
  513. if (res[0]) {
  514. reject(res[0]);
  515. } else {
  516. resolve(res[1]);
  517. }
  518. });
  519. });
  520. }
  521. };
  522. 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/;
  523. var CONTEXT_API_RE = /^create|Manager$/;
  524. // Context例外情况
  525. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  526. // 同步例外情况
  527. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  528. var CALLBACK_API_RE = /^on|^off/;
  529. function isContextApi(name) {
  530. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  531. }
  532. function isSyncApi(name) {
  533. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  534. }
  535. function isCallbackApi(name) {
  536. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  537. }
  538. function handlePromise(promise) {
  539. return promise.then(function (data) {
  540. return [null, data];
  541. }).catch(function (err) {
  542. return [err];
  543. });
  544. }
  545. function shouldPromise(name) {
  546. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  547. return false;
  548. }
  549. return true;
  550. }
  551. /* eslint-disable no-extend-native */
  552. if (!Promise.prototype.finally) {
  553. Promise.prototype.finally = function (callback) {
  554. var promise = this.constructor;
  555. return this.then(function (value) {
  556. return promise.resolve(callback()).then(function () {
  557. return value;
  558. });
  559. }, function (reason) {
  560. return promise.resolve(callback()).then(function () {
  561. throw reason;
  562. });
  563. });
  564. };
  565. }
  566. function promisify(name, api) {
  567. if (!shouldPromise(name) || !isFn(api)) {
  568. return api;
  569. }
  570. return function promiseApi() {
  571. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  572. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  573. params[_key2 - 1] = arguments[_key2];
  574. }
  575. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  576. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  577. }
  578. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  579. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  580. success: resolve,
  581. fail: reject
  582. })].concat(params));
  583. })));
  584. };
  585. }
  586. var EPS = 1e-4;
  587. var BASE_DEVICE_WIDTH = 750;
  588. var isIOS = false;
  589. var deviceWidth = 0;
  590. var deviceDPR = 0;
  591. function checkDeviceWidth() {
  592. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  593. platform = _wx$getSystemInfoSync.platform,
  594. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  595. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  596. deviceWidth = windowWidth;
  597. deviceDPR = pixelRatio;
  598. isIOS = platform === 'ios';
  599. }
  600. function upx2px(number, newDeviceWidth) {
  601. if (deviceWidth === 0) {
  602. checkDeviceWidth();
  603. }
  604. number = Number(number);
  605. if (number === 0) {
  606. return 0;
  607. }
  608. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  609. if (result < 0) {
  610. result = -result;
  611. }
  612. result = Math.floor(result + EPS);
  613. if (result === 0) {
  614. if (deviceDPR === 1 || !isIOS) {
  615. result = 1;
  616. } else {
  617. result = 0.5;
  618. }
  619. }
  620. return number < 0 ? -result : result;
  621. }
  622. var LOCALE_ZH_HANS = 'zh-Hans';
  623. var LOCALE_ZH_HANT = 'zh-Hant';
  624. var LOCALE_EN = 'en';
  625. var LOCALE_FR = 'fr';
  626. var LOCALE_ES = 'es';
  627. var messages = {};
  628. var locale;
  629. {
  630. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  631. }
  632. function initI18nMessages() {
  633. if (!isEnableLocale()) {
  634. return;
  635. }
  636. var localeKeys = Object.keys(__uniConfig.locales);
  637. if (localeKeys.length) {
  638. localeKeys.forEach(function (locale) {
  639. var curMessages = messages[locale];
  640. var userMessages = __uniConfig.locales[locale];
  641. if (curMessages) {
  642. Object.assign(curMessages, userMessages);
  643. } else {
  644. messages[locale] = userMessages;
  645. }
  646. });
  647. }
  648. }
  649. initI18nMessages();
  650. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  651. var t = i18n.t;
  652. var i18nMixin = i18n.mixin = {
  653. beforeCreate: function beforeCreate() {
  654. var _this = this;
  655. var unwatch = i18n.i18n.watchLocale(function () {
  656. _this.$forceUpdate();
  657. });
  658. this.$once('hook:beforeDestroy', function () {
  659. unwatch();
  660. });
  661. },
  662. methods: {
  663. $$t: function $$t(key, values) {
  664. return t(key, values);
  665. }
  666. }
  667. };
  668. var setLocale = i18n.setLocale;
  669. var getLocale = i18n.getLocale;
  670. function initAppLocale(Vue, appVm, locale) {
  671. var state = Vue.observable({
  672. locale: locale || i18n.getLocale()
  673. });
  674. var localeWatchers = [];
  675. appVm.$watchLocale = function (fn) {
  676. localeWatchers.push(fn);
  677. };
  678. Object.defineProperty(appVm, '$locale', {
  679. get: function get() {
  680. return state.locale;
  681. },
  682. set: function set(v) {
  683. state.locale = v;
  684. localeWatchers.forEach(function (watch) {
  685. return watch(v);
  686. });
  687. }
  688. });
  689. }
  690. function isEnableLocale() {
  691. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  692. }
  693. function include(str, parts) {
  694. return !!parts.find(function (part) {
  695. return str.indexOf(part) !== -1;
  696. });
  697. }
  698. function startsWith(str, parts) {
  699. return parts.find(function (part) {
  700. return str.indexOf(part) === 0;
  701. });
  702. }
  703. function normalizeLocale(locale, messages) {
  704. if (!locale) {
  705. return;
  706. }
  707. locale = locale.trim().replace(/_/g, '-');
  708. if (messages && messages[locale]) {
  709. return locale;
  710. }
  711. locale = locale.toLowerCase();
  712. if (locale === 'chinese') {
  713. // 支付宝
  714. return LOCALE_ZH_HANS;
  715. }
  716. if (locale.indexOf('zh') === 0) {
  717. if (locale.indexOf('-hans') > -1) {
  718. return LOCALE_ZH_HANS;
  719. }
  720. if (locale.indexOf('-hant') > -1) {
  721. return LOCALE_ZH_HANT;
  722. }
  723. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  724. return LOCALE_ZH_HANT;
  725. }
  726. return LOCALE_ZH_HANS;
  727. }
  728. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  729. if (lang) {
  730. return lang;
  731. }
  732. }
  733. // export function initI18n() {
  734. // const localeKeys = Object.keys(__uniConfig.locales || {})
  735. // if (localeKeys.length) {
  736. // localeKeys.forEach((locale) =>
  737. // i18n.add(locale, __uniConfig.locales[locale])
  738. // )
  739. // }
  740. // }
  741. function getLocale$1() {
  742. // 优先使用 $locale
  743. if (isFn(getApp)) {
  744. var app = getApp({
  745. allowDefault: true
  746. });
  747. if (app && app.$vm) {
  748. return app.$vm.$locale;
  749. }
  750. }
  751. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  752. }
  753. function setLocale$1(locale) {
  754. var app = isFn(getApp) ? getApp() : false;
  755. if (!app) {
  756. return false;
  757. }
  758. var oldLocale = app.$vm.$locale;
  759. if (oldLocale !== locale) {
  760. app.$vm.$locale = locale;
  761. onLocaleChangeCallbacks.forEach(function (fn) {
  762. return fn({
  763. locale: locale
  764. });
  765. });
  766. return true;
  767. }
  768. return false;
  769. }
  770. var onLocaleChangeCallbacks = [];
  771. function onLocaleChange(fn) {
  772. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  773. onLocaleChangeCallbacks.push(fn);
  774. }
  775. }
  776. if (typeof global !== 'undefined') {
  777. global.getLocale = getLocale$1;
  778. }
  779. var interceptors = {
  780. promiseInterceptor: promiseInterceptor
  781. };
  782. var baseApi = /*#__PURE__*/Object.freeze({
  783. __proto__: null,
  784. upx2px: upx2px,
  785. getLocale: getLocale$1,
  786. setLocale: setLocale$1,
  787. onLocaleChange: onLocaleChange,
  788. addInterceptor: addInterceptor,
  789. removeInterceptor: removeInterceptor,
  790. interceptors: interceptors
  791. });
  792. function findExistsPageIndex(url) {
  793. var pages = getCurrentPages();
  794. var len = pages.length;
  795. while (len--) {
  796. var page = pages[len];
  797. if (page.$page && page.$page.fullPath === url) {
  798. return len;
  799. }
  800. }
  801. return -1;
  802. }
  803. var redirectTo = {
  804. name: function name(fromArgs) {
  805. if (fromArgs.exists === 'back' && fromArgs.delta) {
  806. return 'navigateBack';
  807. }
  808. return 'redirectTo';
  809. },
  810. args: function args(fromArgs) {
  811. if (fromArgs.exists === 'back' && fromArgs.url) {
  812. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  813. if (existsPageIndex !== -1) {
  814. var delta = getCurrentPages().length - 1 - existsPageIndex;
  815. if (delta > 0) {
  816. fromArgs.delta = delta;
  817. }
  818. }
  819. }
  820. }
  821. };
  822. var previewImage = {
  823. args: function args(fromArgs) {
  824. var currentIndex = parseInt(fromArgs.current);
  825. if (isNaN(currentIndex)) {
  826. return;
  827. }
  828. var urls = fromArgs.urls;
  829. if (!Array.isArray(urls)) {
  830. return;
  831. }
  832. var len = urls.length;
  833. if (!len) {
  834. return;
  835. }
  836. if (currentIndex < 0) {
  837. currentIndex = 0;
  838. } else if (currentIndex >= len) {
  839. currentIndex = len - 1;
  840. }
  841. if (currentIndex > 0) {
  842. fromArgs.current = urls[currentIndex];
  843. fromArgs.urls = urls.filter(function (item, index) {
  844. return index < currentIndex ? item !== urls[currentIndex] : true;
  845. });
  846. } else {
  847. fromArgs.current = urls[0];
  848. }
  849. return {
  850. indicator: false,
  851. loop: false
  852. };
  853. }
  854. };
  855. var UUID_KEY = '__DC_STAT_UUID';
  856. var deviceId;
  857. function useDeviceId(result) {
  858. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  859. if (!deviceId) {
  860. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  861. wx.setStorage({
  862. key: UUID_KEY,
  863. data: deviceId
  864. });
  865. }
  866. result.deviceId = deviceId;
  867. }
  868. function addSafeAreaInsets(result) {
  869. if (result.safeArea) {
  870. var safeArea = result.safeArea;
  871. result.safeAreaInsets = {
  872. top: safeArea.top,
  873. left: safeArea.left,
  874. right: result.windowWidth - safeArea.right,
  875. bottom: result.screenHeight - safeArea.bottom
  876. };
  877. }
  878. }
  879. function populateParameters(result) {
  880. var _result$brand = result.brand,
  881. brand = _result$brand === void 0 ? '' : _result$brand,
  882. _result$model = result.model,
  883. model = _result$model === void 0 ? '' : _result$model,
  884. _result$system = result.system,
  885. system = _result$system === void 0 ? '' : _result$system,
  886. _result$language = result.language,
  887. language = _result$language === void 0 ? '' : _result$language,
  888. theme = result.theme,
  889. version = result.version,
  890. platform = result.platform,
  891. fontSizeSetting = result.fontSizeSetting,
  892. SDKVersion = result.SDKVersion,
  893. pixelRatio = result.pixelRatio,
  894. deviceOrientation = result.deviceOrientation;
  895. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  896. var extraParam = {};
  897. // osName osVersion
  898. var osName = '';
  899. var osVersion = '';
  900. {
  901. osName = system.split(' ')[0] || '';
  902. osVersion = system.split(' ')[1] || '';
  903. }
  904. var hostVersion = version;
  905. // deviceType
  906. var deviceType = getGetDeviceType(result, model);
  907. // deviceModel
  908. var deviceBrand = getDeviceBrand(brand);
  909. // hostName
  910. var _hostName = getHostName(result);
  911. // deviceOrientation
  912. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  913. // devicePixelRatio
  914. var _devicePixelRatio = pixelRatio;
  915. // SDKVersion
  916. var _SDKVersion = SDKVersion;
  917. // hostLanguage
  918. var hostLanguage = language.replace(/_/g, '-');
  919. // wx.getAccountInfoSync
  920. var parameters = {
  921. appId: "__UNI__5FB7046",
  922. appName: "贞达市政工程",
  923. appVersion: "1.0.0",
  924. appVersionCode: "100",
  925. appLanguage: getAppLanguage(hostLanguage),
  926. uniCompileVersion: "3.8.12",
  927. uniRuntimeVersion: "3.8.12",
  928. uniPlatform: undefined || "mp-weixin",
  929. deviceBrand: deviceBrand,
  930. deviceModel: model,
  931. deviceType: deviceType,
  932. devicePixelRatio: _devicePixelRatio,
  933. deviceOrientation: _deviceOrientation,
  934. osName: osName.toLocaleLowerCase(),
  935. osVersion: osVersion,
  936. hostTheme: theme,
  937. hostVersion: hostVersion,
  938. hostLanguage: hostLanguage,
  939. hostName: _hostName,
  940. hostSDKVersion: _SDKVersion,
  941. hostFontSizeSetting: fontSizeSetting,
  942. windowTop: 0,
  943. windowBottom: 0,
  944. // TODO
  945. osLanguage: undefined,
  946. osTheme: undefined,
  947. ua: undefined,
  948. hostPackageName: undefined,
  949. browserName: undefined,
  950. browserVersion: undefined
  951. };
  952. Object.assign(result, parameters, extraParam);
  953. }
  954. function getGetDeviceType(result, model) {
  955. var deviceType = result.deviceType || 'phone';
  956. {
  957. var deviceTypeMaps = {
  958. ipad: 'pad',
  959. windows: 'pc',
  960. mac: 'pc'
  961. };
  962. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  963. var _model = model.toLocaleLowerCase();
  964. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  965. var _m = deviceTypeMapsKeys[index];
  966. if (_model.indexOf(_m) !== -1) {
  967. deviceType = deviceTypeMaps[_m];
  968. break;
  969. }
  970. }
  971. }
  972. return deviceType;
  973. }
  974. function getDeviceBrand(brand) {
  975. var deviceBrand = brand;
  976. if (deviceBrand) {
  977. deviceBrand = brand.toLocaleLowerCase();
  978. }
  979. return deviceBrand;
  980. }
  981. function getAppLanguage(defaultLanguage) {
  982. return getLocale$1 ? getLocale$1() : defaultLanguage;
  983. }
  984. function getHostName(result) {
  985. var _platform = 'WeChat';
  986. var _hostName = result.hostName || _platform; // mp-jd
  987. {
  988. if (result.environment) {
  989. _hostName = result.environment;
  990. } else if (result.host && result.host.env) {
  991. _hostName = result.host.env;
  992. }
  993. }
  994. return _hostName;
  995. }
  996. var getSystemInfo = {
  997. returnValue: function returnValue(result) {
  998. useDeviceId(result);
  999. addSafeAreaInsets(result);
  1000. populateParameters(result);
  1001. }
  1002. };
  1003. var showActionSheet = {
  1004. args: function args(fromArgs) {
  1005. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1006. fromArgs.alertText = fromArgs.title;
  1007. }
  1008. }
  1009. };
  1010. var getAppBaseInfo = {
  1011. returnValue: function returnValue(result) {
  1012. var _result = result,
  1013. version = _result.version,
  1014. language = _result.language,
  1015. SDKVersion = _result.SDKVersion,
  1016. theme = _result.theme;
  1017. var _hostName = getHostName(result);
  1018. var hostLanguage = language.replace('_', '-');
  1019. result = sortObject(Object.assign(result, {
  1020. appId: "__UNI__5FB7046",
  1021. appName: "贞达市政工程",
  1022. appVersion: "1.0.0",
  1023. appVersionCode: "100",
  1024. appLanguage: getAppLanguage(hostLanguage),
  1025. hostVersion: version,
  1026. hostLanguage: hostLanguage,
  1027. hostName: _hostName,
  1028. hostSDKVersion: SDKVersion,
  1029. hostTheme: theme
  1030. }));
  1031. }
  1032. };
  1033. var getDeviceInfo = {
  1034. returnValue: function returnValue(result) {
  1035. var _result2 = result,
  1036. brand = _result2.brand,
  1037. model = _result2.model;
  1038. var deviceType = getGetDeviceType(result, model);
  1039. var deviceBrand = getDeviceBrand(brand);
  1040. useDeviceId(result);
  1041. result = sortObject(Object.assign(result, {
  1042. deviceType: deviceType,
  1043. deviceBrand: deviceBrand,
  1044. deviceModel: model
  1045. }));
  1046. }
  1047. };
  1048. var getWindowInfo = {
  1049. returnValue: function returnValue(result) {
  1050. addSafeAreaInsets(result);
  1051. result = sortObject(Object.assign(result, {
  1052. windowTop: 0,
  1053. windowBottom: 0
  1054. }));
  1055. }
  1056. };
  1057. var getAppAuthorizeSetting = {
  1058. returnValue: function returnValue(result) {
  1059. var locationReducedAccuracy = result.locationReducedAccuracy;
  1060. result.locationAccuracy = 'unsupported';
  1061. if (locationReducedAccuracy === true) {
  1062. result.locationAccuracy = 'reduced';
  1063. } else if (locationReducedAccuracy === false) {
  1064. result.locationAccuracy = 'full';
  1065. }
  1066. }
  1067. };
  1068. // import navigateTo from 'uni-helpers/navigate-to'
  1069. var compressImage = {
  1070. args: function args(fromArgs) {
  1071. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1072. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1073. fromArgs.compressHeight = fromArgs.compressedHeight;
  1074. }
  1075. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1076. fromArgs.compressWidth = fromArgs.compressedWidth;
  1077. }
  1078. }
  1079. };
  1080. var protocols = {
  1081. redirectTo: redirectTo,
  1082. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1083. previewImage: previewImage,
  1084. getSystemInfo: getSystemInfo,
  1085. getSystemInfoSync: getSystemInfo,
  1086. showActionSheet: showActionSheet,
  1087. getAppBaseInfo: getAppBaseInfo,
  1088. getDeviceInfo: getDeviceInfo,
  1089. getWindowInfo: getWindowInfo,
  1090. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1091. compressImage: compressImage
  1092. };
  1093. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1094. var canIUses = [];
  1095. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1096. function processCallback(methodName, method, returnValue) {
  1097. return function (res) {
  1098. return method(processReturnValue(methodName, res, returnValue));
  1099. };
  1100. }
  1101. function processArgs(methodName, fromArgs) {
  1102. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1103. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1104. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1105. if (isPlainObject(fromArgs)) {
  1106. // 一般 api 的参数解析
  1107. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1108. if (isFn(argsOption)) {
  1109. argsOption = argsOption(fromArgs, toArgs) || {};
  1110. }
  1111. for (var key in fromArgs) {
  1112. if (hasOwn(argsOption, key)) {
  1113. var keyOption = argsOption[key];
  1114. if (isFn(keyOption)) {
  1115. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1116. }
  1117. if (!keyOption) {
  1118. // 不支持的参数
  1119. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1120. } else if (isStr(keyOption)) {
  1121. // 重写参数 key
  1122. toArgs[keyOption] = fromArgs[key];
  1123. } else if (isPlainObject(keyOption)) {
  1124. // {name:newName,value:value}可重新指定参数 key:value
  1125. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1126. }
  1127. } else if (CALLBACKS.indexOf(key) !== -1) {
  1128. if (isFn(fromArgs[key])) {
  1129. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1130. }
  1131. } else {
  1132. if (!keepFromArgs) {
  1133. toArgs[key] = fromArgs[key];
  1134. }
  1135. }
  1136. }
  1137. return toArgs;
  1138. } else if (isFn(fromArgs)) {
  1139. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1140. }
  1141. return fromArgs;
  1142. }
  1143. function processReturnValue(methodName, res, returnValue) {
  1144. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1145. if (isFn(protocols.returnValue)) {
  1146. // 处理通用 returnValue
  1147. res = protocols.returnValue(methodName, res);
  1148. }
  1149. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1150. }
  1151. function wrapper(methodName, method) {
  1152. if (hasOwn(protocols, methodName)) {
  1153. var protocol = protocols[methodName];
  1154. if (!protocol) {
  1155. // 暂不支持的 api
  1156. return function () {
  1157. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1158. };
  1159. }
  1160. return function (arg1, arg2) {
  1161. // 目前 api 最多两个参数
  1162. var options = protocol;
  1163. if (isFn(protocol)) {
  1164. options = protocol(arg1);
  1165. }
  1166. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1167. var args = [arg1];
  1168. if (typeof arg2 !== 'undefined') {
  1169. args.push(arg2);
  1170. }
  1171. if (isFn(options.name)) {
  1172. methodName = options.name(arg1);
  1173. } else if (isStr(options.name)) {
  1174. methodName = options.name;
  1175. }
  1176. var returnValue = wx[methodName].apply(wx, args);
  1177. if (isSyncApi(methodName)) {
  1178. // 同步 api
  1179. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1180. }
  1181. return returnValue;
  1182. };
  1183. }
  1184. return method;
  1185. }
  1186. var todoApis = Object.create(null);
  1187. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1188. function createTodoApi(name) {
  1189. return function todoApi(_ref) {
  1190. var fail = _ref.fail,
  1191. complete = _ref.complete;
  1192. var res = {
  1193. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1194. };
  1195. isFn(fail) && fail(res);
  1196. isFn(complete) && complete(res);
  1197. };
  1198. }
  1199. TODOS.forEach(function (name) {
  1200. todoApis[name] = createTodoApi(name);
  1201. });
  1202. var providers = {
  1203. oauth: ['weixin'],
  1204. share: ['weixin'],
  1205. payment: ['wxpay'],
  1206. push: ['weixin']
  1207. };
  1208. function getProvider(_ref2) {
  1209. var service = _ref2.service,
  1210. success = _ref2.success,
  1211. fail = _ref2.fail,
  1212. complete = _ref2.complete;
  1213. var res = false;
  1214. if (providers[service]) {
  1215. res = {
  1216. errMsg: 'getProvider:ok',
  1217. service: service,
  1218. provider: providers[service]
  1219. };
  1220. isFn(success) && success(res);
  1221. } else {
  1222. res = {
  1223. errMsg: 'getProvider:fail service not found'
  1224. };
  1225. isFn(fail) && fail(res);
  1226. }
  1227. isFn(complete) && complete(res);
  1228. }
  1229. var extraApi = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. getProvider: getProvider
  1232. });
  1233. var getEmitter = function () {
  1234. var Emitter;
  1235. return function getUniEmitter() {
  1236. if (!Emitter) {
  1237. Emitter = new _vue.default();
  1238. }
  1239. return Emitter;
  1240. };
  1241. }();
  1242. function apply(ctx, method, args) {
  1243. return ctx[method].apply(ctx, args);
  1244. }
  1245. function $on() {
  1246. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1247. }
  1248. function $off() {
  1249. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1250. }
  1251. function $once() {
  1252. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1253. }
  1254. function $emit() {
  1255. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1256. }
  1257. var eventApi = /*#__PURE__*/Object.freeze({
  1258. __proto__: null,
  1259. $on: $on,
  1260. $off: $off,
  1261. $once: $once,
  1262. $emit: $emit
  1263. });
  1264. /**
  1265. * 框架内 try-catch
  1266. */
  1267. /**
  1268. * 开发者 try-catch
  1269. */
  1270. function tryCatch(fn) {
  1271. return function () {
  1272. try {
  1273. return fn.apply(fn, arguments);
  1274. } catch (e) {
  1275. // TODO
  1276. console.error(e);
  1277. }
  1278. };
  1279. }
  1280. function getApiCallbacks(params) {
  1281. var apiCallbacks = {};
  1282. for (var name in params) {
  1283. var param = params[name];
  1284. if (isFn(param)) {
  1285. apiCallbacks[name] = tryCatch(param);
  1286. delete params[name];
  1287. }
  1288. }
  1289. return apiCallbacks;
  1290. }
  1291. var cid;
  1292. var cidErrMsg;
  1293. var enabled;
  1294. function normalizePushMessage(message) {
  1295. try {
  1296. return JSON.parse(message);
  1297. } catch (e) {}
  1298. return message;
  1299. }
  1300. function invokePushCallback(args) {
  1301. if (args.type === 'enabled') {
  1302. enabled = true;
  1303. } else if (args.type === 'clientId') {
  1304. cid = args.cid;
  1305. cidErrMsg = args.errMsg;
  1306. invokeGetPushCidCallbacks(cid, args.errMsg);
  1307. } else if (args.type === 'pushMsg') {
  1308. var message = {
  1309. type: 'receive',
  1310. data: normalizePushMessage(args.message)
  1311. };
  1312. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1313. var callback = onPushMessageCallbacks[i];
  1314. callback(message);
  1315. // 该消息已被阻止
  1316. if (message.stopped) {
  1317. break;
  1318. }
  1319. }
  1320. } else if (args.type === 'click') {
  1321. onPushMessageCallbacks.forEach(function (callback) {
  1322. callback({
  1323. type: 'click',
  1324. data: normalizePushMessage(args.message)
  1325. });
  1326. });
  1327. }
  1328. }
  1329. var getPushCidCallbacks = [];
  1330. function invokeGetPushCidCallbacks(cid, errMsg) {
  1331. getPushCidCallbacks.forEach(function (callback) {
  1332. callback(cid, errMsg);
  1333. });
  1334. getPushCidCallbacks.length = 0;
  1335. }
  1336. function getPushClientId(args) {
  1337. if (!isPlainObject(args)) {
  1338. args = {};
  1339. }
  1340. var _getApiCallbacks = getApiCallbacks(args),
  1341. success = _getApiCallbacks.success,
  1342. fail = _getApiCallbacks.fail,
  1343. complete = _getApiCallbacks.complete;
  1344. var hasSuccess = isFn(success);
  1345. var hasFail = isFn(fail);
  1346. var hasComplete = isFn(complete);
  1347. Promise.resolve().then(function () {
  1348. if (typeof enabled === 'undefined') {
  1349. enabled = false;
  1350. cid = '';
  1351. cidErrMsg = 'uniPush is not enabled';
  1352. }
  1353. getPushCidCallbacks.push(function (cid, errMsg) {
  1354. var res;
  1355. if (cid) {
  1356. res = {
  1357. errMsg: 'getPushClientId:ok',
  1358. cid: cid
  1359. };
  1360. hasSuccess && success(res);
  1361. } else {
  1362. res = {
  1363. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1364. };
  1365. hasFail && fail(res);
  1366. }
  1367. hasComplete && complete(res);
  1368. });
  1369. if (typeof cid !== 'undefined') {
  1370. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1371. }
  1372. });
  1373. }
  1374. var onPushMessageCallbacks = [];
  1375. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1376. var onPushMessage = function onPushMessage(fn) {
  1377. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1378. onPushMessageCallbacks.push(fn);
  1379. }
  1380. };
  1381. var offPushMessage = function offPushMessage(fn) {
  1382. if (!fn) {
  1383. onPushMessageCallbacks.length = 0;
  1384. } else {
  1385. var index = onPushMessageCallbacks.indexOf(fn);
  1386. if (index > -1) {
  1387. onPushMessageCallbacks.splice(index, 1);
  1388. }
  1389. }
  1390. };
  1391. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1392. if (!baseInfo) {
  1393. baseInfo = wx.getSystemInfoSync();
  1394. }
  1395. var host = baseInfo ? baseInfo.host : null;
  1396. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1397. var api = /*#__PURE__*/Object.freeze({
  1398. __proto__: null,
  1399. shareVideoMessage: shareVideoMessage,
  1400. getPushClientId: getPushClientId,
  1401. onPushMessage: onPushMessage,
  1402. offPushMessage: offPushMessage,
  1403. invokePushCallback: invokePushCallback
  1404. });
  1405. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1406. function findVmByVueId(vm, vuePid) {
  1407. var $children = vm.$children;
  1408. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1409. for (var i = $children.length - 1; i >= 0; i--) {
  1410. var childVm = $children[i];
  1411. if (childVm.$scope._$vueId === vuePid) {
  1412. return childVm;
  1413. }
  1414. }
  1415. // 反向递归查找
  1416. var parentVm;
  1417. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1418. parentVm = findVmByVueId($children[_i], vuePid);
  1419. if (parentVm) {
  1420. return parentVm;
  1421. }
  1422. }
  1423. }
  1424. function initBehavior(options) {
  1425. return Behavior(options);
  1426. }
  1427. function isPage() {
  1428. return !!this.route;
  1429. }
  1430. function initRelation(detail) {
  1431. this.triggerEvent('__l', detail);
  1432. }
  1433. function selectAllComponents(mpInstance, selector, $refs) {
  1434. var components = mpInstance.selectAllComponents(selector) || [];
  1435. components.forEach(function (component) {
  1436. var ref = component.dataset.ref;
  1437. $refs[ref] = component.$vm || toSkip(component);
  1438. {
  1439. if (component.dataset.vueGeneric === 'scoped') {
  1440. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1441. selectAllComponents(scopedComponent, selector, $refs);
  1442. });
  1443. }
  1444. }
  1445. });
  1446. }
  1447. function syncRefs(refs, newRefs) {
  1448. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1449. var newKeys = Object.keys(newRefs);
  1450. newKeys.forEach(function (key) {
  1451. var oldValue = refs[key];
  1452. var newValue = newRefs[key];
  1453. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1454. return oldValue.includes(value);
  1455. })) {
  1456. return;
  1457. }
  1458. refs[key] = newValue;
  1459. oldKeys.delete(key);
  1460. });
  1461. oldKeys.forEach(function (key) {
  1462. delete refs[key];
  1463. });
  1464. return refs;
  1465. }
  1466. function initRefs(vm) {
  1467. var mpInstance = vm.$scope;
  1468. var refs = {};
  1469. Object.defineProperty(vm, '$refs', {
  1470. get: function get() {
  1471. var $refs = {};
  1472. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1473. // TODO 暂不考虑 for 中的 scoped
  1474. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1475. forComponents.forEach(function (component) {
  1476. var ref = component.dataset.ref;
  1477. if (!$refs[ref]) {
  1478. $refs[ref] = [];
  1479. }
  1480. $refs[ref].push(component.$vm || toSkip(component));
  1481. });
  1482. return syncRefs(refs, $refs);
  1483. }
  1484. });
  1485. }
  1486. function handleLink(event) {
  1487. var _ref3 = event.detail || event.value,
  1488. vuePid = _ref3.vuePid,
  1489. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1490. var parentVm;
  1491. if (vuePid) {
  1492. parentVm = findVmByVueId(this.$vm, vuePid);
  1493. }
  1494. if (!parentVm) {
  1495. parentVm = this.$vm;
  1496. }
  1497. vueOptions.parent = parentVm;
  1498. }
  1499. function markMPComponent(component) {
  1500. // 在 Vue 中标记为小程序组件
  1501. var IS_MP = '__v_isMPComponent';
  1502. Object.defineProperty(component, IS_MP, {
  1503. configurable: true,
  1504. enumerable: false,
  1505. value: true
  1506. });
  1507. return component;
  1508. }
  1509. function toSkip(obj) {
  1510. var OB = '__ob__';
  1511. var SKIP = '__v_skip';
  1512. if (isObject(obj) && Object.isExtensible(obj)) {
  1513. // 避免被 @vue/composition-api 观测
  1514. Object.defineProperty(obj, OB, {
  1515. configurable: true,
  1516. enumerable: false,
  1517. value: (0, _defineProperty2.default)({}, SKIP, true)
  1518. });
  1519. }
  1520. return obj;
  1521. }
  1522. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1523. function initWorkletMethods(mpMethods, vueMethods) {
  1524. if (vueMethods) {
  1525. Object.keys(vueMethods).forEach(function (name) {
  1526. var matches = name.match(WORKLET_RE);
  1527. if (matches) {
  1528. var workletName = matches[1];
  1529. mpMethods[name] = vueMethods[name];
  1530. mpMethods[workletName] = vueMethods[workletName];
  1531. }
  1532. });
  1533. }
  1534. }
  1535. var MPPage = Page;
  1536. var MPComponent = Component;
  1537. var customizeRE = /:/g;
  1538. var customize = cached(function (str) {
  1539. return camelize(str.replace(customizeRE, '-'));
  1540. });
  1541. function initTriggerEvent(mpInstance) {
  1542. var oldTriggerEvent = mpInstance.triggerEvent;
  1543. var newTriggerEvent = function newTriggerEvent(event) {
  1544. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1545. args[_key3 - 1] = arguments[_key3];
  1546. }
  1547. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1548. if (this.$vm || this.dataset && this.dataset.comType) {
  1549. event = customize(event);
  1550. } else {
  1551. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1552. var newEvent = customize(event);
  1553. if (newEvent !== event) {
  1554. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1555. }
  1556. }
  1557. return oldTriggerEvent.apply(this, [event].concat(args));
  1558. };
  1559. try {
  1560. // 京东小程序 triggerEvent 为只读
  1561. mpInstance.triggerEvent = newTriggerEvent;
  1562. } catch (error) {
  1563. mpInstance._triggerEvent = newTriggerEvent;
  1564. }
  1565. }
  1566. function initHook(name, options, isComponent) {
  1567. var oldHook = options[name];
  1568. options[name] = function () {
  1569. markMPComponent(this);
  1570. initTriggerEvent(this);
  1571. if (oldHook) {
  1572. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1573. args[_key4] = arguments[_key4];
  1574. }
  1575. return oldHook.apply(this, args);
  1576. }
  1577. };
  1578. }
  1579. if (!MPPage.__$wrappered) {
  1580. MPPage.__$wrappered = true;
  1581. Page = function Page() {
  1582. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1583. initHook('onLoad', options);
  1584. return MPPage(options);
  1585. };
  1586. Page.after = MPPage.after;
  1587. Component = function Component() {
  1588. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1589. initHook('created', options);
  1590. return MPComponent(options);
  1591. };
  1592. }
  1593. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1594. function initMocks(vm, mocks) {
  1595. var mpInstance = vm.$mp[vm.mpType];
  1596. mocks.forEach(function (mock) {
  1597. if (hasOwn(mpInstance, mock)) {
  1598. vm[mock] = mpInstance[mock];
  1599. }
  1600. });
  1601. }
  1602. function hasHook(hook, vueOptions) {
  1603. if (!vueOptions) {
  1604. return true;
  1605. }
  1606. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1607. return true;
  1608. }
  1609. vueOptions = vueOptions.default || vueOptions;
  1610. if (isFn(vueOptions)) {
  1611. if (isFn(vueOptions.extendOptions[hook])) {
  1612. return true;
  1613. }
  1614. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1615. return true;
  1616. }
  1617. return false;
  1618. }
  1619. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1620. return true;
  1621. }
  1622. var mixins = vueOptions.mixins;
  1623. if (Array.isArray(mixins)) {
  1624. return !!mixins.find(function (mixin) {
  1625. return hasHook(hook, mixin);
  1626. });
  1627. }
  1628. }
  1629. function initHooks(mpOptions, hooks, vueOptions) {
  1630. hooks.forEach(function (hook) {
  1631. if (hasHook(hook, vueOptions)) {
  1632. mpOptions[hook] = function (args) {
  1633. return this.$vm && this.$vm.__call_hook(hook, args);
  1634. };
  1635. }
  1636. });
  1637. }
  1638. function initUnknownHooks(mpOptions, vueOptions) {
  1639. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1640. findHooks(vueOptions).forEach(function (hook) {
  1641. return initHook$1(mpOptions, hook, excludes);
  1642. });
  1643. }
  1644. function findHooks(vueOptions) {
  1645. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1646. if (vueOptions) {
  1647. Object.keys(vueOptions).forEach(function (name) {
  1648. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1649. hooks.push(name);
  1650. }
  1651. });
  1652. }
  1653. return hooks;
  1654. }
  1655. function initHook$1(mpOptions, hook, excludes) {
  1656. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1657. mpOptions[hook] = function (args) {
  1658. return this.$vm && this.$vm.__call_hook(hook, args);
  1659. };
  1660. }
  1661. }
  1662. function initVueComponent(Vue, vueOptions) {
  1663. vueOptions = vueOptions.default || vueOptions;
  1664. var VueComponent;
  1665. if (isFn(vueOptions)) {
  1666. VueComponent = vueOptions;
  1667. } else {
  1668. VueComponent = Vue.extend(vueOptions);
  1669. }
  1670. vueOptions = VueComponent.options;
  1671. return [VueComponent, vueOptions];
  1672. }
  1673. function initSlots(vm, vueSlots) {
  1674. if (Array.isArray(vueSlots) && vueSlots.length) {
  1675. var $slots = Object.create(null);
  1676. vueSlots.forEach(function (slotName) {
  1677. $slots[slotName] = true;
  1678. });
  1679. vm.$scopedSlots = vm.$slots = $slots;
  1680. }
  1681. }
  1682. function initVueIds(vueIds, mpInstance) {
  1683. vueIds = (vueIds || '').split(',');
  1684. var len = vueIds.length;
  1685. if (len === 1) {
  1686. mpInstance._$vueId = vueIds[0];
  1687. } else if (len === 2) {
  1688. mpInstance._$vueId = vueIds[0];
  1689. mpInstance._$vuePid = vueIds[1];
  1690. }
  1691. }
  1692. function initData(vueOptions, context) {
  1693. var data = vueOptions.data || {};
  1694. var methods = vueOptions.methods || {};
  1695. if (typeof data === 'function') {
  1696. try {
  1697. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1698. } catch (e) {
  1699. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1700. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1701. }
  1702. }
  1703. } else {
  1704. try {
  1705. // 对 data 格式化
  1706. data = JSON.parse(JSON.stringify(data));
  1707. } catch (e) {}
  1708. }
  1709. if (!isPlainObject(data)) {
  1710. data = {};
  1711. }
  1712. Object.keys(methods).forEach(function (methodName) {
  1713. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1714. data[methodName] = methods[methodName];
  1715. }
  1716. });
  1717. return data;
  1718. }
  1719. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1720. function createObserver(name) {
  1721. return function observer(newVal, oldVal) {
  1722. if (this.$vm) {
  1723. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1724. }
  1725. };
  1726. }
  1727. function initBehaviors(vueOptions, initBehavior) {
  1728. var vueBehaviors = vueOptions.behaviors;
  1729. var vueExtends = vueOptions.extends;
  1730. var vueMixins = vueOptions.mixins;
  1731. var vueProps = vueOptions.props;
  1732. if (!vueProps) {
  1733. vueOptions.props = vueProps = [];
  1734. }
  1735. var behaviors = [];
  1736. if (Array.isArray(vueBehaviors)) {
  1737. vueBehaviors.forEach(function (behavior) {
  1738. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1739. if (behavior === 'uni://form-field') {
  1740. if (Array.isArray(vueProps)) {
  1741. vueProps.push('name');
  1742. vueProps.push('value');
  1743. } else {
  1744. vueProps.name = {
  1745. type: String,
  1746. default: ''
  1747. };
  1748. vueProps.value = {
  1749. type: [String, Number, Boolean, Array, Object, Date],
  1750. default: ''
  1751. };
  1752. }
  1753. }
  1754. });
  1755. }
  1756. if (isPlainObject(vueExtends) && vueExtends.props) {
  1757. behaviors.push(initBehavior({
  1758. properties: initProperties(vueExtends.props, true)
  1759. }));
  1760. }
  1761. if (Array.isArray(vueMixins)) {
  1762. vueMixins.forEach(function (vueMixin) {
  1763. if (isPlainObject(vueMixin) && vueMixin.props) {
  1764. behaviors.push(initBehavior({
  1765. properties: initProperties(vueMixin.props, true)
  1766. }));
  1767. }
  1768. });
  1769. }
  1770. return behaviors;
  1771. }
  1772. function parsePropType(key, type, defaultValue, file) {
  1773. // [String]=>String
  1774. if (Array.isArray(type) && type.length === 1) {
  1775. return type[0];
  1776. }
  1777. return type;
  1778. }
  1779. function initProperties(props) {
  1780. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1781. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1782. var options = arguments.length > 3 ? arguments[3] : undefined;
  1783. var properties = {};
  1784. if (!isBehavior) {
  1785. properties.vueId = {
  1786. type: String,
  1787. value: ''
  1788. };
  1789. {
  1790. if (options.virtualHost) {
  1791. properties.virtualHostStyle = {
  1792. type: null,
  1793. value: ''
  1794. };
  1795. properties.virtualHostClass = {
  1796. type: null,
  1797. value: ''
  1798. };
  1799. }
  1800. }
  1801. // scopedSlotsCompiler auto
  1802. properties.scopedSlotsCompiler = {
  1803. type: String,
  1804. value: ''
  1805. };
  1806. properties.vueSlots = {
  1807. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1808. type: null,
  1809. value: [],
  1810. observer: function observer(newVal, oldVal) {
  1811. var $slots = Object.create(null);
  1812. newVal.forEach(function (slotName) {
  1813. $slots[slotName] = true;
  1814. });
  1815. this.setData({
  1816. $slots: $slots
  1817. });
  1818. }
  1819. };
  1820. }
  1821. if (Array.isArray(props)) {
  1822. // ['title']
  1823. props.forEach(function (key) {
  1824. properties[key] = {
  1825. type: null,
  1826. observer: createObserver(key)
  1827. };
  1828. });
  1829. } else if (isPlainObject(props)) {
  1830. // {title:{type:String,default:''},content:String}
  1831. Object.keys(props).forEach(function (key) {
  1832. var opts = props[key];
  1833. if (isPlainObject(opts)) {
  1834. // title:{type:String,default:''}
  1835. var value = opts.default;
  1836. if (isFn(value)) {
  1837. value = value();
  1838. }
  1839. opts.type = parsePropType(key, opts.type);
  1840. properties[key] = {
  1841. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1842. value: value,
  1843. observer: createObserver(key)
  1844. };
  1845. } else {
  1846. // content:String
  1847. var type = parsePropType(key, opts);
  1848. properties[key] = {
  1849. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1850. observer: createObserver(key)
  1851. };
  1852. }
  1853. });
  1854. }
  1855. return properties;
  1856. }
  1857. function wrapper$1(event) {
  1858. // TODO 又得兼容 mpvue 的 mp 对象
  1859. try {
  1860. event.mp = JSON.parse(JSON.stringify(event));
  1861. } catch (e) {}
  1862. event.stopPropagation = noop;
  1863. event.preventDefault = noop;
  1864. event.target = event.target || {};
  1865. if (!hasOwn(event, 'detail')) {
  1866. event.detail = {};
  1867. }
  1868. if (hasOwn(event, 'markerId')) {
  1869. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1870. event.detail.markerId = event.markerId;
  1871. }
  1872. if (isPlainObject(event.detail)) {
  1873. event.target = Object.assign({}, event.target, event.detail);
  1874. }
  1875. return event;
  1876. }
  1877. function getExtraValue(vm, dataPathsArray) {
  1878. var context = vm;
  1879. dataPathsArray.forEach(function (dataPathArray) {
  1880. var dataPath = dataPathArray[0];
  1881. var value = dataPathArray[2];
  1882. if (dataPath || typeof value !== 'undefined') {
  1883. // ['','',index,'disable']
  1884. var propPath = dataPathArray[1];
  1885. var valuePath = dataPathArray[3];
  1886. var vFor;
  1887. if (Number.isInteger(dataPath)) {
  1888. vFor = dataPath;
  1889. } else if (!dataPath) {
  1890. vFor = context;
  1891. } else if (typeof dataPath === 'string' && dataPath) {
  1892. if (dataPath.indexOf('#s#') === 0) {
  1893. vFor = dataPath.substr(3);
  1894. } else {
  1895. vFor = vm.__get_value(dataPath, context);
  1896. }
  1897. }
  1898. if (Number.isInteger(vFor)) {
  1899. context = value;
  1900. } else if (!propPath) {
  1901. context = vFor[value];
  1902. } else {
  1903. if (Array.isArray(vFor)) {
  1904. context = vFor.find(function (vForItem) {
  1905. return vm.__get_value(propPath, vForItem) === value;
  1906. });
  1907. } else if (isPlainObject(vFor)) {
  1908. context = Object.keys(vFor).find(function (vForKey) {
  1909. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1910. });
  1911. } else {
  1912. console.error('v-for 暂不支持循环数据:', vFor);
  1913. }
  1914. }
  1915. if (valuePath) {
  1916. context = vm.__get_value(valuePath, context);
  1917. }
  1918. }
  1919. });
  1920. return context;
  1921. }
  1922. function processEventExtra(vm, extra, event, __args__) {
  1923. var extraObj = {};
  1924. if (Array.isArray(extra) && extra.length) {
  1925. /**
  1926. *[
  1927. * ['data.items', 'data.id', item.data.id],
  1928. * ['metas', 'id', meta.id]
  1929. *],
  1930. *[
  1931. * ['data.items', 'data.id', item.data.id],
  1932. * ['metas', 'id', meta.id]
  1933. *],
  1934. *'test'
  1935. */
  1936. extra.forEach(function (dataPath, index) {
  1937. if (typeof dataPath === 'string') {
  1938. if (!dataPath) {
  1939. // model,prop.sync
  1940. extraObj['$' + index] = vm;
  1941. } else {
  1942. if (dataPath === '$event') {
  1943. // $event
  1944. extraObj['$' + index] = event;
  1945. } else if (dataPath === 'arguments') {
  1946. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1947. } else if (dataPath.indexOf('$event.') === 0) {
  1948. // $event.target.value
  1949. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1950. } else {
  1951. extraObj['$' + index] = vm.__get_value(dataPath);
  1952. }
  1953. }
  1954. } else {
  1955. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1956. }
  1957. });
  1958. }
  1959. return extraObj;
  1960. }
  1961. function getObjByArray(arr) {
  1962. var obj = {};
  1963. for (var i = 1; i < arr.length; i++) {
  1964. var element = arr[i];
  1965. obj[element[0]] = element[1];
  1966. }
  1967. return obj;
  1968. }
  1969. function processEventArgs(vm, event) {
  1970. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1971. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1972. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1973. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1974. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1975. // fixed 用户直接触发 mpInstance.triggerEvent
  1976. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1977. if (isCustom) {
  1978. // 自定义事件
  1979. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1980. if (!args.length) {
  1981. // 无参数,直接传入 event 或 detail 数组
  1982. if (isCustomMPEvent) {
  1983. return [event];
  1984. }
  1985. return __args__;
  1986. }
  1987. }
  1988. var extraObj = processEventExtra(vm, extra, event, __args__);
  1989. var ret = [];
  1990. args.forEach(function (arg) {
  1991. if (arg === '$event') {
  1992. if (methodName === '__set_model' && !isCustom) {
  1993. // input v-model value
  1994. ret.push(event.target.value);
  1995. } else {
  1996. if (isCustom && !isCustomMPEvent) {
  1997. ret.push(__args__[0]);
  1998. } else {
  1999. // wxcomponent 组件或内置组件
  2000. ret.push(event);
  2001. }
  2002. }
  2003. } else {
  2004. if (Array.isArray(arg) && arg[0] === 'o') {
  2005. ret.push(getObjByArray(arg));
  2006. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2007. ret.push(extraObj[arg]);
  2008. } else {
  2009. ret.push(arg);
  2010. }
  2011. }
  2012. });
  2013. return ret;
  2014. }
  2015. var ONCE = '~';
  2016. var CUSTOM = '^';
  2017. function isMatchEventType(eventType, optType) {
  2018. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2019. }
  2020. function getContextVm(vm) {
  2021. var $parent = vm.$parent;
  2022. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2023. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2024. $parent = $parent.$parent;
  2025. }
  2026. return $parent && $parent.$parent;
  2027. }
  2028. function handleEvent(event) {
  2029. var _this2 = this;
  2030. event = wrapper$1(event);
  2031. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2032. var dataset = (event.currentTarget || event.target).dataset;
  2033. if (!dataset) {
  2034. return console.warn('事件信息不存在');
  2035. }
  2036. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2037. if (!eventOpts) {
  2038. return console.warn('事件信息不存在');
  2039. }
  2040. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2041. var eventType = event.type;
  2042. var ret = [];
  2043. eventOpts.forEach(function (eventOpt) {
  2044. var type = eventOpt[0];
  2045. var eventsArray = eventOpt[1];
  2046. var isCustom = type.charAt(0) === CUSTOM;
  2047. type = isCustom ? type.slice(1) : type;
  2048. var isOnce = type.charAt(0) === ONCE;
  2049. type = isOnce ? type.slice(1) : type;
  2050. if (eventsArray && isMatchEventType(eventType, type)) {
  2051. eventsArray.forEach(function (eventArray) {
  2052. var methodName = eventArray[0];
  2053. if (methodName) {
  2054. var handlerCtx = _this2.$vm;
  2055. if (handlerCtx.$options.generic) {
  2056. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2057. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2058. }
  2059. if (methodName === '$emit') {
  2060. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2061. return;
  2062. }
  2063. var handler = handlerCtx[methodName];
  2064. if (!isFn(handler)) {
  2065. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2066. var path = _this2.route || _this2.is;
  2067. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2068. }
  2069. if (isOnce) {
  2070. if (handler.once) {
  2071. return;
  2072. }
  2073. handler.once = true;
  2074. }
  2075. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2076. params = Array.isArray(params) ? params : [];
  2077. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2078. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2079. // eslint-disable-next-line no-sparse-arrays
  2080. params = params.concat([,,,,,,,,,, event]);
  2081. }
  2082. ret.push(handler.apply(handlerCtx, params));
  2083. }
  2084. });
  2085. }
  2086. });
  2087. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2088. return ret[0];
  2089. }
  2090. }
  2091. var eventChannels = {};
  2092. function getEventChannel(id) {
  2093. var eventChannel = eventChannels[id];
  2094. delete eventChannels[id];
  2095. return eventChannel;
  2096. }
  2097. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2098. function initEventChannel() {
  2099. _vue.default.prototype.getOpenerEventChannel = function () {
  2100. // 微信小程序使用自身getOpenerEventChannel
  2101. {
  2102. return this.$scope.getOpenerEventChannel();
  2103. }
  2104. };
  2105. var callHook = _vue.default.prototype.__call_hook;
  2106. _vue.default.prototype.__call_hook = function (hook, args) {
  2107. if (hook === 'onLoad' && args && args.__id__) {
  2108. this.__eventChannel__ = getEventChannel(args.__id__);
  2109. delete args.__id__;
  2110. }
  2111. return callHook.call(this, hook, args);
  2112. };
  2113. }
  2114. function initScopedSlotsParams() {
  2115. var center = {};
  2116. var parents = {};
  2117. function currentId(fn) {
  2118. var vueIds = this.$options.propsData.vueId;
  2119. if (vueIds) {
  2120. var vueId = vueIds.split(',')[0];
  2121. fn(vueId);
  2122. }
  2123. }
  2124. _vue.default.prototype.$hasSSP = function (vueId) {
  2125. var slot = center[vueId];
  2126. if (!slot) {
  2127. parents[vueId] = this;
  2128. this.$on('hook:destroyed', function () {
  2129. delete parents[vueId];
  2130. });
  2131. }
  2132. return slot;
  2133. };
  2134. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2135. var slot = center[vueId];
  2136. if (slot) {
  2137. var params = slot[name] || [];
  2138. if (needAll) {
  2139. return params;
  2140. }
  2141. return params[0];
  2142. }
  2143. };
  2144. _vue.default.prototype.$setSSP = function (name, value) {
  2145. var index = 0;
  2146. currentId.call(this, function (vueId) {
  2147. var slot = center[vueId];
  2148. var params = slot[name] = slot[name] || [];
  2149. params.push(value);
  2150. index = params.length - 1;
  2151. });
  2152. return index;
  2153. };
  2154. _vue.default.prototype.$initSSP = function () {
  2155. currentId.call(this, function (vueId) {
  2156. center[vueId] = {};
  2157. });
  2158. };
  2159. _vue.default.prototype.$callSSP = function () {
  2160. currentId.call(this, function (vueId) {
  2161. if (parents[vueId]) {
  2162. parents[vueId].$forceUpdate();
  2163. }
  2164. });
  2165. };
  2166. _vue.default.mixin({
  2167. destroyed: function destroyed() {
  2168. var propsData = this.$options.propsData;
  2169. var vueId = propsData && propsData.vueId;
  2170. if (vueId) {
  2171. delete center[vueId];
  2172. delete parents[vueId];
  2173. }
  2174. }
  2175. });
  2176. }
  2177. function parseBaseApp(vm, _ref4) {
  2178. var mocks = _ref4.mocks,
  2179. initRefs = _ref4.initRefs;
  2180. initEventChannel();
  2181. {
  2182. initScopedSlotsParams();
  2183. }
  2184. if (vm.$options.store) {
  2185. _vue.default.prototype.$store = vm.$options.store;
  2186. }
  2187. uniIdMixin(_vue.default);
  2188. _vue.default.prototype.mpHost = "mp-weixin";
  2189. _vue.default.mixin({
  2190. beforeCreate: function beforeCreate() {
  2191. if (!this.$options.mpType) {
  2192. return;
  2193. }
  2194. this.mpType = this.$options.mpType;
  2195. this.$mp = (0, _defineProperty2.default)({
  2196. data: {}
  2197. }, this.mpType, this.$options.mpInstance);
  2198. this.$scope = this.$options.mpInstance;
  2199. delete this.$options.mpType;
  2200. delete this.$options.mpInstance;
  2201. if (this.mpType === 'page' && typeof getApp === 'function') {
  2202. // hack vue-i18n
  2203. var app = getApp();
  2204. if (app.$vm && app.$vm.$i18n) {
  2205. this._i18n = app.$vm.$i18n;
  2206. }
  2207. }
  2208. if (this.mpType !== 'app') {
  2209. initRefs(this);
  2210. initMocks(this, mocks);
  2211. }
  2212. }
  2213. });
  2214. var appOptions = {
  2215. onLaunch: function onLaunch(args) {
  2216. if (this.$vm) {
  2217. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2218. return;
  2219. }
  2220. {
  2221. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2222. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2223. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2224. }
  2225. }
  2226. this.$vm = vm;
  2227. this.$vm.$mp = {
  2228. app: this
  2229. };
  2230. this.$vm.$scope = this;
  2231. // vm 上也挂载 globalData
  2232. this.$vm.globalData = this.globalData;
  2233. this.$vm._isMounted = true;
  2234. this.$vm.__call_hook('mounted', args);
  2235. this.$vm.__call_hook('onLaunch', args);
  2236. }
  2237. };
  2238. // 兼容旧版本 globalData
  2239. appOptions.globalData = vm.$options.globalData || {};
  2240. // 将 methods 中的方法挂在 getApp() 中
  2241. var methods = vm.$options.methods;
  2242. if (methods) {
  2243. Object.keys(methods).forEach(function (name) {
  2244. appOptions[name] = methods[name];
  2245. });
  2246. }
  2247. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2248. initHooks(appOptions, hooks);
  2249. initUnknownHooks(appOptions, vm.$options);
  2250. return appOptions;
  2251. }
  2252. function parseApp(vm) {
  2253. return parseBaseApp(vm, {
  2254. mocks: mocks,
  2255. initRefs: initRefs
  2256. });
  2257. }
  2258. function createApp(vm) {
  2259. App(parseApp(vm));
  2260. return vm;
  2261. }
  2262. var encodeReserveRE = /[!'()*]/g;
  2263. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2264. return '%' + c.charCodeAt(0).toString(16);
  2265. };
  2266. var commaRE = /%2C/g;
  2267. // fixed encodeURIComponent which is more conformant to RFC3986:
  2268. // - escapes [!'()*]
  2269. // - preserve commas
  2270. var encode = function encode(str) {
  2271. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2272. };
  2273. function stringifyQuery(obj) {
  2274. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2275. var res = obj ? Object.keys(obj).map(function (key) {
  2276. var val = obj[key];
  2277. if (val === undefined) {
  2278. return '';
  2279. }
  2280. if (val === null) {
  2281. return encodeStr(key);
  2282. }
  2283. if (Array.isArray(val)) {
  2284. var result = [];
  2285. val.forEach(function (val2) {
  2286. if (val2 === undefined) {
  2287. return;
  2288. }
  2289. if (val2 === null) {
  2290. result.push(encodeStr(key));
  2291. } else {
  2292. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2293. }
  2294. });
  2295. return result.join('&');
  2296. }
  2297. return encodeStr(key) + '=' + encodeStr(val);
  2298. }).filter(function (x) {
  2299. return x.length > 0;
  2300. }).join('&') : null;
  2301. return res ? "?".concat(res) : '';
  2302. }
  2303. function parseBaseComponent(vueComponentOptions) {
  2304. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2305. isPage = _ref5.isPage,
  2306. initRelation = _ref5.initRelation;
  2307. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2308. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2309. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2310. VueComponent = _initVueComponent2[0],
  2311. vueOptions = _initVueComponent2[1];
  2312. var options = _objectSpread({
  2313. multipleSlots: true,
  2314. // styleIsolation: 'apply-shared',
  2315. addGlobalClass: true
  2316. }, vueOptions.options || {});
  2317. {
  2318. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2319. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2320. Object.assign(options, vueOptions['mp-weixin'].options);
  2321. }
  2322. }
  2323. var componentOptions = {
  2324. options: options,
  2325. data: initData(vueOptions, _vue.default.prototype),
  2326. behaviors: initBehaviors(vueOptions, initBehavior),
  2327. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2328. lifetimes: {
  2329. attached: function attached() {
  2330. var properties = this.properties;
  2331. var options = {
  2332. mpType: isPage.call(this) ? 'page' : 'component',
  2333. mpInstance: this,
  2334. propsData: properties
  2335. };
  2336. initVueIds(properties.vueId, this);
  2337. // 处理父子关系
  2338. initRelation.call(this, {
  2339. vuePid: this._$vuePid,
  2340. vueOptions: options
  2341. });
  2342. // 初始化 vue 实例
  2343. this.$vm = new VueComponent(options);
  2344. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2345. initSlots(this.$vm, properties.vueSlots);
  2346. // 触发首次 setData
  2347. this.$vm.$mount();
  2348. },
  2349. ready: function ready() {
  2350. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2351. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2352. if (this.$vm) {
  2353. this.$vm._isMounted = true;
  2354. this.$vm.__call_hook('mounted');
  2355. this.$vm.__call_hook('onReady');
  2356. }
  2357. },
  2358. detached: function detached() {
  2359. this.$vm && this.$vm.$destroy();
  2360. }
  2361. },
  2362. pageLifetimes: {
  2363. show: function show(args) {
  2364. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2365. },
  2366. hide: function hide() {
  2367. this.$vm && this.$vm.__call_hook('onPageHide');
  2368. },
  2369. resize: function resize(size) {
  2370. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2371. }
  2372. },
  2373. methods: {
  2374. __l: handleLink,
  2375. __e: handleEvent
  2376. }
  2377. };
  2378. // externalClasses
  2379. if (vueOptions.externalClasses) {
  2380. componentOptions.externalClasses = vueOptions.externalClasses;
  2381. }
  2382. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2383. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2384. componentOptions.methods[callMethod] = function (args) {
  2385. return this.$vm[callMethod](args);
  2386. };
  2387. });
  2388. }
  2389. if (needVueOptions) {
  2390. return [componentOptions, vueOptions, VueComponent];
  2391. }
  2392. if (isPage) {
  2393. return componentOptions;
  2394. }
  2395. return [componentOptions, VueComponent];
  2396. }
  2397. function parseComponent(vueComponentOptions, needVueOptions) {
  2398. return parseBaseComponent(vueComponentOptions, {
  2399. isPage: isPage,
  2400. initRelation: initRelation
  2401. }, needVueOptions);
  2402. }
  2403. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2404. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2405. function parseBasePage(vuePageOptions) {
  2406. var _parseComponent = parseComponent(vuePageOptions, true),
  2407. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2408. pageOptions = _parseComponent2[0],
  2409. vueOptions = _parseComponent2[1];
  2410. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2411. pageOptions.methods.onLoad = function (query) {
  2412. this.options = query;
  2413. var copyQuery = Object.assign({}, query);
  2414. delete copyQuery.__id__;
  2415. this.$page = {
  2416. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2417. };
  2418. this.$vm.$mp.query = query; // 兼容 mpvue
  2419. this.$vm.__call_hook('onLoad', query);
  2420. };
  2421. {
  2422. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2423. }
  2424. {
  2425. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2426. }
  2427. return pageOptions;
  2428. }
  2429. function parsePage(vuePageOptions) {
  2430. return parseBasePage(vuePageOptions);
  2431. }
  2432. function createPage(vuePageOptions) {
  2433. {
  2434. return Component(parsePage(vuePageOptions));
  2435. }
  2436. }
  2437. function createComponent(vueOptions) {
  2438. {
  2439. return Component(parseComponent(vueOptions));
  2440. }
  2441. }
  2442. function createSubpackageApp(vm) {
  2443. var appOptions = parseApp(vm);
  2444. var app = getApp({
  2445. allowDefault: true
  2446. });
  2447. vm.$scope = app;
  2448. var globalData = app.globalData;
  2449. if (globalData) {
  2450. Object.keys(appOptions.globalData).forEach(function (name) {
  2451. if (!hasOwn(globalData, name)) {
  2452. globalData[name] = appOptions.globalData[name];
  2453. }
  2454. });
  2455. }
  2456. Object.keys(appOptions).forEach(function (name) {
  2457. if (!hasOwn(app, name)) {
  2458. app[name] = appOptions[name];
  2459. }
  2460. });
  2461. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2462. wx.onAppShow(function () {
  2463. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2464. args[_key5] = arguments[_key5];
  2465. }
  2466. vm.__call_hook('onShow', args);
  2467. });
  2468. }
  2469. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2470. wx.onAppHide(function () {
  2471. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2472. args[_key6] = arguments[_key6];
  2473. }
  2474. vm.__call_hook('onHide', args);
  2475. });
  2476. }
  2477. if (isFn(appOptions.onLaunch)) {
  2478. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2479. vm.__call_hook('onLaunch', args);
  2480. }
  2481. return vm;
  2482. }
  2483. function createPlugin(vm) {
  2484. var appOptions = parseApp(vm);
  2485. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2486. wx.onAppShow(function () {
  2487. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2488. args[_key7] = arguments[_key7];
  2489. }
  2490. vm.__call_hook('onShow', args);
  2491. });
  2492. }
  2493. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2494. wx.onAppHide(function () {
  2495. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2496. args[_key8] = arguments[_key8];
  2497. }
  2498. vm.__call_hook('onHide', args);
  2499. });
  2500. }
  2501. if (isFn(appOptions.onLaunch)) {
  2502. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2503. vm.__call_hook('onLaunch', args);
  2504. }
  2505. return vm;
  2506. }
  2507. todos.forEach(function (todoApi) {
  2508. protocols[todoApi] = false;
  2509. });
  2510. canIUses.forEach(function (canIUseApi) {
  2511. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2512. if (!wx.canIUse(apiName)) {
  2513. protocols[canIUseApi] = false;
  2514. }
  2515. });
  2516. var uni = {};
  2517. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2518. uni = new Proxy({}, {
  2519. get: function get(target, name) {
  2520. if (hasOwn(target, name)) {
  2521. return target[name];
  2522. }
  2523. if (baseApi[name]) {
  2524. return baseApi[name];
  2525. }
  2526. if (api[name]) {
  2527. return promisify(name, api[name]);
  2528. }
  2529. {
  2530. if (extraApi[name]) {
  2531. return promisify(name, extraApi[name]);
  2532. }
  2533. if (todoApis[name]) {
  2534. return promisify(name, todoApis[name]);
  2535. }
  2536. }
  2537. if (eventApi[name]) {
  2538. return eventApi[name];
  2539. }
  2540. return promisify(name, wrapper(name, wx[name]));
  2541. },
  2542. set: function set(target, name, value) {
  2543. target[name] = value;
  2544. return true;
  2545. }
  2546. });
  2547. } else {
  2548. Object.keys(baseApi).forEach(function (name) {
  2549. uni[name] = baseApi[name];
  2550. });
  2551. {
  2552. Object.keys(todoApis).forEach(function (name) {
  2553. uni[name] = promisify(name, todoApis[name]);
  2554. });
  2555. Object.keys(extraApi).forEach(function (name) {
  2556. uni[name] = promisify(name, extraApi[name]);
  2557. });
  2558. }
  2559. Object.keys(eventApi).forEach(function (name) {
  2560. uni[name] = eventApi[name];
  2561. });
  2562. Object.keys(api).forEach(function (name) {
  2563. uni[name] = promisify(name, api[name]);
  2564. });
  2565. Object.keys(wx).forEach(function (name) {
  2566. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2567. uni[name] = promisify(name, wrapper(name, wx[name]));
  2568. }
  2569. });
  2570. }
  2571. wx.createApp = createApp;
  2572. wx.createPage = createPage;
  2573. wx.createComponent = createComponent;
  2574. wx.createSubpackageApp = createSubpackageApp;
  2575. wx.createPlugin = createPlugin;
  2576. var uni$1 = uni;
  2577. var _default = uni$1;
  2578. exports.default = _default;
  2579. /* 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)))
  2580. /***/ }),
  2581. /***/ 20:
  2582. /*!****************************************************************!*\
  2583. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2584. \****************************************************************/
  2585. /*! no static exports found */
  2586. /***/ (function(module, exports) {
  2587. function _iterableToArray(iter) {
  2588. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2589. }
  2590. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /***/ 21:
  2593. /*!******************************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2595. \******************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _nonIterableSpread() {
  2599. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2600. }
  2601. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2602. /***/ }),
  2603. /***/ 22:
  2604. /*!*************************************************************!*\
  2605. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2606. \*************************************************************/
  2607. /*! no static exports found */
  2608. /***/ (function(module, exports, __webpack_require__) {
  2609. "use strict";
  2610. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2611. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2612. Object.defineProperty(exports, "__esModule", {
  2613. value: true
  2614. });
  2615. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2616. exports.compileI18nJsonStr = compileI18nJsonStr;
  2617. exports.hasI18nJson = hasI18nJson;
  2618. exports.initVueI18n = initVueI18n;
  2619. exports.isI18nStr = isI18nStr;
  2620. exports.isString = void 0;
  2621. exports.normalizeLocale = normalizeLocale;
  2622. exports.parseI18nJson = parseI18nJson;
  2623. exports.resolveLocale = resolveLocale;
  2624. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2625. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2626. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2627. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2628. var isObject = function isObject(val) {
  2629. return val !== null && (0, _typeof2.default)(val) === 'object';
  2630. };
  2631. var defaultDelimiters = ['{', '}'];
  2632. var BaseFormatter = /*#__PURE__*/function () {
  2633. function BaseFormatter() {
  2634. (0, _classCallCheck2.default)(this, BaseFormatter);
  2635. this._caches = Object.create(null);
  2636. }
  2637. (0, _createClass2.default)(BaseFormatter, [{
  2638. key: "interpolate",
  2639. value: function interpolate(message, values) {
  2640. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2641. if (!values) {
  2642. return [message];
  2643. }
  2644. var tokens = this._caches[message];
  2645. if (!tokens) {
  2646. tokens = parse(message, delimiters);
  2647. this._caches[message] = tokens;
  2648. }
  2649. return compile(tokens, values);
  2650. }
  2651. }]);
  2652. return BaseFormatter;
  2653. }();
  2654. exports.Formatter = BaseFormatter;
  2655. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2656. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2657. function parse(format, _ref) {
  2658. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2659. startDelimiter = _ref2[0],
  2660. endDelimiter = _ref2[1];
  2661. var tokens = [];
  2662. var position = 0;
  2663. var text = '';
  2664. while (position < format.length) {
  2665. var char = format[position++];
  2666. if (char === startDelimiter) {
  2667. if (text) {
  2668. tokens.push({
  2669. type: 'text',
  2670. value: text
  2671. });
  2672. }
  2673. text = '';
  2674. var sub = '';
  2675. char = format[position++];
  2676. while (char !== undefined && char !== endDelimiter) {
  2677. sub += char;
  2678. char = format[position++];
  2679. }
  2680. var isClosed = char === endDelimiter;
  2681. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2682. tokens.push({
  2683. value: sub,
  2684. type: type
  2685. });
  2686. }
  2687. // else if (char === '%') {
  2688. // // when found rails i18n syntax, skip text capture
  2689. // if (format[position] !== '{') {
  2690. // text += char
  2691. // }
  2692. // }
  2693. else {
  2694. text += char;
  2695. }
  2696. }
  2697. text && tokens.push({
  2698. type: 'text',
  2699. value: text
  2700. });
  2701. return tokens;
  2702. }
  2703. function compile(tokens, values) {
  2704. var compiled = [];
  2705. var index = 0;
  2706. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2707. if (mode === 'unknown') {
  2708. return compiled;
  2709. }
  2710. while (index < tokens.length) {
  2711. var token = tokens[index];
  2712. switch (token.type) {
  2713. case 'text':
  2714. compiled.push(token.value);
  2715. break;
  2716. case 'list':
  2717. compiled.push(values[parseInt(token.value, 10)]);
  2718. break;
  2719. case 'named':
  2720. if (mode === 'named') {
  2721. compiled.push(values[token.value]);
  2722. } else {
  2723. if (true) {
  2724. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2725. }
  2726. }
  2727. break;
  2728. case 'unknown':
  2729. if (true) {
  2730. console.warn("Detect 'unknown' type of token!");
  2731. }
  2732. break;
  2733. }
  2734. index++;
  2735. }
  2736. return compiled;
  2737. }
  2738. var LOCALE_ZH_HANS = 'zh-Hans';
  2739. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2740. var LOCALE_ZH_HANT = 'zh-Hant';
  2741. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2742. var LOCALE_EN = 'en';
  2743. exports.LOCALE_EN = LOCALE_EN;
  2744. var LOCALE_FR = 'fr';
  2745. exports.LOCALE_FR = LOCALE_FR;
  2746. var LOCALE_ES = 'es';
  2747. exports.LOCALE_ES = LOCALE_ES;
  2748. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2749. var hasOwn = function hasOwn(val, key) {
  2750. return hasOwnProperty.call(val, key);
  2751. };
  2752. var defaultFormatter = new BaseFormatter();
  2753. function include(str, parts) {
  2754. return !!parts.find(function (part) {
  2755. return str.indexOf(part) !== -1;
  2756. });
  2757. }
  2758. function startsWith(str, parts) {
  2759. return parts.find(function (part) {
  2760. return str.indexOf(part) === 0;
  2761. });
  2762. }
  2763. function normalizeLocale(locale, messages) {
  2764. if (!locale) {
  2765. return;
  2766. }
  2767. locale = locale.trim().replace(/_/g, '-');
  2768. if (messages && messages[locale]) {
  2769. return locale;
  2770. }
  2771. locale = locale.toLowerCase();
  2772. if (locale === 'chinese') {
  2773. // 支付宝
  2774. return LOCALE_ZH_HANS;
  2775. }
  2776. if (locale.indexOf('zh') === 0) {
  2777. if (locale.indexOf('-hans') > -1) {
  2778. return LOCALE_ZH_HANS;
  2779. }
  2780. if (locale.indexOf('-hant') > -1) {
  2781. return LOCALE_ZH_HANT;
  2782. }
  2783. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2784. return LOCALE_ZH_HANT;
  2785. }
  2786. return LOCALE_ZH_HANS;
  2787. }
  2788. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2789. if (messages && Object.keys(messages).length > 0) {
  2790. locales = Object.keys(messages);
  2791. }
  2792. var lang = startsWith(locale, locales);
  2793. if (lang) {
  2794. return lang;
  2795. }
  2796. }
  2797. var I18n = /*#__PURE__*/function () {
  2798. function I18n(_ref3) {
  2799. var locale = _ref3.locale,
  2800. fallbackLocale = _ref3.fallbackLocale,
  2801. messages = _ref3.messages,
  2802. watcher = _ref3.watcher,
  2803. formater = _ref3.formater;
  2804. (0, _classCallCheck2.default)(this, I18n);
  2805. this.locale = LOCALE_EN;
  2806. this.fallbackLocale = LOCALE_EN;
  2807. this.message = {};
  2808. this.messages = {};
  2809. this.watchers = [];
  2810. if (fallbackLocale) {
  2811. this.fallbackLocale = fallbackLocale;
  2812. }
  2813. this.formater = formater || defaultFormatter;
  2814. this.messages = messages || {};
  2815. this.setLocale(locale || LOCALE_EN);
  2816. if (watcher) {
  2817. this.watchLocale(watcher);
  2818. }
  2819. }
  2820. (0, _createClass2.default)(I18n, [{
  2821. key: "setLocale",
  2822. value: function setLocale(locale) {
  2823. var _this = this;
  2824. var oldLocale = this.locale;
  2825. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2826. if (!this.messages[this.locale]) {
  2827. // 可能初始化时不存在
  2828. this.messages[this.locale] = {};
  2829. }
  2830. this.message = this.messages[this.locale];
  2831. // 仅发生变化时,通知
  2832. if (oldLocale !== this.locale) {
  2833. this.watchers.forEach(function (watcher) {
  2834. watcher(_this.locale, oldLocale);
  2835. });
  2836. }
  2837. }
  2838. }, {
  2839. key: "getLocale",
  2840. value: function getLocale() {
  2841. return this.locale;
  2842. }
  2843. }, {
  2844. key: "watchLocale",
  2845. value: function watchLocale(fn) {
  2846. var _this2 = this;
  2847. var index = this.watchers.push(fn) - 1;
  2848. return function () {
  2849. _this2.watchers.splice(index, 1);
  2850. };
  2851. }
  2852. }, {
  2853. key: "add",
  2854. value: function add(locale, message) {
  2855. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2856. var curMessages = this.messages[locale];
  2857. if (curMessages) {
  2858. if (override) {
  2859. Object.assign(curMessages, message);
  2860. } else {
  2861. Object.keys(message).forEach(function (key) {
  2862. if (!hasOwn(curMessages, key)) {
  2863. curMessages[key] = message[key];
  2864. }
  2865. });
  2866. }
  2867. } else {
  2868. this.messages[locale] = message;
  2869. }
  2870. }
  2871. }, {
  2872. key: "f",
  2873. value: function f(message, values, delimiters) {
  2874. return this.formater.interpolate(message, values, delimiters).join('');
  2875. }
  2876. }, {
  2877. key: "t",
  2878. value: function t(key, locale, values) {
  2879. var message = this.message;
  2880. if (typeof locale === 'string') {
  2881. locale = normalizeLocale(locale, this.messages);
  2882. locale && (message = this.messages[locale]);
  2883. } else {
  2884. values = locale;
  2885. }
  2886. if (!hasOwn(message, key)) {
  2887. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2888. return key;
  2889. }
  2890. return this.formater.interpolate(message[key], values).join('');
  2891. }
  2892. }]);
  2893. return I18n;
  2894. }();
  2895. exports.I18n = I18n;
  2896. function watchAppLocale(appVm, i18n) {
  2897. // 需要保证 watch 的触发在组件渲染之前
  2898. if (appVm.$watchLocale) {
  2899. // vue2
  2900. appVm.$watchLocale(function (newLocale) {
  2901. i18n.setLocale(newLocale);
  2902. });
  2903. } else {
  2904. appVm.$watch(function () {
  2905. return appVm.$locale;
  2906. }, function (newLocale) {
  2907. i18n.setLocale(newLocale);
  2908. });
  2909. }
  2910. }
  2911. function getDefaultLocale() {
  2912. if (typeof uni !== 'undefined' && uni.getLocale) {
  2913. return uni.getLocale();
  2914. }
  2915. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2916. if (typeof global !== 'undefined' && global.getLocale) {
  2917. return global.getLocale();
  2918. }
  2919. return LOCALE_EN;
  2920. }
  2921. function initVueI18n(locale) {
  2922. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2923. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2924. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2925. // 兼容旧版本入参
  2926. if (typeof locale !== 'string') {
  2927. var _ref4 = [messages, locale];
  2928. locale = _ref4[0];
  2929. messages = _ref4[1];
  2930. }
  2931. if (typeof locale !== 'string') {
  2932. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2933. locale = getDefaultLocale();
  2934. }
  2935. if (typeof fallbackLocale !== 'string') {
  2936. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2937. }
  2938. var i18n = new I18n({
  2939. locale: locale,
  2940. fallbackLocale: fallbackLocale,
  2941. messages: messages,
  2942. watcher: watcher
  2943. });
  2944. var _t = function t(key, values) {
  2945. if (typeof getApp !== 'function') {
  2946. // app view
  2947. /* eslint-disable no-func-assign */
  2948. _t = function t(key, values) {
  2949. return i18n.t(key, values);
  2950. };
  2951. } else {
  2952. var isWatchedAppLocale = false;
  2953. _t = function t(key, values) {
  2954. var appVm = getApp().$vm;
  2955. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2956. // options: {
  2957. // type: Array,
  2958. // default () {
  2959. // return [{
  2960. // icon: 'shop',
  2961. // text: t("uni-goods-nav.options.shop"),
  2962. // }, {
  2963. // icon: 'cart',
  2964. // text: t("uni-goods-nav.options.cart")
  2965. // }]
  2966. // }
  2967. // },
  2968. if (appVm) {
  2969. // 触发响应式
  2970. appVm.$locale;
  2971. if (!isWatchedAppLocale) {
  2972. isWatchedAppLocale = true;
  2973. watchAppLocale(appVm, i18n);
  2974. }
  2975. }
  2976. return i18n.t(key, values);
  2977. };
  2978. }
  2979. return _t(key, values);
  2980. };
  2981. return {
  2982. i18n: i18n,
  2983. f: function f(message, values, delimiters) {
  2984. return i18n.f(message, values, delimiters);
  2985. },
  2986. t: function t(key, values) {
  2987. return _t(key, values);
  2988. },
  2989. add: function add(locale, message) {
  2990. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2991. return i18n.add(locale, message, override);
  2992. },
  2993. watch: function watch(fn) {
  2994. return i18n.watchLocale(fn);
  2995. },
  2996. getLocale: function getLocale() {
  2997. return i18n.getLocale();
  2998. },
  2999. setLocale: function setLocale(newLocale) {
  3000. return i18n.setLocale(newLocale);
  3001. }
  3002. };
  3003. }
  3004. var isString = function isString(val) {
  3005. return typeof val === 'string';
  3006. };
  3007. exports.isString = isString;
  3008. var formater;
  3009. function hasI18nJson(jsonObj, delimiters) {
  3010. if (!formater) {
  3011. formater = new BaseFormatter();
  3012. }
  3013. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3014. var value = jsonObj[key];
  3015. if (isString(value)) {
  3016. if (isI18nStr(value, delimiters)) {
  3017. return true;
  3018. }
  3019. } else {
  3020. return hasI18nJson(value, delimiters);
  3021. }
  3022. });
  3023. }
  3024. function parseI18nJson(jsonObj, values, delimiters) {
  3025. if (!formater) {
  3026. formater = new BaseFormatter();
  3027. }
  3028. walkJsonObj(jsonObj, function (jsonObj, key) {
  3029. var value = jsonObj[key];
  3030. if (isString(value)) {
  3031. if (isI18nStr(value, delimiters)) {
  3032. jsonObj[key] = compileStr(value, values, delimiters);
  3033. }
  3034. } else {
  3035. parseI18nJson(value, values, delimiters);
  3036. }
  3037. });
  3038. return jsonObj;
  3039. }
  3040. function compileI18nJsonStr(jsonStr, _ref5) {
  3041. var locale = _ref5.locale,
  3042. locales = _ref5.locales,
  3043. delimiters = _ref5.delimiters;
  3044. if (!isI18nStr(jsonStr, delimiters)) {
  3045. return jsonStr;
  3046. }
  3047. if (!formater) {
  3048. formater = new BaseFormatter();
  3049. }
  3050. var localeValues = [];
  3051. Object.keys(locales).forEach(function (name) {
  3052. if (name !== locale) {
  3053. localeValues.push({
  3054. locale: name,
  3055. values: locales[name]
  3056. });
  3057. }
  3058. });
  3059. localeValues.unshift({
  3060. locale: locale,
  3061. values: locales[locale]
  3062. });
  3063. try {
  3064. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3065. } catch (e) {}
  3066. return jsonStr;
  3067. }
  3068. function isI18nStr(value, delimiters) {
  3069. return value.indexOf(delimiters[0]) > -1;
  3070. }
  3071. function compileStr(value, values, delimiters) {
  3072. return formater.interpolate(value, values, delimiters).join('');
  3073. }
  3074. function compileValue(jsonObj, key, localeValues, delimiters) {
  3075. var value = jsonObj[key];
  3076. if (isString(value)) {
  3077. // 存在国际化
  3078. if (isI18nStr(value, delimiters)) {
  3079. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3080. if (localeValues.length > 1) {
  3081. // 格式化国际化语言
  3082. var valueLocales = jsonObj[key + 'Locales'] = {};
  3083. localeValues.forEach(function (localValue) {
  3084. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3085. });
  3086. }
  3087. }
  3088. } else {
  3089. compileJsonObj(value, localeValues, delimiters);
  3090. }
  3091. }
  3092. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3093. walkJsonObj(jsonObj, function (jsonObj, key) {
  3094. compileValue(jsonObj, key, localeValues, delimiters);
  3095. });
  3096. return jsonObj;
  3097. }
  3098. function walkJsonObj(jsonObj, walk) {
  3099. if (Array.isArray(jsonObj)) {
  3100. for (var i = 0; i < jsonObj.length; i++) {
  3101. if (walk(jsonObj, i)) {
  3102. return true;
  3103. }
  3104. }
  3105. } else if (isObject(jsonObj)) {
  3106. for (var key in jsonObj) {
  3107. if (walk(jsonObj, key)) {
  3108. return true;
  3109. }
  3110. }
  3111. }
  3112. return false;
  3113. }
  3114. function resolveLocale(locales) {
  3115. return function (locale) {
  3116. if (!locale) {
  3117. return locale;
  3118. }
  3119. locale = normalizeLocale(locale) || locale;
  3120. return resolveLocaleChain(locale).find(function (locale) {
  3121. return locales.indexOf(locale) > -1;
  3122. });
  3123. };
  3124. }
  3125. function resolveLocaleChain(locale) {
  3126. var chain = [];
  3127. var tokens = locale.split('-');
  3128. while (tokens.length) {
  3129. chain.push(tokens.join('-'));
  3130. tokens.pop();
  3131. }
  3132. return chain;
  3133. }
  3134. /* 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)))
  3135. /***/ }),
  3136. /***/ 23:
  3137. /*!***************************************************************!*\
  3138. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3139. \***************************************************************/
  3140. /*! no static exports found */
  3141. /***/ (function(module, exports) {
  3142. function _classCallCheck(instance, Constructor) {
  3143. if (!(instance instanceof Constructor)) {
  3144. throw new TypeError("Cannot call a class as a function");
  3145. }
  3146. }
  3147. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3148. /***/ }),
  3149. /***/ 24:
  3150. /*!************************************************************!*\
  3151. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3152. \************************************************************/
  3153. /*! no static exports found */
  3154. /***/ (function(module, exports, __webpack_require__) {
  3155. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3156. function _defineProperties(target, props) {
  3157. for (var i = 0; i < props.length; i++) {
  3158. var descriptor = props[i];
  3159. descriptor.enumerable = descriptor.enumerable || false;
  3160. descriptor.configurable = true;
  3161. if ("value" in descriptor) descriptor.writable = true;
  3162. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3163. }
  3164. }
  3165. function _createClass(Constructor, protoProps, staticProps) {
  3166. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3167. if (staticProps) _defineProperties(Constructor, staticProps);
  3168. Object.defineProperty(Constructor, "prototype", {
  3169. writable: false
  3170. });
  3171. return Constructor;
  3172. }
  3173. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3174. /***/ }),
  3175. /***/ 25:
  3176. /*!******************************************************************************************!*\
  3177. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3178. \******************************************************************************************/
  3179. /*! exports provided: default */
  3180. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3181. "use strict";
  3182. __webpack_require__.r(__webpack_exports__);
  3183. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3184. * Vue.js v2.6.11
  3185. * (c) 2014-2023 Evan You
  3186. * Released under the MIT License.
  3187. */
  3188. /* */
  3189. var emptyObject = Object.freeze({});
  3190. // These helpers produce better VM code in JS engines due to their
  3191. // explicitness and function inlining.
  3192. function isUndef (v) {
  3193. return v === undefined || v === null
  3194. }
  3195. function isDef (v) {
  3196. return v !== undefined && v !== null
  3197. }
  3198. function isTrue (v) {
  3199. return v === true
  3200. }
  3201. function isFalse (v) {
  3202. return v === false
  3203. }
  3204. /**
  3205. * Check if value is primitive.
  3206. */
  3207. function isPrimitive (value) {
  3208. return (
  3209. typeof value === 'string' ||
  3210. typeof value === 'number' ||
  3211. // $flow-disable-line
  3212. typeof value === 'symbol' ||
  3213. typeof value === 'boolean'
  3214. )
  3215. }
  3216. /**
  3217. * Quick object check - this is primarily used to tell
  3218. * Objects from primitive values when we know the value
  3219. * is a JSON-compliant type.
  3220. */
  3221. function isObject (obj) {
  3222. return obj !== null && typeof obj === 'object'
  3223. }
  3224. /**
  3225. * Get the raw type string of a value, e.g., [object Object].
  3226. */
  3227. var _toString = Object.prototype.toString;
  3228. function toRawType (value) {
  3229. return _toString.call(value).slice(8, -1)
  3230. }
  3231. /**
  3232. * Strict object type check. Only returns true
  3233. * for plain JavaScript objects.
  3234. */
  3235. function isPlainObject (obj) {
  3236. return _toString.call(obj) === '[object Object]'
  3237. }
  3238. function isRegExp (v) {
  3239. return _toString.call(v) === '[object RegExp]'
  3240. }
  3241. /**
  3242. * Check if val is a valid array index.
  3243. */
  3244. function isValidArrayIndex (val) {
  3245. var n = parseFloat(String(val));
  3246. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3247. }
  3248. function isPromise (val) {
  3249. return (
  3250. isDef(val) &&
  3251. typeof val.then === 'function' &&
  3252. typeof val.catch === 'function'
  3253. )
  3254. }
  3255. /**
  3256. * Convert a value to a string that is actually rendered.
  3257. */
  3258. function toString (val) {
  3259. return val == null
  3260. ? ''
  3261. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3262. ? JSON.stringify(val, null, 2)
  3263. : String(val)
  3264. }
  3265. /**
  3266. * Convert an input value to a number for persistence.
  3267. * If the conversion fails, return original string.
  3268. */
  3269. function toNumber (val) {
  3270. var n = parseFloat(val);
  3271. return isNaN(n) ? val : n
  3272. }
  3273. /**
  3274. * Make a map and return a function for checking if a key
  3275. * is in that map.
  3276. */
  3277. function makeMap (
  3278. str,
  3279. expectsLowerCase
  3280. ) {
  3281. var map = Object.create(null);
  3282. var list = str.split(',');
  3283. for (var i = 0; i < list.length; i++) {
  3284. map[list[i]] = true;
  3285. }
  3286. return expectsLowerCase
  3287. ? function (val) { return map[val.toLowerCase()]; }
  3288. : function (val) { return map[val]; }
  3289. }
  3290. /**
  3291. * Check if a tag is a built-in tag.
  3292. */
  3293. var isBuiltInTag = makeMap('slot,component', true);
  3294. /**
  3295. * Check if an attribute is a reserved attribute.
  3296. */
  3297. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3298. /**
  3299. * Remove an item from an array.
  3300. */
  3301. function remove (arr, item) {
  3302. if (arr.length) {
  3303. var index = arr.indexOf(item);
  3304. if (index > -1) {
  3305. return arr.splice(index, 1)
  3306. }
  3307. }
  3308. }
  3309. /**
  3310. * Check whether an object has the property.
  3311. */
  3312. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3313. function hasOwn (obj, key) {
  3314. return hasOwnProperty.call(obj, key)
  3315. }
  3316. /**
  3317. * Create a cached version of a pure function.
  3318. */
  3319. function cached (fn) {
  3320. var cache = Object.create(null);
  3321. return (function cachedFn (str) {
  3322. var hit = cache[str];
  3323. return hit || (cache[str] = fn(str))
  3324. })
  3325. }
  3326. /**
  3327. * Camelize a hyphen-delimited string.
  3328. */
  3329. var camelizeRE = /-(\w)/g;
  3330. var camelize = cached(function (str) {
  3331. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3332. });
  3333. /**
  3334. * Capitalize a string.
  3335. */
  3336. var capitalize = cached(function (str) {
  3337. return str.charAt(0).toUpperCase() + str.slice(1)
  3338. });
  3339. /**
  3340. * Hyphenate a camelCase string.
  3341. */
  3342. var hyphenateRE = /\B([A-Z])/g;
  3343. var hyphenate = cached(function (str) {
  3344. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3345. });
  3346. /**
  3347. * Simple bind polyfill for environments that do not support it,
  3348. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3349. * since native bind is now performant enough in most browsers.
  3350. * But removing it would mean breaking code that was able to run in
  3351. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3352. */
  3353. /* istanbul ignore next */
  3354. function polyfillBind (fn, ctx) {
  3355. function boundFn (a) {
  3356. var l = arguments.length;
  3357. return l
  3358. ? l > 1
  3359. ? fn.apply(ctx, arguments)
  3360. : fn.call(ctx, a)
  3361. : fn.call(ctx)
  3362. }
  3363. boundFn._length = fn.length;
  3364. return boundFn
  3365. }
  3366. function nativeBind (fn, ctx) {
  3367. return fn.bind(ctx)
  3368. }
  3369. var bind = Function.prototype.bind
  3370. ? nativeBind
  3371. : polyfillBind;
  3372. /**
  3373. * Convert an Array-like object to a real Array.
  3374. */
  3375. function toArray (list, start) {
  3376. start = start || 0;
  3377. var i = list.length - start;
  3378. var ret = new Array(i);
  3379. while (i--) {
  3380. ret[i] = list[i + start];
  3381. }
  3382. return ret
  3383. }
  3384. /**
  3385. * Mix properties into target object.
  3386. */
  3387. function extend (to, _from) {
  3388. for (var key in _from) {
  3389. to[key] = _from[key];
  3390. }
  3391. return to
  3392. }
  3393. /**
  3394. * Merge an Array of Objects into a single Object.
  3395. */
  3396. function toObject (arr) {
  3397. var res = {};
  3398. for (var i = 0; i < arr.length; i++) {
  3399. if (arr[i]) {
  3400. extend(res, arr[i]);
  3401. }
  3402. }
  3403. return res
  3404. }
  3405. /* eslint-disable no-unused-vars */
  3406. /**
  3407. * Perform no operation.
  3408. * Stubbing args to make Flow happy without leaving useless transpiled code
  3409. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3410. */
  3411. function noop (a, b, c) {}
  3412. /**
  3413. * Always return false.
  3414. */
  3415. var no = function (a, b, c) { return false; };
  3416. /* eslint-enable no-unused-vars */
  3417. /**
  3418. * Return the same value.
  3419. */
  3420. var identity = function (_) { return _; };
  3421. /**
  3422. * Check if two values are loosely equal - that is,
  3423. * if they are plain objects, do they have the same shape?
  3424. */
  3425. function looseEqual (a, b) {
  3426. if (a === b) { return true }
  3427. var isObjectA = isObject(a);
  3428. var isObjectB = isObject(b);
  3429. if (isObjectA && isObjectB) {
  3430. try {
  3431. var isArrayA = Array.isArray(a);
  3432. var isArrayB = Array.isArray(b);
  3433. if (isArrayA && isArrayB) {
  3434. return a.length === b.length && a.every(function (e, i) {
  3435. return looseEqual(e, b[i])
  3436. })
  3437. } else if (a instanceof Date && b instanceof Date) {
  3438. return a.getTime() === b.getTime()
  3439. } else if (!isArrayA && !isArrayB) {
  3440. var keysA = Object.keys(a);
  3441. var keysB = Object.keys(b);
  3442. return keysA.length === keysB.length && keysA.every(function (key) {
  3443. return looseEqual(a[key], b[key])
  3444. })
  3445. } else {
  3446. /* istanbul ignore next */
  3447. return false
  3448. }
  3449. } catch (e) {
  3450. /* istanbul ignore next */
  3451. return false
  3452. }
  3453. } else if (!isObjectA && !isObjectB) {
  3454. return String(a) === String(b)
  3455. } else {
  3456. return false
  3457. }
  3458. }
  3459. /**
  3460. * Return the first index at which a loosely equal value can be
  3461. * found in the array (if value is a plain object, the array must
  3462. * contain an object of the same shape), or -1 if it is not present.
  3463. */
  3464. function looseIndexOf (arr, val) {
  3465. for (var i = 0; i < arr.length; i++) {
  3466. if (looseEqual(arr[i], val)) { return i }
  3467. }
  3468. return -1
  3469. }
  3470. /**
  3471. * Ensure a function is called only once.
  3472. */
  3473. function once (fn) {
  3474. var called = false;
  3475. return function () {
  3476. if (!called) {
  3477. called = true;
  3478. fn.apply(this, arguments);
  3479. }
  3480. }
  3481. }
  3482. var ASSET_TYPES = [
  3483. 'component',
  3484. 'directive',
  3485. 'filter'
  3486. ];
  3487. var LIFECYCLE_HOOKS = [
  3488. 'beforeCreate',
  3489. 'created',
  3490. 'beforeMount',
  3491. 'mounted',
  3492. 'beforeUpdate',
  3493. 'updated',
  3494. 'beforeDestroy',
  3495. 'destroyed',
  3496. 'activated',
  3497. 'deactivated',
  3498. 'errorCaptured',
  3499. 'serverPrefetch'
  3500. ];
  3501. /* */
  3502. var config = ({
  3503. /**
  3504. * Option merge strategies (used in core/util/options)
  3505. */
  3506. // $flow-disable-line
  3507. optionMergeStrategies: Object.create(null),
  3508. /**
  3509. * Whether to suppress warnings.
  3510. */
  3511. silent: false,
  3512. /**
  3513. * Show production mode tip message on boot?
  3514. */
  3515. productionTip: "development" !== 'production',
  3516. /**
  3517. * Whether to enable devtools
  3518. */
  3519. devtools: "development" !== 'production',
  3520. /**
  3521. * Whether to record perf
  3522. */
  3523. performance: false,
  3524. /**
  3525. * Error handler for watcher errors
  3526. */
  3527. errorHandler: null,
  3528. /**
  3529. * Warn handler for watcher warns
  3530. */
  3531. warnHandler: null,
  3532. /**
  3533. * Ignore certain custom elements
  3534. */
  3535. ignoredElements: [],
  3536. /**
  3537. * Custom user key aliases for v-on
  3538. */
  3539. // $flow-disable-line
  3540. keyCodes: Object.create(null),
  3541. /**
  3542. * Check if a tag is reserved so that it cannot be registered as a
  3543. * component. This is platform-dependent and may be overwritten.
  3544. */
  3545. isReservedTag: no,
  3546. /**
  3547. * Check if an attribute is reserved so that it cannot be used as a component
  3548. * prop. This is platform-dependent and may be overwritten.
  3549. */
  3550. isReservedAttr: no,
  3551. /**
  3552. * Check if a tag is an unknown element.
  3553. * Platform-dependent.
  3554. */
  3555. isUnknownElement: no,
  3556. /**
  3557. * Get the namespace of an element
  3558. */
  3559. getTagNamespace: noop,
  3560. /**
  3561. * Parse the real tag name for the specific platform.
  3562. */
  3563. parsePlatformTagName: identity,
  3564. /**
  3565. * Check if an attribute must be bound using property, e.g. value
  3566. * Platform-dependent.
  3567. */
  3568. mustUseProp: no,
  3569. /**
  3570. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3571. * This will significantly reduce performance if set to false.
  3572. */
  3573. async: true,
  3574. /**
  3575. * Exposed for legacy reasons
  3576. */
  3577. _lifecycleHooks: LIFECYCLE_HOOKS
  3578. });
  3579. /* */
  3580. /**
  3581. * unicode letters used for parsing html tags, component names and property paths.
  3582. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3583. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3584. */
  3585. 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/;
  3586. /**
  3587. * Check if a string starts with $ or _
  3588. */
  3589. function isReserved (str) {
  3590. var c = (str + '').charCodeAt(0);
  3591. return c === 0x24 || c === 0x5F
  3592. }
  3593. /**
  3594. * Define a property.
  3595. */
  3596. function def (obj, key, val, enumerable) {
  3597. Object.defineProperty(obj, key, {
  3598. value: val,
  3599. enumerable: !!enumerable,
  3600. writable: true,
  3601. configurable: true
  3602. });
  3603. }
  3604. /**
  3605. * Parse simple path.
  3606. */
  3607. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3608. function parsePath (path) {
  3609. if (bailRE.test(path)) {
  3610. return
  3611. }
  3612. var segments = path.split('.');
  3613. return function (obj) {
  3614. for (var i = 0; i < segments.length; i++) {
  3615. if (!obj) { return }
  3616. obj = obj[segments[i]];
  3617. }
  3618. return obj
  3619. }
  3620. }
  3621. /* */
  3622. // can we use __proto__?
  3623. var hasProto = '__proto__' in {};
  3624. // Browser environment sniffing
  3625. var inBrowser = typeof window !== 'undefined';
  3626. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3627. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3628. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3629. var isIE = UA && /msie|trident/.test(UA);
  3630. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3631. var isEdge = UA && UA.indexOf('edge/') > 0;
  3632. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3633. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3634. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3635. var isPhantomJS = UA && /phantomjs/.test(UA);
  3636. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3637. // Firefox has a "watch" function on Object.prototype...
  3638. var nativeWatch = ({}).watch;
  3639. if (inBrowser) {
  3640. try {
  3641. var opts = {};
  3642. Object.defineProperty(opts, 'passive', ({
  3643. get: function get () {
  3644. }
  3645. })); // https://github.com/facebook/flow/issues/285
  3646. window.addEventListener('test-passive', null, opts);
  3647. } catch (e) {}
  3648. }
  3649. // this needs to be lazy-evaled because vue may be required before
  3650. // vue-server-renderer can set VUE_ENV
  3651. var _isServer;
  3652. var isServerRendering = function () {
  3653. if (_isServer === undefined) {
  3654. /* istanbul ignore if */
  3655. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3656. // detect presence of vue-server-renderer and avoid
  3657. // Webpack shimming the process
  3658. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3659. } else {
  3660. _isServer = false;
  3661. }
  3662. }
  3663. return _isServer
  3664. };
  3665. // detect devtools
  3666. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3667. /* istanbul ignore next */
  3668. function isNative (Ctor) {
  3669. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3670. }
  3671. var hasSymbol =
  3672. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3673. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3674. var _Set;
  3675. /* istanbul ignore if */ // $flow-disable-line
  3676. if (typeof Set !== 'undefined' && isNative(Set)) {
  3677. // use native Set when available.
  3678. _Set = Set;
  3679. } else {
  3680. // a non-standard Set polyfill that only works with primitive keys.
  3681. _Set = /*@__PURE__*/(function () {
  3682. function Set () {
  3683. this.set = Object.create(null);
  3684. }
  3685. Set.prototype.has = function has (key) {
  3686. return this.set[key] === true
  3687. };
  3688. Set.prototype.add = function add (key) {
  3689. this.set[key] = true;
  3690. };
  3691. Set.prototype.clear = function clear () {
  3692. this.set = Object.create(null);
  3693. };
  3694. return Set;
  3695. }());
  3696. }
  3697. /* */
  3698. var warn = noop;
  3699. var tip = noop;
  3700. var generateComponentTrace = (noop); // work around flow check
  3701. var formatComponentName = (noop);
  3702. if (true) {
  3703. var hasConsole = typeof console !== 'undefined';
  3704. var classifyRE = /(?:^|[-_])(\w)/g;
  3705. var classify = function (str) { return str
  3706. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3707. .replace(/[-_]/g, ''); };
  3708. warn = function (msg, vm) {
  3709. var trace = vm ? generateComponentTrace(vm) : '';
  3710. if (config.warnHandler) {
  3711. config.warnHandler.call(null, msg, vm, trace);
  3712. } else if (hasConsole && (!config.silent)) {
  3713. console.error(("[Vue warn]: " + msg + trace));
  3714. }
  3715. };
  3716. tip = function (msg, vm) {
  3717. if (hasConsole && (!config.silent)) {
  3718. console.warn("[Vue tip]: " + msg + (
  3719. vm ? generateComponentTrace(vm) : ''
  3720. ));
  3721. }
  3722. };
  3723. formatComponentName = function (vm, includeFile) {
  3724. if (vm.$root === vm) {
  3725. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3726. return ('') + vm.$options.__file
  3727. }
  3728. return '<Root>'
  3729. }
  3730. var options = typeof vm === 'function' && vm.cid != null
  3731. ? vm.options
  3732. : vm._isVue
  3733. ? vm.$options || vm.constructor.options
  3734. : vm;
  3735. var name = options.name || options._componentTag;
  3736. var file = options.__file;
  3737. if (!name && file) {
  3738. var match = file.match(/([^/\\]+)\.vue$/);
  3739. name = match && match[1];
  3740. }
  3741. return (
  3742. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3743. (file && includeFile !== false ? (" at " + file) : '')
  3744. )
  3745. };
  3746. var repeat = function (str, n) {
  3747. var res = '';
  3748. while (n) {
  3749. if (n % 2 === 1) { res += str; }
  3750. if (n > 1) { str += str; }
  3751. n >>= 1;
  3752. }
  3753. return res
  3754. };
  3755. generateComponentTrace = function (vm) {
  3756. if (vm._isVue && vm.$parent) {
  3757. var tree = [];
  3758. var currentRecursiveSequence = 0;
  3759. while (vm && vm.$options.name !== 'PageBody') {
  3760. if (tree.length > 0) {
  3761. var last = tree[tree.length - 1];
  3762. if (last.constructor === vm.constructor) {
  3763. currentRecursiveSequence++;
  3764. vm = vm.$parent;
  3765. continue
  3766. } else if (currentRecursiveSequence > 0) {
  3767. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3768. currentRecursiveSequence = 0;
  3769. }
  3770. }
  3771. !vm.$options.isReserved && tree.push(vm);
  3772. vm = vm.$parent;
  3773. }
  3774. return '\n\nfound in\n\n' + tree
  3775. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3776. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3777. : formatComponentName(vm))); })
  3778. .join('\n')
  3779. } else {
  3780. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3781. }
  3782. };
  3783. }
  3784. /* */
  3785. var uid = 0;
  3786. /**
  3787. * A dep is an observable that can have multiple
  3788. * directives subscribing to it.
  3789. */
  3790. var Dep = function Dep () {
  3791. this.id = uid++;
  3792. this.subs = [];
  3793. };
  3794. Dep.prototype.addSub = function addSub (sub) {
  3795. this.subs.push(sub);
  3796. };
  3797. Dep.prototype.removeSub = function removeSub (sub) {
  3798. remove(this.subs, sub);
  3799. };
  3800. Dep.prototype.depend = function depend () {
  3801. if (Dep.SharedObject.target) {
  3802. Dep.SharedObject.target.addDep(this);
  3803. }
  3804. };
  3805. Dep.prototype.notify = function notify () {
  3806. // stabilize the subscriber list first
  3807. var subs = this.subs.slice();
  3808. if ( true && !config.async) {
  3809. // subs aren't sorted in scheduler if not running async
  3810. // we need to sort them now to make sure they fire in correct
  3811. // order
  3812. subs.sort(function (a, b) { return a.id - b.id; });
  3813. }
  3814. for (var i = 0, l = subs.length; i < l; i++) {
  3815. subs[i].update();
  3816. }
  3817. };
  3818. // The current target watcher being evaluated.
  3819. // This is globally unique because only one watcher
  3820. // can be evaluated at a time.
  3821. // fixed by xxxxxx (nvue shared vuex)
  3822. /* eslint-disable no-undef */
  3823. Dep.SharedObject = {};
  3824. Dep.SharedObject.target = null;
  3825. Dep.SharedObject.targetStack = [];
  3826. function pushTarget (target) {
  3827. Dep.SharedObject.targetStack.push(target);
  3828. Dep.SharedObject.target = target;
  3829. Dep.target = target;
  3830. }
  3831. function popTarget () {
  3832. Dep.SharedObject.targetStack.pop();
  3833. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3834. Dep.target = Dep.SharedObject.target;
  3835. }
  3836. /* */
  3837. var VNode = function VNode (
  3838. tag,
  3839. data,
  3840. children,
  3841. text,
  3842. elm,
  3843. context,
  3844. componentOptions,
  3845. asyncFactory
  3846. ) {
  3847. this.tag = tag;
  3848. this.data = data;
  3849. this.children = children;
  3850. this.text = text;
  3851. this.elm = elm;
  3852. this.ns = undefined;
  3853. this.context = context;
  3854. this.fnContext = undefined;
  3855. this.fnOptions = undefined;
  3856. this.fnScopeId = undefined;
  3857. this.key = data && data.key;
  3858. this.componentOptions = componentOptions;
  3859. this.componentInstance = undefined;
  3860. this.parent = undefined;
  3861. this.raw = false;
  3862. this.isStatic = false;
  3863. this.isRootInsert = true;
  3864. this.isComment = false;
  3865. this.isCloned = false;
  3866. this.isOnce = false;
  3867. this.asyncFactory = asyncFactory;
  3868. this.asyncMeta = undefined;
  3869. this.isAsyncPlaceholder = false;
  3870. };
  3871. var prototypeAccessors = { child: { configurable: true } };
  3872. // DEPRECATED: alias for componentInstance for backwards compat.
  3873. /* istanbul ignore next */
  3874. prototypeAccessors.child.get = function () {
  3875. return this.componentInstance
  3876. };
  3877. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3878. var createEmptyVNode = function (text) {
  3879. if ( text === void 0 ) text = '';
  3880. var node = new VNode();
  3881. node.text = text;
  3882. node.isComment = true;
  3883. return node
  3884. };
  3885. function createTextVNode (val) {
  3886. return new VNode(undefined, undefined, undefined, String(val))
  3887. }
  3888. // optimized shallow clone
  3889. // used for static nodes and slot nodes because they may be reused across
  3890. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3891. // on their elm reference.
  3892. function cloneVNode (vnode) {
  3893. var cloned = new VNode(
  3894. vnode.tag,
  3895. vnode.data,
  3896. // #7975
  3897. // clone children array to avoid mutating original in case of cloning
  3898. // a child.
  3899. vnode.children && vnode.children.slice(),
  3900. vnode.text,
  3901. vnode.elm,
  3902. vnode.context,
  3903. vnode.componentOptions,
  3904. vnode.asyncFactory
  3905. );
  3906. cloned.ns = vnode.ns;
  3907. cloned.isStatic = vnode.isStatic;
  3908. cloned.key = vnode.key;
  3909. cloned.isComment = vnode.isComment;
  3910. cloned.fnContext = vnode.fnContext;
  3911. cloned.fnOptions = vnode.fnOptions;
  3912. cloned.fnScopeId = vnode.fnScopeId;
  3913. cloned.asyncMeta = vnode.asyncMeta;
  3914. cloned.isCloned = true;
  3915. return cloned
  3916. }
  3917. /*
  3918. * not type checking this file because flow doesn't play well with
  3919. * dynamically accessing methods on Array prototype
  3920. */
  3921. var arrayProto = Array.prototype;
  3922. var arrayMethods = Object.create(arrayProto);
  3923. var methodsToPatch = [
  3924. 'push',
  3925. 'pop',
  3926. 'shift',
  3927. 'unshift',
  3928. 'splice',
  3929. 'sort',
  3930. 'reverse'
  3931. ];
  3932. /**
  3933. * Intercept mutating methods and emit events
  3934. */
  3935. methodsToPatch.forEach(function (method) {
  3936. // cache original method
  3937. var original = arrayProto[method];
  3938. def(arrayMethods, method, function mutator () {
  3939. var args = [], len = arguments.length;
  3940. while ( len-- ) args[ len ] = arguments[ len ];
  3941. var result = original.apply(this, args);
  3942. var ob = this.__ob__;
  3943. var inserted;
  3944. switch (method) {
  3945. case 'push':
  3946. case 'unshift':
  3947. inserted = args;
  3948. break
  3949. case 'splice':
  3950. inserted = args.slice(2);
  3951. break
  3952. }
  3953. if (inserted) { ob.observeArray(inserted); }
  3954. // notify change
  3955. ob.dep.notify();
  3956. return result
  3957. });
  3958. });
  3959. /* */
  3960. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3961. /**
  3962. * In some cases we may want to disable observation inside a component's
  3963. * update computation.
  3964. */
  3965. var shouldObserve = true;
  3966. function toggleObserving (value) {
  3967. shouldObserve = value;
  3968. }
  3969. /**
  3970. * Observer class that is attached to each observed
  3971. * object. Once attached, the observer converts the target
  3972. * object's property keys into getter/setters that
  3973. * collect dependencies and dispatch updates.
  3974. */
  3975. var Observer = function Observer (value) {
  3976. this.value = value;
  3977. this.dep = new Dep();
  3978. this.vmCount = 0;
  3979. def(value, '__ob__', this);
  3980. if (Array.isArray(value)) {
  3981. if (hasProto) {
  3982. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3983. if(value.push !== value.__proto__.push){
  3984. copyAugment(value, arrayMethods, arrayKeys);
  3985. } else {
  3986. protoAugment(value, arrayMethods);
  3987. }
  3988. }
  3989. } else {
  3990. copyAugment(value, arrayMethods, arrayKeys);
  3991. }
  3992. this.observeArray(value);
  3993. } else {
  3994. this.walk(value);
  3995. }
  3996. };
  3997. /**
  3998. * Walk through all properties and convert them into
  3999. * getter/setters. This method should only be called when
  4000. * value type is Object.
  4001. */
  4002. Observer.prototype.walk = function walk (obj) {
  4003. var keys = Object.keys(obj);
  4004. for (var i = 0; i < keys.length; i++) {
  4005. defineReactive$$1(obj, keys[i]);
  4006. }
  4007. };
  4008. /**
  4009. * Observe a list of Array items.
  4010. */
  4011. Observer.prototype.observeArray = function observeArray (items) {
  4012. for (var i = 0, l = items.length; i < l; i++) {
  4013. observe(items[i]);
  4014. }
  4015. };
  4016. // helpers
  4017. /**
  4018. * Augment a target Object or Array by intercepting
  4019. * the prototype chain using __proto__
  4020. */
  4021. function protoAugment (target, src) {
  4022. /* eslint-disable no-proto */
  4023. target.__proto__ = src;
  4024. /* eslint-enable no-proto */
  4025. }
  4026. /**
  4027. * Augment a target Object or Array by defining
  4028. * hidden properties.
  4029. */
  4030. /* istanbul ignore next */
  4031. function copyAugment (target, src, keys) {
  4032. for (var i = 0, l = keys.length; i < l; i++) {
  4033. var key = keys[i];
  4034. def(target, key, src[key]);
  4035. }
  4036. }
  4037. /**
  4038. * Attempt to create an observer instance for a value,
  4039. * returns the new observer if successfully observed,
  4040. * or the existing observer if the value already has one.
  4041. */
  4042. function observe (value, asRootData) {
  4043. if (!isObject(value) || value instanceof VNode) {
  4044. return
  4045. }
  4046. var ob;
  4047. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4048. ob = value.__ob__;
  4049. } else if (
  4050. shouldObserve &&
  4051. !isServerRendering() &&
  4052. (Array.isArray(value) || isPlainObject(value)) &&
  4053. Object.isExtensible(value) &&
  4054. !value._isVue &&
  4055. !value.__v_isMPComponent
  4056. ) {
  4057. ob = new Observer(value);
  4058. }
  4059. if (asRootData && ob) {
  4060. ob.vmCount++;
  4061. }
  4062. return ob
  4063. }
  4064. /**
  4065. * Define a reactive property on an Object.
  4066. */
  4067. function defineReactive$$1 (
  4068. obj,
  4069. key,
  4070. val,
  4071. customSetter,
  4072. shallow
  4073. ) {
  4074. var dep = new Dep();
  4075. var property = Object.getOwnPropertyDescriptor(obj, key);
  4076. if (property && property.configurable === false) {
  4077. return
  4078. }
  4079. // cater for pre-defined getter/setters
  4080. var getter = property && property.get;
  4081. var setter = property && property.set;
  4082. if ((!getter || setter) && arguments.length === 2) {
  4083. val = obj[key];
  4084. }
  4085. var childOb = !shallow && observe(val);
  4086. Object.defineProperty(obj, key, {
  4087. enumerable: true,
  4088. configurable: true,
  4089. get: function reactiveGetter () {
  4090. var value = getter ? getter.call(obj) : val;
  4091. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4092. dep.depend();
  4093. if (childOb) {
  4094. childOb.dep.depend();
  4095. if (Array.isArray(value)) {
  4096. dependArray(value);
  4097. }
  4098. }
  4099. }
  4100. return value
  4101. },
  4102. set: function reactiveSetter (newVal) {
  4103. var value = getter ? getter.call(obj) : val;
  4104. /* eslint-disable no-self-compare */
  4105. if (newVal === value || (newVal !== newVal && value !== value)) {
  4106. return
  4107. }
  4108. /* eslint-enable no-self-compare */
  4109. if ( true && customSetter) {
  4110. customSetter();
  4111. }
  4112. // #7981: for accessor properties without setter
  4113. if (getter && !setter) { return }
  4114. if (setter) {
  4115. setter.call(obj, newVal);
  4116. } else {
  4117. val = newVal;
  4118. }
  4119. childOb = !shallow && observe(newVal);
  4120. dep.notify();
  4121. }
  4122. });
  4123. }
  4124. /**
  4125. * Set a property on an object. Adds the new property and
  4126. * triggers change notification if the property doesn't
  4127. * already exist.
  4128. */
  4129. function set (target, key, val) {
  4130. if ( true &&
  4131. (isUndef(target) || isPrimitive(target))
  4132. ) {
  4133. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4134. }
  4135. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4136. target.length = Math.max(target.length, key);
  4137. target.splice(key, 1, val);
  4138. return val
  4139. }
  4140. if (key in target && !(key in Object.prototype)) {
  4141. target[key] = val;
  4142. return val
  4143. }
  4144. var ob = (target).__ob__;
  4145. if (target._isVue || (ob && ob.vmCount)) {
  4146. true && warn(
  4147. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4148. 'at runtime - declare it upfront in the data option.'
  4149. );
  4150. return val
  4151. }
  4152. if (!ob) {
  4153. target[key] = val;
  4154. return val
  4155. }
  4156. defineReactive$$1(ob.value, key, val);
  4157. ob.dep.notify();
  4158. return val
  4159. }
  4160. /**
  4161. * Delete a property and trigger change if necessary.
  4162. */
  4163. function del (target, key) {
  4164. if ( true &&
  4165. (isUndef(target) || isPrimitive(target))
  4166. ) {
  4167. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4168. }
  4169. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4170. target.splice(key, 1);
  4171. return
  4172. }
  4173. var ob = (target).__ob__;
  4174. if (target._isVue || (ob && ob.vmCount)) {
  4175. true && warn(
  4176. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4177. '- just set it to null.'
  4178. );
  4179. return
  4180. }
  4181. if (!hasOwn(target, key)) {
  4182. return
  4183. }
  4184. delete target[key];
  4185. if (!ob) {
  4186. return
  4187. }
  4188. ob.dep.notify();
  4189. }
  4190. /**
  4191. * Collect dependencies on array elements when the array is touched, since
  4192. * we cannot intercept array element access like property getters.
  4193. */
  4194. function dependArray (value) {
  4195. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4196. e = value[i];
  4197. e && e.__ob__ && e.__ob__.dep.depend();
  4198. if (Array.isArray(e)) {
  4199. dependArray(e);
  4200. }
  4201. }
  4202. }
  4203. /* */
  4204. /**
  4205. * Option overwriting strategies are functions that handle
  4206. * how to merge a parent option value and a child option
  4207. * value into the final value.
  4208. */
  4209. var strats = config.optionMergeStrategies;
  4210. /**
  4211. * Options with restrictions
  4212. */
  4213. if (true) {
  4214. strats.el = strats.propsData = function (parent, child, vm, key) {
  4215. if (!vm) {
  4216. warn(
  4217. "option \"" + key + "\" can only be used during instance " +
  4218. 'creation with the `new` keyword.'
  4219. );
  4220. }
  4221. return defaultStrat(parent, child)
  4222. };
  4223. }
  4224. /**
  4225. * Helper that recursively merges two data objects together.
  4226. */
  4227. function mergeData (to, from) {
  4228. if (!from) { return to }
  4229. var key, toVal, fromVal;
  4230. var keys = hasSymbol
  4231. ? Reflect.ownKeys(from)
  4232. : Object.keys(from);
  4233. for (var i = 0; i < keys.length; i++) {
  4234. key = keys[i];
  4235. // in case the object is already observed...
  4236. if (key === '__ob__') { continue }
  4237. toVal = to[key];
  4238. fromVal = from[key];
  4239. if (!hasOwn(to, key)) {
  4240. set(to, key, fromVal);
  4241. } else if (
  4242. toVal !== fromVal &&
  4243. isPlainObject(toVal) &&
  4244. isPlainObject(fromVal)
  4245. ) {
  4246. mergeData(toVal, fromVal);
  4247. }
  4248. }
  4249. return to
  4250. }
  4251. /**
  4252. * Data
  4253. */
  4254. function mergeDataOrFn (
  4255. parentVal,
  4256. childVal,
  4257. vm
  4258. ) {
  4259. if (!vm) {
  4260. // in a Vue.extend merge, both should be functions
  4261. if (!childVal) {
  4262. return parentVal
  4263. }
  4264. if (!parentVal) {
  4265. return childVal
  4266. }
  4267. // when parentVal & childVal are both present,
  4268. // we need to return a function that returns the
  4269. // merged result of both functions... no need to
  4270. // check if parentVal is a function here because
  4271. // it has to be a function to pass previous merges.
  4272. return function mergedDataFn () {
  4273. return mergeData(
  4274. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4275. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4276. )
  4277. }
  4278. } else {
  4279. return function mergedInstanceDataFn () {
  4280. // instance merge
  4281. var instanceData = typeof childVal === 'function'
  4282. ? childVal.call(vm, vm)
  4283. : childVal;
  4284. var defaultData = typeof parentVal === 'function'
  4285. ? parentVal.call(vm, vm)
  4286. : parentVal;
  4287. if (instanceData) {
  4288. return mergeData(instanceData, defaultData)
  4289. } else {
  4290. return defaultData
  4291. }
  4292. }
  4293. }
  4294. }
  4295. strats.data = function (
  4296. parentVal,
  4297. childVal,
  4298. vm
  4299. ) {
  4300. if (!vm) {
  4301. if (childVal && typeof childVal !== 'function') {
  4302. true && warn(
  4303. 'The "data" option should be a function ' +
  4304. 'that returns a per-instance value in component ' +
  4305. 'definitions.',
  4306. vm
  4307. );
  4308. return parentVal
  4309. }
  4310. return mergeDataOrFn(parentVal, childVal)
  4311. }
  4312. return mergeDataOrFn(parentVal, childVal, vm)
  4313. };
  4314. /**
  4315. * Hooks and props are merged as arrays.
  4316. */
  4317. function mergeHook (
  4318. parentVal,
  4319. childVal
  4320. ) {
  4321. var res = childVal
  4322. ? parentVal
  4323. ? parentVal.concat(childVal)
  4324. : Array.isArray(childVal)
  4325. ? childVal
  4326. : [childVal]
  4327. : parentVal;
  4328. return res
  4329. ? dedupeHooks(res)
  4330. : res
  4331. }
  4332. function dedupeHooks (hooks) {
  4333. var res = [];
  4334. for (var i = 0; i < hooks.length; i++) {
  4335. if (res.indexOf(hooks[i]) === -1) {
  4336. res.push(hooks[i]);
  4337. }
  4338. }
  4339. return res
  4340. }
  4341. LIFECYCLE_HOOKS.forEach(function (hook) {
  4342. strats[hook] = mergeHook;
  4343. });
  4344. /**
  4345. * Assets
  4346. *
  4347. * When a vm is present (instance creation), we need to do
  4348. * a three-way merge between constructor options, instance
  4349. * options and parent options.
  4350. */
  4351. function mergeAssets (
  4352. parentVal,
  4353. childVal,
  4354. vm,
  4355. key
  4356. ) {
  4357. var res = Object.create(parentVal || null);
  4358. if (childVal) {
  4359. true && assertObjectType(key, childVal, vm);
  4360. return extend(res, childVal)
  4361. } else {
  4362. return res
  4363. }
  4364. }
  4365. ASSET_TYPES.forEach(function (type) {
  4366. strats[type + 's'] = mergeAssets;
  4367. });
  4368. /**
  4369. * Watchers.
  4370. *
  4371. * Watchers hashes should not overwrite one
  4372. * another, so we merge them as arrays.
  4373. */
  4374. strats.watch = function (
  4375. parentVal,
  4376. childVal,
  4377. vm,
  4378. key
  4379. ) {
  4380. // work around Firefox's Object.prototype.watch...
  4381. if (parentVal === nativeWatch) { parentVal = undefined; }
  4382. if (childVal === nativeWatch) { childVal = undefined; }
  4383. /* istanbul ignore if */
  4384. if (!childVal) { return Object.create(parentVal || null) }
  4385. if (true) {
  4386. assertObjectType(key, childVal, vm);
  4387. }
  4388. if (!parentVal) { return childVal }
  4389. var ret = {};
  4390. extend(ret, parentVal);
  4391. for (var key$1 in childVal) {
  4392. var parent = ret[key$1];
  4393. var child = childVal[key$1];
  4394. if (parent && !Array.isArray(parent)) {
  4395. parent = [parent];
  4396. }
  4397. ret[key$1] = parent
  4398. ? parent.concat(child)
  4399. : Array.isArray(child) ? child : [child];
  4400. }
  4401. return ret
  4402. };
  4403. /**
  4404. * Other object hashes.
  4405. */
  4406. strats.props =
  4407. strats.methods =
  4408. strats.inject =
  4409. strats.computed = function (
  4410. parentVal,
  4411. childVal,
  4412. vm,
  4413. key
  4414. ) {
  4415. if (childVal && "development" !== 'production') {
  4416. assertObjectType(key, childVal, vm);
  4417. }
  4418. if (!parentVal) { return childVal }
  4419. var ret = Object.create(null);
  4420. extend(ret, parentVal);
  4421. if (childVal) { extend(ret, childVal); }
  4422. return ret
  4423. };
  4424. strats.provide = mergeDataOrFn;
  4425. /**
  4426. * Default strategy.
  4427. */
  4428. var defaultStrat = function (parentVal, childVal) {
  4429. return childVal === undefined
  4430. ? parentVal
  4431. : childVal
  4432. };
  4433. /**
  4434. * Validate component names
  4435. */
  4436. function checkComponents (options) {
  4437. for (var key in options.components) {
  4438. validateComponentName(key);
  4439. }
  4440. }
  4441. function validateComponentName (name) {
  4442. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4443. warn(
  4444. 'Invalid component name: "' + name + '". Component names ' +
  4445. 'should conform to valid custom element name in html5 specification.'
  4446. );
  4447. }
  4448. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4449. warn(
  4450. 'Do not use built-in or reserved HTML elements as component ' +
  4451. 'id: ' + name
  4452. );
  4453. }
  4454. }
  4455. /**
  4456. * Ensure all props option syntax are normalized into the
  4457. * Object-based format.
  4458. */
  4459. function normalizeProps (options, vm) {
  4460. var props = options.props;
  4461. if (!props) { return }
  4462. var res = {};
  4463. var i, val, name;
  4464. if (Array.isArray(props)) {
  4465. i = props.length;
  4466. while (i--) {
  4467. val = props[i];
  4468. if (typeof val === 'string') {
  4469. name = camelize(val);
  4470. res[name] = { type: null };
  4471. } else if (true) {
  4472. warn('props must be strings when using array syntax.');
  4473. }
  4474. }
  4475. } else if (isPlainObject(props)) {
  4476. for (var key in props) {
  4477. val = props[key];
  4478. name = camelize(key);
  4479. res[name] = isPlainObject(val)
  4480. ? val
  4481. : { type: val };
  4482. }
  4483. } else if (true) {
  4484. warn(
  4485. "Invalid value for option \"props\": expected an Array or an Object, " +
  4486. "but got " + (toRawType(props)) + ".",
  4487. vm
  4488. );
  4489. }
  4490. options.props = res;
  4491. }
  4492. /**
  4493. * Normalize all injections into Object-based format
  4494. */
  4495. function normalizeInject (options, vm) {
  4496. var inject = options.inject;
  4497. if (!inject) { return }
  4498. var normalized = options.inject = {};
  4499. if (Array.isArray(inject)) {
  4500. for (var i = 0; i < inject.length; i++) {
  4501. normalized[inject[i]] = { from: inject[i] };
  4502. }
  4503. } else if (isPlainObject(inject)) {
  4504. for (var key in inject) {
  4505. var val = inject[key];
  4506. normalized[key] = isPlainObject(val)
  4507. ? extend({ from: key }, val)
  4508. : { from: val };
  4509. }
  4510. } else if (true) {
  4511. warn(
  4512. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4513. "but got " + (toRawType(inject)) + ".",
  4514. vm
  4515. );
  4516. }
  4517. }
  4518. /**
  4519. * Normalize raw function directives into object format.
  4520. */
  4521. function normalizeDirectives (options) {
  4522. var dirs = options.directives;
  4523. if (dirs) {
  4524. for (var key in dirs) {
  4525. var def$$1 = dirs[key];
  4526. if (typeof def$$1 === 'function') {
  4527. dirs[key] = { bind: def$$1, update: def$$1 };
  4528. }
  4529. }
  4530. }
  4531. }
  4532. function assertObjectType (name, value, vm) {
  4533. if (!isPlainObject(value)) {
  4534. warn(
  4535. "Invalid value for option \"" + name + "\": expected an Object, " +
  4536. "but got " + (toRawType(value)) + ".",
  4537. vm
  4538. );
  4539. }
  4540. }
  4541. /**
  4542. * Merge two option objects into a new one.
  4543. * Core utility used in both instantiation and inheritance.
  4544. */
  4545. function mergeOptions (
  4546. parent,
  4547. child,
  4548. vm
  4549. ) {
  4550. if (true) {
  4551. checkComponents(child);
  4552. }
  4553. if (typeof child === 'function') {
  4554. child = child.options;
  4555. }
  4556. normalizeProps(child, vm);
  4557. normalizeInject(child, vm);
  4558. normalizeDirectives(child);
  4559. // Apply extends and mixins on the child options,
  4560. // but only if it is a raw options object that isn't
  4561. // the result of another mergeOptions call.
  4562. // Only merged options has the _base property.
  4563. if (!child._base) {
  4564. if (child.extends) {
  4565. parent = mergeOptions(parent, child.extends, vm);
  4566. }
  4567. if (child.mixins) {
  4568. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4569. parent = mergeOptions(parent, child.mixins[i], vm);
  4570. }
  4571. }
  4572. }
  4573. var options = {};
  4574. var key;
  4575. for (key in parent) {
  4576. mergeField(key);
  4577. }
  4578. for (key in child) {
  4579. if (!hasOwn(parent, key)) {
  4580. mergeField(key);
  4581. }
  4582. }
  4583. function mergeField (key) {
  4584. var strat = strats[key] || defaultStrat;
  4585. options[key] = strat(parent[key], child[key], vm, key);
  4586. }
  4587. return options
  4588. }
  4589. /**
  4590. * Resolve an asset.
  4591. * This function is used because child instances need access
  4592. * to assets defined in its ancestor chain.
  4593. */
  4594. function resolveAsset (
  4595. options,
  4596. type,
  4597. id,
  4598. warnMissing
  4599. ) {
  4600. /* istanbul ignore if */
  4601. if (typeof id !== 'string') {
  4602. return
  4603. }
  4604. var assets = options[type];
  4605. // check local registration variations first
  4606. if (hasOwn(assets, id)) { return assets[id] }
  4607. var camelizedId = camelize(id);
  4608. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4609. var PascalCaseId = capitalize(camelizedId);
  4610. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4611. // fallback to prototype chain
  4612. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4613. if ( true && warnMissing && !res) {
  4614. warn(
  4615. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4616. options
  4617. );
  4618. }
  4619. return res
  4620. }
  4621. /* */
  4622. function validateProp (
  4623. key,
  4624. propOptions,
  4625. propsData,
  4626. vm
  4627. ) {
  4628. var prop = propOptions[key];
  4629. var absent = !hasOwn(propsData, key);
  4630. var value = propsData[key];
  4631. // boolean casting
  4632. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4633. if (booleanIndex > -1) {
  4634. if (absent && !hasOwn(prop, 'default')) {
  4635. value = false;
  4636. } else if (value === '' || value === hyphenate(key)) {
  4637. // only cast empty string / same name to boolean if
  4638. // boolean has higher priority
  4639. var stringIndex = getTypeIndex(String, prop.type);
  4640. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4641. value = true;
  4642. }
  4643. }
  4644. }
  4645. // check default value
  4646. if (value === undefined) {
  4647. value = getPropDefaultValue(vm, prop, key);
  4648. // since the default value is a fresh copy,
  4649. // make sure to observe it.
  4650. var prevShouldObserve = shouldObserve;
  4651. toggleObserving(true);
  4652. observe(value);
  4653. toggleObserving(prevShouldObserve);
  4654. }
  4655. if (
  4656. true
  4657. ) {
  4658. assertProp(prop, key, value, vm, absent);
  4659. }
  4660. return value
  4661. }
  4662. /**
  4663. * Get the default value of a prop.
  4664. */
  4665. function getPropDefaultValue (vm, prop, key) {
  4666. // no default, return undefined
  4667. if (!hasOwn(prop, 'default')) {
  4668. return undefined
  4669. }
  4670. var def = prop.default;
  4671. // warn against non-factory defaults for Object & Array
  4672. if ( true && isObject(def)) {
  4673. warn(
  4674. 'Invalid default value for prop "' + key + '": ' +
  4675. 'Props with type Object/Array must use a factory function ' +
  4676. 'to return the default value.',
  4677. vm
  4678. );
  4679. }
  4680. // the raw prop value was also undefined from previous render,
  4681. // return previous default value to avoid unnecessary watcher trigger
  4682. if (vm && vm.$options.propsData &&
  4683. vm.$options.propsData[key] === undefined &&
  4684. vm._props[key] !== undefined
  4685. ) {
  4686. return vm._props[key]
  4687. }
  4688. // call factory function for non-Function types
  4689. // a value is Function if its prototype is function even across different execution context
  4690. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4691. ? def.call(vm)
  4692. : def
  4693. }
  4694. /**
  4695. * Assert whether a prop is valid.
  4696. */
  4697. function assertProp (
  4698. prop,
  4699. name,
  4700. value,
  4701. vm,
  4702. absent
  4703. ) {
  4704. if (prop.required && absent) {
  4705. warn(
  4706. 'Missing required prop: "' + name + '"',
  4707. vm
  4708. );
  4709. return
  4710. }
  4711. if (value == null && !prop.required) {
  4712. return
  4713. }
  4714. var type = prop.type;
  4715. var valid = !type || type === true;
  4716. var expectedTypes = [];
  4717. if (type) {
  4718. if (!Array.isArray(type)) {
  4719. type = [type];
  4720. }
  4721. for (var i = 0; i < type.length && !valid; i++) {
  4722. var assertedType = assertType(value, type[i]);
  4723. expectedTypes.push(assertedType.expectedType || '');
  4724. valid = assertedType.valid;
  4725. }
  4726. }
  4727. if (!valid) {
  4728. warn(
  4729. getInvalidTypeMessage(name, value, expectedTypes),
  4730. vm
  4731. );
  4732. return
  4733. }
  4734. var validator = prop.validator;
  4735. if (validator) {
  4736. if (!validator(value)) {
  4737. warn(
  4738. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4739. vm
  4740. );
  4741. }
  4742. }
  4743. }
  4744. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4745. function assertType (value, type) {
  4746. var valid;
  4747. var expectedType = getType(type);
  4748. if (simpleCheckRE.test(expectedType)) {
  4749. var t = typeof value;
  4750. valid = t === expectedType.toLowerCase();
  4751. // for primitive wrapper objects
  4752. if (!valid && t === 'object') {
  4753. valid = value instanceof type;
  4754. }
  4755. } else if (expectedType === 'Object') {
  4756. valid = isPlainObject(value);
  4757. } else if (expectedType === 'Array') {
  4758. valid = Array.isArray(value);
  4759. } else {
  4760. valid = value instanceof type;
  4761. }
  4762. return {
  4763. valid: valid,
  4764. expectedType: expectedType
  4765. }
  4766. }
  4767. /**
  4768. * Use function string name to check built-in types,
  4769. * because a simple equality check will fail when running
  4770. * across different vms / iframes.
  4771. */
  4772. function getType (fn) {
  4773. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4774. return match ? match[1] : ''
  4775. }
  4776. function isSameType (a, b) {
  4777. return getType(a) === getType(b)
  4778. }
  4779. function getTypeIndex (type, expectedTypes) {
  4780. if (!Array.isArray(expectedTypes)) {
  4781. return isSameType(expectedTypes, type) ? 0 : -1
  4782. }
  4783. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4784. if (isSameType(expectedTypes[i], type)) {
  4785. return i
  4786. }
  4787. }
  4788. return -1
  4789. }
  4790. function getInvalidTypeMessage (name, value, expectedTypes) {
  4791. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4792. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4793. var expectedType = expectedTypes[0];
  4794. var receivedType = toRawType(value);
  4795. var expectedValue = styleValue(value, expectedType);
  4796. var receivedValue = styleValue(value, receivedType);
  4797. // check if we need to specify expected value
  4798. if (expectedTypes.length === 1 &&
  4799. isExplicable(expectedType) &&
  4800. !isBoolean(expectedType, receivedType)) {
  4801. message += " with value " + expectedValue;
  4802. }
  4803. message += ", got " + receivedType + " ";
  4804. // check if we need to specify received value
  4805. if (isExplicable(receivedType)) {
  4806. message += "with value " + receivedValue + ".";
  4807. }
  4808. return message
  4809. }
  4810. function styleValue (value, type) {
  4811. if (type === 'String') {
  4812. return ("\"" + value + "\"")
  4813. } else if (type === 'Number') {
  4814. return ("" + (Number(value)))
  4815. } else {
  4816. return ("" + value)
  4817. }
  4818. }
  4819. function isExplicable (value) {
  4820. var explicitTypes = ['string', 'number', 'boolean'];
  4821. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4822. }
  4823. function isBoolean () {
  4824. var args = [], len = arguments.length;
  4825. while ( len-- ) args[ len ] = arguments[ len ];
  4826. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4827. }
  4828. /* */
  4829. function handleError (err, vm, info) {
  4830. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4831. // See: https://github.com/vuejs/vuex/issues/1505
  4832. pushTarget();
  4833. try {
  4834. if (vm) {
  4835. var cur = vm;
  4836. while ((cur = cur.$parent)) {
  4837. var hooks = cur.$options.errorCaptured;
  4838. if (hooks) {
  4839. for (var i = 0; i < hooks.length; i++) {
  4840. try {
  4841. var capture = hooks[i].call(cur, err, vm, info) === false;
  4842. if (capture) { return }
  4843. } catch (e) {
  4844. globalHandleError(e, cur, 'errorCaptured hook');
  4845. }
  4846. }
  4847. }
  4848. }
  4849. }
  4850. globalHandleError(err, vm, info);
  4851. } finally {
  4852. popTarget();
  4853. }
  4854. }
  4855. function invokeWithErrorHandling (
  4856. handler,
  4857. context,
  4858. args,
  4859. vm,
  4860. info
  4861. ) {
  4862. var res;
  4863. try {
  4864. res = args ? handler.apply(context, args) : handler.call(context);
  4865. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4866. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4867. // issue #9511
  4868. // avoid catch triggering multiple times when nested calls
  4869. res._handled = true;
  4870. }
  4871. } catch (e) {
  4872. handleError(e, vm, info);
  4873. }
  4874. return res
  4875. }
  4876. function globalHandleError (err, vm, info) {
  4877. if (config.errorHandler) {
  4878. try {
  4879. return config.errorHandler.call(null, err, vm, info)
  4880. } catch (e) {
  4881. // if the user intentionally throws the original error in the handler,
  4882. // do not log it twice
  4883. if (e !== err) {
  4884. logError(e, null, 'config.errorHandler');
  4885. }
  4886. }
  4887. }
  4888. logError(err, vm, info);
  4889. }
  4890. function logError (err, vm, info) {
  4891. if (true) {
  4892. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4893. }
  4894. /* istanbul ignore else */
  4895. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4896. console.error(err);
  4897. } else {
  4898. throw err
  4899. }
  4900. }
  4901. /* */
  4902. var callbacks = [];
  4903. var pending = false;
  4904. function flushCallbacks () {
  4905. pending = false;
  4906. var copies = callbacks.slice(0);
  4907. callbacks.length = 0;
  4908. for (var i = 0; i < copies.length; i++) {
  4909. copies[i]();
  4910. }
  4911. }
  4912. // Here we have async deferring wrappers using microtasks.
  4913. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4914. // However, it has subtle problems when state is changed right before repaint
  4915. // (e.g. #6813, out-in transitions).
  4916. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4917. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4918. // So we now use microtasks everywhere, again.
  4919. // A major drawback of this tradeoff is that there are some scenarios
  4920. // where microtasks have too high a priority and fire in between supposedly
  4921. // sequential events (e.g. #4521, #6690, which have workarounds)
  4922. // or even between bubbling of the same event (#6566).
  4923. var timerFunc;
  4924. // The nextTick behavior leverages the microtask queue, which can be accessed
  4925. // via either native Promise.then or MutationObserver.
  4926. // MutationObserver has wider support, however it is seriously bugged in
  4927. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4928. // completely stops working after triggering a few times... so, if native
  4929. // Promise is available, we will use it:
  4930. /* istanbul ignore next, $flow-disable-line */
  4931. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4932. var p = Promise.resolve();
  4933. timerFunc = function () {
  4934. p.then(flushCallbacks);
  4935. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4936. // it can get stuck in a weird state where callbacks are pushed into the
  4937. // microtask queue but the queue isn't being flushed, until the browser
  4938. // needs to do some other work, e.g. handle a timer. Therefore we can
  4939. // "force" the microtask queue to be flushed by adding an empty timer.
  4940. if (isIOS) { setTimeout(noop); }
  4941. };
  4942. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4943. isNative(MutationObserver) ||
  4944. // PhantomJS and iOS 7.x
  4945. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4946. )) {
  4947. // Use MutationObserver where native Promise is not available,
  4948. // e.g. PhantomJS, iOS7, Android 4.4
  4949. // (#6466 MutationObserver is unreliable in IE11)
  4950. var counter = 1;
  4951. var observer = new MutationObserver(flushCallbacks);
  4952. var textNode = document.createTextNode(String(counter));
  4953. observer.observe(textNode, {
  4954. characterData: true
  4955. });
  4956. timerFunc = function () {
  4957. counter = (counter + 1) % 2;
  4958. textNode.data = String(counter);
  4959. };
  4960. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4961. // Fallback to setImmediate.
  4962. // Technically it leverages the (macro) task queue,
  4963. // but it is still a better choice than setTimeout.
  4964. timerFunc = function () {
  4965. setImmediate(flushCallbacks);
  4966. };
  4967. } else {
  4968. // Fallback to setTimeout.
  4969. timerFunc = function () {
  4970. setTimeout(flushCallbacks, 0);
  4971. };
  4972. }
  4973. function nextTick (cb, ctx) {
  4974. var _resolve;
  4975. callbacks.push(function () {
  4976. if (cb) {
  4977. try {
  4978. cb.call(ctx);
  4979. } catch (e) {
  4980. handleError(e, ctx, 'nextTick');
  4981. }
  4982. } else if (_resolve) {
  4983. _resolve(ctx);
  4984. }
  4985. });
  4986. if (!pending) {
  4987. pending = true;
  4988. timerFunc();
  4989. }
  4990. // $flow-disable-line
  4991. if (!cb && typeof Promise !== 'undefined') {
  4992. return new Promise(function (resolve) {
  4993. _resolve = resolve;
  4994. })
  4995. }
  4996. }
  4997. /* */
  4998. /* not type checking this file because flow doesn't play well with Proxy */
  4999. var initProxy;
  5000. if (true) {
  5001. var allowedGlobals = makeMap(
  5002. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5003. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5004. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5005. 'require' // for Webpack/Browserify
  5006. );
  5007. var warnNonPresent = function (target, key) {
  5008. warn(
  5009. "Property or method \"" + key + "\" is not defined on the instance but " +
  5010. 'referenced during render. Make sure that this property is reactive, ' +
  5011. 'either in the data option, or for class-based components, by ' +
  5012. 'initializing the property. ' +
  5013. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5014. target
  5015. );
  5016. };
  5017. var warnReservedPrefix = function (target, key) {
  5018. warn(
  5019. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5020. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5021. 'prevent conflicts with Vue internals. ' +
  5022. 'See: https://vuejs.org/v2/api/#data',
  5023. target
  5024. );
  5025. };
  5026. var hasProxy =
  5027. typeof Proxy !== 'undefined' && isNative(Proxy);
  5028. if (hasProxy) {
  5029. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5030. config.keyCodes = new Proxy(config.keyCodes, {
  5031. set: function set (target, key, value) {
  5032. if (isBuiltInModifier(key)) {
  5033. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5034. return false
  5035. } else {
  5036. target[key] = value;
  5037. return true
  5038. }
  5039. }
  5040. });
  5041. }
  5042. var hasHandler = {
  5043. has: function has (target, key) {
  5044. var has = key in target;
  5045. var isAllowed = allowedGlobals(key) ||
  5046. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5047. if (!has && !isAllowed) {
  5048. if (key in target.$data) { warnReservedPrefix(target, key); }
  5049. else { warnNonPresent(target, key); }
  5050. }
  5051. return has || !isAllowed
  5052. }
  5053. };
  5054. var getHandler = {
  5055. get: function get (target, key) {
  5056. if (typeof key === 'string' && !(key in target)) {
  5057. if (key in target.$data) { warnReservedPrefix(target, key); }
  5058. else { warnNonPresent(target, key); }
  5059. }
  5060. return target[key]
  5061. }
  5062. };
  5063. initProxy = function initProxy (vm) {
  5064. if (hasProxy) {
  5065. // determine which proxy handler to use
  5066. var options = vm.$options;
  5067. var handlers = options.render && options.render._withStripped
  5068. ? getHandler
  5069. : hasHandler;
  5070. vm._renderProxy = new Proxy(vm, handlers);
  5071. } else {
  5072. vm._renderProxy = vm;
  5073. }
  5074. };
  5075. }
  5076. /* */
  5077. var seenObjects = new _Set();
  5078. /**
  5079. * Recursively traverse an object to evoke all converted
  5080. * getters, so that every nested property inside the object
  5081. * is collected as a "deep" dependency.
  5082. */
  5083. function traverse (val) {
  5084. _traverse(val, seenObjects);
  5085. seenObjects.clear();
  5086. }
  5087. function _traverse (val, seen) {
  5088. var i, keys;
  5089. var isA = Array.isArray(val);
  5090. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5091. return
  5092. }
  5093. if (val.__ob__) {
  5094. var depId = val.__ob__.dep.id;
  5095. if (seen.has(depId)) {
  5096. return
  5097. }
  5098. seen.add(depId);
  5099. }
  5100. if (isA) {
  5101. i = val.length;
  5102. while (i--) { _traverse(val[i], seen); }
  5103. } else {
  5104. keys = Object.keys(val);
  5105. i = keys.length;
  5106. while (i--) { _traverse(val[keys[i]], seen); }
  5107. }
  5108. }
  5109. var mark;
  5110. var measure;
  5111. if (true) {
  5112. var perf = inBrowser && window.performance;
  5113. /* istanbul ignore if */
  5114. if (
  5115. perf &&
  5116. perf.mark &&
  5117. perf.measure &&
  5118. perf.clearMarks &&
  5119. perf.clearMeasures
  5120. ) {
  5121. mark = function (tag) { return perf.mark(tag); };
  5122. measure = function (name, startTag, endTag) {
  5123. perf.measure(name, startTag, endTag);
  5124. perf.clearMarks(startTag);
  5125. perf.clearMarks(endTag);
  5126. // perf.clearMeasures(name)
  5127. };
  5128. }
  5129. }
  5130. /* */
  5131. var normalizeEvent = cached(function (name) {
  5132. var passive = name.charAt(0) === '&';
  5133. name = passive ? name.slice(1) : name;
  5134. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5135. name = once$$1 ? name.slice(1) : name;
  5136. var capture = name.charAt(0) === '!';
  5137. name = capture ? name.slice(1) : name;
  5138. return {
  5139. name: name,
  5140. once: once$$1,
  5141. capture: capture,
  5142. passive: passive
  5143. }
  5144. });
  5145. function createFnInvoker (fns, vm) {
  5146. function invoker () {
  5147. var arguments$1 = arguments;
  5148. var fns = invoker.fns;
  5149. if (Array.isArray(fns)) {
  5150. var cloned = fns.slice();
  5151. for (var i = 0; i < cloned.length; i++) {
  5152. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5153. }
  5154. } else {
  5155. // return handler return value for single handlers
  5156. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5157. }
  5158. }
  5159. invoker.fns = fns;
  5160. return invoker
  5161. }
  5162. function updateListeners (
  5163. on,
  5164. oldOn,
  5165. add,
  5166. remove$$1,
  5167. createOnceHandler,
  5168. vm
  5169. ) {
  5170. var name, def$$1, cur, old, event;
  5171. for (name in on) {
  5172. def$$1 = cur = on[name];
  5173. old = oldOn[name];
  5174. event = normalizeEvent(name);
  5175. if (isUndef(cur)) {
  5176. true && warn(
  5177. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5178. vm
  5179. );
  5180. } else if (isUndef(old)) {
  5181. if (isUndef(cur.fns)) {
  5182. cur = on[name] = createFnInvoker(cur, vm);
  5183. }
  5184. if (isTrue(event.once)) {
  5185. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5186. }
  5187. add(event.name, cur, event.capture, event.passive, event.params);
  5188. } else if (cur !== old) {
  5189. old.fns = cur;
  5190. on[name] = old;
  5191. }
  5192. }
  5193. for (name in oldOn) {
  5194. if (isUndef(on[name])) {
  5195. event = normalizeEvent(name);
  5196. remove$$1(event.name, oldOn[name], event.capture);
  5197. }
  5198. }
  5199. }
  5200. /* */
  5201. /* */
  5202. // fixed by xxxxxx (mp properties)
  5203. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5204. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5205. if (isUndef(propOptions)) {
  5206. return res
  5207. }
  5208. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5209. var attrs = data.attrs;
  5210. var props = data.props;
  5211. if (isDef(attrs) || isDef(props)) {
  5212. for (var key in propOptions) {
  5213. var altKey = hyphenate(key);
  5214. var result = checkProp(res, props, key, altKey, true) ||
  5215. checkProp(res, attrs, key, altKey, false);
  5216. // externalClass
  5217. if (
  5218. result &&
  5219. res[key] &&
  5220. externalClasses.indexOf(altKey) !== -1 &&
  5221. context[camelize(res[key])]
  5222. ) {
  5223. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5224. res[key] = context[camelize(res[key])];
  5225. }
  5226. }
  5227. }
  5228. return res
  5229. }
  5230. function extractPropsFromVNodeData (
  5231. data,
  5232. Ctor,
  5233. tag,
  5234. context// fixed by xxxxxx
  5235. ) {
  5236. // we are only extracting raw values here.
  5237. // validation and default values are handled in the child
  5238. // component itself.
  5239. var propOptions = Ctor.options.props;
  5240. if (isUndef(propOptions)) {
  5241. // fixed by xxxxxx
  5242. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5243. }
  5244. var res = {};
  5245. var attrs = data.attrs;
  5246. var props = data.props;
  5247. if (isDef(attrs) || isDef(props)) {
  5248. for (var key in propOptions) {
  5249. var altKey = hyphenate(key);
  5250. if (true) {
  5251. var keyInLowerCase = key.toLowerCase();
  5252. if (
  5253. key !== keyInLowerCase &&
  5254. attrs && hasOwn(attrs, keyInLowerCase)
  5255. ) {
  5256. tip(
  5257. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5258. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5259. " \"" + key + "\". " +
  5260. "Note that HTML attributes are case-insensitive and camelCased " +
  5261. "props need to use their kebab-case equivalents when using in-DOM " +
  5262. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5263. );
  5264. }
  5265. }
  5266. checkProp(res, props, key, altKey, true) ||
  5267. checkProp(res, attrs, key, altKey, false);
  5268. }
  5269. }
  5270. // fixed by xxxxxx
  5271. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5272. }
  5273. function checkProp (
  5274. res,
  5275. hash,
  5276. key,
  5277. altKey,
  5278. preserve
  5279. ) {
  5280. if (isDef(hash)) {
  5281. if (hasOwn(hash, key)) {
  5282. res[key] = hash[key];
  5283. if (!preserve) {
  5284. delete hash[key];
  5285. }
  5286. return true
  5287. } else if (hasOwn(hash, altKey)) {
  5288. res[key] = hash[altKey];
  5289. if (!preserve) {
  5290. delete hash[altKey];
  5291. }
  5292. return true
  5293. }
  5294. }
  5295. return false
  5296. }
  5297. /* */
  5298. // The template compiler attempts to minimize the need for normalization by
  5299. // statically analyzing the template at compile time.
  5300. //
  5301. // For plain HTML markup, normalization can be completely skipped because the
  5302. // generated render function is guaranteed to return Array<VNode>. There are
  5303. // two cases where extra normalization is needed:
  5304. // 1. When the children contains components - because a functional component
  5305. // may return an Array instead of a single root. In this case, just a simple
  5306. // normalization is needed - if any child is an Array, we flatten the whole
  5307. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5308. // because functional components already normalize their own children.
  5309. function simpleNormalizeChildren (children) {
  5310. for (var i = 0; i < children.length; i++) {
  5311. if (Array.isArray(children[i])) {
  5312. return Array.prototype.concat.apply([], children)
  5313. }
  5314. }
  5315. return children
  5316. }
  5317. // 2. When the children contains constructs that always generated nested Arrays,
  5318. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5319. // with hand-written render functions / JSX. In such cases a full normalization
  5320. // is needed to cater to all possible types of children values.
  5321. function normalizeChildren (children) {
  5322. return isPrimitive(children)
  5323. ? [createTextVNode(children)]
  5324. : Array.isArray(children)
  5325. ? normalizeArrayChildren(children)
  5326. : undefined
  5327. }
  5328. function isTextNode (node) {
  5329. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5330. }
  5331. function normalizeArrayChildren (children, nestedIndex) {
  5332. var res = [];
  5333. var i, c, lastIndex, last;
  5334. for (i = 0; i < children.length; i++) {
  5335. c = children[i];
  5336. if (isUndef(c) || typeof c === 'boolean') { continue }
  5337. lastIndex = res.length - 1;
  5338. last = res[lastIndex];
  5339. // nested
  5340. if (Array.isArray(c)) {
  5341. if (c.length > 0) {
  5342. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5343. // merge adjacent text nodes
  5344. if (isTextNode(c[0]) && isTextNode(last)) {
  5345. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5346. c.shift();
  5347. }
  5348. res.push.apply(res, c);
  5349. }
  5350. } else if (isPrimitive(c)) {
  5351. if (isTextNode(last)) {
  5352. // merge adjacent text nodes
  5353. // this is necessary for SSR hydration because text nodes are
  5354. // essentially merged when rendered to HTML strings
  5355. res[lastIndex] = createTextVNode(last.text + c);
  5356. } else if (c !== '') {
  5357. // convert primitive to vnode
  5358. res.push(createTextVNode(c));
  5359. }
  5360. } else {
  5361. if (isTextNode(c) && isTextNode(last)) {
  5362. // merge adjacent text nodes
  5363. res[lastIndex] = createTextVNode(last.text + c.text);
  5364. } else {
  5365. // default key for nested array children (likely generated by v-for)
  5366. if (isTrue(children._isVList) &&
  5367. isDef(c.tag) &&
  5368. isUndef(c.key) &&
  5369. isDef(nestedIndex)) {
  5370. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5371. }
  5372. res.push(c);
  5373. }
  5374. }
  5375. }
  5376. return res
  5377. }
  5378. /* */
  5379. function initProvide (vm) {
  5380. var provide = vm.$options.provide;
  5381. if (provide) {
  5382. vm._provided = typeof provide === 'function'
  5383. ? provide.call(vm)
  5384. : provide;
  5385. }
  5386. }
  5387. function initInjections (vm) {
  5388. var result = resolveInject(vm.$options.inject, vm);
  5389. if (result) {
  5390. toggleObserving(false);
  5391. Object.keys(result).forEach(function (key) {
  5392. /* istanbul ignore else */
  5393. if (true) {
  5394. defineReactive$$1(vm, key, result[key], function () {
  5395. warn(
  5396. "Avoid mutating an injected value directly since the changes will be " +
  5397. "overwritten whenever the provided component re-renders. " +
  5398. "injection being mutated: \"" + key + "\"",
  5399. vm
  5400. );
  5401. });
  5402. } else {}
  5403. });
  5404. toggleObserving(true);
  5405. }
  5406. }
  5407. function resolveInject (inject, vm) {
  5408. if (inject) {
  5409. // inject is :any because flow is not smart enough to figure out cached
  5410. var result = Object.create(null);
  5411. var keys = hasSymbol
  5412. ? Reflect.ownKeys(inject)
  5413. : Object.keys(inject);
  5414. for (var i = 0; i < keys.length; i++) {
  5415. var key = keys[i];
  5416. // #6574 in case the inject object is observed...
  5417. if (key === '__ob__') { continue }
  5418. var provideKey = inject[key].from;
  5419. var source = vm;
  5420. while (source) {
  5421. if (source._provided && hasOwn(source._provided, provideKey)) {
  5422. result[key] = source._provided[provideKey];
  5423. break
  5424. }
  5425. source = source.$parent;
  5426. }
  5427. if (!source) {
  5428. if ('default' in inject[key]) {
  5429. var provideDefault = inject[key].default;
  5430. result[key] = typeof provideDefault === 'function'
  5431. ? provideDefault.call(vm)
  5432. : provideDefault;
  5433. } else if (true) {
  5434. warn(("Injection \"" + key + "\" not found"), vm);
  5435. }
  5436. }
  5437. }
  5438. return result
  5439. }
  5440. }
  5441. /* */
  5442. /**
  5443. * Runtime helper for resolving raw children VNodes into a slot object.
  5444. */
  5445. function resolveSlots (
  5446. children,
  5447. context
  5448. ) {
  5449. if (!children || !children.length) {
  5450. return {}
  5451. }
  5452. var slots = {};
  5453. for (var i = 0, l = children.length; i < l; i++) {
  5454. var child = children[i];
  5455. var data = child.data;
  5456. // remove slot attribute if the node is resolved as a Vue slot node
  5457. if (data && data.attrs && data.attrs.slot) {
  5458. delete data.attrs.slot;
  5459. }
  5460. // named slots should only be respected if the vnode was rendered in the
  5461. // same context.
  5462. if ((child.context === context || child.fnContext === context) &&
  5463. data && data.slot != null
  5464. ) {
  5465. var name = data.slot;
  5466. var slot = (slots[name] || (slots[name] = []));
  5467. if (child.tag === 'template') {
  5468. slot.push.apply(slot, child.children || []);
  5469. } else {
  5470. slot.push(child);
  5471. }
  5472. } else {
  5473. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5474. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5475. (slots['page'] || (slots['page'] = [])).push(child);
  5476. }else{
  5477. (slots.default || (slots.default = [])).push(child);
  5478. }
  5479. }
  5480. }
  5481. // ignore slots that contains only whitespace
  5482. for (var name$1 in slots) {
  5483. if (slots[name$1].every(isWhitespace)) {
  5484. delete slots[name$1];
  5485. }
  5486. }
  5487. return slots
  5488. }
  5489. function isWhitespace (node) {
  5490. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5491. }
  5492. /* */
  5493. function normalizeScopedSlots (
  5494. slots,
  5495. normalSlots,
  5496. prevSlots
  5497. ) {
  5498. var res;
  5499. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5500. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5501. var key = slots && slots.$key;
  5502. if (!slots) {
  5503. res = {};
  5504. } else if (slots._normalized) {
  5505. // fast path 1: child component re-render only, parent did not change
  5506. return slots._normalized
  5507. } else if (
  5508. isStable &&
  5509. prevSlots &&
  5510. prevSlots !== emptyObject &&
  5511. key === prevSlots.$key &&
  5512. !hasNormalSlots &&
  5513. !prevSlots.$hasNormal
  5514. ) {
  5515. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5516. // only need to normalize once
  5517. return prevSlots
  5518. } else {
  5519. res = {};
  5520. for (var key$1 in slots) {
  5521. if (slots[key$1] && key$1[0] !== '$') {
  5522. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5523. }
  5524. }
  5525. }
  5526. // expose normal slots on scopedSlots
  5527. for (var key$2 in normalSlots) {
  5528. if (!(key$2 in res)) {
  5529. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5530. }
  5531. }
  5532. // avoriaz seems to mock a non-extensible $scopedSlots object
  5533. // and when that is passed down this would cause an error
  5534. if (slots && Object.isExtensible(slots)) {
  5535. (slots)._normalized = res;
  5536. }
  5537. def(res, '$stable', isStable);
  5538. def(res, '$key', key);
  5539. def(res, '$hasNormal', hasNormalSlots);
  5540. return res
  5541. }
  5542. function normalizeScopedSlot(normalSlots, key, fn) {
  5543. var normalized = function () {
  5544. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5545. res = res && typeof res === 'object' && !Array.isArray(res)
  5546. ? [res] // single vnode
  5547. : normalizeChildren(res);
  5548. return res && (
  5549. res.length === 0 ||
  5550. (res.length === 1 && res[0].isComment) // #9658
  5551. ) ? undefined
  5552. : res
  5553. };
  5554. // this is a slot using the new v-slot syntax without scope. although it is
  5555. // compiled as a scoped slot, render fn users would expect it to be present
  5556. // on this.$slots because the usage is semantically a normal slot.
  5557. if (fn.proxy) {
  5558. Object.defineProperty(normalSlots, key, {
  5559. get: normalized,
  5560. enumerable: true,
  5561. configurable: true
  5562. });
  5563. }
  5564. return normalized
  5565. }
  5566. function proxyNormalSlot(slots, key) {
  5567. return function () { return slots[key]; }
  5568. }
  5569. /* */
  5570. /**
  5571. * Runtime helper for rendering v-for lists.
  5572. */
  5573. function renderList (
  5574. val,
  5575. render
  5576. ) {
  5577. var ret, i, l, keys, key;
  5578. if (Array.isArray(val) || typeof val === 'string') {
  5579. ret = new Array(val.length);
  5580. for (i = 0, l = val.length; i < l; i++) {
  5581. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5582. }
  5583. } else if (typeof val === 'number') {
  5584. ret = new Array(val);
  5585. for (i = 0; i < val; i++) {
  5586. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5587. }
  5588. } else if (isObject(val)) {
  5589. if (hasSymbol && val[Symbol.iterator]) {
  5590. ret = [];
  5591. var iterator = val[Symbol.iterator]();
  5592. var result = iterator.next();
  5593. while (!result.done) {
  5594. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5595. result = iterator.next();
  5596. }
  5597. } else {
  5598. keys = Object.keys(val);
  5599. ret = new Array(keys.length);
  5600. for (i = 0, l = keys.length; i < l; i++) {
  5601. key = keys[i];
  5602. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5603. }
  5604. }
  5605. }
  5606. if (!isDef(ret)) {
  5607. ret = [];
  5608. }
  5609. (ret)._isVList = true;
  5610. return ret
  5611. }
  5612. /* */
  5613. /**
  5614. * Runtime helper for rendering <slot>
  5615. */
  5616. function renderSlot (
  5617. name,
  5618. fallback,
  5619. props,
  5620. bindObject
  5621. ) {
  5622. var scopedSlotFn = this.$scopedSlots[name];
  5623. var nodes;
  5624. if (scopedSlotFn) { // scoped slot
  5625. props = props || {};
  5626. if (bindObject) {
  5627. if ( true && !isObject(bindObject)) {
  5628. warn(
  5629. 'slot v-bind without argument expects an Object',
  5630. this
  5631. );
  5632. }
  5633. props = extend(extend({}, bindObject), props);
  5634. }
  5635. // fixed by xxxxxx app-plus scopedSlot
  5636. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5637. } else {
  5638. nodes = this.$slots[name] || fallback;
  5639. }
  5640. var target = props && props.slot;
  5641. if (target) {
  5642. return this.$createElement('template', { slot: target }, nodes)
  5643. } else {
  5644. return nodes
  5645. }
  5646. }
  5647. /* */
  5648. /**
  5649. * Runtime helper for resolving filters
  5650. */
  5651. function resolveFilter (id) {
  5652. return resolveAsset(this.$options, 'filters', id, true) || identity
  5653. }
  5654. /* */
  5655. function isKeyNotMatch (expect, actual) {
  5656. if (Array.isArray(expect)) {
  5657. return expect.indexOf(actual) === -1
  5658. } else {
  5659. return expect !== actual
  5660. }
  5661. }
  5662. /**
  5663. * Runtime helper for checking keyCodes from config.
  5664. * exposed as Vue.prototype._k
  5665. * passing in eventKeyName as last argument separately for backwards compat
  5666. */
  5667. function checkKeyCodes (
  5668. eventKeyCode,
  5669. key,
  5670. builtInKeyCode,
  5671. eventKeyName,
  5672. builtInKeyName
  5673. ) {
  5674. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5675. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5676. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5677. } else if (mappedKeyCode) {
  5678. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5679. } else if (eventKeyName) {
  5680. return hyphenate(eventKeyName) !== key
  5681. }
  5682. }
  5683. /* */
  5684. /**
  5685. * Runtime helper for merging v-bind="object" into a VNode's data.
  5686. */
  5687. function bindObjectProps (
  5688. data,
  5689. tag,
  5690. value,
  5691. asProp,
  5692. isSync
  5693. ) {
  5694. if (value) {
  5695. if (!isObject(value)) {
  5696. true && warn(
  5697. 'v-bind without argument expects an Object or Array value',
  5698. this
  5699. );
  5700. } else {
  5701. if (Array.isArray(value)) {
  5702. value = toObject(value);
  5703. }
  5704. var hash;
  5705. var loop = function ( key ) {
  5706. if (
  5707. key === 'class' ||
  5708. key === 'style' ||
  5709. isReservedAttribute(key)
  5710. ) {
  5711. hash = data;
  5712. } else {
  5713. var type = data.attrs && data.attrs.type;
  5714. hash = asProp || config.mustUseProp(tag, type, key)
  5715. ? data.domProps || (data.domProps = {})
  5716. : data.attrs || (data.attrs = {});
  5717. }
  5718. var camelizedKey = camelize(key);
  5719. var hyphenatedKey = hyphenate(key);
  5720. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5721. hash[key] = value[key];
  5722. if (isSync) {
  5723. var on = data.on || (data.on = {});
  5724. on[("update:" + key)] = function ($event) {
  5725. value[key] = $event;
  5726. };
  5727. }
  5728. }
  5729. };
  5730. for (var key in value) loop( key );
  5731. }
  5732. }
  5733. return data
  5734. }
  5735. /* */
  5736. /**
  5737. * Runtime helper for rendering static trees.
  5738. */
  5739. function renderStatic (
  5740. index,
  5741. isInFor
  5742. ) {
  5743. var cached = this._staticTrees || (this._staticTrees = []);
  5744. var tree = cached[index];
  5745. // if has already-rendered static tree and not inside v-for,
  5746. // we can reuse the same tree.
  5747. if (tree && !isInFor) {
  5748. return tree
  5749. }
  5750. // otherwise, render a fresh tree.
  5751. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5752. this._renderProxy,
  5753. null,
  5754. this // for render fns generated for functional component templates
  5755. );
  5756. markStatic(tree, ("__static__" + index), false);
  5757. return tree
  5758. }
  5759. /**
  5760. * Runtime helper for v-once.
  5761. * Effectively it means marking the node as static with a unique key.
  5762. */
  5763. function markOnce (
  5764. tree,
  5765. index,
  5766. key
  5767. ) {
  5768. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5769. return tree
  5770. }
  5771. function markStatic (
  5772. tree,
  5773. key,
  5774. isOnce
  5775. ) {
  5776. if (Array.isArray(tree)) {
  5777. for (var i = 0; i < tree.length; i++) {
  5778. if (tree[i] && typeof tree[i] !== 'string') {
  5779. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5780. }
  5781. }
  5782. } else {
  5783. markStaticNode(tree, key, isOnce);
  5784. }
  5785. }
  5786. function markStaticNode (node, key, isOnce) {
  5787. node.isStatic = true;
  5788. node.key = key;
  5789. node.isOnce = isOnce;
  5790. }
  5791. /* */
  5792. function bindObjectListeners (data, value) {
  5793. if (value) {
  5794. if (!isPlainObject(value)) {
  5795. true && warn(
  5796. 'v-on without argument expects an Object value',
  5797. this
  5798. );
  5799. } else {
  5800. var on = data.on = data.on ? extend({}, data.on) : {};
  5801. for (var key in value) {
  5802. var existing = on[key];
  5803. var ours = value[key];
  5804. on[key] = existing ? [].concat(existing, ours) : ours;
  5805. }
  5806. }
  5807. }
  5808. return data
  5809. }
  5810. /* */
  5811. function resolveScopedSlots (
  5812. fns, // see flow/vnode
  5813. res,
  5814. // the following are added in 2.6
  5815. hasDynamicKeys,
  5816. contentHashKey
  5817. ) {
  5818. res = res || { $stable: !hasDynamicKeys };
  5819. for (var i = 0; i < fns.length; i++) {
  5820. var slot = fns[i];
  5821. if (Array.isArray(slot)) {
  5822. resolveScopedSlots(slot, res, hasDynamicKeys);
  5823. } else if (slot) {
  5824. // marker for reverse proxying v-slot without scope on this.$slots
  5825. if (slot.proxy) {
  5826. slot.fn.proxy = true;
  5827. }
  5828. res[slot.key] = slot.fn;
  5829. }
  5830. }
  5831. if (contentHashKey) {
  5832. (res).$key = contentHashKey;
  5833. }
  5834. return res
  5835. }
  5836. /* */
  5837. function bindDynamicKeys (baseObj, values) {
  5838. for (var i = 0; i < values.length; i += 2) {
  5839. var key = values[i];
  5840. if (typeof key === 'string' && key) {
  5841. baseObj[values[i]] = values[i + 1];
  5842. } else if ( true && key !== '' && key !== null) {
  5843. // null is a special value for explicitly removing a binding
  5844. warn(
  5845. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5846. this
  5847. );
  5848. }
  5849. }
  5850. return baseObj
  5851. }
  5852. // helper to dynamically append modifier runtime markers to event names.
  5853. // ensure only append when value is already string, otherwise it will be cast
  5854. // to string and cause the type check to miss.
  5855. function prependModifier (value, symbol) {
  5856. return typeof value === 'string' ? symbol + value : value
  5857. }
  5858. /* */
  5859. function installRenderHelpers (target) {
  5860. target._o = markOnce;
  5861. target._n = toNumber;
  5862. target._s = toString;
  5863. target._l = renderList;
  5864. target._t = renderSlot;
  5865. target._q = looseEqual;
  5866. target._i = looseIndexOf;
  5867. target._m = renderStatic;
  5868. target._f = resolveFilter;
  5869. target._k = checkKeyCodes;
  5870. target._b = bindObjectProps;
  5871. target._v = createTextVNode;
  5872. target._e = createEmptyVNode;
  5873. target._u = resolveScopedSlots;
  5874. target._g = bindObjectListeners;
  5875. target._d = bindDynamicKeys;
  5876. target._p = prependModifier;
  5877. }
  5878. /* */
  5879. function FunctionalRenderContext (
  5880. data,
  5881. props,
  5882. children,
  5883. parent,
  5884. Ctor
  5885. ) {
  5886. var this$1 = this;
  5887. var options = Ctor.options;
  5888. // ensure the createElement function in functional components
  5889. // gets a unique context - this is necessary for correct named slot check
  5890. var contextVm;
  5891. if (hasOwn(parent, '_uid')) {
  5892. contextVm = Object.create(parent);
  5893. // $flow-disable-line
  5894. contextVm._original = parent;
  5895. } else {
  5896. // the context vm passed in is a functional context as well.
  5897. // in this case we want to make sure we are able to get a hold to the
  5898. // real context instance.
  5899. contextVm = parent;
  5900. // $flow-disable-line
  5901. parent = parent._original;
  5902. }
  5903. var isCompiled = isTrue(options._compiled);
  5904. var needNormalization = !isCompiled;
  5905. this.data = data;
  5906. this.props = props;
  5907. this.children = children;
  5908. this.parent = parent;
  5909. this.listeners = data.on || emptyObject;
  5910. this.injections = resolveInject(options.inject, parent);
  5911. this.slots = function () {
  5912. if (!this$1.$slots) {
  5913. normalizeScopedSlots(
  5914. data.scopedSlots,
  5915. this$1.$slots = resolveSlots(children, parent)
  5916. );
  5917. }
  5918. return this$1.$slots
  5919. };
  5920. Object.defineProperty(this, 'scopedSlots', ({
  5921. enumerable: true,
  5922. get: function get () {
  5923. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5924. }
  5925. }));
  5926. // support for compiled functional template
  5927. if (isCompiled) {
  5928. // exposing $options for renderStatic()
  5929. this.$options = options;
  5930. // pre-resolve slots for renderSlot()
  5931. this.$slots = this.slots();
  5932. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5933. }
  5934. if (options._scopeId) {
  5935. this._c = function (a, b, c, d) {
  5936. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5937. if (vnode && !Array.isArray(vnode)) {
  5938. vnode.fnScopeId = options._scopeId;
  5939. vnode.fnContext = parent;
  5940. }
  5941. return vnode
  5942. };
  5943. } else {
  5944. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5945. }
  5946. }
  5947. installRenderHelpers(FunctionalRenderContext.prototype);
  5948. function createFunctionalComponent (
  5949. Ctor,
  5950. propsData,
  5951. data,
  5952. contextVm,
  5953. children
  5954. ) {
  5955. var options = Ctor.options;
  5956. var props = {};
  5957. var propOptions = options.props;
  5958. if (isDef(propOptions)) {
  5959. for (var key in propOptions) {
  5960. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5961. }
  5962. } else {
  5963. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5964. if (isDef(data.props)) { mergeProps(props, data.props); }
  5965. }
  5966. var renderContext = new FunctionalRenderContext(
  5967. data,
  5968. props,
  5969. children,
  5970. contextVm,
  5971. Ctor
  5972. );
  5973. var vnode = options.render.call(null, renderContext._c, renderContext);
  5974. if (vnode instanceof VNode) {
  5975. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5976. } else if (Array.isArray(vnode)) {
  5977. var vnodes = normalizeChildren(vnode) || [];
  5978. var res = new Array(vnodes.length);
  5979. for (var i = 0; i < vnodes.length; i++) {
  5980. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5981. }
  5982. return res
  5983. }
  5984. }
  5985. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5986. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5987. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5988. // that should not be matched to match.
  5989. var clone = cloneVNode(vnode);
  5990. clone.fnContext = contextVm;
  5991. clone.fnOptions = options;
  5992. if (true) {
  5993. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5994. }
  5995. if (data.slot) {
  5996. (clone.data || (clone.data = {})).slot = data.slot;
  5997. }
  5998. return clone
  5999. }
  6000. function mergeProps (to, from) {
  6001. for (var key in from) {
  6002. to[camelize(key)] = from[key];
  6003. }
  6004. }
  6005. /* */
  6006. /* */
  6007. /* */
  6008. /* */
  6009. // inline hooks to be invoked on component VNodes during patch
  6010. var componentVNodeHooks = {
  6011. init: function init (vnode, hydrating) {
  6012. if (
  6013. vnode.componentInstance &&
  6014. !vnode.componentInstance._isDestroyed &&
  6015. vnode.data.keepAlive
  6016. ) {
  6017. // kept-alive components, treat as a patch
  6018. var mountedNode = vnode; // work around flow
  6019. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6020. } else {
  6021. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6022. vnode,
  6023. activeInstance
  6024. );
  6025. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6026. }
  6027. },
  6028. prepatch: function prepatch (oldVnode, vnode) {
  6029. var options = vnode.componentOptions;
  6030. var child = vnode.componentInstance = oldVnode.componentInstance;
  6031. updateChildComponent(
  6032. child,
  6033. options.propsData, // updated props
  6034. options.listeners, // updated listeners
  6035. vnode, // new parent vnode
  6036. options.children // new children
  6037. );
  6038. },
  6039. insert: function insert (vnode) {
  6040. var context = vnode.context;
  6041. var componentInstance = vnode.componentInstance;
  6042. if (!componentInstance._isMounted) {
  6043. callHook(componentInstance, 'onServiceCreated');
  6044. callHook(componentInstance, 'onServiceAttached');
  6045. componentInstance._isMounted = true;
  6046. callHook(componentInstance, 'mounted');
  6047. }
  6048. if (vnode.data.keepAlive) {
  6049. if (context._isMounted) {
  6050. // vue-router#1212
  6051. // During updates, a kept-alive component's child components may
  6052. // change, so directly walking the tree here may call activated hooks
  6053. // on incorrect children. Instead we push them into a queue which will
  6054. // be processed after the whole patch process ended.
  6055. queueActivatedComponent(componentInstance);
  6056. } else {
  6057. activateChildComponent(componentInstance, true /* direct */);
  6058. }
  6059. }
  6060. },
  6061. destroy: function destroy (vnode) {
  6062. var componentInstance = vnode.componentInstance;
  6063. if (!componentInstance._isDestroyed) {
  6064. if (!vnode.data.keepAlive) {
  6065. componentInstance.$destroy();
  6066. } else {
  6067. deactivateChildComponent(componentInstance, true /* direct */);
  6068. }
  6069. }
  6070. }
  6071. };
  6072. var hooksToMerge = Object.keys(componentVNodeHooks);
  6073. function createComponent (
  6074. Ctor,
  6075. data,
  6076. context,
  6077. children,
  6078. tag
  6079. ) {
  6080. if (isUndef(Ctor)) {
  6081. return
  6082. }
  6083. var baseCtor = context.$options._base;
  6084. // plain options object: turn it into a constructor
  6085. if (isObject(Ctor)) {
  6086. Ctor = baseCtor.extend(Ctor);
  6087. }
  6088. // if at this stage it's not a constructor or an async component factory,
  6089. // reject.
  6090. if (typeof Ctor !== 'function') {
  6091. if (true) {
  6092. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6093. }
  6094. return
  6095. }
  6096. // async component
  6097. var asyncFactory;
  6098. if (isUndef(Ctor.cid)) {
  6099. asyncFactory = Ctor;
  6100. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6101. if (Ctor === undefined) {
  6102. // return a placeholder node for async component, which is rendered
  6103. // as a comment node but preserves all the raw information for the node.
  6104. // the information will be used for async server-rendering and hydration.
  6105. return createAsyncPlaceholder(
  6106. asyncFactory,
  6107. data,
  6108. context,
  6109. children,
  6110. tag
  6111. )
  6112. }
  6113. }
  6114. data = data || {};
  6115. // resolve constructor options in case global mixins are applied after
  6116. // component constructor creation
  6117. resolveConstructorOptions(Ctor);
  6118. // transform component v-model data into props & events
  6119. if (isDef(data.model)) {
  6120. transformModel(Ctor.options, data);
  6121. }
  6122. // extract props
  6123. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6124. // functional component
  6125. if (isTrue(Ctor.options.functional)) {
  6126. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6127. }
  6128. // extract listeners, since these needs to be treated as
  6129. // child component listeners instead of DOM listeners
  6130. var listeners = data.on;
  6131. // replace with listeners with .native modifier
  6132. // so it gets processed during parent component patch.
  6133. data.on = data.nativeOn;
  6134. if (isTrue(Ctor.options.abstract)) {
  6135. // abstract components do not keep anything
  6136. // other than props & listeners & slot
  6137. // work around flow
  6138. var slot = data.slot;
  6139. data = {};
  6140. if (slot) {
  6141. data.slot = slot;
  6142. }
  6143. }
  6144. // install component management hooks onto the placeholder node
  6145. installComponentHooks(data);
  6146. // return a placeholder vnode
  6147. var name = Ctor.options.name || tag;
  6148. var vnode = new VNode(
  6149. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6150. data, undefined, undefined, undefined, context,
  6151. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6152. asyncFactory
  6153. );
  6154. return vnode
  6155. }
  6156. function createComponentInstanceForVnode (
  6157. vnode, // we know it's MountedComponentVNode but flow doesn't
  6158. parent // activeInstance in lifecycle state
  6159. ) {
  6160. var options = {
  6161. _isComponent: true,
  6162. _parentVnode: vnode,
  6163. parent: parent
  6164. };
  6165. // check inline-template render functions
  6166. var inlineTemplate = vnode.data.inlineTemplate;
  6167. if (isDef(inlineTemplate)) {
  6168. options.render = inlineTemplate.render;
  6169. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6170. }
  6171. return new vnode.componentOptions.Ctor(options)
  6172. }
  6173. function installComponentHooks (data) {
  6174. var hooks = data.hook || (data.hook = {});
  6175. for (var i = 0; i < hooksToMerge.length; i++) {
  6176. var key = hooksToMerge[i];
  6177. var existing = hooks[key];
  6178. var toMerge = componentVNodeHooks[key];
  6179. if (existing !== toMerge && !(existing && existing._merged)) {
  6180. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6181. }
  6182. }
  6183. }
  6184. function mergeHook$1 (f1, f2) {
  6185. var merged = function (a, b) {
  6186. // flow complains about extra args which is why we use any
  6187. f1(a, b);
  6188. f2(a, b);
  6189. };
  6190. merged._merged = true;
  6191. return merged
  6192. }
  6193. // transform component v-model info (value and callback) into
  6194. // prop and event handler respectively.
  6195. function transformModel (options, data) {
  6196. var prop = (options.model && options.model.prop) || 'value';
  6197. var event = (options.model && options.model.event) || 'input'
  6198. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6199. var on = data.on || (data.on = {});
  6200. var existing = on[event];
  6201. var callback = data.model.callback;
  6202. if (isDef(existing)) {
  6203. if (
  6204. Array.isArray(existing)
  6205. ? existing.indexOf(callback) === -1
  6206. : existing !== callback
  6207. ) {
  6208. on[event] = [callback].concat(existing);
  6209. }
  6210. } else {
  6211. on[event] = callback;
  6212. }
  6213. }
  6214. /* */
  6215. var SIMPLE_NORMALIZE = 1;
  6216. var ALWAYS_NORMALIZE = 2;
  6217. // wrapper function for providing a more flexible interface
  6218. // without getting yelled at by flow
  6219. function createElement (
  6220. context,
  6221. tag,
  6222. data,
  6223. children,
  6224. normalizationType,
  6225. alwaysNormalize
  6226. ) {
  6227. if (Array.isArray(data) || isPrimitive(data)) {
  6228. normalizationType = children;
  6229. children = data;
  6230. data = undefined;
  6231. }
  6232. if (isTrue(alwaysNormalize)) {
  6233. normalizationType = ALWAYS_NORMALIZE;
  6234. }
  6235. return _createElement(context, tag, data, children, normalizationType)
  6236. }
  6237. function _createElement (
  6238. context,
  6239. tag,
  6240. data,
  6241. children,
  6242. normalizationType
  6243. ) {
  6244. if (isDef(data) && isDef((data).__ob__)) {
  6245. true && warn(
  6246. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6247. 'Always create fresh vnode data objects in each render!',
  6248. context
  6249. );
  6250. return createEmptyVNode()
  6251. }
  6252. // object syntax in v-bind
  6253. if (isDef(data) && isDef(data.is)) {
  6254. tag = data.is;
  6255. }
  6256. if (!tag) {
  6257. // in case of component :is set to falsy value
  6258. return createEmptyVNode()
  6259. }
  6260. // warn against non-primitive key
  6261. if ( true &&
  6262. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6263. ) {
  6264. {
  6265. warn(
  6266. 'Avoid using non-primitive value as key, ' +
  6267. 'use string/number value instead.',
  6268. context
  6269. );
  6270. }
  6271. }
  6272. // support single function children as default scoped slot
  6273. if (Array.isArray(children) &&
  6274. typeof children[0] === 'function'
  6275. ) {
  6276. data = data || {};
  6277. data.scopedSlots = { default: children[0] };
  6278. children.length = 0;
  6279. }
  6280. if (normalizationType === ALWAYS_NORMALIZE) {
  6281. children = normalizeChildren(children);
  6282. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6283. children = simpleNormalizeChildren(children);
  6284. }
  6285. var vnode, ns;
  6286. if (typeof tag === 'string') {
  6287. var Ctor;
  6288. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6289. if (config.isReservedTag(tag)) {
  6290. // platform built-in elements
  6291. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6292. warn(
  6293. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6294. context
  6295. );
  6296. }
  6297. vnode = new VNode(
  6298. config.parsePlatformTagName(tag), data, children,
  6299. undefined, undefined, context
  6300. );
  6301. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6302. // component
  6303. vnode = createComponent(Ctor, data, context, children, tag);
  6304. } else {
  6305. // unknown or unlisted namespaced elements
  6306. // check at runtime because it may get assigned a namespace when its
  6307. // parent normalizes children
  6308. vnode = new VNode(
  6309. tag, data, children,
  6310. undefined, undefined, context
  6311. );
  6312. }
  6313. } else {
  6314. // direct component options / constructor
  6315. vnode = createComponent(tag, data, context, children);
  6316. }
  6317. if (Array.isArray(vnode)) {
  6318. return vnode
  6319. } else if (isDef(vnode)) {
  6320. if (isDef(ns)) { applyNS(vnode, ns); }
  6321. if (isDef(data)) { registerDeepBindings(data); }
  6322. return vnode
  6323. } else {
  6324. return createEmptyVNode()
  6325. }
  6326. }
  6327. function applyNS (vnode, ns, force) {
  6328. vnode.ns = ns;
  6329. if (vnode.tag === 'foreignObject') {
  6330. // use default namespace inside foreignObject
  6331. ns = undefined;
  6332. force = true;
  6333. }
  6334. if (isDef(vnode.children)) {
  6335. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6336. var child = vnode.children[i];
  6337. if (isDef(child.tag) && (
  6338. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6339. applyNS(child, ns, force);
  6340. }
  6341. }
  6342. }
  6343. }
  6344. // ref #5318
  6345. // necessary to ensure parent re-render when deep bindings like :style and
  6346. // :class are used on slot nodes
  6347. function registerDeepBindings (data) {
  6348. if (isObject(data.style)) {
  6349. traverse(data.style);
  6350. }
  6351. if (isObject(data.class)) {
  6352. traverse(data.class);
  6353. }
  6354. }
  6355. /* */
  6356. function initRender (vm) {
  6357. vm._vnode = null; // the root of the child tree
  6358. vm._staticTrees = null; // v-once cached trees
  6359. var options = vm.$options;
  6360. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6361. var renderContext = parentVnode && parentVnode.context;
  6362. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6363. vm.$scopedSlots = emptyObject;
  6364. // bind the createElement fn to this instance
  6365. // so that we get proper render context inside it.
  6366. // args order: tag, data, children, normalizationType, alwaysNormalize
  6367. // internal version is used by render functions compiled from templates
  6368. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6369. // normalization is always applied for the public version, used in
  6370. // user-written render functions.
  6371. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6372. // $attrs & $listeners are exposed for easier HOC creation.
  6373. // they need to be reactive so that HOCs using them are always updated
  6374. var parentData = parentVnode && parentVnode.data;
  6375. /* istanbul ignore else */
  6376. if (true) {
  6377. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6378. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6379. }, true);
  6380. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6381. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6382. }, true);
  6383. } else {}
  6384. }
  6385. var currentRenderingInstance = null;
  6386. function renderMixin (Vue) {
  6387. // install runtime convenience helpers
  6388. installRenderHelpers(Vue.prototype);
  6389. Vue.prototype.$nextTick = function (fn) {
  6390. return nextTick(fn, this)
  6391. };
  6392. Vue.prototype._render = function () {
  6393. var vm = this;
  6394. var ref = vm.$options;
  6395. var render = ref.render;
  6396. var _parentVnode = ref._parentVnode;
  6397. if (_parentVnode) {
  6398. vm.$scopedSlots = normalizeScopedSlots(
  6399. _parentVnode.data.scopedSlots,
  6400. vm.$slots,
  6401. vm.$scopedSlots
  6402. );
  6403. }
  6404. // set parent vnode. this allows render functions to have access
  6405. // to the data on the placeholder node.
  6406. vm.$vnode = _parentVnode;
  6407. // render self
  6408. var vnode;
  6409. try {
  6410. // There's no need to maintain a stack because all render fns are called
  6411. // separately from one another. Nested component's render fns are called
  6412. // when parent component is patched.
  6413. currentRenderingInstance = vm;
  6414. vnode = render.call(vm._renderProxy, vm.$createElement);
  6415. } catch (e) {
  6416. handleError(e, vm, "render");
  6417. // return error render result,
  6418. // or previous vnode to prevent render error causing blank component
  6419. /* istanbul ignore else */
  6420. if ( true && vm.$options.renderError) {
  6421. try {
  6422. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6423. } catch (e) {
  6424. handleError(e, vm, "renderError");
  6425. vnode = vm._vnode;
  6426. }
  6427. } else {
  6428. vnode = vm._vnode;
  6429. }
  6430. } finally {
  6431. currentRenderingInstance = null;
  6432. }
  6433. // if the returned array contains only a single node, allow it
  6434. if (Array.isArray(vnode) && vnode.length === 1) {
  6435. vnode = vnode[0];
  6436. }
  6437. // return empty vnode in case the render function errored out
  6438. if (!(vnode instanceof VNode)) {
  6439. if ( true && Array.isArray(vnode)) {
  6440. warn(
  6441. 'Multiple root nodes returned from render function. Render function ' +
  6442. 'should return a single root node.',
  6443. vm
  6444. );
  6445. }
  6446. vnode = createEmptyVNode();
  6447. }
  6448. // set parent
  6449. vnode.parent = _parentVnode;
  6450. return vnode
  6451. };
  6452. }
  6453. /* */
  6454. function ensureCtor (comp, base) {
  6455. if (
  6456. comp.__esModule ||
  6457. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6458. ) {
  6459. comp = comp.default;
  6460. }
  6461. return isObject(comp)
  6462. ? base.extend(comp)
  6463. : comp
  6464. }
  6465. function createAsyncPlaceholder (
  6466. factory,
  6467. data,
  6468. context,
  6469. children,
  6470. tag
  6471. ) {
  6472. var node = createEmptyVNode();
  6473. node.asyncFactory = factory;
  6474. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6475. return node
  6476. }
  6477. function resolveAsyncComponent (
  6478. factory,
  6479. baseCtor
  6480. ) {
  6481. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6482. return factory.errorComp
  6483. }
  6484. if (isDef(factory.resolved)) {
  6485. return factory.resolved
  6486. }
  6487. var owner = currentRenderingInstance;
  6488. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6489. // already pending
  6490. factory.owners.push(owner);
  6491. }
  6492. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6493. return factory.loadingComp
  6494. }
  6495. if (owner && !isDef(factory.owners)) {
  6496. var owners = factory.owners = [owner];
  6497. var sync = true;
  6498. var timerLoading = null;
  6499. var timerTimeout = null
  6500. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6501. var forceRender = function (renderCompleted) {
  6502. for (var i = 0, l = owners.length; i < l; i++) {
  6503. (owners[i]).$forceUpdate();
  6504. }
  6505. if (renderCompleted) {
  6506. owners.length = 0;
  6507. if (timerLoading !== null) {
  6508. clearTimeout(timerLoading);
  6509. timerLoading = null;
  6510. }
  6511. if (timerTimeout !== null) {
  6512. clearTimeout(timerTimeout);
  6513. timerTimeout = null;
  6514. }
  6515. }
  6516. };
  6517. var resolve = once(function (res) {
  6518. // cache resolved
  6519. factory.resolved = ensureCtor(res, baseCtor);
  6520. // invoke callbacks only if this is not a synchronous resolve
  6521. // (async resolves are shimmed as synchronous during SSR)
  6522. if (!sync) {
  6523. forceRender(true);
  6524. } else {
  6525. owners.length = 0;
  6526. }
  6527. });
  6528. var reject = once(function (reason) {
  6529. true && warn(
  6530. "Failed to resolve async component: " + (String(factory)) +
  6531. (reason ? ("\nReason: " + reason) : '')
  6532. );
  6533. if (isDef(factory.errorComp)) {
  6534. factory.error = true;
  6535. forceRender(true);
  6536. }
  6537. });
  6538. var res = factory(resolve, reject);
  6539. if (isObject(res)) {
  6540. if (isPromise(res)) {
  6541. // () => Promise
  6542. if (isUndef(factory.resolved)) {
  6543. res.then(resolve, reject);
  6544. }
  6545. } else if (isPromise(res.component)) {
  6546. res.component.then(resolve, reject);
  6547. if (isDef(res.error)) {
  6548. factory.errorComp = ensureCtor(res.error, baseCtor);
  6549. }
  6550. if (isDef(res.loading)) {
  6551. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6552. if (res.delay === 0) {
  6553. factory.loading = true;
  6554. } else {
  6555. timerLoading = setTimeout(function () {
  6556. timerLoading = null;
  6557. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6558. factory.loading = true;
  6559. forceRender(false);
  6560. }
  6561. }, res.delay || 200);
  6562. }
  6563. }
  6564. if (isDef(res.timeout)) {
  6565. timerTimeout = setTimeout(function () {
  6566. timerTimeout = null;
  6567. if (isUndef(factory.resolved)) {
  6568. reject(
  6569. true
  6570. ? ("timeout (" + (res.timeout) + "ms)")
  6571. : undefined
  6572. );
  6573. }
  6574. }, res.timeout);
  6575. }
  6576. }
  6577. }
  6578. sync = false;
  6579. // return in case resolved synchronously
  6580. return factory.loading
  6581. ? factory.loadingComp
  6582. : factory.resolved
  6583. }
  6584. }
  6585. /* */
  6586. function isAsyncPlaceholder (node) {
  6587. return node.isComment && node.asyncFactory
  6588. }
  6589. /* */
  6590. function getFirstComponentChild (children) {
  6591. if (Array.isArray(children)) {
  6592. for (var i = 0; i < children.length; i++) {
  6593. var c = children[i];
  6594. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6595. return c
  6596. }
  6597. }
  6598. }
  6599. }
  6600. /* */
  6601. /* */
  6602. function initEvents (vm) {
  6603. vm._events = Object.create(null);
  6604. vm._hasHookEvent = false;
  6605. // init parent attached events
  6606. var listeners = vm.$options._parentListeners;
  6607. if (listeners) {
  6608. updateComponentListeners(vm, listeners);
  6609. }
  6610. }
  6611. var target;
  6612. function add (event, fn) {
  6613. target.$on(event, fn);
  6614. }
  6615. function remove$1 (event, fn) {
  6616. target.$off(event, fn);
  6617. }
  6618. function createOnceHandler (event, fn) {
  6619. var _target = target;
  6620. return function onceHandler () {
  6621. var res = fn.apply(null, arguments);
  6622. if (res !== null) {
  6623. _target.$off(event, onceHandler);
  6624. }
  6625. }
  6626. }
  6627. function updateComponentListeners (
  6628. vm,
  6629. listeners,
  6630. oldListeners
  6631. ) {
  6632. target = vm;
  6633. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6634. target = undefined;
  6635. }
  6636. function eventsMixin (Vue) {
  6637. var hookRE = /^hook:/;
  6638. Vue.prototype.$on = function (event, fn) {
  6639. var vm = this;
  6640. if (Array.isArray(event)) {
  6641. for (var i = 0, l = event.length; i < l; i++) {
  6642. vm.$on(event[i], fn);
  6643. }
  6644. } else {
  6645. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6646. // optimize hook:event cost by using a boolean flag marked at registration
  6647. // instead of a hash lookup
  6648. if (hookRE.test(event)) {
  6649. vm._hasHookEvent = true;
  6650. }
  6651. }
  6652. return vm
  6653. };
  6654. Vue.prototype.$once = function (event, fn) {
  6655. var vm = this;
  6656. function on () {
  6657. vm.$off(event, on);
  6658. fn.apply(vm, arguments);
  6659. }
  6660. on.fn = fn;
  6661. vm.$on(event, on);
  6662. return vm
  6663. };
  6664. Vue.prototype.$off = function (event, fn) {
  6665. var vm = this;
  6666. // all
  6667. if (!arguments.length) {
  6668. vm._events = Object.create(null);
  6669. return vm
  6670. }
  6671. // array of events
  6672. if (Array.isArray(event)) {
  6673. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6674. vm.$off(event[i$1], fn);
  6675. }
  6676. return vm
  6677. }
  6678. // specific event
  6679. var cbs = vm._events[event];
  6680. if (!cbs) {
  6681. return vm
  6682. }
  6683. if (!fn) {
  6684. vm._events[event] = null;
  6685. return vm
  6686. }
  6687. // specific handler
  6688. var cb;
  6689. var i = cbs.length;
  6690. while (i--) {
  6691. cb = cbs[i];
  6692. if (cb === fn || cb.fn === fn) {
  6693. cbs.splice(i, 1);
  6694. break
  6695. }
  6696. }
  6697. return vm
  6698. };
  6699. Vue.prototype.$emit = function (event) {
  6700. var vm = this;
  6701. if (true) {
  6702. var lowerCaseEvent = event.toLowerCase();
  6703. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6704. tip(
  6705. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6706. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6707. "Note that HTML attributes are case-insensitive and you cannot use " +
  6708. "v-on to listen to camelCase events when using in-DOM templates. " +
  6709. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6710. );
  6711. }
  6712. }
  6713. var cbs = vm._events[event];
  6714. if (cbs) {
  6715. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6716. var args = toArray(arguments, 1);
  6717. var info = "event handler for \"" + event + "\"";
  6718. for (var i = 0, l = cbs.length; i < l; i++) {
  6719. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6720. }
  6721. }
  6722. return vm
  6723. };
  6724. }
  6725. /* */
  6726. var activeInstance = null;
  6727. var isUpdatingChildComponent = false;
  6728. function setActiveInstance(vm) {
  6729. var prevActiveInstance = activeInstance;
  6730. activeInstance = vm;
  6731. return function () {
  6732. activeInstance = prevActiveInstance;
  6733. }
  6734. }
  6735. function initLifecycle (vm) {
  6736. var options = vm.$options;
  6737. // locate first non-abstract parent
  6738. var parent = options.parent;
  6739. if (parent && !options.abstract) {
  6740. while (parent.$options.abstract && parent.$parent) {
  6741. parent = parent.$parent;
  6742. }
  6743. parent.$children.push(vm);
  6744. }
  6745. vm.$parent = parent;
  6746. vm.$root = parent ? parent.$root : vm;
  6747. vm.$children = [];
  6748. vm.$refs = {};
  6749. vm._watcher = null;
  6750. vm._inactive = null;
  6751. vm._directInactive = false;
  6752. vm._isMounted = false;
  6753. vm._isDestroyed = false;
  6754. vm._isBeingDestroyed = false;
  6755. }
  6756. function lifecycleMixin (Vue) {
  6757. Vue.prototype._update = function (vnode, hydrating) {
  6758. var vm = this;
  6759. var prevEl = vm.$el;
  6760. var prevVnode = vm._vnode;
  6761. var restoreActiveInstance = setActiveInstance(vm);
  6762. vm._vnode = vnode;
  6763. // Vue.prototype.__patch__ is injected in entry points
  6764. // based on the rendering backend used.
  6765. if (!prevVnode) {
  6766. // initial render
  6767. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6768. } else {
  6769. // updates
  6770. vm.$el = vm.__patch__(prevVnode, vnode);
  6771. }
  6772. restoreActiveInstance();
  6773. // update __vue__ reference
  6774. if (prevEl) {
  6775. prevEl.__vue__ = null;
  6776. }
  6777. if (vm.$el) {
  6778. vm.$el.__vue__ = vm;
  6779. }
  6780. // if parent is an HOC, update its $el as well
  6781. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6782. vm.$parent.$el = vm.$el;
  6783. }
  6784. // updated hook is called by the scheduler to ensure that children are
  6785. // updated in a parent's updated hook.
  6786. };
  6787. Vue.prototype.$forceUpdate = function () {
  6788. var vm = this;
  6789. if (vm._watcher) {
  6790. vm._watcher.update();
  6791. }
  6792. };
  6793. Vue.prototype.$destroy = function () {
  6794. var vm = this;
  6795. if (vm._isBeingDestroyed) {
  6796. return
  6797. }
  6798. callHook(vm, 'beforeDestroy');
  6799. vm._isBeingDestroyed = true;
  6800. // remove self from parent
  6801. var parent = vm.$parent;
  6802. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6803. remove(parent.$children, vm);
  6804. }
  6805. // teardown watchers
  6806. if (vm._watcher) {
  6807. vm._watcher.teardown();
  6808. }
  6809. var i = vm._watchers.length;
  6810. while (i--) {
  6811. vm._watchers[i].teardown();
  6812. }
  6813. // remove reference from data ob
  6814. // frozen object may not have observer.
  6815. if (vm._data.__ob__) {
  6816. vm._data.__ob__.vmCount--;
  6817. }
  6818. // call the last hook...
  6819. vm._isDestroyed = true;
  6820. // invoke destroy hooks on current rendered tree
  6821. vm.__patch__(vm._vnode, null);
  6822. // fire destroyed hook
  6823. callHook(vm, 'destroyed');
  6824. // turn off all instance listeners.
  6825. vm.$off();
  6826. // remove __vue__ reference
  6827. if (vm.$el) {
  6828. vm.$el.__vue__ = null;
  6829. }
  6830. // release circular reference (#6759)
  6831. if (vm.$vnode) {
  6832. vm.$vnode.parent = null;
  6833. }
  6834. };
  6835. }
  6836. function updateChildComponent (
  6837. vm,
  6838. propsData,
  6839. listeners,
  6840. parentVnode,
  6841. renderChildren
  6842. ) {
  6843. if (true) {
  6844. isUpdatingChildComponent = true;
  6845. }
  6846. // determine whether component has slot children
  6847. // we need to do this before overwriting $options._renderChildren.
  6848. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6849. // dynamic slot names). Static scoped slots compiled from template has the
  6850. // "$stable" marker.
  6851. var newScopedSlots = parentVnode.data.scopedSlots;
  6852. var oldScopedSlots = vm.$scopedSlots;
  6853. var hasDynamicScopedSlot = !!(
  6854. (newScopedSlots && !newScopedSlots.$stable) ||
  6855. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6856. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6857. );
  6858. // Any static slot children from the parent may have changed during parent's
  6859. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6860. // update is necessary to ensure correctness.
  6861. var needsForceUpdate = !!(
  6862. renderChildren || // has new static slots
  6863. vm.$options._renderChildren || // has old static slots
  6864. hasDynamicScopedSlot
  6865. );
  6866. vm.$options._parentVnode = parentVnode;
  6867. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6868. if (vm._vnode) { // update child tree's parent
  6869. vm._vnode.parent = parentVnode;
  6870. }
  6871. vm.$options._renderChildren = renderChildren;
  6872. // update $attrs and $listeners hash
  6873. // these are also reactive so they may trigger child update if the child
  6874. // used them during render
  6875. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6876. vm.$listeners = listeners || emptyObject;
  6877. // update props
  6878. if (propsData && vm.$options.props) {
  6879. toggleObserving(false);
  6880. var props = vm._props;
  6881. var propKeys = vm.$options._propKeys || [];
  6882. for (var i = 0; i < propKeys.length; i++) {
  6883. var key = propKeys[i];
  6884. var propOptions = vm.$options.props; // wtf flow?
  6885. props[key] = validateProp(key, propOptions, propsData, vm);
  6886. }
  6887. toggleObserving(true);
  6888. // keep a copy of raw propsData
  6889. vm.$options.propsData = propsData;
  6890. }
  6891. // fixed by xxxxxx update properties(mp runtime)
  6892. vm._$updateProperties && vm._$updateProperties(vm);
  6893. // update listeners
  6894. listeners = listeners || emptyObject;
  6895. var oldListeners = vm.$options._parentListeners;
  6896. vm.$options._parentListeners = listeners;
  6897. updateComponentListeners(vm, listeners, oldListeners);
  6898. // resolve slots + force update if has children
  6899. if (needsForceUpdate) {
  6900. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6901. vm.$forceUpdate();
  6902. }
  6903. if (true) {
  6904. isUpdatingChildComponent = false;
  6905. }
  6906. }
  6907. function isInInactiveTree (vm) {
  6908. while (vm && (vm = vm.$parent)) {
  6909. if (vm._inactive) { return true }
  6910. }
  6911. return false
  6912. }
  6913. function activateChildComponent (vm, direct) {
  6914. if (direct) {
  6915. vm._directInactive = false;
  6916. if (isInInactiveTree(vm)) {
  6917. return
  6918. }
  6919. } else if (vm._directInactive) {
  6920. return
  6921. }
  6922. if (vm._inactive || vm._inactive === null) {
  6923. vm._inactive = false;
  6924. for (var i = 0; i < vm.$children.length; i++) {
  6925. activateChildComponent(vm.$children[i]);
  6926. }
  6927. callHook(vm, 'activated');
  6928. }
  6929. }
  6930. function deactivateChildComponent (vm, direct) {
  6931. if (direct) {
  6932. vm._directInactive = true;
  6933. if (isInInactiveTree(vm)) {
  6934. return
  6935. }
  6936. }
  6937. if (!vm._inactive) {
  6938. vm._inactive = true;
  6939. for (var i = 0; i < vm.$children.length; i++) {
  6940. deactivateChildComponent(vm.$children[i]);
  6941. }
  6942. callHook(vm, 'deactivated');
  6943. }
  6944. }
  6945. function callHook (vm, hook) {
  6946. // #7573 disable dep collection when invoking lifecycle hooks
  6947. pushTarget();
  6948. var handlers = vm.$options[hook];
  6949. var info = hook + " hook";
  6950. if (handlers) {
  6951. for (var i = 0, j = handlers.length; i < j; i++) {
  6952. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6953. }
  6954. }
  6955. if (vm._hasHookEvent) {
  6956. vm.$emit('hook:' + hook);
  6957. }
  6958. popTarget();
  6959. }
  6960. /* */
  6961. var MAX_UPDATE_COUNT = 100;
  6962. var queue = [];
  6963. var activatedChildren = [];
  6964. var has = {};
  6965. var circular = {};
  6966. var waiting = false;
  6967. var flushing = false;
  6968. var index = 0;
  6969. /**
  6970. * Reset the scheduler's state.
  6971. */
  6972. function resetSchedulerState () {
  6973. index = queue.length = activatedChildren.length = 0;
  6974. has = {};
  6975. if (true) {
  6976. circular = {};
  6977. }
  6978. waiting = flushing = false;
  6979. }
  6980. // Async edge case #6566 requires saving the timestamp when event listeners are
  6981. // attached. However, calling performance.now() has a perf overhead especially
  6982. // if the page has thousands of event listeners. Instead, we take a timestamp
  6983. // every time the scheduler flushes and use that for all event listeners
  6984. // attached during that flush.
  6985. var currentFlushTimestamp = 0;
  6986. // Async edge case fix requires storing an event listener's attach timestamp.
  6987. var getNow = Date.now;
  6988. // Determine what event timestamp the browser is using. Annoyingly, the
  6989. // timestamp can either be hi-res (relative to page load) or low-res
  6990. // (relative to UNIX epoch), so in order to compare time we have to use the
  6991. // same timestamp type when saving the flush timestamp.
  6992. // All IE versions use low-res event timestamps, and have problematic clock
  6993. // implementations (#9632)
  6994. if (inBrowser && !isIE) {
  6995. var performance = window.performance;
  6996. if (
  6997. performance &&
  6998. typeof performance.now === 'function' &&
  6999. getNow() > document.createEvent('Event').timeStamp
  7000. ) {
  7001. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7002. // smaller than it, it means the event is using a hi-res timestamp,
  7003. // and we need to use the hi-res version for event listener timestamps as
  7004. // well.
  7005. getNow = function () { return performance.now(); };
  7006. }
  7007. }
  7008. /**
  7009. * Flush both queues and run the watchers.
  7010. */
  7011. function flushSchedulerQueue () {
  7012. currentFlushTimestamp = getNow();
  7013. flushing = true;
  7014. var watcher, id;
  7015. // Sort queue before flush.
  7016. // This ensures that:
  7017. // 1. Components are updated from parent to child. (because parent is always
  7018. // created before the child)
  7019. // 2. A component's user watchers are run before its render watcher (because
  7020. // user watchers are created before the render watcher)
  7021. // 3. If a component is destroyed during a parent component's watcher run,
  7022. // its watchers can be skipped.
  7023. queue.sort(function (a, b) { return a.id - b.id; });
  7024. // do not cache length because more watchers might be pushed
  7025. // as we run existing watchers
  7026. for (index = 0; index < queue.length; index++) {
  7027. watcher = queue[index];
  7028. if (watcher.before) {
  7029. watcher.before();
  7030. }
  7031. id = watcher.id;
  7032. has[id] = null;
  7033. watcher.run();
  7034. // in dev build, check and stop circular updates.
  7035. if ( true && has[id] != null) {
  7036. circular[id] = (circular[id] || 0) + 1;
  7037. if (circular[id] > MAX_UPDATE_COUNT) {
  7038. warn(
  7039. 'You may have an infinite update loop ' + (
  7040. watcher.user
  7041. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7042. : "in a component render function."
  7043. ),
  7044. watcher.vm
  7045. );
  7046. break
  7047. }
  7048. }
  7049. }
  7050. // keep copies of post queues before resetting state
  7051. var activatedQueue = activatedChildren.slice();
  7052. var updatedQueue = queue.slice();
  7053. resetSchedulerState();
  7054. // call component updated and activated hooks
  7055. callActivatedHooks(activatedQueue);
  7056. callUpdatedHooks(updatedQueue);
  7057. // devtool hook
  7058. /* istanbul ignore if */
  7059. if (devtools && config.devtools) {
  7060. devtools.emit('flush');
  7061. }
  7062. }
  7063. function callUpdatedHooks (queue) {
  7064. var i = queue.length;
  7065. while (i--) {
  7066. var watcher = queue[i];
  7067. var vm = watcher.vm;
  7068. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7069. callHook(vm, 'updated');
  7070. }
  7071. }
  7072. }
  7073. /**
  7074. * Queue a kept-alive component that was activated during patch.
  7075. * The queue will be processed after the entire tree has been patched.
  7076. */
  7077. function queueActivatedComponent (vm) {
  7078. // setting _inactive to false here so that a render function can
  7079. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7080. vm._inactive = false;
  7081. activatedChildren.push(vm);
  7082. }
  7083. function callActivatedHooks (queue) {
  7084. for (var i = 0; i < queue.length; i++) {
  7085. queue[i]._inactive = true;
  7086. activateChildComponent(queue[i], true /* true */);
  7087. }
  7088. }
  7089. /**
  7090. * Push a watcher into the watcher queue.
  7091. * Jobs with duplicate IDs will be skipped unless it's
  7092. * pushed when the queue is being flushed.
  7093. */
  7094. function queueWatcher (watcher) {
  7095. var id = watcher.id;
  7096. if (has[id] == null) {
  7097. has[id] = true;
  7098. if (!flushing) {
  7099. queue.push(watcher);
  7100. } else {
  7101. // if already flushing, splice the watcher based on its id
  7102. // if already past its id, it will be run next immediately.
  7103. var i = queue.length - 1;
  7104. while (i > index && queue[i].id > watcher.id) {
  7105. i--;
  7106. }
  7107. queue.splice(i + 1, 0, watcher);
  7108. }
  7109. // queue the flush
  7110. if (!waiting) {
  7111. waiting = true;
  7112. if ( true && !config.async) {
  7113. flushSchedulerQueue();
  7114. return
  7115. }
  7116. nextTick(flushSchedulerQueue);
  7117. }
  7118. }
  7119. }
  7120. /* */
  7121. var uid$2 = 0;
  7122. /**
  7123. * A watcher parses an expression, collects dependencies,
  7124. * and fires callback when the expression value changes.
  7125. * This is used for both the $watch() api and directives.
  7126. */
  7127. var Watcher = function Watcher (
  7128. vm,
  7129. expOrFn,
  7130. cb,
  7131. options,
  7132. isRenderWatcher
  7133. ) {
  7134. this.vm = vm;
  7135. if (isRenderWatcher) {
  7136. vm._watcher = this;
  7137. }
  7138. vm._watchers.push(this);
  7139. // options
  7140. if (options) {
  7141. this.deep = !!options.deep;
  7142. this.user = !!options.user;
  7143. this.lazy = !!options.lazy;
  7144. this.sync = !!options.sync;
  7145. this.before = options.before;
  7146. } else {
  7147. this.deep = this.user = this.lazy = this.sync = false;
  7148. }
  7149. this.cb = cb;
  7150. this.id = ++uid$2; // uid for batching
  7151. this.active = true;
  7152. this.dirty = this.lazy; // for lazy watchers
  7153. this.deps = [];
  7154. this.newDeps = [];
  7155. this.depIds = new _Set();
  7156. this.newDepIds = new _Set();
  7157. this.expression = true
  7158. ? expOrFn.toString()
  7159. : undefined;
  7160. // parse expression for getter
  7161. if (typeof expOrFn === 'function') {
  7162. this.getter = expOrFn;
  7163. } else {
  7164. this.getter = parsePath(expOrFn);
  7165. if (!this.getter) {
  7166. this.getter = noop;
  7167. true && warn(
  7168. "Failed watching path: \"" + expOrFn + "\" " +
  7169. 'Watcher only accepts simple dot-delimited paths. ' +
  7170. 'For full control, use a function instead.',
  7171. vm
  7172. );
  7173. }
  7174. }
  7175. this.value = this.lazy
  7176. ? undefined
  7177. : this.get();
  7178. };
  7179. /**
  7180. * Evaluate the getter, and re-collect dependencies.
  7181. */
  7182. Watcher.prototype.get = function get () {
  7183. pushTarget(this);
  7184. var value;
  7185. var vm = this.vm;
  7186. try {
  7187. value = this.getter.call(vm, vm);
  7188. } catch (e) {
  7189. if (this.user) {
  7190. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7191. } else {
  7192. throw e
  7193. }
  7194. } finally {
  7195. // "touch" every property so they are all tracked as
  7196. // dependencies for deep watching
  7197. if (this.deep) {
  7198. traverse(value);
  7199. }
  7200. popTarget();
  7201. this.cleanupDeps();
  7202. }
  7203. return value
  7204. };
  7205. /**
  7206. * Add a dependency to this directive.
  7207. */
  7208. Watcher.prototype.addDep = function addDep (dep) {
  7209. var id = dep.id;
  7210. if (!this.newDepIds.has(id)) {
  7211. this.newDepIds.add(id);
  7212. this.newDeps.push(dep);
  7213. if (!this.depIds.has(id)) {
  7214. dep.addSub(this);
  7215. }
  7216. }
  7217. };
  7218. /**
  7219. * Clean up for dependency collection.
  7220. */
  7221. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7222. var i = this.deps.length;
  7223. while (i--) {
  7224. var dep = this.deps[i];
  7225. if (!this.newDepIds.has(dep.id)) {
  7226. dep.removeSub(this);
  7227. }
  7228. }
  7229. var tmp = this.depIds;
  7230. this.depIds = this.newDepIds;
  7231. this.newDepIds = tmp;
  7232. this.newDepIds.clear();
  7233. tmp = this.deps;
  7234. this.deps = this.newDeps;
  7235. this.newDeps = tmp;
  7236. this.newDeps.length = 0;
  7237. };
  7238. /**
  7239. * Subscriber interface.
  7240. * Will be called when a dependency changes.
  7241. */
  7242. Watcher.prototype.update = function update () {
  7243. /* istanbul ignore else */
  7244. if (this.lazy) {
  7245. this.dirty = true;
  7246. } else if (this.sync) {
  7247. this.run();
  7248. } else {
  7249. queueWatcher(this);
  7250. }
  7251. };
  7252. /**
  7253. * Scheduler job interface.
  7254. * Will be called by the scheduler.
  7255. */
  7256. Watcher.prototype.run = function run () {
  7257. if (this.active) {
  7258. var value = this.get();
  7259. if (
  7260. value !== this.value ||
  7261. // Deep watchers and watchers on Object/Arrays should fire even
  7262. // when the value is the same, because the value may
  7263. // have mutated.
  7264. isObject(value) ||
  7265. this.deep
  7266. ) {
  7267. // set new value
  7268. var oldValue = this.value;
  7269. this.value = value;
  7270. if (this.user) {
  7271. try {
  7272. this.cb.call(this.vm, value, oldValue);
  7273. } catch (e) {
  7274. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7275. }
  7276. } else {
  7277. this.cb.call(this.vm, value, oldValue);
  7278. }
  7279. }
  7280. }
  7281. };
  7282. /**
  7283. * Evaluate the value of the watcher.
  7284. * This only gets called for lazy watchers.
  7285. */
  7286. Watcher.prototype.evaluate = function evaluate () {
  7287. this.value = this.get();
  7288. this.dirty = false;
  7289. };
  7290. /**
  7291. * Depend on all deps collected by this watcher.
  7292. */
  7293. Watcher.prototype.depend = function depend () {
  7294. var i = this.deps.length;
  7295. while (i--) {
  7296. this.deps[i].depend();
  7297. }
  7298. };
  7299. /**
  7300. * Remove self from all dependencies' subscriber list.
  7301. */
  7302. Watcher.prototype.teardown = function teardown () {
  7303. if (this.active) {
  7304. // remove self from vm's watcher list
  7305. // this is a somewhat expensive operation so we skip it
  7306. // if the vm is being destroyed.
  7307. if (!this.vm._isBeingDestroyed) {
  7308. remove(this.vm._watchers, this);
  7309. }
  7310. var i = this.deps.length;
  7311. while (i--) {
  7312. this.deps[i].removeSub(this);
  7313. }
  7314. this.active = false;
  7315. }
  7316. };
  7317. /* */
  7318. var sharedPropertyDefinition = {
  7319. enumerable: true,
  7320. configurable: true,
  7321. get: noop,
  7322. set: noop
  7323. };
  7324. function proxy (target, sourceKey, key) {
  7325. sharedPropertyDefinition.get = function proxyGetter () {
  7326. return this[sourceKey][key]
  7327. };
  7328. sharedPropertyDefinition.set = function proxySetter (val) {
  7329. this[sourceKey][key] = val;
  7330. };
  7331. Object.defineProperty(target, key, sharedPropertyDefinition);
  7332. }
  7333. function initState (vm) {
  7334. vm._watchers = [];
  7335. var opts = vm.$options;
  7336. if (opts.props) { initProps(vm, opts.props); }
  7337. if (opts.methods) { initMethods(vm, opts.methods); }
  7338. if (opts.data) {
  7339. initData(vm);
  7340. } else {
  7341. observe(vm._data = {}, true /* asRootData */);
  7342. }
  7343. if (opts.computed) { initComputed(vm, opts.computed); }
  7344. if (opts.watch && opts.watch !== nativeWatch) {
  7345. initWatch(vm, opts.watch);
  7346. }
  7347. }
  7348. function initProps (vm, propsOptions) {
  7349. var propsData = vm.$options.propsData || {};
  7350. var props = vm._props = {};
  7351. // cache prop keys so that future props updates can iterate using Array
  7352. // instead of dynamic object key enumeration.
  7353. var keys = vm.$options._propKeys = [];
  7354. var isRoot = !vm.$parent;
  7355. // root instance props should be converted
  7356. if (!isRoot) {
  7357. toggleObserving(false);
  7358. }
  7359. var loop = function ( key ) {
  7360. keys.push(key);
  7361. var value = validateProp(key, propsOptions, propsData, vm);
  7362. /* istanbul ignore else */
  7363. if (true) {
  7364. var hyphenatedKey = hyphenate(key);
  7365. if (isReservedAttribute(hyphenatedKey) ||
  7366. config.isReservedAttr(hyphenatedKey)) {
  7367. warn(
  7368. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7369. vm
  7370. );
  7371. }
  7372. defineReactive$$1(props, key, value, function () {
  7373. if (!isRoot && !isUpdatingChildComponent) {
  7374. {
  7375. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7376. return
  7377. }
  7378. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7379. if(
  7380. key === 'value' &&
  7381. Array.isArray(vm.$options.behaviors) &&
  7382. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7383. ){
  7384. return
  7385. }
  7386. if(vm._getFormData){
  7387. return
  7388. }
  7389. var $parent = vm.$parent;
  7390. while($parent){
  7391. if($parent.__next_tick_pending){
  7392. return
  7393. }
  7394. $parent = $parent.$parent;
  7395. }
  7396. }
  7397. warn(
  7398. "Avoid mutating a prop directly since the value will be " +
  7399. "overwritten whenever the parent component re-renders. " +
  7400. "Instead, use a data or computed property based on the prop's " +
  7401. "value. Prop being mutated: \"" + key + "\"",
  7402. vm
  7403. );
  7404. }
  7405. });
  7406. } else {}
  7407. // static props are already proxied on the component's prototype
  7408. // during Vue.extend(). We only need to proxy props defined at
  7409. // instantiation here.
  7410. if (!(key in vm)) {
  7411. proxy(vm, "_props", key);
  7412. }
  7413. };
  7414. for (var key in propsOptions) loop( key );
  7415. toggleObserving(true);
  7416. }
  7417. function initData (vm) {
  7418. var data = vm.$options.data;
  7419. data = vm._data = typeof data === 'function'
  7420. ? getData(data, vm)
  7421. : data || {};
  7422. if (!isPlainObject(data)) {
  7423. data = {};
  7424. true && warn(
  7425. 'data functions should return an object:\n' +
  7426. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7427. vm
  7428. );
  7429. }
  7430. // proxy data on instance
  7431. var keys = Object.keys(data);
  7432. var props = vm.$options.props;
  7433. var methods = vm.$options.methods;
  7434. var i = keys.length;
  7435. while (i--) {
  7436. var key = keys[i];
  7437. if (true) {
  7438. if (methods && hasOwn(methods, key)) {
  7439. warn(
  7440. ("Method \"" + key + "\" has already been defined as a data property."),
  7441. vm
  7442. );
  7443. }
  7444. }
  7445. if (props && hasOwn(props, key)) {
  7446. true && warn(
  7447. "The data property \"" + key + "\" is already declared as a prop. " +
  7448. "Use prop default value instead.",
  7449. vm
  7450. );
  7451. } else if (!isReserved(key)) {
  7452. proxy(vm, "_data", key);
  7453. }
  7454. }
  7455. // observe data
  7456. observe(data, true /* asRootData */);
  7457. }
  7458. function getData (data, vm) {
  7459. // #7573 disable dep collection when invoking data getters
  7460. pushTarget();
  7461. try {
  7462. return data.call(vm, vm)
  7463. } catch (e) {
  7464. handleError(e, vm, "data()");
  7465. return {}
  7466. } finally {
  7467. popTarget();
  7468. }
  7469. }
  7470. var computedWatcherOptions = { lazy: true };
  7471. function initComputed (vm, computed) {
  7472. // $flow-disable-line
  7473. var watchers = vm._computedWatchers = Object.create(null);
  7474. // computed properties are just getters during SSR
  7475. var isSSR = isServerRendering();
  7476. for (var key in computed) {
  7477. var userDef = computed[key];
  7478. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7479. if ( true && getter == null) {
  7480. warn(
  7481. ("Getter is missing for computed property \"" + key + "\"."),
  7482. vm
  7483. );
  7484. }
  7485. if (!isSSR) {
  7486. // create internal watcher for the computed property.
  7487. watchers[key] = new Watcher(
  7488. vm,
  7489. getter || noop,
  7490. noop,
  7491. computedWatcherOptions
  7492. );
  7493. }
  7494. // component-defined computed properties are already defined on the
  7495. // component prototype. We only need to define computed properties defined
  7496. // at instantiation here.
  7497. if (!(key in vm)) {
  7498. defineComputed(vm, key, userDef);
  7499. } else if (true) {
  7500. if (key in vm.$data) {
  7501. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7502. } else if (vm.$options.props && key in vm.$options.props) {
  7503. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7504. }
  7505. }
  7506. }
  7507. }
  7508. function defineComputed (
  7509. target,
  7510. key,
  7511. userDef
  7512. ) {
  7513. var shouldCache = !isServerRendering();
  7514. if (typeof userDef === 'function') {
  7515. sharedPropertyDefinition.get = shouldCache
  7516. ? createComputedGetter(key)
  7517. : createGetterInvoker(userDef);
  7518. sharedPropertyDefinition.set = noop;
  7519. } else {
  7520. sharedPropertyDefinition.get = userDef.get
  7521. ? shouldCache && userDef.cache !== false
  7522. ? createComputedGetter(key)
  7523. : createGetterInvoker(userDef.get)
  7524. : noop;
  7525. sharedPropertyDefinition.set = userDef.set || noop;
  7526. }
  7527. if ( true &&
  7528. sharedPropertyDefinition.set === noop) {
  7529. sharedPropertyDefinition.set = function () {
  7530. warn(
  7531. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7532. this
  7533. );
  7534. };
  7535. }
  7536. Object.defineProperty(target, key, sharedPropertyDefinition);
  7537. }
  7538. function createComputedGetter (key) {
  7539. return function computedGetter () {
  7540. var watcher = this._computedWatchers && this._computedWatchers[key];
  7541. if (watcher) {
  7542. if (watcher.dirty) {
  7543. watcher.evaluate();
  7544. }
  7545. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7546. watcher.depend();
  7547. }
  7548. return watcher.value
  7549. }
  7550. }
  7551. }
  7552. function createGetterInvoker(fn) {
  7553. return function computedGetter () {
  7554. return fn.call(this, this)
  7555. }
  7556. }
  7557. function initMethods (vm, methods) {
  7558. var props = vm.$options.props;
  7559. for (var key in methods) {
  7560. if (true) {
  7561. if (typeof methods[key] !== 'function') {
  7562. warn(
  7563. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7564. "Did you reference the function correctly?",
  7565. vm
  7566. );
  7567. }
  7568. if (props && hasOwn(props, key)) {
  7569. warn(
  7570. ("Method \"" + key + "\" has already been defined as a prop."),
  7571. vm
  7572. );
  7573. }
  7574. if ((key in vm) && isReserved(key)) {
  7575. warn(
  7576. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7577. "Avoid defining component methods that start with _ or $."
  7578. );
  7579. }
  7580. }
  7581. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7582. }
  7583. }
  7584. function initWatch (vm, watch) {
  7585. for (var key in watch) {
  7586. var handler = watch[key];
  7587. if (Array.isArray(handler)) {
  7588. for (var i = 0; i < handler.length; i++) {
  7589. createWatcher(vm, key, handler[i]);
  7590. }
  7591. } else {
  7592. createWatcher(vm, key, handler);
  7593. }
  7594. }
  7595. }
  7596. function createWatcher (
  7597. vm,
  7598. expOrFn,
  7599. handler,
  7600. options
  7601. ) {
  7602. if (isPlainObject(handler)) {
  7603. options = handler;
  7604. handler = handler.handler;
  7605. }
  7606. if (typeof handler === 'string') {
  7607. handler = vm[handler];
  7608. }
  7609. return vm.$watch(expOrFn, handler, options)
  7610. }
  7611. function stateMixin (Vue) {
  7612. // flow somehow has problems with directly declared definition object
  7613. // when using Object.defineProperty, so we have to procedurally build up
  7614. // the object here.
  7615. var dataDef = {};
  7616. dataDef.get = function () { return this._data };
  7617. var propsDef = {};
  7618. propsDef.get = function () { return this._props };
  7619. if (true) {
  7620. dataDef.set = function () {
  7621. warn(
  7622. 'Avoid replacing instance root $data. ' +
  7623. 'Use nested data properties instead.',
  7624. this
  7625. );
  7626. };
  7627. propsDef.set = function () {
  7628. warn("$props is readonly.", this);
  7629. };
  7630. }
  7631. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7632. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7633. Vue.prototype.$set = set;
  7634. Vue.prototype.$delete = del;
  7635. Vue.prototype.$watch = function (
  7636. expOrFn,
  7637. cb,
  7638. options
  7639. ) {
  7640. var vm = this;
  7641. if (isPlainObject(cb)) {
  7642. return createWatcher(vm, expOrFn, cb, options)
  7643. }
  7644. options = options || {};
  7645. options.user = true;
  7646. var watcher = new Watcher(vm, expOrFn, cb, options);
  7647. if (options.immediate) {
  7648. try {
  7649. cb.call(vm, watcher.value);
  7650. } catch (error) {
  7651. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7652. }
  7653. }
  7654. return function unwatchFn () {
  7655. watcher.teardown();
  7656. }
  7657. };
  7658. }
  7659. /* */
  7660. var uid$3 = 0;
  7661. function initMixin (Vue) {
  7662. Vue.prototype._init = function (options) {
  7663. var vm = this;
  7664. // a uid
  7665. vm._uid = uid$3++;
  7666. var startTag, endTag;
  7667. /* istanbul ignore if */
  7668. if ( true && config.performance && mark) {
  7669. startTag = "vue-perf-start:" + (vm._uid);
  7670. endTag = "vue-perf-end:" + (vm._uid);
  7671. mark(startTag);
  7672. }
  7673. // a flag to avoid this being observed
  7674. vm._isVue = true;
  7675. // merge options
  7676. if (options && options._isComponent) {
  7677. // optimize internal component instantiation
  7678. // since dynamic options merging is pretty slow, and none of the
  7679. // internal component options needs special treatment.
  7680. initInternalComponent(vm, options);
  7681. } else {
  7682. vm.$options = mergeOptions(
  7683. resolveConstructorOptions(vm.constructor),
  7684. options || {},
  7685. vm
  7686. );
  7687. }
  7688. /* istanbul ignore else */
  7689. if (true) {
  7690. initProxy(vm);
  7691. } else {}
  7692. // expose real self
  7693. vm._self = vm;
  7694. initLifecycle(vm);
  7695. initEvents(vm);
  7696. initRender(vm);
  7697. callHook(vm, 'beforeCreate');
  7698. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7699. initState(vm);
  7700. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7701. !vm._$fallback && callHook(vm, 'created');
  7702. /* istanbul ignore if */
  7703. if ( true && config.performance && mark) {
  7704. vm._name = formatComponentName(vm, false);
  7705. mark(endTag);
  7706. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7707. }
  7708. if (vm.$options.el) {
  7709. vm.$mount(vm.$options.el);
  7710. }
  7711. };
  7712. }
  7713. function initInternalComponent (vm, options) {
  7714. var opts = vm.$options = Object.create(vm.constructor.options);
  7715. // doing this because it's faster than dynamic enumeration.
  7716. var parentVnode = options._parentVnode;
  7717. opts.parent = options.parent;
  7718. opts._parentVnode = parentVnode;
  7719. var vnodeComponentOptions = parentVnode.componentOptions;
  7720. opts.propsData = vnodeComponentOptions.propsData;
  7721. opts._parentListeners = vnodeComponentOptions.listeners;
  7722. opts._renderChildren = vnodeComponentOptions.children;
  7723. opts._componentTag = vnodeComponentOptions.tag;
  7724. if (options.render) {
  7725. opts.render = options.render;
  7726. opts.staticRenderFns = options.staticRenderFns;
  7727. }
  7728. }
  7729. function resolveConstructorOptions (Ctor) {
  7730. var options = Ctor.options;
  7731. if (Ctor.super) {
  7732. var superOptions = resolveConstructorOptions(Ctor.super);
  7733. var cachedSuperOptions = Ctor.superOptions;
  7734. if (superOptions !== cachedSuperOptions) {
  7735. // super option changed,
  7736. // need to resolve new options.
  7737. Ctor.superOptions = superOptions;
  7738. // check if there are any late-modified/attached options (#4976)
  7739. var modifiedOptions = resolveModifiedOptions(Ctor);
  7740. // update base extend options
  7741. if (modifiedOptions) {
  7742. extend(Ctor.extendOptions, modifiedOptions);
  7743. }
  7744. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7745. if (options.name) {
  7746. options.components[options.name] = Ctor;
  7747. }
  7748. }
  7749. }
  7750. return options
  7751. }
  7752. function resolveModifiedOptions (Ctor) {
  7753. var modified;
  7754. var latest = Ctor.options;
  7755. var sealed = Ctor.sealedOptions;
  7756. for (var key in latest) {
  7757. if (latest[key] !== sealed[key]) {
  7758. if (!modified) { modified = {}; }
  7759. modified[key] = latest[key];
  7760. }
  7761. }
  7762. return modified
  7763. }
  7764. function Vue (options) {
  7765. if ( true &&
  7766. !(this instanceof Vue)
  7767. ) {
  7768. warn('Vue is a constructor and should be called with the `new` keyword');
  7769. }
  7770. this._init(options);
  7771. }
  7772. initMixin(Vue);
  7773. stateMixin(Vue);
  7774. eventsMixin(Vue);
  7775. lifecycleMixin(Vue);
  7776. renderMixin(Vue);
  7777. /* */
  7778. function initUse (Vue) {
  7779. Vue.use = function (plugin) {
  7780. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7781. if (installedPlugins.indexOf(plugin) > -1) {
  7782. return this
  7783. }
  7784. // additional parameters
  7785. var args = toArray(arguments, 1);
  7786. args.unshift(this);
  7787. if (typeof plugin.install === 'function') {
  7788. plugin.install.apply(plugin, args);
  7789. } else if (typeof plugin === 'function') {
  7790. plugin.apply(null, args);
  7791. }
  7792. installedPlugins.push(plugin);
  7793. return this
  7794. };
  7795. }
  7796. /* */
  7797. function initMixin$1 (Vue) {
  7798. Vue.mixin = function (mixin) {
  7799. this.options = mergeOptions(this.options, mixin);
  7800. return this
  7801. };
  7802. }
  7803. /* */
  7804. function initExtend (Vue) {
  7805. /**
  7806. * Each instance constructor, including Vue, has a unique
  7807. * cid. This enables us to create wrapped "child
  7808. * constructors" for prototypal inheritance and cache them.
  7809. */
  7810. Vue.cid = 0;
  7811. var cid = 1;
  7812. /**
  7813. * Class inheritance
  7814. */
  7815. Vue.extend = function (extendOptions) {
  7816. extendOptions = extendOptions || {};
  7817. var Super = this;
  7818. var SuperId = Super.cid;
  7819. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7820. if (cachedCtors[SuperId]) {
  7821. return cachedCtors[SuperId]
  7822. }
  7823. var name = extendOptions.name || Super.options.name;
  7824. if ( true && name) {
  7825. validateComponentName(name);
  7826. }
  7827. var Sub = function VueComponent (options) {
  7828. this._init(options);
  7829. };
  7830. Sub.prototype = Object.create(Super.prototype);
  7831. Sub.prototype.constructor = Sub;
  7832. Sub.cid = cid++;
  7833. Sub.options = mergeOptions(
  7834. Super.options,
  7835. extendOptions
  7836. );
  7837. Sub['super'] = Super;
  7838. // For props and computed properties, we define the proxy getters on
  7839. // the Vue instances at extension time, on the extended prototype. This
  7840. // avoids Object.defineProperty calls for each instance created.
  7841. if (Sub.options.props) {
  7842. initProps$1(Sub);
  7843. }
  7844. if (Sub.options.computed) {
  7845. initComputed$1(Sub);
  7846. }
  7847. // allow further extension/mixin/plugin usage
  7848. Sub.extend = Super.extend;
  7849. Sub.mixin = Super.mixin;
  7850. Sub.use = Super.use;
  7851. // create asset registers, so extended classes
  7852. // can have their private assets too.
  7853. ASSET_TYPES.forEach(function (type) {
  7854. Sub[type] = Super[type];
  7855. });
  7856. // enable recursive self-lookup
  7857. if (name) {
  7858. Sub.options.components[name] = Sub;
  7859. }
  7860. // keep a reference to the super options at extension time.
  7861. // later at instantiation we can check if Super's options have
  7862. // been updated.
  7863. Sub.superOptions = Super.options;
  7864. Sub.extendOptions = extendOptions;
  7865. Sub.sealedOptions = extend({}, Sub.options);
  7866. // cache constructor
  7867. cachedCtors[SuperId] = Sub;
  7868. return Sub
  7869. };
  7870. }
  7871. function initProps$1 (Comp) {
  7872. var props = Comp.options.props;
  7873. for (var key in props) {
  7874. proxy(Comp.prototype, "_props", key);
  7875. }
  7876. }
  7877. function initComputed$1 (Comp) {
  7878. var computed = Comp.options.computed;
  7879. for (var key in computed) {
  7880. defineComputed(Comp.prototype, key, computed[key]);
  7881. }
  7882. }
  7883. /* */
  7884. function initAssetRegisters (Vue) {
  7885. /**
  7886. * Create asset registration methods.
  7887. */
  7888. ASSET_TYPES.forEach(function (type) {
  7889. Vue[type] = function (
  7890. id,
  7891. definition
  7892. ) {
  7893. if (!definition) {
  7894. return this.options[type + 's'][id]
  7895. } else {
  7896. /* istanbul ignore if */
  7897. if ( true && type === 'component') {
  7898. validateComponentName(id);
  7899. }
  7900. if (type === 'component' && isPlainObject(definition)) {
  7901. definition.name = definition.name || id;
  7902. definition = this.options._base.extend(definition);
  7903. }
  7904. if (type === 'directive' && typeof definition === 'function') {
  7905. definition = { bind: definition, update: definition };
  7906. }
  7907. this.options[type + 's'][id] = definition;
  7908. return definition
  7909. }
  7910. };
  7911. });
  7912. }
  7913. /* */
  7914. function getComponentName (opts) {
  7915. return opts && (opts.Ctor.options.name || opts.tag)
  7916. }
  7917. function matches (pattern, name) {
  7918. if (Array.isArray(pattern)) {
  7919. return pattern.indexOf(name) > -1
  7920. } else if (typeof pattern === 'string') {
  7921. return pattern.split(',').indexOf(name) > -1
  7922. } else if (isRegExp(pattern)) {
  7923. return pattern.test(name)
  7924. }
  7925. /* istanbul ignore next */
  7926. return false
  7927. }
  7928. function pruneCache (keepAliveInstance, filter) {
  7929. var cache = keepAliveInstance.cache;
  7930. var keys = keepAliveInstance.keys;
  7931. var _vnode = keepAliveInstance._vnode;
  7932. for (var key in cache) {
  7933. var cachedNode = cache[key];
  7934. if (cachedNode) {
  7935. var name = getComponentName(cachedNode.componentOptions);
  7936. if (name && !filter(name)) {
  7937. pruneCacheEntry(cache, key, keys, _vnode);
  7938. }
  7939. }
  7940. }
  7941. }
  7942. function pruneCacheEntry (
  7943. cache,
  7944. key,
  7945. keys,
  7946. current
  7947. ) {
  7948. var cached$$1 = cache[key];
  7949. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7950. cached$$1.componentInstance.$destroy();
  7951. }
  7952. cache[key] = null;
  7953. remove(keys, key);
  7954. }
  7955. var patternTypes = [String, RegExp, Array];
  7956. var KeepAlive = {
  7957. name: 'keep-alive',
  7958. abstract: true,
  7959. props: {
  7960. include: patternTypes,
  7961. exclude: patternTypes,
  7962. max: [String, Number]
  7963. },
  7964. created: function created () {
  7965. this.cache = Object.create(null);
  7966. this.keys = [];
  7967. },
  7968. destroyed: function destroyed () {
  7969. for (var key in this.cache) {
  7970. pruneCacheEntry(this.cache, key, this.keys);
  7971. }
  7972. },
  7973. mounted: function mounted () {
  7974. var this$1 = this;
  7975. this.$watch('include', function (val) {
  7976. pruneCache(this$1, function (name) { return matches(val, name); });
  7977. });
  7978. this.$watch('exclude', function (val) {
  7979. pruneCache(this$1, function (name) { return !matches(val, name); });
  7980. });
  7981. },
  7982. render: function render () {
  7983. var slot = this.$slots.default;
  7984. var vnode = getFirstComponentChild(slot);
  7985. var componentOptions = vnode && vnode.componentOptions;
  7986. if (componentOptions) {
  7987. // check pattern
  7988. var name = getComponentName(componentOptions);
  7989. var ref = this;
  7990. var include = ref.include;
  7991. var exclude = ref.exclude;
  7992. if (
  7993. // not included
  7994. (include && (!name || !matches(include, name))) ||
  7995. // excluded
  7996. (exclude && name && matches(exclude, name))
  7997. ) {
  7998. return vnode
  7999. }
  8000. var ref$1 = this;
  8001. var cache = ref$1.cache;
  8002. var keys = ref$1.keys;
  8003. var key = vnode.key == null
  8004. // same constructor may get registered as different local components
  8005. // so cid alone is not enough (#3269)
  8006. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8007. : vnode.key;
  8008. if (cache[key]) {
  8009. vnode.componentInstance = cache[key].componentInstance;
  8010. // make current key freshest
  8011. remove(keys, key);
  8012. keys.push(key);
  8013. } else {
  8014. cache[key] = vnode;
  8015. keys.push(key);
  8016. // prune oldest entry
  8017. if (this.max && keys.length > parseInt(this.max)) {
  8018. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8019. }
  8020. }
  8021. vnode.data.keepAlive = true;
  8022. }
  8023. return vnode || (slot && slot[0])
  8024. }
  8025. };
  8026. var builtInComponents = {
  8027. KeepAlive: KeepAlive
  8028. };
  8029. /* */
  8030. function initGlobalAPI (Vue) {
  8031. // config
  8032. var configDef = {};
  8033. configDef.get = function () { return config; };
  8034. if (true) {
  8035. configDef.set = function () {
  8036. warn(
  8037. 'Do not replace the Vue.config object, set individual fields instead.'
  8038. );
  8039. };
  8040. }
  8041. Object.defineProperty(Vue, 'config', configDef);
  8042. // exposed util methods.
  8043. // NOTE: these are not considered part of the public API - avoid relying on
  8044. // them unless you are aware of the risk.
  8045. Vue.util = {
  8046. warn: warn,
  8047. extend: extend,
  8048. mergeOptions: mergeOptions,
  8049. defineReactive: defineReactive$$1
  8050. };
  8051. Vue.set = set;
  8052. Vue.delete = del;
  8053. Vue.nextTick = nextTick;
  8054. // 2.6 explicit observable API
  8055. Vue.observable = function (obj) {
  8056. observe(obj);
  8057. return obj
  8058. };
  8059. Vue.options = Object.create(null);
  8060. ASSET_TYPES.forEach(function (type) {
  8061. Vue.options[type + 's'] = Object.create(null);
  8062. });
  8063. // this is used to identify the "base" constructor to extend all plain-object
  8064. // components with in Weex's multi-instance scenarios.
  8065. Vue.options._base = Vue;
  8066. extend(Vue.options.components, builtInComponents);
  8067. initUse(Vue);
  8068. initMixin$1(Vue);
  8069. initExtend(Vue);
  8070. initAssetRegisters(Vue);
  8071. }
  8072. initGlobalAPI(Vue);
  8073. Object.defineProperty(Vue.prototype, '$isServer', {
  8074. get: isServerRendering
  8075. });
  8076. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8077. get: function get () {
  8078. /* istanbul ignore next */
  8079. return this.$vnode && this.$vnode.ssrContext
  8080. }
  8081. });
  8082. // expose FunctionalRenderContext for ssr runtime helper installation
  8083. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8084. value: FunctionalRenderContext
  8085. });
  8086. Vue.version = '2.6.11';
  8087. /**
  8088. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8089. */
  8090. var ARRAYTYPE = '[object Array]';
  8091. var OBJECTTYPE = '[object Object]';
  8092. var NULLTYPE = '[object Null]';
  8093. var UNDEFINEDTYPE = '[object Undefined]';
  8094. // const FUNCTIONTYPE = '[object Function]'
  8095. function diff(current, pre) {
  8096. var result = {};
  8097. syncKeys(current, pre);
  8098. _diff(current, pre, '', result);
  8099. return result
  8100. }
  8101. function syncKeys(current, pre) {
  8102. if (current === pre) { return }
  8103. var rootCurrentType = type(current);
  8104. var rootPreType = type(pre);
  8105. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8106. if(Object.keys(current).length >= Object.keys(pre).length){
  8107. for (var key in pre) {
  8108. var currentValue = current[key];
  8109. if (currentValue === undefined) {
  8110. current[key] = null;
  8111. } else {
  8112. syncKeys(currentValue, pre[key]);
  8113. }
  8114. }
  8115. }
  8116. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8117. if (current.length >= pre.length) {
  8118. pre.forEach(function (item, index) {
  8119. syncKeys(current[index], item);
  8120. });
  8121. }
  8122. }
  8123. }
  8124. function nullOrUndefined(currentType, preType) {
  8125. if(
  8126. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8127. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8128. ) {
  8129. return false
  8130. }
  8131. return true
  8132. }
  8133. function _diff(current, pre, path, result) {
  8134. if (current === pre) { return }
  8135. var rootCurrentType = type(current);
  8136. var rootPreType = type(pre);
  8137. if (rootCurrentType == OBJECTTYPE) {
  8138. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8139. setResult(result, path, current);
  8140. } else {
  8141. var loop = function ( key ) {
  8142. var currentValue = current[key];
  8143. var preValue = pre[key];
  8144. var currentType = type(currentValue);
  8145. var preType = type(preValue);
  8146. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8147. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8148. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8149. }
  8150. } else if (currentType == ARRAYTYPE) {
  8151. if (preType != ARRAYTYPE) {
  8152. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8153. } else {
  8154. if (currentValue.length < preValue.length) {
  8155. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8156. } else {
  8157. currentValue.forEach(function (item, index) {
  8158. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8159. });
  8160. }
  8161. }
  8162. } else if (currentType == OBJECTTYPE) {
  8163. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8164. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8165. } else {
  8166. for (var subKey in currentValue) {
  8167. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8168. }
  8169. }
  8170. }
  8171. };
  8172. for (var key in current) loop( key );
  8173. }
  8174. } else if (rootCurrentType == ARRAYTYPE) {
  8175. if (rootPreType != ARRAYTYPE) {
  8176. setResult(result, path, current);
  8177. } else {
  8178. if (current.length < pre.length) {
  8179. setResult(result, path, current);
  8180. } else {
  8181. current.forEach(function (item, index) {
  8182. _diff(item, pre[index], path + '[' + index + ']', result);
  8183. });
  8184. }
  8185. }
  8186. } else {
  8187. setResult(result, path, current);
  8188. }
  8189. }
  8190. function setResult(result, k, v) {
  8191. // if (type(v) != FUNCTIONTYPE) {
  8192. result[k] = v;
  8193. // }
  8194. }
  8195. function type(obj) {
  8196. return Object.prototype.toString.call(obj)
  8197. }
  8198. /* */
  8199. function flushCallbacks$1(vm) {
  8200. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8201. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8202. var mpInstance = vm.$scope;
  8203. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8204. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8205. }
  8206. var copies = vm.__next_tick_callbacks.slice(0);
  8207. vm.__next_tick_callbacks.length = 0;
  8208. for (var i = 0; i < copies.length; i++) {
  8209. copies[i]();
  8210. }
  8211. }
  8212. }
  8213. function hasRenderWatcher(vm) {
  8214. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8215. }
  8216. function nextTick$1(vm, cb) {
  8217. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8218. //2.nextTick 之前存在 render watcher
  8219. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8220. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8221. var mpInstance = vm.$scope;
  8222. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8223. ']:nextVueTick');
  8224. }
  8225. return nextTick(cb, vm)
  8226. }else{
  8227. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8228. var mpInstance$1 = vm.$scope;
  8229. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8230. ']:nextMPTick');
  8231. }
  8232. }
  8233. var _resolve;
  8234. if (!vm.__next_tick_callbacks) {
  8235. vm.__next_tick_callbacks = [];
  8236. }
  8237. vm.__next_tick_callbacks.push(function () {
  8238. if (cb) {
  8239. try {
  8240. cb.call(vm);
  8241. } catch (e) {
  8242. handleError(e, vm, 'nextTick');
  8243. }
  8244. } else if (_resolve) {
  8245. _resolve(vm);
  8246. }
  8247. });
  8248. // $flow-disable-line
  8249. if (!cb && typeof Promise !== 'undefined') {
  8250. return new Promise(function (resolve) {
  8251. _resolve = resolve;
  8252. })
  8253. }
  8254. }
  8255. /* */
  8256. function clearInstance(key, value) {
  8257. // 简易去除 Vue 和小程序组件实例
  8258. if (value) {
  8259. if (value._isVue || value.__v_isMPComponent) {
  8260. return {}
  8261. }
  8262. }
  8263. return value
  8264. }
  8265. function cloneWithData(vm) {
  8266. // 确保当前 vm 所有数据被同步
  8267. var ret = Object.create(null);
  8268. var dataKeys = [].concat(
  8269. Object.keys(vm._data || {}),
  8270. Object.keys(vm._computedWatchers || {}));
  8271. dataKeys.reduce(function(ret, key) {
  8272. ret[key] = vm[key];
  8273. return ret
  8274. }, ret);
  8275. // vue-composition-api
  8276. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8277. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8278. if (rawBindings) {
  8279. Object.keys(rawBindings).forEach(function (key) {
  8280. ret[key] = vm[key];
  8281. });
  8282. }
  8283. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8284. Object.assign(ret, vm.$mp.data || {});
  8285. if (
  8286. Array.isArray(vm.$options.behaviors) &&
  8287. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8288. ) { //form-field
  8289. ret['name'] = vm.name;
  8290. ret['value'] = vm.value;
  8291. }
  8292. return JSON.parse(JSON.stringify(ret, clearInstance))
  8293. }
  8294. var patch = function(oldVnode, vnode) {
  8295. var this$1 = this;
  8296. if (vnode === null) { //destroy
  8297. return
  8298. }
  8299. if (this.mpType === 'page' || this.mpType === 'component') {
  8300. var mpInstance = this.$scope;
  8301. var data = Object.create(null);
  8302. try {
  8303. data = cloneWithData(this);
  8304. } catch (err) {
  8305. console.error(err);
  8306. }
  8307. data.__webviewId__ = mpInstance.data.__webviewId__;
  8308. var mpData = Object.create(null);
  8309. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8310. mpData[key] = mpInstance.data[key];
  8311. });
  8312. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8313. if (Object.keys(diffData).length) {
  8314. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8315. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8316. ']差量更新',
  8317. JSON.stringify(diffData));
  8318. }
  8319. this.__next_tick_pending = true;
  8320. mpInstance.setData(diffData, function () {
  8321. this$1.__next_tick_pending = false;
  8322. flushCallbacks$1(this$1);
  8323. });
  8324. } else {
  8325. flushCallbacks$1(this);
  8326. }
  8327. }
  8328. };
  8329. /* */
  8330. function createEmptyRender() {
  8331. }
  8332. function mountComponent$1(
  8333. vm,
  8334. el,
  8335. hydrating
  8336. ) {
  8337. if (!vm.mpType) {//main.js 中的 new Vue
  8338. return vm
  8339. }
  8340. if (vm.mpType === 'app') {
  8341. vm.$options.render = createEmptyRender;
  8342. }
  8343. if (!vm.$options.render) {
  8344. vm.$options.render = createEmptyRender;
  8345. if (true) {
  8346. /* istanbul ignore if */
  8347. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8348. vm.$options.el || el) {
  8349. warn(
  8350. 'You are using the runtime-only build of Vue where the template ' +
  8351. 'compiler is not available. Either pre-compile the templates into ' +
  8352. 'render functions, or use the compiler-included build.',
  8353. vm
  8354. );
  8355. } else {
  8356. warn(
  8357. 'Failed to mount component: template or render function not defined.',
  8358. vm
  8359. );
  8360. }
  8361. }
  8362. }
  8363. !vm._$fallback && callHook(vm, 'beforeMount');
  8364. var updateComponent = function () {
  8365. vm._update(vm._render(), hydrating);
  8366. };
  8367. // we set this to vm._watcher inside the watcher's constructor
  8368. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8369. // component's mounted hook), which relies on vm._watcher being already defined
  8370. new Watcher(vm, updateComponent, noop, {
  8371. before: function before() {
  8372. if (vm._isMounted && !vm._isDestroyed) {
  8373. callHook(vm, 'beforeUpdate');
  8374. }
  8375. }
  8376. }, true /* isRenderWatcher */);
  8377. hydrating = false;
  8378. return vm
  8379. }
  8380. /* */
  8381. function renderClass (
  8382. staticClass,
  8383. dynamicClass
  8384. ) {
  8385. if (isDef(staticClass) || isDef(dynamicClass)) {
  8386. return concat(staticClass, stringifyClass(dynamicClass))
  8387. }
  8388. /* istanbul ignore next */
  8389. return ''
  8390. }
  8391. function concat (a, b) {
  8392. return a ? b ? (a + ' ' + b) : a : (b || '')
  8393. }
  8394. function stringifyClass (value) {
  8395. if (Array.isArray(value)) {
  8396. return stringifyArray(value)
  8397. }
  8398. if (isObject(value)) {
  8399. return stringifyObject(value)
  8400. }
  8401. if (typeof value === 'string') {
  8402. return value
  8403. }
  8404. /* istanbul ignore next */
  8405. return ''
  8406. }
  8407. function stringifyArray (value) {
  8408. var res = '';
  8409. var stringified;
  8410. for (var i = 0, l = value.length; i < l; i++) {
  8411. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8412. if (res) { res += ' '; }
  8413. res += stringified;
  8414. }
  8415. }
  8416. return res
  8417. }
  8418. function stringifyObject (value) {
  8419. var res = '';
  8420. for (var key in value) {
  8421. if (value[key]) {
  8422. if (res) { res += ' '; }
  8423. res += key;
  8424. }
  8425. }
  8426. return res
  8427. }
  8428. /* */
  8429. var parseStyleText = cached(function (cssText) {
  8430. var res = {};
  8431. var listDelimiter = /;(?![^(]*\))/g;
  8432. var propertyDelimiter = /:(.+)/;
  8433. cssText.split(listDelimiter).forEach(function (item) {
  8434. if (item) {
  8435. var tmp = item.split(propertyDelimiter);
  8436. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8437. }
  8438. });
  8439. return res
  8440. });
  8441. // normalize possible array / string values into Object
  8442. function normalizeStyleBinding (bindingStyle) {
  8443. if (Array.isArray(bindingStyle)) {
  8444. return toObject(bindingStyle)
  8445. }
  8446. if (typeof bindingStyle === 'string') {
  8447. return parseStyleText(bindingStyle)
  8448. }
  8449. return bindingStyle
  8450. }
  8451. /* */
  8452. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8453. function getTarget(obj, path) {
  8454. var parts = path.split('.');
  8455. var key = parts[0];
  8456. if (key.indexOf('__$n') === 0) { //number index
  8457. key = parseInt(key.replace('__$n', ''));
  8458. }
  8459. if (parts.length === 1) {
  8460. return obj[key]
  8461. }
  8462. return getTarget(obj[key], parts.slice(1).join('.'))
  8463. }
  8464. function internalMixin(Vue) {
  8465. Vue.config.errorHandler = function(err, vm, info) {
  8466. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8467. console.error(err);
  8468. /* eslint-disable no-undef */
  8469. var app = typeof getApp === 'function' && getApp();
  8470. if (app && app.onError) {
  8471. app.onError(err);
  8472. }
  8473. };
  8474. var oldEmit = Vue.prototype.$emit;
  8475. Vue.prototype.$emit = function(event) {
  8476. if (this.$scope && event) {
  8477. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8478. if (triggerEvent) {
  8479. try {
  8480. triggerEvent.call(this.$scope, event, {
  8481. __args__: toArray(arguments, 1)
  8482. });
  8483. } catch (error) {
  8484. }
  8485. }
  8486. }
  8487. return oldEmit.apply(this, arguments)
  8488. };
  8489. Vue.prototype.$nextTick = function(fn) {
  8490. return nextTick$1(this, fn)
  8491. };
  8492. MP_METHODS.forEach(function (method) {
  8493. Vue.prototype[method] = function(args) {
  8494. if (this.$scope && this.$scope[method]) {
  8495. return this.$scope[method](args)
  8496. }
  8497. // mp-alipay
  8498. if (typeof my === 'undefined') {
  8499. return
  8500. }
  8501. if (method === 'createSelectorQuery') {
  8502. /* eslint-disable no-undef */
  8503. return my.createSelectorQuery(args)
  8504. } else if (method === 'createIntersectionObserver') {
  8505. /* eslint-disable no-undef */
  8506. return my.createIntersectionObserver(args)
  8507. }
  8508. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8509. };
  8510. });
  8511. Vue.prototype.__init_provide = initProvide;
  8512. Vue.prototype.__init_injections = initInjections;
  8513. Vue.prototype.__call_hook = function(hook, args) {
  8514. var vm = this;
  8515. // #7573 disable dep collection when invoking lifecycle hooks
  8516. pushTarget();
  8517. var handlers = vm.$options[hook];
  8518. var info = hook + " hook";
  8519. var ret;
  8520. if (handlers) {
  8521. for (var i = 0, j = handlers.length; i < j; i++) {
  8522. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8523. }
  8524. }
  8525. if (vm._hasHookEvent) {
  8526. vm.$emit('hook:' + hook, args);
  8527. }
  8528. popTarget();
  8529. return ret
  8530. };
  8531. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8532. if (Array.isArray(modifiers)) {
  8533. if (modifiers.indexOf('trim') !== -1) {
  8534. value = value.trim();
  8535. }
  8536. if (modifiers.indexOf('number') !== -1) {
  8537. value = this._n(value);
  8538. }
  8539. }
  8540. if (!target) {
  8541. target = this;
  8542. }
  8543. // 解决动态属性添加
  8544. Vue.set(target, key, value);
  8545. };
  8546. Vue.prototype.__set_sync = function(target, key, value) {
  8547. if (!target) {
  8548. target = this;
  8549. }
  8550. // 解决动态属性添加
  8551. Vue.set(target, key, value);
  8552. };
  8553. Vue.prototype.__get_orig = function(item) {
  8554. if (isPlainObject(item)) {
  8555. return item['$orig'] || item
  8556. }
  8557. return item
  8558. };
  8559. Vue.prototype.__get_value = function(dataPath, target) {
  8560. return getTarget(target || this, dataPath)
  8561. };
  8562. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8563. return renderClass(staticClass, dynamicClass)
  8564. };
  8565. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8566. if (!dynamicStyle && !staticStyle) {
  8567. return ''
  8568. }
  8569. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8570. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8571. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8572. };
  8573. Vue.prototype.__map = function(val, iteratee) {
  8574. //TODO 暂不考虑 string
  8575. var ret, i, l, keys, key;
  8576. if (Array.isArray(val)) {
  8577. ret = new Array(val.length);
  8578. for (i = 0, l = val.length; i < l; i++) {
  8579. ret[i] = iteratee(val[i], i);
  8580. }
  8581. return ret
  8582. } else if (isObject(val)) {
  8583. keys = Object.keys(val);
  8584. ret = Object.create(null);
  8585. for (i = 0, l = keys.length; i < l; i++) {
  8586. key = keys[i];
  8587. ret[key] = iteratee(val[key], key, i);
  8588. }
  8589. return ret
  8590. } else if (typeof val === 'number') {
  8591. ret = new Array(val);
  8592. for (i = 0, l = val; i < l; i++) {
  8593. // 第一个参数暂时仍和小程序一致
  8594. ret[i] = iteratee(i, i);
  8595. }
  8596. return ret
  8597. }
  8598. return []
  8599. };
  8600. }
  8601. /* */
  8602. var LIFECYCLE_HOOKS$1 = [
  8603. //App
  8604. 'onLaunch',
  8605. 'onShow',
  8606. 'onHide',
  8607. 'onUniNViewMessage',
  8608. 'onPageNotFound',
  8609. 'onThemeChange',
  8610. 'onError',
  8611. 'onUnhandledRejection',
  8612. //Page
  8613. 'onInit',
  8614. 'onLoad',
  8615. // 'onShow',
  8616. 'onReady',
  8617. // 'onHide',
  8618. 'onUnload',
  8619. 'onPullDownRefresh',
  8620. 'onReachBottom',
  8621. 'onTabItemTap',
  8622. 'onAddToFavorites',
  8623. 'onShareTimeline',
  8624. 'onShareAppMessage',
  8625. 'onResize',
  8626. 'onPageScroll',
  8627. 'onNavigationBarButtonTap',
  8628. 'onBackPress',
  8629. 'onNavigationBarSearchInputChanged',
  8630. 'onNavigationBarSearchInputConfirmed',
  8631. 'onNavigationBarSearchInputClicked',
  8632. 'onUploadDouyinVideo',
  8633. 'onNFCReadMessage',
  8634. //Component
  8635. // 'onReady', // 兼容旧版本,应该移除该事件
  8636. 'onPageShow',
  8637. 'onPageHide',
  8638. 'onPageResize'
  8639. ];
  8640. function lifecycleMixin$1(Vue) {
  8641. //fixed vue-class-component
  8642. var oldExtend = Vue.extend;
  8643. Vue.extend = function(extendOptions) {
  8644. extendOptions = extendOptions || {};
  8645. var methods = extendOptions.methods;
  8646. if (methods) {
  8647. Object.keys(methods).forEach(function (methodName) {
  8648. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8649. extendOptions[methodName] = methods[methodName];
  8650. delete methods[methodName];
  8651. }
  8652. });
  8653. }
  8654. return oldExtend.call(this, extendOptions)
  8655. };
  8656. var strategies = Vue.config.optionMergeStrategies;
  8657. var mergeHook = strategies.created;
  8658. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8659. strategies[hook] = mergeHook;
  8660. });
  8661. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8662. }
  8663. /* */
  8664. // install platform patch function
  8665. Vue.prototype.__patch__ = patch;
  8666. // public mount method
  8667. Vue.prototype.$mount = function(
  8668. el ,
  8669. hydrating
  8670. ) {
  8671. return mountComponent$1(this, el, hydrating)
  8672. };
  8673. lifecycleMixin$1(Vue);
  8674. internalMixin(Vue);
  8675. /* */
  8676. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8677. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8678. /***/ }),
  8679. /***/ 26:
  8680. /*!*********************************************!*\
  8681. !*** E:/Desktop/zd_wechatApp(1)/pages.json ***!
  8682. \*********************************************/
  8683. /*! no static exports found */
  8684. /***/ (function(module, exports) {
  8685. /***/ }),
  8686. /***/ 3:
  8687. /*!***********************************!*\
  8688. !*** (webpack)/buildin/global.js ***!
  8689. \***********************************/
  8690. /*! no static exports found */
  8691. /***/ (function(module, exports) {
  8692. var g;
  8693. // This works in non-strict mode
  8694. g = (function() {
  8695. return this;
  8696. })();
  8697. try {
  8698. // This works if eval is allowed (see CSP)
  8699. g = g || new Function("return this")();
  8700. } catch (e) {
  8701. // This works if the window reference is available
  8702. if (typeof window === "object") g = window;
  8703. }
  8704. // g can still be undefined, but nothing to do about it...
  8705. // We return undefined, instead of nothing here, so it's
  8706. // easier to handle this case. if(!global) { ...}
  8707. module.exports = g;
  8708. /***/ }),
  8709. /***/ 32:
  8710. /*!**********************************************************************************************************!*\
  8711. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8712. \**********************************************************************************************************/
  8713. /*! exports provided: default */
  8714. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8715. "use strict";
  8716. __webpack_require__.r(__webpack_exports__);
  8717. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8718. /* globals __VUE_SSR_CONTEXT__ */
  8719. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8720. // This module is a runtime utility for cleaner component module output and will
  8721. // be included in the final webpack user bundle.
  8722. function normalizeComponent (
  8723. scriptExports,
  8724. render,
  8725. staticRenderFns,
  8726. functionalTemplate,
  8727. injectStyles,
  8728. scopeId,
  8729. moduleIdentifier, /* server only */
  8730. shadowMode, /* vue-cli only */
  8731. components, // fixed by xxxxxx auto components
  8732. renderjs // fixed by xxxxxx renderjs
  8733. ) {
  8734. // Vue.extend constructor export interop
  8735. var options = typeof scriptExports === 'function'
  8736. ? scriptExports.options
  8737. : scriptExports
  8738. // fixed by xxxxxx auto components
  8739. if (components) {
  8740. if (!options.components) {
  8741. options.components = {}
  8742. }
  8743. var hasOwn = Object.prototype.hasOwnProperty
  8744. for (var name in components) {
  8745. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8746. options.components[name] = components[name]
  8747. }
  8748. }
  8749. }
  8750. // fixed by xxxxxx renderjs
  8751. if (renderjs) {
  8752. if(typeof renderjs.beforeCreate === 'function'){
  8753. renderjs.beforeCreate = [renderjs.beforeCreate]
  8754. }
  8755. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8756. this[renderjs.__module] = this
  8757. });
  8758. (options.mixins || (options.mixins = [])).push(renderjs)
  8759. }
  8760. // render functions
  8761. if (render) {
  8762. options.render = render
  8763. options.staticRenderFns = staticRenderFns
  8764. options._compiled = true
  8765. }
  8766. // functional template
  8767. if (functionalTemplate) {
  8768. options.functional = true
  8769. }
  8770. // scopedId
  8771. if (scopeId) {
  8772. options._scopeId = 'data-v-' + scopeId
  8773. }
  8774. var hook
  8775. if (moduleIdentifier) { // server build
  8776. hook = function (context) {
  8777. // 2.3 injection
  8778. context =
  8779. context || // cached call
  8780. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8781. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8782. // 2.2 with runInNewContext: true
  8783. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8784. context = __VUE_SSR_CONTEXT__
  8785. }
  8786. // inject component styles
  8787. if (injectStyles) {
  8788. injectStyles.call(this, context)
  8789. }
  8790. // register component module identifier for async chunk inferrence
  8791. if (context && context._registeredComponents) {
  8792. context._registeredComponents.add(moduleIdentifier)
  8793. }
  8794. }
  8795. // used by ssr in case component is cached and beforeCreate
  8796. // never gets called
  8797. options._ssrRegister = hook
  8798. } else if (injectStyles) {
  8799. hook = shadowMode
  8800. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8801. : injectStyles
  8802. }
  8803. if (hook) {
  8804. if (options.functional) {
  8805. // for template-only hot-reload because in that case the render fn doesn't
  8806. // go through the normalizer
  8807. options._injectStyles = hook
  8808. // register for functioal component in vue file
  8809. var originalRender = options.render
  8810. options.render = function renderWithStyleInjection (h, context) {
  8811. hook.call(context)
  8812. return originalRender(h, context)
  8813. }
  8814. } else {
  8815. // inject component registration as beforeCreate hook
  8816. var existing = options.beforeCreate
  8817. options.beforeCreate = existing
  8818. ? [].concat(existing, hook)
  8819. : [hook]
  8820. }
  8821. }
  8822. return {
  8823. exports: scriptExports,
  8824. options: options
  8825. }
  8826. }
  8827. /***/ }),
  8828. /***/ 33:
  8829. /*!***********************************************!*\
  8830. !*** E:/Desktop/zd_wechatApp(1)/api/index.js ***!
  8831. \***********************************************/
  8832. /*! no static exports found */
  8833. /***/ (function(module, exports, __webpack_require__) {
  8834. "use strict";
  8835. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8836. Object.defineProperty(exports, "__esModule", {
  8837. value: true
  8838. });
  8839. exports.default = void 0;
  8840. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8841. var _common = _interopRequireDefault(__webpack_require__(/*! ./common.js */ 34));
  8842. var _login = _interopRequireDefault(__webpack_require__(/*! ./login.js */ 37));
  8843. 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; }
  8844. 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; }
  8845. var service = _objectSpread(_objectSpread({}, _common.default), _login.default);
  8846. var _default = service;
  8847. exports.default = _default;
  8848. /***/ }),
  8849. /***/ 34:
  8850. /*!************************************************!*\
  8851. !*** E:/Desktop/zd_wechatApp(1)/api/common.js ***!
  8852. \************************************************/
  8853. /*! no static exports found */
  8854. /***/ (function(module, exports, __webpack_require__) {
  8855. "use strict";
  8856. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8857. Object.defineProperty(exports, "__esModule", {
  8858. value: true
  8859. });
  8860. exports.default = void 0;
  8861. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8862. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  8863. var _getDistrict$getUnit$;
  8864. var _default = (_getDistrict$getUnit$ = {
  8865. //选择行政区
  8866. getDistrict: function getDistrict(data) {
  8867. return _request.default.requestFn("/system/dict/data/type/district", data);
  8868. },
  8869. // //选择小区
  8870. // getArea(data) {
  8871. // return utils.requestEn(`/mobile/area/getArea`, data)
  8872. // },
  8873. //选择单元
  8874. getUnit: function getUnit(data) {
  8875. return _request.default.requestEn("/mobile/unit/getUnit", data);
  8876. },
  8877. //选择楼宇
  8878. getBuilding: function getBuilding(data) {
  8879. return _request.default.requestEn("/mobile/building/getBuilding", data);
  8880. },
  8881. //选择房屋(门牌)
  8882. getHouse: function getHouse(data) {
  8883. return _request.default.requestEn("/mobile/house/getHouse", data);
  8884. },
  8885. //公告列表
  8886. getNoticeList: function getNoticeList(data) {
  8887. return _request.default.requestEn("/mobile/notice/getNotice", data);
  8888. },
  8889. //关于我们
  8890. getAboutUs: function getAboutUs(data) {
  8891. return _request.default.requestEn("/mobile/aboutUs/getOne", data);
  8892. },
  8893. //服务说明
  8894. getExplain: function getExplain(data) {
  8895. return _request.default.requestEn("/mobile/explain/getOne", data);
  8896. },
  8897. //上门类型
  8898. getDic: function getDic(data) {
  8899. return _request.default.requestEn("/mobile/order/getDic", data);
  8900. },
  8901. //管子类别
  8902. getPipeType: function getPipeType(data) {
  8903. return _request.default.requestEn("/mobile/pipeType/getPipeType", data);
  8904. },
  8905. //管子长度
  8906. getPipeLength: function getPipeLength(data) {
  8907. return _request.default.requestEn("/mobile/pipeLength/getPipeLength", data);
  8908. },
  8909. //历史施工
  8910. getListAll: function getListAll(data) {
  8911. return _request.default.requestFn("/mobile/order/getListAll", data);
  8912. },
  8913. //历史施工(查看详情页)
  8914. getOrderPhoto: function getOrderPhoto(data) {
  8915. return _request.default.requestEn("/mobile/orderPhoto/getPhoto", data);
  8916. },
  8917. //提交数据
  8918. submitOrder: function submitOrder(data) {
  8919. return _request.default.requestFn("/mobile/order", data, 'POST');
  8920. },
  8921. //工程列表
  8922. getEngineList: function getEngineList(data) {
  8923. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8924. },
  8925. //查看非市政项目
  8926. getEngineDetail: function getEngineDetail(data) {
  8927. return _request.default.requestEn("/mobile/otherEngine/getById", data);
  8928. },
  8929. //查看非市政项目页 确认上传照片
  8930. updateEnginePhoto: function updateEnginePhoto(data) {
  8931. return _request.default.requestFn("/mobile/otherEngine", data, 'PUT');
  8932. },
  8933. //门牌验证
  8934. // getOrderForStatus(data){
  8935. // return utils.requestEn(`/mobile/order/getOrderForStatus`, data)
  8936. // },
  8937. //首页轮播图
  8938. getLunBo: function getLunBo(data) {
  8939. return _request.default.requestEn("/mobile/rotation/list", data);
  8940. },
  8941. //获取项目类型
  8942. getProjectType: function getProjectType(data) {
  8943. return _request.default.requestEn("/mobile/order/getDic", data);
  8944. },
  8945. //获取项目列表
  8946. getProjectList: function getProjectList(data) {
  8947. return _request.default.requestEn("/mobile/otherEngine/getList", data);
  8948. },
  8949. //自闭阀类型
  8950. getProject: function getProject(data) {
  8951. return _request.default.requestEn("/mobile/valve/getValveType", data);
  8952. },
  8953. //上传照片
  8954. getImage: function getImage(data) {
  8955. return _request.default.requestFn("/obs", data, 'POST');
  8956. },
  8957. //获取用户名
  8958. getUserName: function getUserName(data) {
  8959. return _request.default.requestFn("/mobile/user/getName", data);
  8960. },
  8961. //工程列表
  8962. getList: function getList(data) {
  8963. return _request.default.requestEn("/mobile/order/getList", data);
  8964. },
  8965. //小区合格率
  8966. getExamineArea: function getExamineArea(data) {
  8967. return _request.default.requestEn("/mobile/area/getExamineArea", data);
  8968. },
  8969. //列表
  8970. getOtherList: function getOtherList(data) {
  8971. return _request.default.requestEn("/mobile/order/getOtherList", data);
  8972. },
  8973. //职工合格率
  8974. getExamineWorker: function getExamineWorker(data) {
  8975. return _request.default.requestEn("/mobile/area/getExamineWorker", data);
  8976. },
  8977. //小区服务统计
  8978. getExamineServe: function getExamineServe(data) {
  8979. return _request.default.requestEn("/mobile/area/getExamineServe", data);
  8980. },
  8981. //管材类别统计
  8982. getExaminePipeType: function getExaminePipeType(data) {
  8983. return _request.default.requestEn("/mobile/area/getExaminePipeType", data);
  8984. },
  8985. //管材长度统计
  8986. getExaminePipeLength: function getExaminePipeLength(data) {
  8987. return _request.default.requestEn("/mobile/area/getExaminePipeLength", data);
  8988. },
  8989. //自闭阀类别统计
  8990. getExamineValveType: function getExamineValveType(data) {
  8991. return _request.default.requestEn("/mobile/area/getExamineValveType", data);
  8992. },
  8993. //小区汇总统计
  8994. getAreaSum: function getAreaSum(data) {
  8995. return _request.default.requestEn("/mobile/area/getAreaSum", data);
  8996. },
  8997. //获取职工
  8998. getWorker: function getWorker(data) {
  8999. return _request.default.requestEn("/mobile/area/getWorker", data);
  9000. },
  9001. getById: function getById(data) {
  9002. return _request.default.requestEn("/mobile/order/getById", data);
  9003. },
  9004. getOrderList: function getOrderList(data) {
  9005. return _request.default.requestEn("/mobile/order/getList", data);
  9006. },
  9007. //修改
  9008. getUpdateOrder: function getUpdateOrder(data) {
  9009. return _request.default.requestFn("/mobile/order", data, 'PUT');
  9010. },
  9011. //选择门牌(安检,工程管理页)
  9012. getAllHouse: function getAllHouse(data) {
  9013. return _request.default.requestEn("/mobile/house/getAllHouse", data);
  9014. },
  9015. //选择门牌(安检,工程管理页)
  9016. getDictInfo: function getDictInfo(data) {
  9017. return _request.default.requestEn("/mobile/sysInfo/dict", data);
  9018. },
  9019. //选择门牌(安检,工程管理页)
  9020. getUnitList: function getUnitList(data) {
  9021. return _request.default.requestEn("/mobile/unit/getUnit", data);
  9022. },
  9023. getBuildingList: function getBuildingList(data) {
  9024. return _request.default.requestEn("/mobile/building/getBuilding", data);
  9025. },
  9026. getArea: function getArea(data) {
  9027. return _request.default.requestEn("/mobile/area/getArea", data);
  9028. },
  9029. getDictInfoList: function getDictInfoList(data) {
  9030. return _request.default.requestEn("/mobile/sysInfo/dictlist", data, 'POST');
  9031. },
  9032. setregulatorBox: function setregulatorBox(data) {
  9033. return _request.default.requestEn("/mobile/regulatorBox", data, 'POST');
  9034. },
  9035. setwarningPile: function setwarningPile(data) {
  9036. return _request.default.requestEn("/mobile/warningPile", data, 'Put');
  9037. },
  9038. getwarningPileList: function getwarningPileList(data) {
  9039. return _request.default.requestEn("/mobile/warningPile/getList", data);
  9040. },
  9041. getwarningPileInfo: function getwarningPileInfo(data) {
  9042. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9043. },
  9044. setcourtyardNetworkManagement: function setcourtyardNetworkManagement(data) {
  9045. return _request.default.requestEn("/mobile/courtyardNetworkManagement", data, 'POST');
  9046. },
  9047. setemergencyRepair: function setemergencyRepair(data) {
  9048. return _request.default.requestEn("/mobile/emergencyRepair", data, 'POST');
  9049. },
  9050. getOne: function getOne() {
  9051. return _request.default.requestEn("/mobile/explain/getOne");
  9052. }
  9053. }, (0, _defineProperty2.default)(_getDistrict$getUnit$, "getWorker", function getWorker() {
  9054. return _request.default.requestEn("/mobile/user/getWorker");
  9055. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getSearch", function getSearch(data) {
  9056. return _request.default.requestEn("/mobile/sysInfo/search", data);
  9057. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getcourtyardNetworkManagement", function getcourtyardNetworkManagement(data) {
  9058. return _request.default.requestEn("/mobile/courtyardNetworkManagement/".concat(data));
  9059. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getemergencyRepair", function getemergencyRepair(data) {
  9060. return _request.default.requestEn("/mobile/emergencyRepair/".concat(data));
  9061. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getregulatorBox", function getregulatorBox(data) {
  9062. return _request.default.requestEn("/mobile/regulatorBox/".concat(data));
  9063. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getwarningPile", function getwarningPile(data) {
  9064. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9065. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "patrolRecord", function patrolRecord(data) {
  9066. return _request.default.requestEn("/mobile/patrolRecord", data, 'POST');
  9067. }), (0, _defineProperty2.default)(_getDistrict$getUnit$, "getpatrolRecord", function getpatrolRecord(data) {
  9068. return _request.default.requestEn("/mobile/patrolRecord/".concat(data));
  9069. }), _getDistrict$getUnit$);
  9070. exports.default = _default;
  9071. /***/ }),
  9072. /***/ 35:
  9073. /*!****************************************************!*\
  9074. !*** E:/Desktop/zd_wechatApp(1)/common/request.js ***!
  9075. \****************************************************/
  9076. /*! no static exports found */
  9077. /***/ (function(module, exports, __webpack_require__) {
  9078. "use strict";
  9079. /* WEBPACK VAR INJECTION */(function(uni) {
  9080. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9081. Object.defineProperty(exports, "__esModule", {
  9082. value: true
  9083. });
  9084. exports.default = void 0;
  9085. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9086. var _default = {
  9087. // 请求方法
  9088. requestEn: function requestEn(url) {
  9089. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9090. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9091. return new Promise(function (resolve, reject) {
  9092. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9093. uni.request({
  9094. url: _http.default.webUrl + url,
  9095. method: methods ? methods : 'GET',
  9096. data: data,
  9097. success: function success(res) {
  9098. if (res.data.code === 200) {
  9099. resolve(res.data.data === undefined ? null : res.data.data);
  9100. } else if (res.data.code === 403 || res.data.code === 401) {
  9101. uni.showToast({
  9102. title: 'Token超时,请重新登录',
  9103. icon: 'none'
  9104. });
  9105. if (uni.getStorageSync('token')) {
  9106. uni.removeStorage({
  9107. key: 'token',
  9108. success: function success() {
  9109. uni.navigateTo({
  9110. url: '/pages/login/login'
  9111. });
  9112. }
  9113. });
  9114. } else {
  9115. uni.navigateTo({
  9116. url: '/pages/login/login'
  9117. });
  9118. }
  9119. } else {
  9120. uni.showToast({
  9121. title: res.data.msg ? res.data.msg : '系统异常',
  9122. icon: 'none'
  9123. });
  9124. }
  9125. },
  9126. fail: function fail() {
  9127. uni.showToast({
  9128. title: '网络异常',
  9129. icon: 'none'
  9130. });
  9131. }
  9132. });
  9133. });
  9134. },
  9135. // 请求方法
  9136. requestFn: function requestFn(url) {
  9137. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9138. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9139. return new Promise(function (resolve, reject) {
  9140. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9141. uni.request({
  9142. url: _http.default.webUrl + url,
  9143. method: methods ? methods : 'GET',
  9144. data: data,
  9145. header: {
  9146. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9147. "userType": 'MOdBILE'
  9148. },
  9149. success: function success(res) {
  9150. console.log(res);
  9151. if (res.data.code === 200) {
  9152. resolve(res.data.data === undefined ? null : res.data.data);
  9153. } else if (res.data.code === 403 || res.data.code === 401) {
  9154. uni.showToast({
  9155. title: 'Token超时,请重新登录',
  9156. icon: 'none'
  9157. });
  9158. if (uni.getStorageSync('token')) {
  9159. uni.removeStorage({
  9160. key: 'token',
  9161. success: function success() {
  9162. uni.navigateTo({
  9163. url: '/pages/login/login'
  9164. });
  9165. }
  9166. });
  9167. } else {
  9168. uni.navigateTo({
  9169. url: '/pages/login/login'
  9170. });
  9171. }
  9172. } else {
  9173. uni.showToast({
  9174. title: res.data.msg ? res.data.msg : '系统异常',
  9175. icon: 'none'
  9176. });
  9177. }
  9178. },
  9179. fail: function fail() {
  9180. uni.showToast({
  9181. title: '网络异常',
  9182. icon: 'none'
  9183. });
  9184. }
  9185. });
  9186. });
  9187. },
  9188. requestLo: function requestLo(url) {
  9189. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9190. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9191. return new Promise(function (resolve, reject) {
  9192. console.log(_http.default.webUrl + url);
  9193. uni.request({
  9194. url: _http.default.webUrl + url,
  9195. method: methods ? methods : 'GET',
  9196. data: data,
  9197. header: {
  9198. "userType": 'MOBILE'
  9199. },
  9200. success: function success(res) {
  9201. console.log(res);
  9202. if (res.data.code === 200) {
  9203. resolve(res.data === undefined ? null : res.data);
  9204. } else if (res.data.code === 403) {
  9205. uni.showToast({
  9206. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9207. icon: 'none'
  9208. });
  9209. if (uni.getStorageSync('token')) {
  9210. uni.removeStorage({
  9211. key: 'token',
  9212. success: function success() {
  9213. uni.navigateTo({
  9214. url: '/pages/login/login'
  9215. });
  9216. }
  9217. });
  9218. } else {
  9219. uni.navigateTo({
  9220. url: '/pages/login/login'
  9221. });
  9222. }
  9223. } else {
  9224. uni.showToast({
  9225. title: res.data.msg ? res.data.msg : '系统异常',
  9226. icon: 'none'
  9227. });
  9228. }
  9229. },
  9230. fail: function fail() {
  9231. uni.showToast({
  9232. title: '网络异常',
  9233. icon: 'none'
  9234. });
  9235. }
  9236. });
  9237. });
  9238. }
  9239. };
  9240. exports.default = _default;
  9241. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9242. /***/ }),
  9243. /***/ 358:
  9244. /*!****************************************************************!*\
  9245. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/emitter.js ***!
  9246. \****************************************************************/
  9247. /*! no static exports found */
  9248. /***/ (function(module, exports, __webpack_require__) {
  9249. "use strict";
  9250. Object.defineProperty(exports, "__esModule", {
  9251. value: true
  9252. });
  9253. exports.default = void 0;
  9254. /**
  9255. * 递归使用 call 方式this指向
  9256. * @param componentName // 需要找的组件的名称
  9257. * @param eventName // 事件名称
  9258. * @param params // 需要传递的参数
  9259. */
  9260. function _broadcast(componentName, eventName, params) {
  9261. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9262. this.$children.map(function (child) {
  9263. if (componentName === child.$options.name) {
  9264. child.$emit.apply(child, [eventName].concat(params));
  9265. } else {
  9266. _broadcast.apply(child, [componentName, eventName].concat(params));
  9267. }
  9268. });
  9269. }
  9270. var _default = {
  9271. methods: {
  9272. /**
  9273. * 派发 (向上查找) (一个)
  9274. * @param componentName // 需要找的组件的名称
  9275. * @param eventName // 事件名称
  9276. * @param params // 需要传递的参数
  9277. */
  9278. dispatch: function dispatch(componentName, eventName, params) {
  9279. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9280. var name = parent.$options.name; // 获取当前组件实例的name
  9281. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9282. // 循环出当前名称的一样的组件实例
  9283. while (parent && (!name || name !== componentName)) {
  9284. parent = parent.$parent;
  9285. if (parent) {
  9286. name = parent.$options.name;
  9287. }
  9288. }
  9289. // 有节点表示当前找到了name一样的实例
  9290. if (parent) {
  9291. parent.$emit.apply(parent, [eventName].concat(params));
  9292. }
  9293. },
  9294. /**
  9295. * 广播 (向下查找) (广播多个)
  9296. * @param componentName // 需要找的组件的名称
  9297. * @param eventName // 事件名称
  9298. * @param params // 需要传递的参数
  9299. */
  9300. broadcast: function broadcast(componentName, eventName, params) {
  9301. _broadcast.call(this, componentName, eventName, params);
  9302. }
  9303. }
  9304. };
  9305. exports.default = _default;
  9306. /***/ }),
  9307. /***/ 36:
  9308. /*!*************************************************!*\
  9309. !*** E:/Desktop/zd_wechatApp(1)/common/http.js ***!
  9310. \*************************************************/
  9311. /*! no static exports found */
  9312. /***/ (function(module, exports, __webpack_require__) {
  9313. "use strict";
  9314. Object.defineProperty(exports, "__esModule", {
  9315. value: true
  9316. });
  9317. exports.default = void 0;
  9318. // 配置信息
  9319. var _default = {
  9320. // webUrl: 'http://127.0.0.1:8080',
  9321. //webUrl: 'https://www.cczdsz.cn/prod-api/',
  9322. // webUrl: 'http://124.221.101.24:8082',
  9323. webUrl: 'http://192.168.4.20:8080'
  9324. };
  9325. exports.default = _default;
  9326. /***/ }),
  9327. /***/ 37:
  9328. /*!***********************************************!*\
  9329. !*** E:/Desktop/zd_wechatApp(1)/api/login.js ***!
  9330. \***********************************************/
  9331. /*! no static exports found */
  9332. /***/ (function(module, exports, __webpack_require__) {
  9333. "use strict";
  9334. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9335. Object.defineProperty(exports, "__esModule", {
  9336. value: true
  9337. });
  9338. exports.default = void 0;
  9339. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9340. var _default = {
  9341. // 登录
  9342. login: function login(data) {
  9343. return _request.default.requestEn('/mobile/user', data, 'POST');
  9344. }
  9345. };
  9346. exports.default = _default;
  9347. /***/ }),
  9348. /***/ 38:
  9349. /*!**************************************************!*\
  9350. !*** E:/Desktop/zd_wechatApp(1)/common/utils.js ***!
  9351. \**************************************************/
  9352. /*! no static exports found */
  9353. /***/ (function(module, exports, __webpack_require__) {
  9354. "use strict";
  9355. /* WEBPACK VAR INJECTION */(function(uni) {
  9356. Object.defineProperty(exports, "__esModule", {
  9357. value: true
  9358. });
  9359. exports.default = void 0;
  9360. var _default = {
  9361. // 页面提示信息函数
  9362. showPrompt: function showPrompt(msg) {
  9363. uni.showToast({
  9364. title: msg,
  9365. icon: 'none',
  9366. mask: true
  9367. });
  9368. },
  9369. // APP名称
  9370. appName: function appName() {
  9371. return "贞达市政工程";
  9372. },
  9373. formatRichText: function formatRichText(html) {
  9374. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9375. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9376. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9377. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9378. return match;
  9379. });
  9380. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9381. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9382. return match;
  9383. });
  9384. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9385. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9386. return newContent;
  9387. },
  9388. getHeight: function getHeight(e) {
  9389. console.log(e);
  9390. },
  9391. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9392. var f_x = parseFloat(x);
  9393. if (isNaN(f_x)) {
  9394. return 0;
  9395. }
  9396. var f_x = Math.round(x * 100) / 100;
  9397. var s_x = f_x.toString();
  9398. var pos_decimal = s_x.indexOf('.');
  9399. if (pos_decimal < 0) {
  9400. pos_decimal = s_x.length;
  9401. s_x += '.';
  9402. }
  9403. while (s_x.length <= pos_decimal + 2) {
  9404. s_x += '0';
  9405. }
  9406. return s_x;
  9407. },
  9408. // token过期
  9409. tokenOverdue: function tokenOverdue() {
  9410. uni.setStorage({
  9411. key: "jumpUrl",
  9412. data: ''
  9413. });
  9414. uni.setStorage({
  9415. key: "jumpType",
  9416. data: ''
  9417. });
  9418. uni.navigateTo({
  9419. url: "/pages/login/login"
  9420. });
  9421. },
  9422. checkLoginTo: function checkLoginTo(url, type) {
  9423. console.log(type);
  9424. var status = uni.getStorageSync('token');
  9425. console.log(status);
  9426. if (status) {
  9427. uni.navigateTo({
  9428. url: url
  9429. });
  9430. } else {
  9431. uni.showModal({
  9432. title: '',
  9433. content: '您未登录,是否登录?',
  9434. success: function success(res) {
  9435. if (res.confirm) {
  9436. uni.setStorage({
  9437. key: "jumpUrl",
  9438. data: url
  9439. });
  9440. uni.setStorage({
  9441. key: "jumpType",
  9442. data: type
  9443. });
  9444. uni.navigateTo({
  9445. url: "/pages/login/login"
  9446. });
  9447. }
  9448. }
  9449. });
  9450. }
  9451. },
  9452. // 拨打电话
  9453. toCall: function toCall(tel) {
  9454. if (!tel) {
  9455. this.showPrompt('暂无商家电话');
  9456. return;
  9457. }
  9458. uni.makePhoneCall({
  9459. phoneNumber: tel
  9460. });
  9461. },
  9462. toBack: function toBack() {
  9463. uni.navigateBack({
  9464. delta: 1
  9465. });
  9466. },
  9467. // 图片预览
  9468. previewImage: function previewImage(url) {
  9469. var urlList = [];
  9470. if (typeof url == 'string') {
  9471. urlList.push(url);
  9472. } else {
  9473. urlList = url;
  9474. }
  9475. uni.previewImage({
  9476. urls: urlList
  9477. });
  9478. },
  9479. // 登录成功后的跳转
  9480. loginSuccess: function loginSuccess() {
  9481. var type = uni.getStorageSync('jumpType');
  9482. // console.log(type)
  9483. if (type) {
  9484. var url = uni.getStorageSync('jumpUrl');
  9485. // console.log(url)
  9486. if (!url) {
  9487. uni.navigateBack({
  9488. delta: 1
  9489. });
  9490. return;
  9491. }
  9492. if (type == 'page') {
  9493. uni.redirectTo({
  9494. url: url
  9495. });
  9496. } else {
  9497. uni.switchTab({
  9498. url: url,
  9499. fail: function fail(error) {
  9500. console.log(error);
  9501. }
  9502. });
  9503. }
  9504. } else {
  9505. // uni.switchTab({
  9506. // url: "/pages/index/index"
  9507. // })
  9508. uni.navigateBack({
  9509. delta: 1
  9510. });
  9511. }
  9512. },
  9513. parseNumber: function parseNumber(num) {
  9514. return num < 10 ? "0" + num : num;
  9515. },
  9516. // 时间格式化基类
  9517. dateFormat: function dateFormat(date, formatStr) {
  9518. var dateObj = {},
  9519. rStr = /\{([^}]+)\}/,
  9520. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9521. dateObj["Y"] = date.getFullYear();
  9522. dateObj["M"] = date.getMonth() + 1;
  9523. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9524. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9525. dateObj["D"] = date.getDate();
  9526. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9527. dateObj["h"] = date.getHours();
  9528. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9529. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9530. dateObj["t"] = dateObj["h"];
  9531. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9532. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9533. dateObj["i"] = date.getMinutes();
  9534. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9535. dateObj["s"] = date.getSeconds();
  9536. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9537. while (rStr.test(formatStr)) {
  9538. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9539. }
  9540. return formatStr;
  9541. },
  9542. // 时间格式 年月日时分秒
  9543. gettime: function gettime(shorttime, type) {
  9544. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9545. var now = new Date().getTime();
  9546. var cha = (now - parseInt(shorttime)) / 1000;
  9547. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9548. if (type == 1) {
  9549. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9550. } else if (type == 2) {
  9551. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9552. } else if (type == 3) {
  9553. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9554. }
  9555. },
  9556. // 时间格式 年月日
  9557. getDate: function getDate(shorttime) {
  9558. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9559. var now = new Date().getTime();
  9560. var cha = (now - parseInt(shorttime)) / 1000;
  9561. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9562. },
  9563. // 时间格式 月日
  9564. getDateMd: function getDateMd(shorttime) {
  9565. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9566. var now = new Date().getTime();
  9567. var cha = (now - parseInt(shorttime)) / 1000;
  9568. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9569. },
  9570. getSevenDate: function getSevenDate(num) {
  9571. var date1 = new Date();
  9572. //今天时间
  9573. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9574. var date2 = new Date(date1);
  9575. date2.setDate(date1.getDate() + num);
  9576. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9577. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9578. return this.getdiffdate(time1, time2, num);
  9579. },
  9580. //获取两日期之间日期列表函数
  9581. getdiffdate: function getdiffdate(stime, etime, num) {
  9582. //初始化日期列表,数组
  9583. var diffdate = new Array();
  9584. var i = 0;
  9585. //开始日期小于等于结束日期,并循环
  9586. while (i <= num - 1) {
  9587. diffdate.push({
  9588. dateStr: stime,
  9589. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9590. });
  9591. //获取开始日期时间戳
  9592. var stime_ts = new Date(stime).getTime();
  9593. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9594. //增加一天时间戳后的日期
  9595. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9596. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9597. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9598. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9599. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9600. stime = next_dates_m + next_dates_d;
  9601. // 增加数组key
  9602. i++;
  9603. }
  9604. return diffdate;
  9605. },
  9606. // 根据日期转换星期
  9607. getWeek: function getWeek(dateString) {
  9608. var dateArray = dateString.split("-");
  9609. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9610. return "周" + "日一二三四五六".charAt(date.getDay());
  9611. },
  9612. // 获取当前位置
  9613. getNowAddress: function getNowAddress() {
  9614. console.log(222);
  9615. return new Promise(function (resolve, reject) {
  9616. var mapkey = '';
  9617. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9618. console.log(mapkey);
  9619. var amapPlugin = new amap.AMapWX({
  9620. key: mapkey
  9621. });
  9622. amapPlugin.getRegeo({
  9623. success: function success(res) {
  9624. resolve(res[0]);
  9625. },
  9626. fail: function fail(error) {
  9627. console.log(error);
  9628. uni.showToast({
  9629. mask: true,
  9630. icon: "none",
  9631. title: error
  9632. });
  9633. }
  9634. });
  9635. });
  9636. }
  9637. };
  9638. exports.default = _default;
  9639. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9640. /***/ }),
  9641. /***/ 387:
  9642. /*!************************************************************************!*\
  9643. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/async-validator.js ***!
  9644. \************************************************************************/
  9645. /*! no static exports found */
  9646. /***/ (function(module, exports, __webpack_require__) {
  9647. "use strict";
  9648. /* WEBPACK VAR INJECTION */(function(process) {
  9649. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9650. Object.defineProperty(exports, "__esModule", {
  9651. value: true
  9652. });
  9653. exports.default = void 0;
  9654. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9655. function _extends() {
  9656. _extends = Object.assign || function (target) {
  9657. for (var i = 1; i < arguments.length; i++) {
  9658. var source = arguments[i];
  9659. for (var key in source) {
  9660. if (Object.prototype.hasOwnProperty.call(source, key)) {
  9661. target[key] = source[key];
  9662. }
  9663. }
  9664. }
  9665. return target;
  9666. };
  9667. return _extends.apply(this, arguments);
  9668. }
  9669. /* eslint no-console:0 */
  9670. var formatRegExp = /%[sdj%]/g;
  9671. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  9672. if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"贞达市政工程","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  9673. warning = function warning(type, errors) {
  9674. if (typeof console !== 'undefined' && console.warn) {
  9675. if (errors.every(function (e) {
  9676. return typeof e === 'string';
  9677. })) {
  9678. console.warn(type, errors);
  9679. }
  9680. }
  9681. };
  9682. }
  9683. function convertFieldsError(errors) {
  9684. if (!errors || !errors.length) return null;
  9685. var fields = {};
  9686. errors.forEach(function (error) {
  9687. var field = error.field;
  9688. fields[field] = fields[field] || [];
  9689. fields[field].push(error);
  9690. });
  9691. return fields;
  9692. }
  9693. function format() {
  9694. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  9695. args[_key] = arguments[_key];
  9696. }
  9697. var i = 1;
  9698. var f = args[0];
  9699. var len = args.length;
  9700. if (typeof f === 'function') {
  9701. return f.apply(null, args.slice(1));
  9702. }
  9703. if (typeof f === 'string') {
  9704. var str = String(f).replace(formatRegExp, function (x) {
  9705. if (x === '%%') {
  9706. return '%';
  9707. }
  9708. if (i >= len) {
  9709. return x;
  9710. }
  9711. switch (x) {
  9712. case '%s':
  9713. return String(args[i++]);
  9714. case '%d':
  9715. return Number(args[i++]);
  9716. case '%j':
  9717. try {
  9718. return JSON.stringify(args[i++]);
  9719. } catch (_) {
  9720. return '[Circular]';
  9721. }
  9722. break;
  9723. default:
  9724. return x;
  9725. }
  9726. });
  9727. for (var arg = args[i]; i < len; arg = args[++i]) {
  9728. str += " " + arg;
  9729. }
  9730. return str;
  9731. }
  9732. return f;
  9733. }
  9734. function isNativeStringType(type) {
  9735. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  9736. }
  9737. function isEmptyValue(value, type) {
  9738. if (value === undefined || value === null) {
  9739. return true;
  9740. }
  9741. if (type === 'array' && Array.isArray(value) && !value.length) {
  9742. return true;
  9743. }
  9744. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  9745. return true;
  9746. }
  9747. return false;
  9748. }
  9749. function asyncParallelArray(arr, func, callback) {
  9750. var results = [];
  9751. var total = 0;
  9752. var arrLength = arr.length;
  9753. function count(errors) {
  9754. results.push.apply(results, errors);
  9755. total++;
  9756. if (total === arrLength) {
  9757. callback(results);
  9758. }
  9759. }
  9760. arr.forEach(function (a) {
  9761. func(a, count);
  9762. });
  9763. }
  9764. function asyncSerialArray(arr, func, callback) {
  9765. var index = 0;
  9766. var arrLength = arr.length;
  9767. function next(errors) {
  9768. if (errors && errors.length) {
  9769. callback(errors);
  9770. return;
  9771. }
  9772. var original = index;
  9773. index = index + 1;
  9774. if (original < arrLength) {
  9775. func(arr[original], next);
  9776. } else {
  9777. callback([]);
  9778. }
  9779. }
  9780. next([]);
  9781. }
  9782. function flattenObjArr(objArr) {
  9783. var ret = [];
  9784. Object.keys(objArr).forEach(function (k) {
  9785. ret.push.apply(ret, objArr[k]);
  9786. });
  9787. return ret;
  9788. }
  9789. function asyncMap(objArr, option, func, callback) {
  9790. if (option.first) {
  9791. var _pending = new Promise(function (resolve, reject) {
  9792. var next = function next(errors) {
  9793. callback(errors);
  9794. return errors.length ? reject({
  9795. errors: errors,
  9796. fields: convertFieldsError(errors)
  9797. }) : resolve();
  9798. };
  9799. var flattenArr = flattenObjArr(objArr);
  9800. asyncSerialArray(flattenArr, func, next);
  9801. });
  9802. _pending["catch"](function (e) {
  9803. return e;
  9804. });
  9805. return _pending;
  9806. }
  9807. var firstFields = option.firstFields || [];
  9808. if (firstFields === true) {
  9809. firstFields = Object.keys(objArr);
  9810. }
  9811. var objArrKeys = Object.keys(objArr);
  9812. var objArrLength = objArrKeys.length;
  9813. var total = 0;
  9814. var results = [];
  9815. var pending = new Promise(function (resolve, reject) {
  9816. var next = function next(errors) {
  9817. results.push.apply(results, errors);
  9818. total++;
  9819. if (total === objArrLength) {
  9820. callback(results);
  9821. return results.length ? reject({
  9822. errors: results,
  9823. fields: convertFieldsError(results)
  9824. }) : resolve();
  9825. }
  9826. };
  9827. if (!objArrKeys.length) {
  9828. callback(results);
  9829. resolve();
  9830. }
  9831. objArrKeys.forEach(function (key) {
  9832. var arr = objArr[key];
  9833. if (firstFields.indexOf(key) !== -1) {
  9834. asyncSerialArray(arr, func, next);
  9835. } else {
  9836. asyncParallelArray(arr, func, next);
  9837. }
  9838. });
  9839. });
  9840. pending["catch"](function (e) {
  9841. return e;
  9842. });
  9843. return pending;
  9844. }
  9845. function complementError(rule) {
  9846. return function (oe) {
  9847. if (oe && oe.message) {
  9848. oe.field = oe.field || rule.fullField;
  9849. return oe;
  9850. }
  9851. return {
  9852. message: typeof oe === 'function' ? oe() : oe,
  9853. field: oe.field || rule.fullField
  9854. };
  9855. };
  9856. }
  9857. function deepMerge(target, source) {
  9858. if (source) {
  9859. for (var s in source) {
  9860. if (source.hasOwnProperty(s)) {
  9861. var value = source[s];
  9862. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  9863. target[s] = _extends({}, target[s], {}, value);
  9864. } else {
  9865. target[s] = value;
  9866. }
  9867. }
  9868. }
  9869. }
  9870. return target;
  9871. }
  9872. /**
  9873. * Rule for validating required fields.
  9874. *
  9875. * @param rule The validation rule.
  9876. * @param value The value of the field on the source object.
  9877. * @param source The source object being validated.
  9878. * @param errors An array of errors that this rule may add
  9879. * validation errors to.
  9880. * @param options The validation options.
  9881. * @param options.messages The validation messages.
  9882. */
  9883. function required(rule, value, source, errors, options, type) {
  9884. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  9885. errors.push(format(options.messages.required, rule.fullField));
  9886. }
  9887. }
  9888. /**
  9889. * Rule for validating whitespace.
  9890. *
  9891. * @param rule The validation rule.
  9892. * @param value The value of the field on the source object.
  9893. * @param source The source object being validated.
  9894. * @param errors An array of errors that this rule may add
  9895. * validation errors to.
  9896. * @param options The validation options.
  9897. * @param options.messages The validation messages.
  9898. */
  9899. function whitespace(rule, value, source, errors, options) {
  9900. if (/^\s+$/.test(value) || value === '') {
  9901. errors.push(format(options.messages.whitespace, rule.fullField));
  9902. }
  9903. }
  9904. /* eslint max-len:0 */
  9905. var pattern = {
  9906. // http://emailregex.com/
  9907. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  9908. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  9909. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  9910. };
  9911. var types = {
  9912. integer: function integer(value) {
  9913. return types.number(value) && parseInt(value, 10) === value;
  9914. },
  9915. "float": function float(value) {
  9916. return types.number(value) && !types.integer(value);
  9917. },
  9918. array: function array(value) {
  9919. return Array.isArray(value);
  9920. },
  9921. regexp: function regexp(value) {
  9922. if (value instanceof RegExp) {
  9923. return true;
  9924. }
  9925. try {
  9926. return !!new RegExp(value);
  9927. } catch (e) {
  9928. return false;
  9929. }
  9930. },
  9931. date: function date(value) {
  9932. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  9933. },
  9934. number: function number(value) {
  9935. if (isNaN(value)) {
  9936. return false;
  9937. }
  9938. // 修改源码,将字符串数值先转为数值
  9939. return typeof +value === 'number';
  9940. },
  9941. object: function object(value) {
  9942. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  9943. },
  9944. method: function method(value) {
  9945. return typeof value === 'function';
  9946. },
  9947. email: function email(value) {
  9948. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  9949. },
  9950. url: function url(value) {
  9951. return typeof value === 'string' && !!value.match(pattern.url);
  9952. },
  9953. hex: function hex(value) {
  9954. return typeof value === 'string' && !!value.match(pattern.hex);
  9955. }
  9956. };
  9957. /**
  9958. * Rule for validating the type of a value.
  9959. *
  9960. * @param rule The validation rule.
  9961. * @param value The value of the field on the source object.
  9962. * @param source The source object being validated.
  9963. * @param errors An array of errors that this rule may add
  9964. * validation errors to.
  9965. * @param options The validation options.
  9966. * @param options.messages The validation messages.
  9967. */
  9968. function type(rule, value, source, errors, options) {
  9969. if (rule.required && value === undefined) {
  9970. required(rule, value, source, errors, options);
  9971. return;
  9972. }
  9973. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  9974. var ruleType = rule.type;
  9975. if (custom.indexOf(ruleType) > -1) {
  9976. if (!types[ruleType](value)) {
  9977. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9978. } // straight typeof check
  9979. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  9980. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  9981. }
  9982. }
  9983. /**
  9984. * Rule for validating minimum and maximum allowed values.
  9985. *
  9986. * @param rule The validation rule.
  9987. * @param value The value of the field on the source object.
  9988. * @param source The source object being validated.
  9989. * @param errors An array of errors that this rule may add
  9990. * validation errors to.
  9991. * @param options The validation options.
  9992. * @param options.messages The validation messages.
  9993. */
  9994. function range(rule, value, source, errors, options) {
  9995. var len = typeof rule.len === 'number';
  9996. var min = typeof rule.min === 'number';
  9997. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  9998. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  9999. var val = value;
  10000. var key = null;
  10001. var num = typeof value === 'number';
  10002. var str = typeof value === 'string';
  10003. var arr = Array.isArray(value);
  10004. if (num) {
  10005. key = 'number';
  10006. } else if (str) {
  10007. key = 'string';
  10008. } else if (arr) {
  10009. key = 'array';
  10010. } // if the value is not of a supported type for range validation
  10011. // the validation rule rule should use the
  10012. // type property to also test for a particular type
  10013. if (!key) {
  10014. return false;
  10015. }
  10016. if (arr) {
  10017. val = value.length;
  10018. }
  10019. if (str) {
  10020. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  10021. val = value.replace(spRegexp, '_').length;
  10022. }
  10023. if (len) {
  10024. if (val !== rule.len) {
  10025. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10026. }
  10027. } else if (min && !max && val < rule.min) {
  10028. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10029. } else if (max && !min && val > rule.max) {
  10030. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10031. } else if (min && max && (val < rule.min || val > rule.max)) {
  10032. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10033. }
  10034. }
  10035. var ENUM = 'enum';
  10036. /**
  10037. * Rule for validating a value exists in an enumerable list.
  10038. *
  10039. * @param rule The validation rule.
  10040. * @param value The value of the field on the source object.
  10041. * @param source The source object being validated.
  10042. * @param errors An array of errors that this rule may add
  10043. * validation errors to.
  10044. * @param options The validation options.
  10045. * @param options.messages The validation messages.
  10046. */
  10047. function enumerable(rule, value, source, errors, options) {
  10048. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10049. if (rule[ENUM].indexOf(value) === -1) {
  10050. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10051. }
  10052. }
  10053. /**
  10054. * Rule for validating a regular expression pattern.
  10055. *
  10056. * @param rule The validation rule.
  10057. * @param value The value of the field on the source object.
  10058. * @param source The source object being validated.
  10059. * @param errors An array of errors that this rule may add
  10060. * validation errors to.
  10061. * @param options The validation options.
  10062. * @param options.messages The validation messages.
  10063. */
  10064. function pattern$1(rule, value, source, errors, options) {
  10065. if (rule.pattern) {
  10066. if (rule.pattern instanceof RegExp) {
  10067. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10068. // flag is accidentally set to `true`, which in a validation scenario
  10069. // is not necessary and the result might be misleading
  10070. rule.pattern.lastIndex = 0;
  10071. if (!rule.pattern.test(value)) {
  10072. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10073. }
  10074. } else if (typeof rule.pattern === 'string') {
  10075. var _pattern = new RegExp(rule.pattern);
  10076. if (!_pattern.test(value)) {
  10077. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10078. }
  10079. }
  10080. }
  10081. }
  10082. var rules = {
  10083. required: required,
  10084. whitespace: whitespace,
  10085. type: type,
  10086. range: range,
  10087. "enum": enumerable,
  10088. pattern: pattern$1
  10089. };
  10090. /**
  10091. * Performs validation for string types.
  10092. *
  10093. * @param rule The validation rule.
  10094. * @param value The value of the field on the source object.
  10095. * @param callback The callback function.
  10096. * @param source The source object being validated.
  10097. * @param options The validation options.
  10098. * @param options.messages The validation messages.
  10099. */
  10100. function string(rule, value, callback, source, options) {
  10101. var errors = [];
  10102. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10103. if (validate) {
  10104. if (isEmptyValue(value, 'string') && !rule.required) {
  10105. return callback();
  10106. }
  10107. rules.required(rule, value, source, errors, options, 'string');
  10108. if (!isEmptyValue(value, 'string')) {
  10109. rules.type(rule, value, source, errors, options);
  10110. rules.range(rule, value, source, errors, options);
  10111. rules.pattern(rule, value, source, errors, options);
  10112. if (rule.whitespace === true) {
  10113. rules.whitespace(rule, value, source, errors, options);
  10114. }
  10115. }
  10116. }
  10117. callback(errors);
  10118. }
  10119. /**
  10120. * Validates a function.
  10121. *
  10122. * @param rule The validation rule.
  10123. * @param value The value of the field on the source object.
  10124. * @param callback The callback function.
  10125. * @param source The source object being validated.
  10126. * @param options The validation options.
  10127. * @param options.messages The validation messages.
  10128. */
  10129. function method(rule, value, callback, source, options) {
  10130. var errors = [];
  10131. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10132. if (validate) {
  10133. if (isEmptyValue(value) && !rule.required) {
  10134. return callback();
  10135. }
  10136. rules.required(rule, value, source, errors, options);
  10137. if (value !== undefined) {
  10138. rules.type(rule, value, source, errors, options);
  10139. }
  10140. }
  10141. callback(errors);
  10142. }
  10143. /**
  10144. * Validates a number.
  10145. *
  10146. * @param rule The validation rule.
  10147. * @param value The value of the field on the source object.
  10148. * @param callback The callback function.
  10149. * @param source The source object being validated.
  10150. * @param options The validation options.
  10151. * @param options.messages The validation messages.
  10152. */
  10153. function number(rule, value, callback, source, options) {
  10154. var errors = [];
  10155. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10156. if (validate) {
  10157. if (value === '') {
  10158. value = undefined;
  10159. }
  10160. if (isEmptyValue(value) && !rule.required) {
  10161. return callback();
  10162. }
  10163. rules.required(rule, value, source, errors, options);
  10164. if (value !== undefined) {
  10165. rules.type(rule, value, source, errors, options);
  10166. rules.range(rule, value, source, errors, options);
  10167. }
  10168. }
  10169. callback(errors);
  10170. }
  10171. /**
  10172. * Validates a boolean.
  10173. *
  10174. * @param rule The validation rule.
  10175. * @param value The value of the field on the source object.
  10176. * @param callback The callback function.
  10177. * @param source The source object being validated.
  10178. * @param options The validation options.
  10179. * @param options.messages The validation messages.
  10180. */
  10181. function _boolean(rule, value, callback, source, options) {
  10182. var errors = [];
  10183. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10184. if (validate) {
  10185. if (isEmptyValue(value) && !rule.required) {
  10186. return callback();
  10187. }
  10188. rules.required(rule, value, source, errors, options);
  10189. if (value !== undefined) {
  10190. rules.type(rule, value, source, errors, options);
  10191. }
  10192. }
  10193. callback(errors);
  10194. }
  10195. /**
  10196. * Validates the regular expression type.
  10197. *
  10198. * @param rule The validation rule.
  10199. * @param value The value of the field on the source object.
  10200. * @param callback The callback function.
  10201. * @param source The source object being validated.
  10202. * @param options The validation options.
  10203. * @param options.messages The validation messages.
  10204. */
  10205. function regexp(rule, value, callback, source, options) {
  10206. var errors = [];
  10207. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10208. if (validate) {
  10209. if (isEmptyValue(value) && !rule.required) {
  10210. return callback();
  10211. }
  10212. rules.required(rule, value, source, errors, options);
  10213. if (!isEmptyValue(value)) {
  10214. rules.type(rule, value, source, errors, options);
  10215. }
  10216. }
  10217. callback(errors);
  10218. }
  10219. /**
  10220. * Validates a number is an integer.
  10221. *
  10222. * @param rule The validation rule.
  10223. * @param value The value of the field on the source object.
  10224. * @param callback The callback function.
  10225. * @param source The source object being validated.
  10226. * @param options The validation options.
  10227. * @param options.messages The validation messages.
  10228. */
  10229. function integer(rule, value, callback, source, options) {
  10230. var errors = [];
  10231. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10232. if (validate) {
  10233. if (isEmptyValue(value) && !rule.required) {
  10234. return callback();
  10235. }
  10236. rules.required(rule, value, source, errors, options);
  10237. if (value !== undefined) {
  10238. rules.type(rule, value, source, errors, options);
  10239. rules.range(rule, value, source, errors, options);
  10240. }
  10241. }
  10242. callback(errors);
  10243. }
  10244. /**
  10245. * Validates a number is a floating point number.
  10246. *
  10247. * @param rule The validation rule.
  10248. * @param value The value of the field on the source object.
  10249. * @param callback The callback function.
  10250. * @param source The source object being validated.
  10251. * @param options The validation options.
  10252. * @param options.messages The validation messages.
  10253. */
  10254. function floatFn(rule, value, callback, source, options) {
  10255. var errors = [];
  10256. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10257. if (validate) {
  10258. if (isEmptyValue(value) && !rule.required) {
  10259. return callback();
  10260. }
  10261. rules.required(rule, value, source, errors, options);
  10262. if (value !== undefined) {
  10263. rules.type(rule, value, source, errors, options);
  10264. rules.range(rule, value, source, errors, options);
  10265. }
  10266. }
  10267. callback(errors);
  10268. }
  10269. /**
  10270. * Validates an array.
  10271. *
  10272. * @param rule The validation rule.
  10273. * @param value The value of the field on the source object.
  10274. * @param callback The callback function.
  10275. * @param source The source object being validated.
  10276. * @param options The validation options.
  10277. * @param options.messages The validation messages.
  10278. */
  10279. function array(rule, value, callback, source, options) {
  10280. var errors = [];
  10281. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10282. if (validate) {
  10283. if (isEmptyValue(value, 'array') && !rule.required) {
  10284. return callback();
  10285. }
  10286. rules.required(rule, value, source, errors, options, 'array');
  10287. if (!isEmptyValue(value, 'array')) {
  10288. rules.type(rule, value, source, errors, options);
  10289. rules.range(rule, value, source, errors, options);
  10290. }
  10291. }
  10292. callback(errors);
  10293. }
  10294. /**
  10295. * Validates an object.
  10296. *
  10297. * @param rule The validation rule.
  10298. * @param value The value of the field on the source object.
  10299. * @param callback The callback function.
  10300. * @param source The source object being validated.
  10301. * @param options The validation options.
  10302. * @param options.messages The validation messages.
  10303. */
  10304. function object(rule, value, callback, source, options) {
  10305. var errors = [];
  10306. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10307. if (validate) {
  10308. if (isEmptyValue(value) && !rule.required) {
  10309. return callback();
  10310. }
  10311. rules.required(rule, value, source, errors, options);
  10312. if (value !== undefined) {
  10313. rules.type(rule, value, source, errors, options);
  10314. }
  10315. }
  10316. callback(errors);
  10317. }
  10318. var ENUM$1 = 'enum';
  10319. /**
  10320. * Validates an enumerable list.
  10321. *
  10322. * @param rule The validation rule.
  10323. * @param value The value of the field on the source object.
  10324. * @param callback The callback function.
  10325. * @param source The source object being validated.
  10326. * @param options The validation options.
  10327. * @param options.messages The validation messages.
  10328. */
  10329. function enumerable$1(rule, value, callback, source, options) {
  10330. var errors = [];
  10331. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10332. if (validate) {
  10333. if (isEmptyValue(value) && !rule.required) {
  10334. return callback();
  10335. }
  10336. rules.required(rule, value, source, errors, options);
  10337. if (value !== undefined) {
  10338. rules[ENUM$1](rule, value, source, errors, options);
  10339. }
  10340. }
  10341. callback(errors);
  10342. }
  10343. /**
  10344. * Validates a regular expression pattern.
  10345. *
  10346. * Performs validation when a rule only contains
  10347. * a pattern property but is not declared as a string type.
  10348. *
  10349. * @param rule The validation rule.
  10350. * @param value The value of the field on the source object.
  10351. * @param callback The callback function.
  10352. * @param source The source object being validated.
  10353. * @param options The validation options.
  10354. * @param options.messages The validation messages.
  10355. */
  10356. function pattern$2(rule, value, callback, source, options) {
  10357. var errors = [];
  10358. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10359. if (validate) {
  10360. if (isEmptyValue(value, 'string') && !rule.required) {
  10361. return callback();
  10362. }
  10363. rules.required(rule, value, source, errors, options);
  10364. if (!isEmptyValue(value, 'string')) {
  10365. rules.pattern(rule, value, source, errors, options);
  10366. }
  10367. }
  10368. callback(errors);
  10369. }
  10370. function date(rule, value, callback, source, options) {
  10371. var errors = [];
  10372. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10373. if (validate) {
  10374. if (isEmptyValue(value) && !rule.required) {
  10375. return callback();
  10376. }
  10377. rules.required(rule, value, source, errors, options);
  10378. if (!isEmptyValue(value)) {
  10379. var dateObject;
  10380. if (typeof value === 'number') {
  10381. dateObject = new Date(value);
  10382. } else {
  10383. dateObject = value;
  10384. }
  10385. rules.type(rule, dateObject, source, errors, options);
  10386. if (dateObject) {
  10387. rules.range(rule, dateObject.getTime(), source, errors, options);
  10388. }
  10389. }
  10390. }
  10391. callback(errors);
  10392. }
  10393. function required$1(rule, value, callback, source, options) {
  10394. var errors = [];
  10395. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  10396. rules.required(rule, value, source, errors, options, type);
  10397. callback(errors);
  10398. }
  10399. function type$1(rule, value, callback, source, options) {
  10400. var ruleType = rule.type;
  10401. var errors = [];
  10402. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10403. if (validate) {
  10404. if (isEmptyValue(value, ruleType) && !rule.required) {
  10405. return callback();
  10406. }
  10407. rules.required(rule, value, source, errors, options, ruleType);
  10408. if (!isEmptyValue(value, ruleType)) {
  10409. rules.type(rule, value, source, errors, options);
  10410. }
  10411. }
  10412. callback(errors);
  10413. }
  10414. /**
  10415. * Performs validation for any type.
  10416. *
  10417. * @param rule The validation rule.
  10418. * @param value The value of the field on the source object.
  10419. * @param callback The callback function.
  10420. * @param source The source object being validated.
  10421. * @param options The validation options.
  10422. * @param options.messages The validation messages.
  10423. */
  10424. function any(rule, value, callback, source, options) {
  10425. var errors = [];
  10426. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10427. if (validate) {
  10428. if (isEmptyValue(value) && !rule.required) {
  10429. return callback();
  10430. }
  10431. rules.required(rule, value, source, errors, options);
  10432. }
  10433. callback(errors);
  10434. }
  10435. var validators = {
  10436. string: string,
  10437. method: method,
  10438. number: number,
  10439. "boolean": _boolean,
  10440. regexp: regexp,
  10441. integer: integer,
  10442. "float": floatFn,
  10443. array: array,
  10444. object: object,
  10445. "enum": enumerable$1,
  10446. pattern: pattern$2,
  10447. date: date,
  10448. url: type$1,
  10449. hex: type$1,
  10450. email: type$1,
  10451. required: required$1,
  10452. any: any
  10453. };
  10454. function newMessages() {
  10455. return {
  10456. "default": 'Validation error on field %s',
  10457. required: '%s is required',
  10458. "enum": '%s must be one of %s',
  10459. whitespace: '%s cannot be empty',
  10460. date: {
  10461. format: '%s date %s is invalid for format %s',
  10462. parse: '%s date could not be parsed, %s is invalid ',
  10463. invalid: '%s date %s is invalid'
  10464. },
  10465. types: {
  10466. string: '%s is not a %s',
  10467. method: '%s is not a %s (function)',
  10468. array: '%s is not an %s',
  10469. object: '%s is not an %s',
  10470. number: '%s is not a %s',
  10471. date: '%s is not a %s',
  10472. "boolean": '%s is not a %s',
  10473. integer: '%s is not an %s',
  10474. "float": '%s is not a %s',
  10475. regexp: '%s is not a valid %s',
  10476. email: '%s is not a valid %s',
  10477. url: '%s is not a valid %s',
  10478. hex: '%s is not a valid %s'
  10479. },
  10480. string: {
  10481. len: '%s must be exactly %s characters',
  10482. min: '%s must be at least %s characters',
  10483. max: '%s cannot be longer than %s characters',
  10484. range: '%s must be between %s and %s characters'
  10485. },
  10486. number: {
  10487. len: '%s must equal %s',
  10488. min: '%s cannot be less than %s',
  10489. max: '%s cannot be greater than %s',
  10490. range: '%s must be between %s and %s'
  10491. },
  10492. array: {
  10493. len: '%s must be exactly %s in length',
  10494. min: '%s cannot be less than %s in length',
  10495. max: '%s cannot be greater than %s in length',
  10496. range: '%s must be between %s and %s in length'
  10497. },
  10498. pattern: {
  10499. mismatch: '%s value %s does not match pattern %s'
  10500. },
  10501. clone: function clone() {
  10502. var cloned = JSON.parse(JSON.stringify(this));
  10503. cloned.clone = this.clone;
  10504. return cloned;
  10505. }
  10506. };
  10507. }
  10508. var messages = newMessages();
  10509. /**
  10510. * Encapsulates a validation schema.
  10511. *
  10512. * @param descriptor An object declaring validation rules
  10513. * for this schema.
  10514. */
  10515. function Schema(descriptor) {
  10516. this.rules = null;
  10517. this._messages = messages;
  10518. this.define(descriptor);
  10519. }
  10520. Schema.prototype = {
  10521. messages: function messages(_messages) {
  10522. if (_messages) {
  10523. this._messages = deepMerge(newMessages(), _messages);
  10524. }
  10525. return this._messages;
  10526. },
  10527. define: function define(rules) {
  10528. if (!rules) {
  10529. throw new Error('Cannot configure a schema with no rules');
  10530. }
  10531. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  10532. throw new Error('Rules must be an object');
  10533. }
  10534. this.rules = {};
  10535. var z;
  10536. var item;
  10537. for (z in rules) {
  10538. if (rules.hasOwnProperty(z)) {
  10539. item = rules[z];
  10540. this.rules[z] = Array.isArray(item) ? item : [item];
  10541. }
  10542. }
  10543. },
  10544. validate: function validate(source_, o, oc) {
  10545. var _this = this;
  10546. if (o === void 0) {
  10547. o = {};
  10548. }
  10549. if (oc === void 0) {
  10550. oc = function oc() {};
  10551. }
  10552. var source = source_;
  10553. var options = o;
  10554. var callback = oc;
  10555. if (typeof options === 'function') {
  10556. callback = options;
  10557. options = {};
  10558. }
  10559. if (!this.rules || Object.keys(this.rules).length === 0) {
  10560. if (callback) {
  10561. callback();
  10562. }
  10563. return Promise.resolve();
  10564. }
  10565. function complete(results) {
  10566. var i;
  10567. var errors = [];
  10568. var fields = {};
  10569. function add(e) {
  10570. if (Array.isArray(e)) {
  10571. var _errors;
  10572. errors = (_errors = errors).concat.apply(_errors, e);
  10573. } else {
  10574. errors.push(e);
  10575. }
  10576. }
  10577. for (i = 0; i < results.length; i++) {
  10578. add(results[i]);
  10579. }
  10580. if (!errors.length) {
  10581. errors = null;
  10582. fields = null;
  10583. } else {
  10584. fields = convertFieldsError(errors);
  10585. }
  10586. callback(errors, fields);
  10587. }
  10588. if (options.messages) {
  10589. var messages$1 = this.messages();
  10590. if (messages$1 === messages) {
  10591. messages$1 = newMessages();
  10592. }
  10593. deepMerge(messages$1, options.messages);
  10594. options.messages = messages$1;
  10595. } else {
  10596. options.messages = this.messages();
  10597. }
  10598. var arr;
  10599. var value;
  10600. var series = {};
  10601. var keys = options.keys || Object.keys(this.rules);
  10602. keys.forEach(function (z) {
  10603. arr = _this.rules[z];
  10604. value = source[z];
  10605. arr.forEach(function (r) {
  10606. var rule = r;
  10607. if (typeof rule.transform === 'function') {
  10608. if (source === source_) {
  10609. source = _extends({}, source);
  10610. }
  10611. value = source[z] = rule.transform(value);
  10612. }
  10613. if (typeof rule === 'function') {
  10614. rule = {
  10615. validator: rule
  10616. };
  10617. } else {
  10618. rule = _extends({}, rule);
  10619. }
  10620. rule.validator = _this.getValidationMethod(rule);
  10621. rule.field = z;
  10622. rule.fullField = rule.fullField || z;
  10623. rule.type = _this.getType(rule);
  10624. if (!rule.validator) {
  10625. return;
  10626. }
  10627. series[z] = series[z] || [];
  10628. series[z].push({
  10629. rule: rule,
  10630. value: value,
  10631. source: source,
  10632. field: z
  10633. });
  10634. });
  10635. });
  10636. var errorFields = {};
  10637. return asyncMap(series, options, function (data, doIt) {
  10638. var rule = data.rule;
  10639. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  10640. deep = deep && (rule.required || !rule.required && data.value);
  10641. rule.field = data.field;
  10642. function addFullfield(key, schema) {
  10643. return _extends({}, schema, {
  10644. fullField: rule.fullField + "." + key
  10645. });
  10646. }
  10647. function cb(e) {
  10648. if (e === void 0) {
  10649. e = [];
  10650. }
  10651. var errors = e;
  10652. if (!Array.isArray(errors)) {
  10653. errors = [errors];
  10654. }
  10655. if (!options.suppressWarning && errors.length) {
  10656. Schema.warning('async-validator:', errors);
  10657. }
  10658. if (errors.length && rule.message) {
  10659. errors = [].concat(rule.message);
  10660. }
  10661. errors = errors.map(complementError(rule));
  10662. if (options.first && errors.length) {
  10663. errorFields[rule.field] = 1;
  10664. return doIt(errors);
  10665. }
  10666. if (!deep) {
  10667. doIt(errors);
  10668. } else {
  10669. // if rule is required but the target object
  10670. // does not exist fail at the rule level and don't
  10671. // go deeper
  10672. if (rule.required && !data.value) {
  10673. if (rule.message) {
  10674. errors = [].concat(rule.message).map(complementError(rule));
  10675. } else if (options.error) {
  10676. errors = [options.error(rule, format(options.messages.required, rule.field))];
  10677. } else {
  10678. errors = [];
  10679. }
  10680. return doIt(errors);
  10681. }
  10682. var fieldsSchema = {};
  10683. if (rule.defaultField) {
  10684. for (var k in data.value) {
  10685. if (data.value.hasOwnProperty(k)) {
  10686. fieldsSchema[k] = rule.defaultField;
  10687. }
  10688. }
  10689. }
  10690. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  10691. for (var f in fieldsSchema) {
  10692. if (fieldsSchema.hasOwnProperty(f)) {
  10693. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  10694. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  10695. }
  10696. }
  10697. var schema = new Schema(fieldsSchema);
  10698. schema.messages(options.messages);
  10699. if (data.rule.options) {
  10700. data.rule.options.messages = options.messages;
  10701. data.rule.options.error = options.error;
  10702. }
  10703. schema.validate(data.value, data.rule.options || options, function (errs) {
  10704. var finalErrors = [];
  10705. if (errors && errors.length) {
  10706. finalErrors.push.apply(finalErrors, errors);
  10707. }
  10708. if (errs && errs.length) {
  10709. finalErrors.push.apply(finalErrors, errs);
  10710. }
  10711. doIt(finalErrors.length ? finalErrors : null);
  10712. });
  10713. }
  10714. }
  10715. var res;
  10716. if (rule.asyncValidator) {
  10717. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  10718. } else if (rule.validator) {
  10719. res = rule.validator(rule, data.value, cb, data.source, options);
  10720. if (res === true) {
  10721. cb();
  10722. } else if (res === false) {
  10723. cb(rule.message || rule.field + " fails");
  10724. } else if (res instanceof Array) {
  10725. cb(res);
  10726. } else if (res instanceof Error) {
  10727. cb(res.message);
  10728. }
  10729. }
  10730. if (res && res.then) {
  10731. res.then(function () {
  10732. return cb();
  10733. }, function (e) {
  10734. return cb(e);
  10735. });
  10736. }
  10737. }, function (results) {
  10738. complete(results);
  10739. });
  10740. },
  10741. getType: function getType(rule) {
  10742. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  10743. rule.type = 'pattern';
  10744. }
  10745. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  10746. throw new Error(format('Unknown rule type %s', rule.type));
  10747. }
  10748. return rule.type || 'string';
  10749. },
  10750. getValidationMethod: function getValidationMethod(rule) {
  10751. if (typeof rule.validator === 'function') {
  10752. return rule.validator;
  10753. }
  10754. var keys = Object.keys(rule);
  10755. var messageIndex = keys.indexOf('message');
  10756. if (messageIndex !== -1) {
  10757. keys.splice(messageIndex, 1);
  10758. }
  10759. if (keys.length === 1 && keys[0] === 'required') {
  10760. return validators.required;
  10761. }
  10762. return validators[this.getType(rule)] || false;
  10763. }
  10764. };
  10765. Schema.register = function register(type, validator) {
  10766. if (typeof validator !== 'function') {
  10767. throw new Error('Cannot register a validator by type, validator is not a function');
  10768. }
  10769. validators[type] = validator;
  10770. };
  10771. Schema.warning = warning;
  10772. Schema.messages = messages;
  10773. var _default = Schema;
  10774. exports.default = _default;
  10775. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 388)))
  10776. /***/ }),
  10777. /***/ 388:
  10778. /*!********************************************************!*\
  10779. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10780. \********************************************************/
  10781. /*! no static exports found */
  10782. /***/ (function(module, exports, __webpack_require__) {
  10783. exports.nextTick = function nextTick(fn) {
  10784. var args = Array.prototype.slice.call(arguments);
  10785. args.shift();
  10786. setTimeout(function () {
  10787. fn.apply(null, args);
  10788. }, 0);
  10789. };
  10790. exports.platform = exports.arch =
  10791. exports.execPath = exports.title = 'browser';
  10792. exports.pid = 1;
  10793. exports.browser = true;
  10794. exports.env = {};
  10795. exports.argv = [];
  10796. exports.binding = function (name) {
  10797. throw new Error('No such module. (Possibly not yet loaded)')
  10798. };
  10799. (function () {
  10800. var cwd = '/';
  10801. var path;
  10802. exports.cwd = function () { return cwd };
  10803. exports.chdir = function (dir) {
  10804. if (!path) path = __webpack_require__(/*! path */ 389);
  10805. cwd = path.resolve(dir, cwd);
  10806. };
  10807. })();
  10808. exports.exit = exports.kill =
  10809. exports.umask = exports.dlopen =
  10810. exports.uptime = exports.memoryUsage =
  10811. exports.uvCounters = function() {};
  10812. exports.features = {};
  10813. /***/ }),
  10814. /***/ 389:
  10815. /*!***********************************************!*\
  10816. !*** ./node_modules/path-browserify/index.js ***!
  10817. \***********************************************/
  10818. /*! no static exports found */
  10819. /***/ (function(module, exports, __webpack_require__) {
  10820. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10821. // backported and transplited with Babel, with backwards-compat fixes
  10822. // Copyright Joyent, Inc. and other Node contributors.
  10823. //
  10824. // Permission is hereby granted, free of charge, to any person obtaining a
  10825. // copy of this software and associated documentation files (the
  10826. // "Software"), to deal in the Software without restriction, including
  10827. // without limitation the rights to use, copy, modify, merge, publish,
  10828. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10829. // persons to whom the Software is furnished to do so, subject to the
  10830. // following conditions:
  10831. //
  10832. // The above copyright notice and this permission notice shall be included
  10833. // in all copies or substantial portions of the Software.
  10834. //
  10835. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10836. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10837. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10838. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10839. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10840. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10841. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10842. // resolves . and .. elements in a path array with directory names there
  10843. // must be no slashes, empty elements, or device names (c:\) in the array
  10844. // (so also no leading and trailing slashes - it does not distinguish
  10845. // relative and absolute paths)
  10846. function normalizeArray(parts, allowAboveRoot) {
  10847. // if the path tries to go above the root, `up` ends up > 0
  10848. var up = 0;
  10849. for (var i = parts.length - 1; i >= 0; i--) {
  10850. var last = parts[i];
  10851. if (last === '.') {
  10852. parts.splice(i, 1);
  10853. } else if (last === '..') {
  10854. parts.splice(i, 1);
  10855. up++;
  10856. } else if (up) {
  10857. parts.splice(i, 1);
  10858. up--;
  10859. }
  10860. }
  10861. // if the path is allowed to go above the root, restore leading ..s
  10862. if (allowAboveRoot) {
  10863. for (; up--; up) {
  10864. parts.unshift('..');
  10865. }
  10866. }
  10867. return parts;
  10868. }
  10869. // path.resolve([from ...], to)
  10870. // posix version
  10871. exports.resolve = function() {
  10872. var resolvedPath = '',
  10873. resolvedAbsolute = false;
  10874. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10875. var path = (i >= 0) ? arguments[i] : process.cwd();
  10876. // Skip empty and invalid entries
  10877. if (typeof path !== 'string') {
  10878. throw new TypeError('Arguments to path.resolve must be strings');
  10879. } else if (!path) {
  10880. continue;
  10881. }
  10882. resolvedPath = path + '/' + resolvedPath;
  10883. resolvedAbsolute = path.charAt(0) === '/';
  10884. }
  10885. // At this point the path should be resolved to a full absolute path, but
  10886. // handle relative paths to be safe (might happen when process.cwd() fails)
  10887. // Normalize the path
  10888. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10889. return !!p;
  10890. }), !resolvedAbsolute).join('/');
  10891. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10892. };
  10893. // path.normalize(path)
  10894. // posix version
  10895. exports.normalize = function(path) {
  10896. var isAbsolute = exports.isAbsolute(path),
  10897. trailingSlash = substr(path, -1) === '/';
  10898. // Normalize the path
  10899. path = normalizeArray(filter(path.split('/'), function(p) {
  10900. return !!p;
  10901. }), !isAbsolute).join('/');
  10902. if (!path && !isAbsolute) {
  10903. path = '.';
  10904. }
  10905. if (path && trailingSlash) {
  10906. path += '/';
  10907. }
  10908. return (isAbsolute ? '/' : '') + path;
  10909. };
  10910. // posix version
  10911. exports.isAbsolute = function(path) {
  10912. return path.charAt(0) === '/';
  10913. };
  10914. // posix version
  10915. exports.join = function() {
  10916. var paths = Array.prototype.slice.call(arguments, 0);
  10917. return exports.normalize(filter(paths, function(p, index) {
  10918. if (typeof p !== 'string') {
  10919. throw new TypeError('Arguments to path.join must be strings');
  10920. }
  10921. return p;
  10922. }).join('/'));
  10923. };
  10924. // path.relative(from, to)
  10925. // posix version
  10926. exports.relative = function(from, to) {
  10927. from = exports.resolve(from).substr(1);
  10928. to = exports.resolve(to).substr(1);
  10929. function trim(arr) {
  10930. var start = 0;
  10931. for (; start < arr.length; start++) {
  10932. if (arr[start] !== '') break;
  10933. }
  10934. var end = arr.length - 1;
  10935. for (; end >= 0; end--) {
  10936. if (arr[end] !== '') break;
  10937. }
  10938. if (start > end) return [];
  10939. return arr.slice(start, end - start + 1);
  10940. }
  10941. var fromParts = trim(from.split('/'));
  10942. var toParts = trim(to.split('/'));
  10943. var length = Math.min(fromParts.length, toParts.length);
  10944. var samePartsLength = length;
  10945. for (var i = 0; i < length; i++) {
  10946. if (fromParts[i] !== toParts[i]) {
  10947. samePartsLength = i;
  10948. break;
  10949. }
  10950. }
  10951. var outputParts = [];
  10952. for (var i = samePartsLength; i < fromParts.length; i++) {
  10953. outputParts.push('..');
  10954. }
  10955. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10956. return outputParts.join('/');
  10957. };
  10958. exports.sep = '/';
  10959. exports.delimiter = ':';
  10960. exports.dirname = function (path) {
  10961. if (typeof path !== 'string') path = path + '';
  10962. if (path.length === 0) return '.';
  10963. var code = path.charCodeAt(0);
  10964. var hasRoot = code === 47 /*/*/;
  10965. var end = -1;
  10966. var matchedSlash = true;
  10967. for (var i = path.length - 1; i >= 1; --i) {
  10968. code = path.charCodeAt(i);
  10969. if (code === 47 /*/*/) {
  10970. if (!matchedSlash) {
  10971. end = i;
  10972. break;
  10973. }
  10974. } else {
  10975. // We saw the first non-path separator
  10976. matchedSlash = false;
  10977. }
  10978. }
  10979. if (end === -1) return hasRoot ? '/' : '.';
  10980. if (hasRoot && end === 1) {
  10981. // return '//';
  10982. // Backwards-compat fix:
  10983. return '/';
  10984. }
  10985. return path.slice(0, end);
  10986. };
  10987. function basename(path) {
  10988. if (typeof path !== 'string') path = path + '';
  10989. var start = 0;
  10990. var end = -1;
  10991. var matchedSlash = true;
  10992. var i;
  10993. for (i = path.length - 1; i >= 0; --i) {
  10994. if (path.charCodeAt(i) === 47 /*/*/) {
  10995. // If we reached a path separator that was not part of a set of path
  10996. // separators at the end of the string, stop now
  10997. if (!matchedSlash) {
  10998. start = i + 1;
  10999. break;
  11000. }
  11001. } else if (end === -1) {
  11002. // We saw the first non-path separator, mark this as the end of our
  11003. // path component
  11004. matchedSlash = false;
  11005. end = i + 1;
  11006. }
  11007. }
  11008. if (end === -1) return '';
  11009. return path.slice(start, end);
  11010. }
  11011. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  11012. // in new Node.js versions, so only basename() above is backported here
  11013. exports.basename = function (path, ext) {
  11014. var f = basename(path);
  11015. if (ext && f.substr(-1 * ext.length) === ext) {
  11016. f = f.substr(0, f.length - ext.length);
  11017. }
  11018. return f;
  11019. };
  11020. exports.extname = function (path) {
  11021. if (typeof path !== 'string') path = path + '';
  11022. var startDot = -1;
  11023. var startPart = 0;
  11024. var end = -1;
  11025. var matchedSlash = true;
  11026. // Track the state of characters (if any) we see before our first dot and
  11027. // after any path separator we find
  11028. var preDotState = 0;
  11029. for (var i = path.length - 1; i >= 0; --i) {
  11030. var code = path.charCodeAt(i);
  11031. if (code === 47 /*/*/) {
  11032. // If we reached a path separator that was not part of a set of path
  11033. // separators at the end of the string, stop now
  11034. if (!matchedSlash) {
  11035. startPart = i + 1;
  11036. break;
  11037. }
  11038. continue;
  11039. }
  11040. if (end === -1) {
  11041. // We saw the first non-path separator, mark this as the end of our
  11042. // extension
  11043. matchedSlash = false;
  11044. end = i + 1;
  11045. }
  11046. if (code === 46 /*.*/) {
  11047. // If this is our first dot, mark it as the start of our extension
  11048. if (startDot === -1)
  11049. startDot = i;
  11050. else if (preDotState !== 1)
  11051. preDotState = 1;
  11052. } else if (startDot !== -1) {
  11053. // We saw a non-dot and non-path separator before our dot, so we should
  11054. // have a good chance at having a non-empty extension
  11055. preDotState = -1;
  11056. }
  11057. }
  11058. if (startDot === -1 || end === -1 ||
  11059. // We saw a non-dot character immediately before the dot
  11060. preDotState === 0 ||
  11061. // The (right-most) trimmed path component is exactly '..'
  11062. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11063. return '';
  11064. }
  11065. return path.slice(startDot, end);
  11066. };
  11067. function filter (xs, f) {
  11068. if (xs.filter) return xs.filter(f);
  11069. var res = [];
  11070. for (var i = 0; i < xs.length; i++) {
  11071. if (f(xs[i], i, xs)) res.push(xs[i]);
  11072. }
  11073. return res;
  11074. }
  11075. // String.prototype.substr - negative index don't work in IE8
  11076. var substr = 'ab'.substr(-1) === 'b'
  11077. ? function (str, start, len) { return str.substr(start, len) }
  11078. : function (str, start, len) {
  11079. if (start < 0) start = str.length + start;
  11080. return str.substr(start, len);
  11081. }
  11082. ;
  11083. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 388)))
  11084. /***/ }),
  11085. /***/ 39:
  11086. /*!*******************************************************!*\
  11087. !*** E:/Desktop/zd_wechatApp(1)/common/lodash.min.js ***!
  11088. \*******************************************************/
  11089. /*! no static exports found */
  11090. /***/ (function(module, exports, __webpack_require__) {
  11091. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  11092. /**
  11093. * @license
  11094. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  11095. */
  11096. ;
  11097. (function () {
  11098. function n(n, t, r) {
  11099. switch (r.length) {
  11100. case 0:
  11101. return n.call(t);
  11102. case 1:
  11103. return n.call(t, r[0]);
  11104. case 2:
  11105. return n.call(t, r[0], r[1]);
  11106. case 3:
  11107. return n.call(t, r[0], r[1], r[2]);
  11108. }
  11109. return n.apply(t, r);
  11110. }
  11111. function t(n, t, r, e) {
  11112. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  11113. var o = n[u];
  11114. t(e, o, r(o), n);
  11115. }
  11116. return e;
  11117. }
  11118. function r(n, t) {
  11119. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  11120. ;
  11121. }
  11122. return n;
  11123. }
  11124. function e(n, t) {
  11125. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  11126. ;
  11127. }
  11128. return n;
  11129. }
  11130. function u(n, t) {
  11131. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11132. if (!t(n[r], r, n)) return false;
  11133. }
  11134. return true;
  11135. }
  11136. function i(n, t) {
  11137. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  11138. var o = n[r];
  11139. t(o, r, n) && (i[u++] = o);
  11140. }
  11141. return i;
  11142. }
  11143. function o(n, t) {
  11144. return !(null == n || !n.length) && -1 < v(n, t, 0);
  11145. }
  11146. function f(n, t, r) {
  11147. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  11148. if (r(t, n[e])) return true;
  11149. }
  11150. return false;
  11151. }
  11152. function c(n, t) {
  11153. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  11154. u[r] = t(n[r], r, n);
  11155. }
  11156. return u;
  11157. }
  11158. function a(n, t) {
  11159. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  11160. n[u + r] = t[r];
  11161. }
  11162. return n;
  11163. }
  11164. function l(n, t, r, e) {
  11165. var u = -1,
  11166. i = null == n ? 0 : n.length;
  11167. for (e && i && (r = n[++u]); ++u < i;) {
  11168. r = t(r, n[u], u, n);
  11169. }
  11170. return r;
  11171. }
  11172. function s(n, t, r, e) {
  11173. var u = null == n ? 0 : n.length;
  11174. for (e && u && (r = n[--u]); u--;) {
  11175. r = t(r, n[u], u, n);
  11176. }
  11177. return r;
  11178. }
  11179. function h(n, t) {
  11180. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  11181. if (t(n[r], r, n)) return true;
  11182. }
  11183. return false;
  11184. }
  11185. function p(n, t, r) {
  11186. var e;
  11187. return r(n, function (n, r, u) {
  11188. if (t(n, r, u)) return e = r, false;
  11189. }), e;
  11190. }
  11191. function _(n, t, r, e) {
  11192. var u = n.length;
  11193. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  11194. if (t(n[r], r, n)) return r;
  11195. }
  11196. return -1;
  11197. }
  11198. function v(n, t, r) {
  11199. if (t === t) n: {
  11200. --r;
  11201. for (var e = n.length; ++r < e;) {
  11202. if (n[r] === t) {
  11203. n = r;
  11204. break n;
  11205. }
  11206. }
  11207. n = -1;
  11208. } else n = _(n, d, r);
  11209. return n;
  11210. }
  11211. function g(n, t, r, e) {
  11212. --r;
  11213. for (var u = n.length; ++r < u;) {
  11214. if (e(n[r], t)) return r;
  11215. }
  11216. return -1;
  11217. }
  11218. function d(n) {
  11219. return n !== n;
  11220. }
  11221. function y(n, t) {
  11222. var r = null == n ? 0 : n.length;
  11223. return r ? m(n, t) / r : F;
  11224. }
  11225. function b(n) {
  11226. return function (t) {
  11227. return null == t ? T : t[n];
  11228. };
  11229. }
  11230. function x(n) {
  11231. return function (t) {
  11232. return null == n ? T : n[t];
  11233. };
  11234. }
  11235. function j(n, t, r, e, u) {
  11236. return u(n, function (n, u, i) {
  11237. r = e ? (e = false, n) : t(r, n, u, i);
  11238. }), r;
  11239. }
  11240. function w(n, t) {
  11241. var r = n.length;
  11242. for (n.sort(t); r--;) {
  11243. n[r] = n[r].c;
  11244. }
  11245. return n;
  11246. }
  11247. function m(n, t) {
  11248. for (var r, e = -1, u = n.length; ++e < u;) {
  11249. var i = t(n[e]);
  11250. i !== T && (r = r === T ? i : r + i);
  11251. }
  11252. return r;
  11253. }
  11254. function A(n, t) {
  11255. for (var r = -1, e = Array(n); ++r < n;) {
  11256. e[r] = t(r);
  11257. }
  11258. return e;
  11259. }
  11260. function E(n, t) {
  11261. return c(t, function (t) {
  11262. return [t, n[t]];
  11263. });
  11264. }
  11265. function k(n) {
  11266. return function (t) {
  11267. return n(t);
  11268. };
  11269. }
  11270. function S(n, t) {
  11271. return c(t, function (t) {
  11272. return n[t];
  11273. });
  11274. }
  11275. function O(n, t) {
  11276. return n.has(t);
  11277. }
  11278. function I(n, t) {
  11279. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  11280. ;
  11281. }
  11282. return r;
  11283. }
  11284. function R(n, t) {
  11285. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  11286. ;
  11287. }
  11288. return r;
  11289. }
  11290. function z(n) {
  11291. return "\\" + Un[n];
  11292. }
  11293. function W(n) {
  11294. var t = -1,
  11295. r = Array(n.size);
  11296. return n.forEach(function (n, e) {
  11297. r[++t] = [e, n];
  11298. }), r;
  11299. }
  11300. function B(n, t) {
  11301. return function (r) {
  11302. return n(t(r));
  11303. };
  11304. }
  11305. function L(n, t) {
  11306. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  11307. var o = n[r];
  11308. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  11309. }
  11310. return i;
  11311. }
  11312. function U(n) {
  11313. var t = -1,
  11314. r = Array(n.size);
  11315. return n.forEach(function (n) {
  11316. r[++t] = n;
  11317. }), r;
  11318. }
  11319. function C(n) {
  11320. var t = -1,
  11321. r = Array(n.size);
  11322. return n.forEach(function (n) {
  11323. r[++t] = [n, n];
  11324. }), r;
  11325. }
  11326. function D(n) {
  11327. if (Rn.test(n)) {
  11328. for (var t = On.lastIndex = 0; On.test(n);) {
  11329. ++t;
  11330. }
  11331. n = t;
  11332. } else n = Qn(n);
  11333. return n;
  11334. }
  11335. function M(n) {
  11336. return Rn.test(n) ? n.match(On) || [] : n.split("");
  11337. }
  11338. var T,
  11339. $ = 1 / 0,
  11340. F = NaN,
  11341. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  11342. P = /\b__p\+='';/g,
  11343. Z = /\b(__p\+=)''\+/g,
  11344. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  11345. V = /&(?:amp|lt|gt|quot|#39);/g,
  11346. K = /[&<>"']/g,
  11347. G = RegExp(V.source),
  11348. H = RegExp(K.source),
  11349. J = /<%-([\s\S]+?)%>/g,
  11350. Y = /<%([\s\S]+?)%>/g,
  11351. Q = /<%=([\s\S]+?)%>/g,
  11352. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  11353. nn = /^\w*$/,
  11354. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  11355. rn = /[\\^$.*+?()[\]{}|]/g,
  11356. en = RegExp(rn.source),
  11357. un = /^\s+|\s+$/g,
  11358. on = /^\s+/,
  11359. fn = /\s+$/,
  11360. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  11361. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  11362. ln = /,? & /,
  11363. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  11364. hn = /\\(\\)?/g,
  11365. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  11366. _n = /\w*$/,
  11367. vn = /^[-+]0x[0-9a-f]+$/i,
  11368. gn = /^0b[01]+$/i,
  11369. dn = /^\[object .+?Constructor\]$/,
  11370. yn = /^0o[0-7]+$/i,
  11371. bn = /^(?:0|[1-9]\d*)$/,
  11372. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  11373. jn = /($^)/,
  11374. wn = /['\n\r\u2028\u2029\\]/g,
  11375. mn = "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
  11376. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  11377. En = "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",
  11378. kn = RegExp("['\u2019]", "g"),
  11379. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  11380. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  11381. In = RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", An].join("|"), "g"),
  11382. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  11383. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  11384. Wn = "Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),
  11385. Bn = {};
  11386. Bn["[object Float32Array]"] = Bn["[object Float64Array]"] = Bn["[object Int8Array]"] = Bn["[object Int16Array]"] = Bn["[object Int32Array]"] = Bn["[object Uint8Array]"] = Bn["[object Uint8ClampedArray]"] = Bn["[object Uint16Array]"] = Bn["[object Uint32Array]"] = true, Bn["[object Arguments]"] = Bn["[object Array]"] = Bn["[object ArrayBuffer]"] = Bn["[object Boolean]"] = Bn["[object DataView]"] = Bn["[object Date]"] = Bn["[object Error]"] = Bn["[object Function]"] = Bn["[object Map]"] = Bn["[object Number]"] = Bn["[object Object]"] = Bn["[object RegExp]"] = Bn["[object Set]"] = Bn["[object String]"] = Bn["[object WeakMap]"] = false;
  11387. var Ln = {};
  11388. Ln["[object Arguments]"] = Ln["[object Array]"] = Ln["[object ArrayBuffer]"] = Ln["[object DataView]"] = Ln["[object Boolean]"] = Ln["[object Date]"] = Ln["[object Float32Array]"] = Ln["[object Float64Array]"] = Ln["[object Int8Array]"] = Ln["[object Int16Array]"] = Ln["[object Int32Array]"] = Ln["[object Map]"] = Ln["[object Number]"] = Ln["[object Object]"] = Ln["[object RegExp]"] = Ln["[object Set]"] = Ln["[object String]"] = Ln["[object Symbol]"] = Ln["[object Uint8Array]"] = Ln["[object Uint8ClampedArray]"] = Ln["[object Uint16Array]"] = Ln["[object Uint32Array]"] = true, Ln["[object Error]"] = Ln["[object Function]"] = Ln["[object WeakMap]"] = false;
  11389. var Un = {
  11390. "\\": "\\",
  11391. "'": "'",
  11392. "\n": "n",
  11393. "\r": "r",
  11394. "\u2028": "u2028",
  11395. "\u2029": "u2029"
  11396. },
  11397. Cn = parseFloat,
  11398. Dn = parseInt,
  11399. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  11400. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  11401. $n = Mn || Tn || Function("return this")(),
  11402. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  11403. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  11404. Pn = Nn && Nn.exports === Fn,
  11405. Zn = Pn && Mn.process,
  11406. qn = function () {
  11407. try {
  11408. var n = Nn && Nn.f && Nn.f("util").types;
  11409. return n ? n : Zn && Zn.binding && Zn.binding("util");
  11410. } catch (n) {}
  11411. }(),
  11412. Vn = qn && qn.isArrayBuffer,
  11413. Kn = qn && qn.isDate,
  11414. Gn = qn && qn.isMap,
  11415. Hn = qn && qn.isRegExp,
  11416. Jn = qn && qn.isSet,
  11417. Yn = qn && qn.isTypedArray,
  11418. Qn = b("length"),
  11419. Xn = x({
  11420. "\xc0": "A",
  11421. "\xc1": "A",
  11422. "\xc2": "A",
  11423. "\xc3": "A",
  11424. "\xc4": "A",
  11425. "\xc5": "A",
  11426. "\xe0": "a",
  11427. "\xe1": "a",
  11428. "\xe2": "a",
  11429. "\xe3": "a",
  11430. "\xe4": "a",
  11431. "\xe5": "a",
  11432. "\xc7": "C",
  11433. "\xe7": "c",
  11434. "\xd0": "D",
  11435. "\xf0": "d",
  11436. "\xc8": "E",
  11437. "\xc9": "E",
  11438. "\xca": "E",
  11439. "\xcb": "E",
  11440. "\xe8": "e",
  11441. "\xe9": "e",
  11442. "\xea": "e",
  11443. "\xeb": "e",
  11444. "\xcc": "I",
  11445. "\xcd": "I",
  11446. "\xce": "I",
  11447. "\xcf": "I",
  11448. "\xec": "i",
  11449. "\xed": "i",
  11450. "\xee": "i",
  11451. "\xef": "i",
  11452. "\xd1": "N",
  11453. "\xf1": "n",
  11454. "\xd2": "O",
  11455. "\xd3": "O",
  11456. "\xd4": "O",
  11457. "\xd5": "O",
  11458. "\xd6": "O",
  11459. "\xd8": "O",
  11460. "\xf2": "o",
  11461. "\xf3": "o",
  11462. "\xf4": "o",
  11463. "\xf5": "o",
  11464. "\xf6": "o",
  11465. "\xf8": "o",
  11466. "\xd9": "U",
  11467. "\xda": "U",
  11468. "\xdb": "U",
  11469. "\xdc": "U",
  11470. "\xf9": "u",
  11471. "\xfa": "u",
  11472. "\xfb": "u",
  11473. "\xfc": "u",
  11474. "\xdd": "Y",
  11475. "\xfd": "y",
  11476. "\xff": "y",
  11477. "\xc6": "Ae",
  11478. "\xe6": "ae",
  11479. "\xde": "Th",
  11480. "\xfe": "th",
  11481. "\xdf": "ss",
  11482. "\u0100": "A",
  11483. "\u0102": "A",
  11484. "\u0104": "A",
  11485. "\u0101": "a",
  11486. "\u0103": "a",
  11487. "\u0105": "a",
  11488. "\u0106": "C",
  11489. "\u0108": "C",
  11490. "\u010A": "C",
  11491. "\u010C": "C",
  11492. "\u0107": "c",
  11493. "\u0109": "c",
  11494. "\u010B": "c",
  11495. "\u010D": "c",
  11496. "\u010E": "D",
  11497. "\u0110": "D",
  11498. "\u010F": "d",
  11499. "\u0111": "d",
  11500. "\u0112": "E",
  11501. "\u0114": "E",
  11502. "\u0116": "E",
  11503. "\u0118": "E",
  11504. "\u011A": "E",
  11505. "\u0113": "e",
  11506. "\u0115": "e",
  11507. "\u0117": "e",
  11508. "\u0119": "e",
  11509. "\u011B": "e",
  11510. "\u011C": "G",
  11511. "\u011E": "G",
  11512. "\u0120": "G",
  11513. "\u0122": "G",
  11514. "\u011D": "g",
  11515. "\u011F": "g",
  11516. "\u0121": "g",
  11517. "\u0123": "g",
  11518. "\u0124": "H",
  11519. "\u0126": "H",
  11520. "\u0125": "h",
  11521. "\u0127": "h",
  11522. "\u0128": "I",
  11523. "\u012A": "I",
  11524. "\u012C": "I",
  11525. "\u012E": "I",
  11526. "\u0130": "I",
  11527. "\u0129": "i",
  11528. "\u012B": "i",
  11529. "\u012D": "i",
  11530. "\u012F": "i",
  11531. "\u0131": "i",
  11532. "\u0134": "J",
  11533. "\u0135": "j",
  11534. "\u0136": "K",
  11535. "\u0137": "k",
  11536. "\u0138": "k",
  11537. "\u0139": "L",
  11538. "\u013B": "L",
  11539. "\u013D": "L",
  11540. "\u013F": "L",
  11541. "\u0141": "L",
  11542. "\u013A": "l",
  11543. "\u013C": "l",
  11544. "\u013E": "l",
  11545. "\u0140": "l",
  11546. "\u0142": "l",
  11547. "\u0143": "N",
  11548. "\u0145": "N",
  11549. "\u0147": "N",
  11550. "\u014A": "N",
  11551. "\u0144": "n",
  11552. "\u0146": "n",
  11553. "\u0148": "n",
  11554. "\u014B": "n",
  11555. "\u014C": "O",
  11556. "\u014E": "O",
  11557. "\u0150": "O",
  11558. "\u014D": "o",
  11559. "\u014F": "o",
  11560. "\u0151": "o",
  11561. "\u0154": "R",
  11562. "\u0156": "R",
  11563. "\u0158": "R",
  11564. "\u0155": "r",
  11565. "\u0157": "r",
  11566. "\u0159": "r",
  11567. "\u015A": "S",
  11568. "\u015C": "S",
  11569. "\u015E": "S",
  11570. "\u0160": "S",
  11571. "\u015B": "s",
  11572. "\u015D": "s",
  11573. "\u015F": "s",
  11574. "\u0161": "s",
  11575. "\u0162": "T",
  11576. "\u0164": "T",
  11577. "\u0166": "T",
  11578. "\u0163": "t",
  11579. "\u0165": "t",
  11580. "\u0167": "t",
  11581. "\u0168": "U",
  11582. "\u016A": "U",
  11583. "\u016C": "U",
  11584. "\u016E": "U",
  11585. "\u0170": "U",
  11586. "\u0172": "U",
  11587. "\u0169": "u",
  11588. "\u016B": "u",
  11589. "\u016D": "u",
  11590. "\u016F": "u",
  11591. "\u0171": "u",
  11592. "\u0173": "u",
  11593. "\u0174": "W",
  11594. "\u0175": "w",
  11595. "\u0176": "Y",
  11596. "\u0177": "y",
  11597. "\u0178": "Y",
  11598. "\u0179": "Z",
  11599. "\u017B": "Z",
  11600. "\u017D": "Z",
  11601. "\u017A": "z",
  11602. "\u017C": "z",
  11603. "\u017E": "z",
  11604. "\u0132": "IJ",
  11605. "\u0133": "ij",
  11606. "\u0152": "Oe",
  11607. "\u0153": "oe",
  11608. "\u0149": "'n",
  11609. "\u017F": "s"
  11610. }),
  11611. nt = x({
  11612. "&": "&amp;",
  11613. "<": "&lt;",
  11614. ">": "&gt;",
  11615. '"': "&quot;",
  11616. "'": "&#39;"
  11617. }),
  11618. tt = x({
  11619. "&amp;": "&",
  11620. "&lt;": "<",
  11621. "&gt;": ">",
  11622. "&quot;": '"',
  11623. "&#39;": "'"
  11624. }),
  11625. rt = function x(mn) {
  11626. function An(n) {
  11627. if (du(n) && !of(n) && !(n instanceof Un)) {
  11628. if (n instanceof On) return n;
  11629. if (ii.call(n, "__wrapped__")) return $e(n);
  11630. }
  11631. return new On(n);
  11632. }
  11633. function En() {}
  11634. function On(n, t) {
  11635. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  11636. }
  11637. function Un(n) {
  11638. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  11639. }
  11640. function Mn(n) {
  11641. var t = -1,
  11642. r = null == n ? 0 : n.length;
  11643. for (this.clear(); ++t < r;) {
  11644. var e = n[t];
  11645. this.set(e[0], e[1]);
  11646. }
  11647. }
  11648. function Tn(n) {
  11649. var t = -1,
  11650. r = null == n ? 0 : n.length;
  11651. for (this.clear(); ++t < r;) {
  11652. var e = n[t];
  11653. this.set(e[0], e[1]);
  11654. }
  11655. }
  11656. function Fn(n) {
  11657. var t = -1,
  11658. r = null == n ? 0 : n.length;
  11659. for (this.clear(); ++t < r;) {
  11660. var e = n[t];
  11661. this.set(e[0], e[1]);
  11662. }
  11663. }
  11664. function Nn(n) {
  11665. var t = -1,
  11666. r = null == n ? 0 : n.length;
  11667. for (this.__data__ = new Fn(); ++t < r;) {
  11668. this.add(n[t]);
  11669. }
  11670. }
  11671. function Zn(n) {
  11672. this.size = (this.__data__ = new Tn(n)).size;
  11673. }
  11674. function qn(n, t) {
  11675. var r,
  11676. e = of(n),
  11677. u = !e && uf(n),
  11678. i = !e && !u && cf(n),
  11679. o = !e && !u && !i && pf(n),
  11680. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  11681. f = u.length;
  11682. for (r in n) {
  11683. !t && !ii.call(n, r) || e && ("length" == r || i && ("offset" == r || "parent" == r) || o && ("buffer" == r || "byteLength" == r || "byteOffset" == r) || Se(r, f)) || u.push(r);
  11684. }
  11685. return u;
  11686. }
  11687. function Qn(n) {
  11688. var t = n.length;
  11689. return t ? n[ir(0, t - 1)] : T;
  11690. }
  11691. function et(n, t) {
  11692. return Ce(Ur(n), pt(t, 0, n.length));
  11693. }
  11694. function ut(n) {
  11695. return Ce(Ur(n));
  11696. }
  11697. function it(n, t, r) {
  11698. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  11699. }
  11700. function ot(n, t, r) {
  11701. var e = n[t];
  11702. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  11703. }
  11704. function ft(n, t) {
  11705. for (var r = n.length; r--;) {
  11706. if (au(n[r][0], t)) return r;
  11707. }
  11708. return -1;
  11709. }
  11710. function ct(n, t, r, e) {
  11711. return eo(n, function (n, u, i) {
  11712. t(e, n, r(n), i);
  11713. }), e;
  11714. }
  11715. function at(n, t) {
  11716. return n && Cr(t, zu(t), n);
  11717. }
  11718. function lt(n, t) {
  11719. return n && Cr(t, Wu(t), n);
  11720. }
  11721. function st(n, t, r) {
  11722. "__proto__" == t && mi ? mi(n, t, {
  11723. configurable: true,
  11724. enumerable: true,
  11725. value: r,
  11726. writable: true
  11727. }) : n[t] = r;
  11728. }
  11729. function ht(n, t) {
  11730. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  11731. u[r] = i ? T : Iu(n, t[r]);
  11732. }
  11733. return u;
  11734. }
  11735. function pt(n, t, r) {
  11736. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  11737. }
  11738. function _t(n, t, e, u, i, o) {
  11739. var f,
  11740. c = 1 & t,
  11741. a = 2 & t,
  11742. l = 4 & t;
  11743. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  11744. if (!gu(n)) return n;
  11745. if (u = of(n)) {
  11746. if (f = me(n), !c) return Ur(n, f);
  11747. } else {
  11748. var s = _o(n),
  11749. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  11750. if (cf(n)) return Ir(n, c);
  11751. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  11752. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  11753. } else {
  11754. if (!Ln[s]) return i ? n : {};
  11755. f = Ee(n, s, c);
  11756. }
  11757. }
  11758. if (o || (o = new Zn()), i = o.get(n)) return i;
  11759. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  11760. f.add(_t(r, t, e, r, n, o));
  11761. }), f;
  11762. if (lf(n)) return n.forEach(function (r, u) {
  11763. f.set(u, _t(r, t, e, u, n, o));
  11764. }), f;
  11765. var a = l ? a ? ve : _e : a ? Wu : zu,
  11766. p = u ? T : a(n);
  11767. return r(p || n, function (r, u) {
  11768. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  11769. }), f;
  11770. }
  11771. function vt(n) {
  11772. var t = zu(n);
  11773. return function (r) {
  11774. return gt(r, n, t);
  11775. };
  11776. }
  11777. function gt(n, t, r) {
  11778. var e = r.length;
  11779. if (null == n) return !e;
  11780. for (n = Yu(n); e--;) {
  11781. var u = r[e],
  11782. i = t[u],
  11783. o = n[u];
  11784. if (o === T && !(u in n) || !i(o)) return false;
  11785. }
  11786. return true;
  11787. }
  11788. function dt(n, t, r) {
  11789. if (typeof n != "function") throw new ni("Expected a function");
  11790. return yo(function () {
  11791. n.apply(T, r);
  11792. }, t);
  11793. }
  11794. function yt(n, t, r, e) {
  11795. var u = -1,
  11796. i = o,
  11797. a = true,
  11798. l = n.length,
  11799. s = [],
  11800. h = t.length;
  11801. if (!l) return s;
  11802. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  11803. n: for (; ++u < l;) {
  11804. var p = n[u],
  11805. _ = null == r ? p : r(p),
  11806. p = e || 0 !== p ? p : 0;
  11807. if (a && _ === _) {
  11808. for (var v = h; v--;) {
  11809. if (t[v] === _) continue n;
  11810. }
  11811. s.push(p);
  11812. } else i(t, _, e) || s.push(p);
  11813. }
  11814. return s;
  11815. }
  11816. function bt(n, t) {
  11817. var r = true;
  11818. return eo(n, function (n, e, u) {
  11819. return r = !!t(n, e, u);
  11820. }), r;
  11821. }
  11822. function xt(n, t, r) {
  11823. for (var e = -1, u = n.length; ++e < u;) {
  11824. var i = n[e],
  11825. o = t(i);
  11826. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  11827. c = i;
  11828. }
  11829. return c;
  11830. }
  11831. function jt(n, t) {
  11832. var r = [];
  11833. return eo(n, function (n, e, u) {
  11834. t(n, e, u) && r.push(n);
  11835. }), r;
  11836. }
  11837. function wt(n, t, r, e, u) {
  11838. var i = -1,
  11839. o = n.length;
  11840. for (r || (r = ke), u || (u = []); ++i < o;) {
  11841. var f = n[i];
  11842. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  11843. }
  11844. return u;
  11845. }
  11846. function mt(n, t) {
  11847. return n && io(n, t, zu);
  11848. }
  11849. function At(n, t) {
  11850. return n && oo(n, t, zu);
  11851. }
  11852. function Et(n, t) {
  11853. return i(t, function (t) {
  11854. return pu(n[t]);
  11855. });
  11856. }
  11857. function kt(n, t) {
  11858. t = Sr(t, n);
  11859. for (var r = 0, e = t.length; null != n && r < e;) {
  11860. n = n[De(t[r++])];
  11861. }
  11862. return r && r == e ? n : T;
  11863. }
  11864. function St(n, t, r) {
  11865. return t = t(n), of(n) ? t : a(t, r(n));
  11866. }
  11867. function Ot(n) {
  11868. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  11869. var t = ii.call(n, wi),
  11870. r = n[wi];
  11871. try {
  11872. n[wi] = T;
  11873. var e = true;
  11874. } catch (n) {}
  11875. var u = ci.call(n);
  11876. e && (t ? n[wi] = r : delete n[wi]), n = u;
  11877. } else n = ci.call(n);
  11878. return n;
  11879. }
  11880. function It(n, t) {
  11881. return n > t;
  11882. }
  11883. function Rt(n, t) {
  11884. return null != n && ii.call(n, t);
  11885. }
  11886. function zt(n, t) {
  11887. return null != n && t in Yu(n);
  11888. }
  11889. function Wt(n, t, r) {
  11890. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  11891. var p = n[a];
  11892. a && t && (p = c(p, k(t))), s = Ui(p.length, s), l[a] = !r && (t || 120 <= u && 120 <= p.length) ? new Nn(a && p) : T;
  11893. }
  11894. var p = n[0],
  11895. _ = -1,
  11896. v = l[0];
  11897. n: for (; ++_ < u && h.length < s;) {
  11898. var g = p[_],
  11899. d = t ? t(g) : g,
  11900. g = r || 0 !== g ? g : 0;
  11901. if (v ? !O(v, d) : !e(h, d, r)) {
  11902. for (a = i; --a;) {
  11903. var y = l[a];
  11904. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  11905. }
  11906. v && v.push(d), h.push(g);
  11907. }
  11908. }
  11909. return h;
  11910. }
  11911. function Bt(n, t, r) {
  11912. var e = {};
  11913. return mt(n, function (n, u, i) {
  11914. t(e, r(n), u, i);
  11915. }), e;
  11916. }
  11917. function Lt(t, r, e) {
  11918. return r = Sr(r, t), t = 2 > r.length ? t : kt(t, hr(r, 0, -1)), r = null == t ? t : t[De(qe(r))], null == r ? T : n(r, t, e);
  11919. }
  11920. function Ut(n) {
  11921. return du(n) && "[object Arguments]" == Ot(n);
  11922. }
  11923. function Ct(n) {
  11924. return du(n) && "[object ArrayBuffer]" == Ot(n);
  11925. }
  11926. function Dt(n) {
  11927. return du(n) && "[object Date]" == Ot(n);
  11928. }
  11929. function Mt(n, t, r, e, u) {
  11930. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  11931. var i = of(n),
  11932. o = of(t),
  11933. f = i ? "[object Array]" : _o(n),
  11934. c = o ? "[object Array]" : _o(t),
  11935. f = "[object Arguments]" == f ? "[object Object]" : f,
  11936. c = "[object Arguments]" == c ? "[object Object]" : c,
  11937. a = "[object Object]" == f,
  11938. o = "[object Object]" == c;
  11939. if ((c = f == c) && cf(n)) {
  11940. if (!cf(t)) {
  11941. t = false;
  11942. break n;
  11943. }
  11944. i = true, a = false;
  11945. }
  11946. if (c && !a) u || (u = new Zn()), t = i || pf(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u);else {
  11947. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  11948. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  11949. break n;
  11950. }
  11951. if (c) {
  11952. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  11953. for (a = o; a--;) {
  11954. var l = f[a];
  11955. if (!(i ? l in t : ii.call(t, l))) {
  11956. t = false;
  11957. break t;
  11958. }
  11959. }
  11960. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  11961. c = true, u.set(n, t), u.set(t, n);
  11962. for (var s = i; ++a < o;) {
  11963. var l = f[a],
  11964. h = n[l],
  11965. p = t[l];
  11966. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  11967. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  11968. c = false;
  11969. break;
  11970. }
  11971. s || (s = "constructor" == l);
  11972. }
  11973. c && !s && (r = n.constructor, e = t.constructor, r != e && "constructor" in n && "constructor" in t && !(typeof r == "function" && r instanceof r && typeof e == "function" && e instanceof e) && (c = false)), u.delete(n), u.delete(t), t = c;
  11974. }
  11975. } else t = false;
  11976. } else t = false;
  11977. }
  11978. }
  11979. return t;
  11980. }
  11981. function Tt(n) {
  11982. return du(n) && "[object Map]" == _o(n);
  11983. }
  11984. function $t(n, t, r, e) {
  11985. var u = r.length,
  11986. i = u,
  11987. o = !e;
  11988. if (null == n) return !i;
  11989. for (n = Yu(n); u--;) {
  11990. var f = r[u];
  11991. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  11992. }
  11993. for (; ++u < i;) {
  11994. var f = r[u],
  11995. c = f[0],
  11996. a = n[c],
  11997. l = f[1];
  11998. if (o && f[2]) {
  11999. if (a === T && !(c in n)) return false;
  12000. } else {
  12001. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  12002. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  12003. }
  12004. }
  12005. return true;
  12006. }
  12007. function Ft(n) {
  12008. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  12009. }
  12010. function Nt(n) {
  12011. return du(n) && "[object RegExp]" == Ot(n);
  12012. }
  12013. function Pt(n) {
  12014. return du(n) && "[object Set]" == _o(n);
  12015. }
  12016. function Zt(n) {
  12017. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  12018. }
  12019. function qt(n) {
  12020. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  12021. }
  12022. function Vt(n) {
  12023. if (!ze(n)) return Bi(n);
  12024. var t,
  12025. r = [];
  12026. for (t in Yu(n)) {
  12027. ii.call(n, t) && "constructor" != t && r.push(t);
  12028. }
  12029. return r;
  12030. }
  12031. function Kt(n, t) {
  12032. return n < t;
  12033. }
  12034. function Gt(n, t) {
  12035. var r = -1,
  12036. e = lu(n) ? Vu(n.length) : [];
  12037. return eo(n, function (n, u, i) {
  12038. e[++r] = t(n, u, i);
  12039. }), e;
  12040. }
  12041. function Ht(n) {
  12042. var t = xe(n);
  12043. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  12044. return r === n || $t(r, n, t);
  12045. };
  12046. }
  12047. function Jt(n, t) {
  12048. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  12049. var e = Iu(r, n);
  12050. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  12051. };
  12052. }
  12053. function Yt(n, t, r, e, u) {
  12054. n !== t && io(t, function (i, o) {
  12055. if (gu(i)) {
  12056. u || (u = new Zn());
  12057. var f = u,
  12058. c = "__proto__" == o ? T : n[o],
  12059. a = "__proto__" == o ? T : t[o],
  12060. l = f.get(a);
  12061. if (l) it(n, o, l);else {
  12062. var l = e ? e(c, a, o + "", n, t, f) : T,
  12063. s = l === T;
  12064. if (s) {
  12065. var h = of(a),
  12066. p = !h && cf(a),
  12067. _ = !h && !p && pf(a),
  12068. l = a;
  12069. h || p || _ ? of(c) ? l = c : su(c) ? l = Ur(c) : p ? (s = false, l = Ir(a, true)) : _ ? (s = false, l = zr(a, true)) : l = [] : bu(a) || uf(a) ? (l = c, uf(c) ? l = Su(c) : (!gu(c) || r && pu(c)) && (l = Ae(a))) : s = false;
  12070. }
  12071. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  12072. }
  12073. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  12074. }, Wu);
  12075. }
  12076. function Qt(n, t) {
  12077. var r = n.length;
  12078. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  12079. }
  12080. function Xt(n, t, r) {
  12081. var e = -1;
  12082. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  12083. return {
  12084. a: c(t, function (t) {
  12085. return t(n);
  12086. }),
  12087. b: ++e,
  12088. c: n
  12089. };
  12090. }), w(n, function (n, t) {
  12091. var e;
  12092. n: {
  12093. e = -1;
  12094. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  12095. var c = Wr(u[e], i[e]);
  12096. if (c) {
  12097. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  12098. break n;
  12099. }
  12100. }
  12101. e = n.b - t.b;
  12102. }
  12103. return e;
  12104. });
  12105. }
  12106. function nr(n, t) {
  12107. return tr(n, t, function (t, r) {
  12108. return Ru(n, r);
  12109. });
  12110. }
  12111. function tr(n, t, r) {
  12112. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  12113. var o = t[e],
  12114. f = kt(n, o);
  12115. r(f, o) && lr(i, Sr(o, n), f);
  12116. }
  12117. return i;
  12118. }
  12119. function rr(n) {
  12120. return function (t) {
  12121. return kt(t, n);
  12122. };
  12123. }
  12124. function er(n, t, r, e) {
  12125. var u = e ? g : v,
  12126. i = -1,
  12127. o = t.length,
  12128. f = n;
  12129. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  12130. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  12131. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  12132. }
  12133. }
  12134. return n;
  12135. }
  12136. function ur(n, t) {
  12137. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  12138. var u = t[r];
  12139. if (r == e || u !== i) {
  12140. var i = u;
  12141. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  12142. }
  12143. }
  12144. }
  12145. function ir(n, t) {
  12146. return n + Oi(Mi() * (t - n + 1));
  12147. }
  12148. function or(n, t) {
  12149. var r = "";
  12150. if (!n || 1 > t || 9007199254740991 < t) return r;
  12151. do {
  12152. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  12153. } while (t);
  12154. return r;
  12155. }
  12156. function fr(n, t) {
  12157. return bo(Be(n, t, Tu), n + "");
  12158. }
  12159. function cr(n) {
  12160. return Qn(Lu(n));
  12161. }
  12162. function ar(n, t) {
  12163. var r = Lu(n);
  12164. return Ce(r, pt(t, 0, r.length));
  12165. }
  12166. function lr(n, t, r, e) {
  12167. if (!gu(n)) return n;
  12168. t = Sr(t, n);
  12169. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  12170. var c = De(t[u]),
  12171. a = r;
  12172. if (u != o) {
  12173. var l = f[c],
  12174. a = e ? e(l, c, f) : T;
  12175. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  12176. }
  12177. ot(f, c, a), f = f[c];
  12178. }
  12179. return n;
  12180. }
  12181. function sr(n) {
  12182. return Ce(Lu(n));
  12183. }
  12184. function hr(n, t, r) {
  12185. var e = -1,
  12186. u = n.length;
  12187. for (0 > t && (t = -t > u ? 0 : u + t), r = r > u ? u : r, 0 > r && (r += u), u = t > r ? 0 : r - t >>> 0, t >>>= 0, r = Vu(u); ++e < u;) {
  12188. r[e] = n[e + t];
  12189. }
  12190. return r;
  12191. }
  12192. function pr(n, t) {
  12193. var r;
  12194. return eo(n, function (n, e, u) {
  12195. return r = t(n, e, u), !r;
  12196. }), !!r;
  12197. }
  12198. function _r(n, t, r) {
  12199. var e = 0,
  12200. u = null == n ? e : n.length;
  12201. if (typeof t == "number" && t === t && 2147483647 >= u) {
  12202. for (; e < u;) {
  12203. var i = e + u >>> 1,
  12204. o = n[i];
  12205. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  12206. }
  12207. return u;
  12208. }
  12209. return vr(n, t, Tu, r);
  12210. }
  12211. function vr(n, t, r, e) {
  12212. t = r(t);
  12213. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  12214. var l = Oi((u + i) / 2),
  12215. s = r(n[l]),
  12216. h = s !== T,
  12217. p = null === s,
  12218. _ = s === s,
  12219. v = ju(s);
  12220. (o ? e || _ : a ? _ && (e || h) : f ? _ && h && (e || !p) : c ? _ && h && !p && (e || !v) : p || v ? 0 : e ? s <= t : s < t) ? u = l + 1 : i = l;
  12221. }
  12222. return Ui(i, 4294967294);
  12223. }
  12224. function gr(n, t) {
  12225. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  12226. var o = n[r],
  12227. f = t ? t(o) : o;
  12228. if (!r || !au(f, c)) {
  12229. var c = f;
  12230. i[u++] = 0 === o ? 0 : o;
  12231. }
  12232. }
  12233. return i;
  12234. }
  12235. function dr(n) {
  12236. return typeof n == "number" ? n : ju(n) ? F : +n;
  12237. }
  12238. function yr(n) {
  12239. if (typeof n == "string") return n;
  12240. if (of(n)) return c(n, yr) + "";
  12241. if (ju(n)) return to ? to.call(n) : "";
  12242. var t = n + "";
  12243. return "0" == t && 1 / n == -$ ? "-0" : t;
  12244. }
  12245. function br(n, t, r) {
  12246. var e = -1,
  12247. u = o,
  12248. i = n.length,
  12249. c = true,
  12250. a = [],
  12251. l = a;
  12252. if (r) c = false, u = f;else if (200 <= i) {
  12253. if (u = t ? null : lo(n)) return U(u);
  12254. c = false, u = O, l = new Nn();
  12255. } else l = t ? [] : a;
  12256. n: for (; ++e < i;) {
  12257. var s = n[e],
  12258. h = t ? t(s) : s,
  12259. s = r || 0 !== s ? s : 0;
  12260. if (c && h === h) {
  12261. for (var p = l.length; p--;) {
  12262. if (l[p] === h) continue n;
  12263. }
  12264. t && l.push(h), a.push(s);
  12265. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  12266. }
  12267. return a;
  12268. }
  12269. function xr(n, t) {
  12270. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  12271. }
  12272. function jr(n, t, r, e) {
  12273. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  12274. ;
  12275. }
  12276. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  12277. }
  12278. function wr(n, t) {
  12279. var r = n;
  12280. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  12281. return t.func.apply(t.thisArg, a([n], t.args));
  12282. }, r);
  12283. }
  12284. function mr(n, t, r) {
  12285. var e = n.length;
  12286. if (2 > e) return e ? br(n[0]) : [];
  12287. for (var u = -1, i = Vu(e); ++u < e;) {
  12288. for (var o = n[u], f = -1; ++f < e;) {
  12289. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  12290. }
  12291. }
  12292. return br(wt(i, 1), t, r);
  12293. }
  12294. function Ar(n, t, r) {
  12295. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  12296. r(o, n[e], e < i ? t[e] : T);
  12297. }
  12298. return o;
  12299. }
  12300. function Er(n) {
  12301. return su(n) ? n : [];
  12302. }
  12303. function kr(n) {
  12304. return typeof n == "function" ? n : Tu;
  12305. }
  12306. function Sr(n, t) {
  12307. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  12308. }
  12309. function Or(n, t, r) {
  12310. var e = n.length;
  12311. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  12312. }
  12313. function Ir(n, t) {
  12314. if (t) return n.slice();
  12315. var r = n.length,
  12316. r = vi ? vi(r) : new n.constructor(r);
  12317. return n.copy(r), r;
  12318. }
  12319. function Rr(n) {
  12320. var t = new n.constructor(n.byteLength);
  12321. return new _i(t).set(new _i(n)), t;
  12322. }
  12323. function zr(n, t) {
  12324. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  12325. }
  12326. function Wr(n, t) {
  12327. if (n !== t) {
  12328. var r = n !== T,
  12329. e = null === n,
  12330. u = n === n,
  12331. i = ju(n),
  12332. o = t !== T,
  12333. f = null === t,
  12334. c = t === t,
  12335. a = ju(t);
  12336. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  12337. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  12338. }
  12339. return 0;
  12340. }
  12341. function Br(n, t, r, e) {
  12342. var u = -1,
  12343. i = n.length,
  12344. o = r.length,
  12345. f = -1,
  12346. c = t.length,
  12347. a = Li(i - o, 0),
  12348. l = Vu(c + a);
  12349. for (e = !e; ++f < c;) {
  12350. l[f] = t[f];
  12351. }
  12352. for (; ++u < o;) {
  12353. (e || u < i) && (l[r[u]] = n[u]);
  12354. }
  12355. for (; a--;) {
  12356. l[f++] = n[u++];
  12357. }
  12358. return l;
  12359. }
  12360. function Lr(n, t, r, e) {
  12361. var u = -1,
  12362. i = n.length,
  12363. o = -1,
  12364. f = r.length,
  12365. c = -1,
  12366. a = t.length,
  12367. l = Li(i - f, 0),
  12368. s = Vu(l + a);
  12369. for (e = !e; ++u < l;) {
  12370. s[u] = n[u];
  12371. }
  12372. for (l = u; ++c < a;) {
  12373. s[l + c] = t[c];
  12374. }
  12375. for (; ++o < f;) {
  12376. (e || u < i) && (s[l + r[o]] = n[u++]);
  12377. }
  12378. return s;
  12379. }
  12380. function Ur(n, t) {
  12381. var r = -1,
  12382. e = n.length;
  12383. for (t || (t = Vu(e)); ++r < e;) {
  12384. t[r] = n[r];
  12385. }
  12386. return t;
  12387. }
  12388. function Cr(n, t, r, e) {
  12389. var u = !r;
  12390. r || (r = {});
  12391. for (var i = -1, o = t.length; ++i < o;) {
  12392. var f = t[i],
  12393. c = e ? e(r[f], n[f], f, r, n) : T;
  12394. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  12395. }
  12396. return r;
  12397. }
  12398. function Dr(n, t) {
  12399. return Cr(n, ho(n), t);
  12400. }
  12401. function Mr(n, t) {
  12402. return Cr(n, po(n), t);
  12403. }
  12404. function Tr(n, r) {
  12405. return function (e, u) {
  12406. var i = of(e) ? t : ct,
  12407. o = r ? r() : {};
  12408. return i(e, n, ye(u, 2), o);
  12409. };
  12410. }
  12411. function $r(n) {
  12412. return fr(function (t, r) {
  12413. var e = -1,
  12414. u = r.length,
  12415. i = 1 < u ? r[u - 1] : T,
  12416. o = 2 < u ? r[2] : T,
  12417. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  12418. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  12419. (o = r[e]) && n(t, o, e, i);
  12420. }
  12421. return t;
  12422. });
  12423. }
  12424. function Fr(n, t) {
  12425. return function (r, e) {
  12426. if (null == r) return r;
  12427. if (!lu(r)) return n(r, e);
  12428. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  12429. ;
  12430. }
  12431. return r;
  12432. };
  12433. }
  12434. function Nr(n) {
  12435. return function (t, r, e) {
  12436. var u = -1,
  12437. i = Yu(t);
  12438. e = e(t);
  12439. for (var o = e.length; o--;) {
  12440. var f = e[n ? o : ++u];
  12441. if (false === r(i[f], f, i)) break;
  12442. }
  12443. return t;
  12444. };
  12445. }
  12446. function Pr(n, t, r) {
  12447. function e() {
  12448. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  12449. }
  12450. var u = 1 & t,
  12451. i = Vr(n);
  12452. return e;
  12453. }
  12454. function Zr(n) {
  12455. return function (t) {
  12456. t = Ou(t);
  12457. var r = Rn.test(t) ? M(t) : T,
  12458. e = r ? r[0] : t.charAt(0);
  12459. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  12460. };
  12461. }
  12462. function qr(n) {
  12463. return function (t) {
  12464. return l(Du(Cu(t).replace(kn, "")), n, "");
  12465. };
  12466. }
  12467. function Vr(n) {
  12468. return function () {
  12469. var t = arguments;
  12470. switch (t.length) {
  12471. case 0:
  12472. return new n();
  12473. case 1:
  12474. return new n(t[0]);
  12475. case 2:
  12476. return new n(t[0], t[1]);
  12477. case 3:
  12478. return new n(t[0], t[1], t[2]);
  12479. case 4:
  12480. return new n(t[0], t[1], t[2], t[3]);
  12481. case 5:
  12482. return new n(t[0], t[1], t[2], t[3], t[4]);
  12483. case 6:
  12484. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  12485. case 7:
  12486. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  12487. }
  12488. var r = ro(n.prototype),
  12489. t = n.apply(r, t);
  12490. return gu(t) ? t : r;
  12491. };
  12492. }
  12493. function Kr(t, r, e) {
  12494. function u() {
  12495. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  12496. f[c] = arguments[c];
  12497. }
  12498. return c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a), o -= c.length, o < e ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) : n(this && this !== $n && this instanceof u ? i : t, this, f);
  12499. }
  12500. var i = Vr(t);
  12501. return u;
  12502. }
  12503. function Gr(n) {
  12504. return function (t, r, e) {
  12505. var u = Yu(t);
  12506. if (!lu(t)) {
  12507. var i = ye(r, 3);
  12508. t = zu(t), r = function r(n) {
  12509. return i(u[n], n, u);
  12510. };
  12511. }
  12512. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  12513. };
  12514. }
  12515. function Hr(n) {
  12516. return pe(function (t) {
  12517. var r = t.length,
  12518. e = r,
  12519. u = On.prototype.thru;
  12520. for (n && t.reverse(); e--;) {
  12521. var i = t[e];
  12522. if (typeof i != "function") throw new ni("Expected a function");
  12523. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  12524. }
  12525. for (e = o ? e : r; ++e < r;) {
  12526. var i = t[e],
  12527. u = ge(i),
  12528. f = "wrapper" == u ? so(i) : T,
  12529. o = f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] ? o[ge(f[0])].apply(o, f[3]) : 1 == i.length && Re(i) ? o[u]() : o.thru(i);
  12530. }
  12531. return function () {
  12532. var n = arguments,
  12533. e = n[0];
  12534. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  12535. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  12536. n = t[u].call(this, n);
  12537. }
  12538. return n;
  12539. };
  12540. });
  12541. }
  12542. function Jr(n, t, r, e, u, i, o, f, c, a) {
  12543. function l() {
  12544. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  12545. y[b] = arguments[b];
  12546. }
  12547. if (_) {
  12548. var x,
  12549. j = de(l),
  12550. b = y.length;
  12551. for (x = 0; b--;) {
  12552. y[b] === j && ++x;
  12553. }
  12554. }
  12555. if (e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), d -= x, _ && d < a) return j = L(y, j), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d);
  12556. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  12557. x = y.length;
  12558. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  12559. var A = f[w];
  12560. y[w] = Se(A, x) ? m[A] : T;
  12561. }
  12562. } else v && 1 < d && y.reverse();
  12563. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  12564. }
  12565. var s = 128 & t,
  12566. h = 1 & t,
  12567. p = 2 & t,
  12568. _ = 24 & t,
  12569. v = 512 & t,
  12570. g = p ? T : Vr(n);
  12571. return l;
  12572. }
  12573. function Yr(n, t) {
  12574. return function (r, e) {
  12575. return Bt(r, n, t(e));
  12576. };
  12577. }
  12578. function Qr(n, t) {
  12579. return function (r, e) {
  12580. var u;
  12581. if (r === T && e === T) return t;
  12582. if (r !== T && (u = r), e !== T) {
  12583. if (u === T) return e;
  12584. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  12585. }
  12586. return u;
  12587. };
  12588. }
  12589. function Xr(t) {
  12590. return pe(function (r) {
  12591. return r = c(r, k(ye())), fr(function (e) {
  12592. var u = this;
  12593. return t(r, function (t) {
  12594. return n(t, u, e);
  12595. });
  12596. });
  12597. });
  12598. }
  12599. function ne(n, t) {
  12600. t = t === T ? " " : yr(t);
  12601. var r = t.length;
  12602. return 2 > r ? r ? or(t, n) : t : (r = or(t, Si(n / D(t))), Rn.test(t) ? Or(M(r), 0, n).join("") : r.slice(0, n));
  12603. }
  12604. function te(t, r, e, u) {
  12605. function i() {
  12606. for (var r = -1, c = arguments.length, a = -1, l = u.length, s = Vu(l + c), h = this && this !== $n && this instanceof i ? f : t; ++a < l;) {
  12607. s[a] = u[a];
  12608. }
  12609. for (; c--;) {
  12610. s[a++] = arguments[++r];
  12611. }
  12612. return n(h, o ? e : this, s);
  12613. }
  12614. var o = 1 & r,
  12615. f = Vr(t);
  12616. return i;
  12617. }
  12618. function re(n) {
  12619. return function (t, r, e) {
  12620. e && typeof e != "number" && Oe(t, r, e) && (r = e = T), t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), e = e === T ? t < r ? 1 : -1 : mu(e);
  12621. var u = -1;
  12622. r = Li(Si((r - t) / (e || 1)), 0);
  12623. for (var i = Vu(r); r--;) {
  12624. i[n ? r : ++u] = t, t += e;
  12625. }
  12626. return i;
  12627. };
  12628. }
  12629. function ee(n) {
  12630. return function (t, r) {
  12631. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  12632. };
  12633. }
  12634. function ue(n, t, r, e, u, i, o, f, c, a) {
  12635. var l = 8 & t,
  12636. s = l ? o : T;
  12637. o = l ? T : o;
  12638. var h = l ? i : T;
  12639. return i = l ? T : i, t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32), 4 & t || (t &= -4), u = [n, t, u, h, s, i, o, f, c, a], r = r.apply(T, u), Re(n) && go(r, u), r.placeholder = e, Le(r, n, t);
  12640. }
  12641. function ie(n) {
  12642. var t = Ju[n];
  12643. return function (n, r) {
  12644. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  12645. var e = (Ou(n) + "e").split("e"),
  12646. e = t(e[0] + "e" + (+e[1] + r)),
  12647. e = (Ou(e) + "e").split("e");
  12648. return +(e[0] + "e" + (+e[1] - r));
  12649. }
  12650. return t(n);
  12651. };
  12652. }
  12653. function oe(n) {
  12654. return function (t) {
  12655. var r = _o(t);
  12656. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  12657. };
  12658. }
  12659. function fe(n, t, r, e, u, i, o, f) {
  12660. var c = 2 & t;
  12661. if (!c && typeof n != "function") throw new ni("Expected a function");
  12662. var a = e ? e.length : 0;
  12663. if (a || (t &= -97, e = u = T), o = o === T ? o : Li(Au(o), 0), f = f === T ? f : Au(f), a -= u ? u.length : 0, 64 & t) {
  12664. var l = e,
  12665. s = u;
  12666. e = u = T;
  12667. }
  12668. var h = c ? T : so(n);
  12669. return i = [n, t, r, e, u, l, s, i, o, f], h && (r = i[1], n = h[1], t = r | n, e = 128 == n && 8 == r || 128 == n && 256 == r && i[7].length <= h[8] || 384 == n && h[7].length <= h[8] && 8 == r, 131 > t || e) && (1 & n && (i[2] = h[2], t |= 1 & r ? 0 : 4), (r = h[3]) && (e = i[3], i[3] = e ? Br(e, r, h[4]) : r, i[4] = e ? L(i[3], "__lodash_placeholder__") : h[4]), (r = h[5]) && (e = i[5], i[5] = e ? Lr(e, r, h[6]) : r, i[6] = e ? L(i[5], "__lodash_placeholder__") : h[6]), (r = h[7]) && (i[7] = r), 128 & n && (i[8] = null == i[8] ? h[8] : Ui(i[8], h[8])), null == i[9] && (i[9] = h[9]), i[0] = h[0], i[1] = t), n = i[0], t = i[1], r = i[2], e = i[3], u = i[4], f = i[9] = i[9] === T ? c ? 0 : n.length : Li(i[9] - a, 0), !f && 24 & t && (t &= -25), Le((h ? fo : go)(t && 1 != t ? 8 == t || 16 == t ? Kr(n, t, f) : 32 != t && 33 != t || u.length ? Jr.apply(T, i) : te(n, t, r, e) : Pr(n, t, r), i), n, t);
  12670. }
  12671. function ce(n, t, r, e) {
  12672. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  12673. }
  12674. function ae(n, t, r, e, u, i) {
  12675. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  12676. }
  12677. function le(n) {
  12678. return bu(n) ? T : n;
  12679. }
  12680. function se(n, t, r, e, u, i) {
  12681. var o = 1 & r,
  12682. f = n.length,
  12683. c = t.length;
  12684. if (f != c && !(o && c > f)) return false;
  12685. if ((c = i.get(n)) && i.get(t)) return c == t;
  12686. var c = -1,
  12687. a = true,
  12688. l = 2 & r ? new Nn() : T;
  12689. for (i.set(n, t), i.set(t, n); ++c < f;) {
  12690. var s = n[c],
  12691. p = t[c];
  12692. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  12693. if (_ !== T) {
  12694. if (_) continue;
  12695. a = false;
  12696. break;
  12697. }
  12698. if (l) {
  12699. if (!h(t, function (n, t) {
  12700. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  12701. })) {
  12702. a = false;
  12703. break;
  12704. }
  12705. } else if (s !== p && !u(s, p, r, e, i)) {
  12706. a = false;
  12707. break;
  12708. }
  12709. }
  12710. return i.delete(n), i.delete(t), a;
  12711. }
  12712. function he(n, t, r, e, u, i, o) {
  12713. switch (r) {
  12714. case "[object DataView]":
  12715. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  12716. n = n.buffer, t = t.buffer;
  12717. case "[object ArrayBuffer]":
  12718. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  12719. return true;
  12720. case "[object Boolean]":
  12721. case "[object Date]":
  12722. case "[object Number]":
  12723. return au(+n, +t);
  12724. case "[object Error]":
  12725. return n.name == t.name && n.message == t.message;
  12726. case "[object RegExp]":
  12727. case "[object String]":
  12728. return n == t + "";
  12729. case "[object Map]":
  12730. var f = W;
  12731. case "[object Set]":
  12732. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  12733. return (r = o.get(n)) ? r == t : (e |= 2, o.set(n, t), t = se(f(n), f(t), e, u, i, o), o.delete(n), t);
  12734. case "[object Symbol]":
  12735. if (no) return no.call(n) == no.call(t);
  12736. }
  12737. return false;
  12738. }
  12739. function pe(n) {
  12740. return bo(Be(n, T, Pe), n + "");
  12741. }
  12742. function _e(n) {
  12743. return St(n, zu, ho);
  12744. }
  12745. function ve(n) {
  12746. return St(n, Wu, po);
  12747. }
  12748. function ge(n) {
  12749. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  12750. var u = r[e],
  12751. i = u.func;
  12752. if (null == i || i == n) return u.name;
  12753. }
  12754. return t;
  12755. }
  12756. function de(n) {
  12757. return (ii.call(An, "placeholder") ? An : n).placeholder;
  12758. }
  12759. function ye() {
  12760. var n = An.iteratee || $u,
  12761. n = n === $u ? qt : n;
  12762. return arguments.length ? n(arguments[0], arguments[1]) : n;
  12763. }
  12764. function be(n, t) {
  12765. var r = n.__data__,
  12766. e = _typeof(t);
  12767. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  12768. }
  12769. function xe(n) {
  12770. for (var t = zu(n), r = t.length; r--;) {
  12771. var e = t[r],
  12772. u = n[e];
  12773. t[r] = [e, u, u === u && !gu(u)];
  12774. }
  12775. return t;
  12776. }
  12777. function je(n, t) {
  12778. var r = null == n ? T : n[t];
  12779. return Ft(r) ? r : T;
  12780. }
  12781. function we(n, t, r) {
  12782. t = Sr(t, n);
  12783. for (var e = -1, u = t.length, i = false; ++e < u;) {
  12784. var o = De(t[e]);
  12785. if (!(i = null != n && r(n, o))) break;
  12786. n = n[o];
  12787. }
  12788. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  12789. }
  12790. function me(n) {
  12791. var t = n.length,
  12792. r = new n.constructor(t);
  12793. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  12794. }
  12795. function Ae(n) {
  12796. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  12797. }
  12798. function Ee(n, t, r) {
  12799. var e = n.constructor;
  12800. switch (t) {
  12801. case "[object ArrayBuffer]":
  12802. return Rr(n);
  12803. case "[object Boolean]":
  12804. case "[object Date]":
  12805. return new e(+n);
  12806. case "[object DataView]":
  12807. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  12808. case "[object Float32Array]":
  12809. case "[object Float64Array]":
  12810. case "[object Int8Array]":
  12811. case "[object Int16Array]":
  12812. case "[object Int32Array]":
  12813. case "[object Uint8Array]":
  12814. case "[object Uint8ClampedArray]":
  12815. case "[object Uint16Array]":
  12816. case "[object Uint32Array]":
  12817. return zr(n, r);
  12818. case "[object Map]":
  12819. return new e();
  12820. case "[object Number]":
  12821. case "[object String]":
  12822. return new e(n);
  12823. case "[object RegExp]":
  12824. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  12825. case "[object Set]":
  12826. return new e();
  12827. case "[object Symbol]":
  12828. return no ? Yu(no.call(n)) : {};
  12829. }
  12830. }
  12831. function ke(n) {
  12832. return of(n) || uf(n) || !!(xi && n && n[xi]);
  12833. }
  12834. function Se(n, t) {
  12835. var r = _typeof(n);
  12836. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  12837. }
  12838. function Oe(n, t, r) {
  12839. if (!gu(r)) return false;
  12840. var e = _typeof(t);
  12841. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  12842. }
  12843. function Ie(n, t) {
  12844. if (of(n)) return false;
  12845. var r = _typeof(n);
  12846. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  12847. }
  12848. function Re(n) {
  12849. var t = ge(n),
  12850. r = An[t];
  12851. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  12852. }
  12853. function ze(n) {
  12854. var t = n && n.constructor;
  12855. return n === (typeof t == "function" && t.prototype || ri);
  12856. }
  12857. function We(n, t) {
  12858. return function (r) {
  12859. return null != r && r[n] === t && (t !== T || n in Yu(r));
  12860. };
  12861. }
  12862. function Be(t, r, e) {
  12863. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  12864. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  12865. f[i] = u[r + i];
  12866. }
  12867. for (i = -1, o = Vu(r + 1); ++i < r;) {
  12868. o[i] = u[i];
  12869. }
  12870. return o[r] = e(f), n(t, this, o);
  12871. };
  12872. }
  12873. function Le(n, t, r) {
  12874. var e = t + "";
  12875. t = bo;
  12876. var u,
  12877. i = Te;
  12878. return u = (u = e.match(an)) ? u[1].split(ln) : [], r = i(u, r), (i = r.length) && (u = i - 1, r[u] = (1 < i ? "& " : "") + r[u], r = r.join(2 < i ? ", " : " "), e = e.replace(cn, "{\n/* [wrapped with " + r + "] */\n")), t(n, e);
  12879. }
  12880. function Ue(n) {
  12881. var t = 0,
  12882. r = 0;
  12883. return function () {
  12884. var e = Ci(),
  12885. u = 16 - (e - r);
  12886. if (r = e, 0 < u) {
  12887. if (800 <= ++t) return arguments[0];
  12888. } else t = 0;
  12889. return n.apply(T, arguments);
  12890. };
  12891. }
  12892. function Ce(n, t) {
  12893. var r = -1,
  12894. e = n.length,
  12895. u = e - 1;
  12896. for (t = t === T ? e : t; ++r < t;) {
  12897. var e = ir(r, u),
  12898. i = n[e];
  12899. n[e] = n[r], n[r] = i;
  12900. }
  12901. return n.length = t, n;
  12902. }
  12903. function De(n) {
  12904. if (typeof n == "string" || ju(n)) return n;
  12905. var t = n + "";
  12906. return "0" == t && 1 / n == -$ ? "-0" : t;
  12907. }
  12908. function Me(n) {
  12909. if (null != n) {
  12910. try {
  12911. return ui.call(n);
  12912. } catch (n) {}
  12913. return n + "";
  12914. }
  12915. return "";
  12916. }
  12917. function Te(n, t) {
  12918. return r(N, function (r) {
  12919. var e = "_." + r[0];
  12920. t & r[1] && !o(n, e) && n.push(e);
  12921. }), n.sort();
  12922. }
  12923. function $e(n) {
  12924. if (n instanceof Un) return n.clone();
  12925. var t = new On(n.__wrapped__, n.__chain__);
  12926. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  12927. }
  12928. function Fe(n, t, r) {
  12929. var e = null == n ? 0 : n.length;
  12930. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  12931. }
  12932. function Ne(n, t, r) {
  12933. var e = null == n ? 0 : n.length;
  12934. if (!e) return -1;
  12935. var u = e - 1;
  12936. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  12937. }
  12938. function Pe(n) {
  12939. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  12940. }
  12941. function Ze(n) {
  12942. return n && n.length ? n[0] : T;
  12943. }
  12944. function qe(n) {
  12945. var t = null == n ? 0 : n.length;
  12946. return t ? n[t - 1] : T;
  12947. }
  12948. function Ve(n, t) {
  12949. return n && n.length && t && t.length ? er(n, t) : n;
  12950. }
  12951. function Ke(n) {
  12952. return null == n ? n : Ti.call(n);
  12953. }
  12954. function Ge(n) {
  12955. if (!n || !n.length) return [];
  12956. var t = 0;
  12957. return n = i(n, function (n) {
  12958. if (su(n)) return t = Li(n.length, t), true;
  12959. }), A(t, function (t) {
  12960. return c(n, b(t));
  12961. });
  12962. }
  12963. function He(t, r) {
  12964. if (!t || !t.length) return [];
  12965. var e = Ge(t);
  12966. return null == r ? e : c(e, function (t) {
  12967. return n(r, T, t);
  12968. });
  12969. }
  12970. function Je(n) {
  12971. return n = An(n), n.__chain__ = true, n;
  12972. }
  12973. function Ye(n, t) {
  12974. return t(n);
  12975. }
  12976. function Qe() {
  12977. return this;
  12978. }
  12979. function Xe(n, t) {
  12980. return (of(n) ? r : eo)(n, ye(t, 3));
  12981. }
  12982. function nu(n, t) {
  12983. return (of(n) ? e : uo)(n, ye(t, 3));
  12984. }
  12985. function tu(n, t) {
  12986. return (of(n) ? c : Gt)(n, ye(t, 3));
  12987. }
  12988. function ru(n, t, r) {
  12989. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  12990. }
  12991. function eu(n, t) {
  12992. var r;
  12993. if (typeof t != "function") throw new ni("Expected a function");
  12994. return n = Au(n), function () {
  12995. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  12996. };
  12997. }
  12998. function uu(n, t, r) {
  12999. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  13000. }
  13001. function iu(n, t, r) {
  13002. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  13003. }
  13004. function ou(n, t, r) {
  13005. function e(t) {
  13006. var r = c,
  13007. e = a;
  13008. return c = a = T, _ = t, s = n.apply(e, r);
  13009. }
  13010. function u(n) {
  13011. var r = n - p;
  13012. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  13013. }
  13014. function i() {
  13015. var n = Ko();
  13016. if (u(n)) return o(n);
  13017. var r,
  13018. e = yo;
  13019. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  13020. }
  13021. function o(n) {
  13022. return h = T, d && c ? e(n) : (c = a = T, s);
  13023. }
  13024. function f() {
  13025. var n = Ko(),
  13026. r = u(n);
  13027. if (c = arguments, a = this, p = n, r) {
  13028. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  13029. if (g) return h = yo(i, t), e(p);
  13030. }
  13031. return h === T && (h = yo(i, t)), s;
  13032. }
  13033. var c,
  13034. a,
  13035. l,
  13036. s,
  13037. h,
  13038. p,
  13039. _ = 0,
  13040. v = false,
  13041. g = false,
  13042. d = true;
  13043. if (typeof n != "function") throw new ni("Expected a function");
  13044. return t = ku(t) || 0, gu(r) && (v = !!r.leading, l = (g = "maxWait" in r) ? Li(ku(r.maxWait) || 0, t) : l, d = "trailing" in r ? !!r.trailing : d), f.cancel = function () {
  13045. h !== T && ao(h), _ = 0, c = p = a = h = T;
  13046. }, f.flush = function () {
  13047. return h === T ? s : o(Ko());
  13048. }, f;
  13049. }
  13050. function fu(n, t) {
  13051. function r() {
  13052. var e = arguments,
  13053. u = t ? t.apply(this, e) : e[0],
  13054. i = r.cache;
  13055. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  13056. }
  13057. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  13058. return r.cache = new (fu.Cache || Fn)(), r;
  13059. }
  13060. function cu(n) {
  13061. if (typeof n != "function") throw new ni("Expected a function");
  13062. return function () {
  13063. var t = arguments;
  13064. switch (t.length) {
  13065. case 0:
  13066. return !n.call(this);
  13067. case 1:
  13068. return !n.call(this, t[0]);
  13069. case 2:
  13070. return !n.call(this, t[0], t[1]);
  13071. case 3:
  13072. return !n.call(this, t[0], t[1], t[2]);
  13073. }
  13074. return !n.apply(this, t);
  13075. };
  13076. }
  13077. function au(n, t) {
  13078. return n === t || n !== n && t !== t;
  13079. }
  13080. function lu(n) {
  13081. return null != n && vu(n.length) && !pu(n);
  13082. }
  13083. function su(n) {
  13084. return du(n) && lu(n);
  13085. }
  13086. function hu(n) {
  13087. if (!du(n)) return false;
  13088. var t = Ot(n);
  13089. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  13090. }
  13091. function pu(n) {
  13092. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  13093. }
  13094. function _u(n) {
  13095. return typeof n == "number" && n == Au(n);
  13096. }
  13097. function vu(n) {
  13098. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  13099. }
  13100. function gu(n) {
  13101. var t = _typeof(n);
  13102. return null != n && ("object" == t || "function" == t);
  13103. }
  13104. function du(n) {
  13105. return null != n && _typeof(n) == "object";
  13106. }
  13107. function yu(n) {
  13108. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  13109. }
  13110. function bu(n) {
  13111. return !(!du(n) || "[object Object]" != Ot(n)) && (n = gi(n), null === n || (n = ii.call(n, "constructor") && n.constructor, typeof n == "function" && n instanceof n && ui.call(n) == ai));
  13112. }
  13113. function xu(n) {
  13114. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  13115. }
  13116. function ju(n) {
  13117. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  13118. }
  13119. function wu(n) {
  13120. if (!n) return [];
  13121. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  13122. if (ji && n[ji]) {
  13123. n = n[ji]();
  13124. for (var t, r = []; !(t = n.next()).done;) {
  13125. r.push(t.value);
  13126. }
  13127. return r;
  13128. }
  13129. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  13130. }
  13131. function mu(n) {
  13132. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  13133. }
  13134. function Au(n) {
  13135. n = mu(n);
  13136. var t = n % 1;
  13137. return n === n ? t ? n - t : n : 0;
  13138. }
  13139. function Eu(n) {
  13140. return n ? pt(Au(n), 0, 4294967295) : 0;
  13141. }
  13142. function ku(n) {
  13143. if (typeof n == "number") return n;
  13144. if (ju(n)) return F;
  13145. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  13146. n = n.replace(un, "");
  13147. var t = gn.test(n);
  13148. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  13149. }
  13150. function Su(n) {
  13151. return Cr(n, Wu(n));
  13152. }
  13153. function Ou(n) {
  13154. return null == n ? "" : yr(n);
  13155. }
  13156. function Iu(n, t, r) {
  13157. return n = null == n ? T : kt(n, t), n === T ? r : n;
  13158. }
  13159. function Ru(n, t) {
  13160. return null != n && we(n, t, zt);
  13161. }
  13162. function zu(n) {
  13163. return lu(n) ? qn(n) : Vt(n);
  13164. }
  13165. function Wu(n) {
  13166. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  13167. var t,
  13168. r = ze(n),
  13169. e = [];
  13170. for (t in n) {
  13171. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  13172. }
  13173. n = e;
  13174. } else {
  13175. if (t = [], null != n) for (r in Yu(n)) {
  13176. t.push(r);
  13177. }
  13178. n = t;
  13179. }
  13180. return n;
  13181. }
  13182. function Bu(n, t) {
  13183. if (null == n) return {};
  13184. var r = c(ve(n), function (n) {
  13185. return [n];
  13186. });
  13187. return t = ye(t), tr(n, r, function (n, r) {
  13188. return t(n, r[0]);
  13189. });
  13190. }
  13191. function Lu(n) {
  13192. return null == n ? [] : S(n, zu(n));
  13193. }
  13194. function Uu(n) {
  13195. return Tf(Ou(n).toLowerCase());
  13196. }
  13197. function Cu(n) {
  13198. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  13199. }
  13200. function Du(n, t, r) {
  13201. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  13202. }
  13203. function Mu(n) {
  13204. return function () {
  13205. return n;
  13206. };
  13207. }
  13208. function Tu(n) {
  13209. return n;
  13210. }
  13211. function $u(n) {
  13212. return qt(typeof n == "function" ? n : _t(n, 1));
  13213. }
  13214. function Fu(n, t, e) {
  13215. var u = zu(t),
  13216. i = Et(t, u);
  13217. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  13218. var o = !(gu(e) && "chain" in e && !e.chain),
  13219. f = pu(n);
  13220. return r(i, function (r) {
  13221. var e = t[r];
  13222. n[r] = e, f && (n.prototype[r] = function () {
  13223. var t = this.__chain__;
  13224. if (o || t) {
  13225. var r = n(this.__wrapped__);
  13226. return (r.__actions__ = Ur(this.__actions__)).push({
  13227. func: e,
  13228. args: arguments,
  13229. thisArg: n
  13230. }), r.__chain__ = t, r;
  13231. }
  13232. return e.apply(n, a([this.value()], arguments));
  13233. });
  13234. }), n;
  13235. }
  13236. function Nu() {}
  13237. function Pu(n) {
  13238. return Ie(n) ? b(De(n)) : rr(n);
  13239. }
  13240. function Zu() {
  13241. return [];
  13242. }
  13243. function qu() {
  13244. return false;
  13245. }
  13246. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  13247. var Vu = mn.Array,
  13248. Ku = mn.Date,
  13249. Gu = mn.Error,
  13250. Hu = mn.Function,
  13251. Ju = mn.Math,
  13252. Yu = mn.Object,
  13253. Qu = mn.RegExp,
  13254. Xu = mn.String,
  13255. ni = mn.TypeError,
  13256. ti = Vu.prototype,
  13257. ri = Yu.prototype,
  13258. ei = mn["__core-js_shared__"],
  13259. ui = Hu.prototype.toString,
  13260. ii = ri.hasOwnProperty,
  13261. oi = 0,
  13262. fi = function () {
  13263. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  13264. return n ? "Symbol(src)_1." + n : "";
  13265. }(),
  13266. ci = ri.toString,
  13267. ai = ui.call(Yu),
  13268. li = $n._,
  13269. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  13270. hi = Pn ? mn.Buffer : T,
  13271. pi = mn.Symbol,
  13272. _i = mn.Uint8Array,
  13273. vi = hi ? hi.g : T,
  13274. gi = B(Yu.getPrototypeOf, Yu),
  13275. di = Yu.create,
  13276. yi = ri.propertyIsEnumerable,
  13277. bi = ti.splice,
  13278. xi = pi ? pi.isConcatSpreadable : T,
  13279. ji = pi ? pi.iterator : T,
  13280. wi = pi ? pi.toStringTag : T,
  13281. mi = function () {
  13282. try {
  13283. var n = je(Yu, "defineProperty");
  13284. return n({}, "", {}), n;
  13285. } catch (n) {}
  13286. }(),
  13287. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  13288. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  13289. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  13290. Si = Ju.ceil,
  13291. Oi = Ju.floor,
  13292. Ii = Yu.getOwnPropertySymbols,
  13293. Ri = hi ? hi.isBuffer : T,
  13294. zi = mn.isFinite,
  13295. Wi = ti.join,
  13296. Bi = B(Yu.keys, Yu),
  13297. Li = Ju.max,
  13298. Ui = Ju.min,
  13299. Ci = Ku.now,
  13300. Di = mn.parseInt,
  13301. Mi = Ju.random,
  13302. Ti = ti.reverse,
  13303. $i = je(mn, "DataView"),
  13304. Fi = je(mn, "Map"),
  13305. Ni = je(mn, "Promise"),
  13306. Pi = je(mn, "Set"),
  13307. Zi = je(mn, "WeakMap"),
  13308. qi = je(Yu, "create"),
  13309. Vi = Zi && new Zi(),
  13310. Ki = {},
  13311. Gi = Me($i),
  13312. Hi = Me(Fi),
  13313. Ji = Me(Ni),
  13314. Yi = Me(Pi),
  13315. Qi = Me(Zi),
  13316. Xi = pi ? pi.prototype : T,
  13317. no = Xi ? Xi.valueOf : T,
  13318. to = Xi ? Xi.toString : T,
  13319. ro = function () {
  13320. function n() {}
  13321. return function (t) {
  13322. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  13323. };
  13324. }();
  13325. An.templateSettings = {
  13326. escape: J,
  13327. evaluate: Y,
  13328. interpolate: Q,
  13329. variable: "",
  13330. imports: {
  13331. _: An
  13332. }
  13333. }, An.prototype = En.prototype, An.prototype.constructor = An, On.prototype = ro(En.prototype), On.prototype.constructor = On, Un.prototype = ro(En.prototype), Un.prototype.constructor = Un, Mn.prototype.clear = function () {
  13334. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  13335. }, Mn.prototype.delete = function (n) {
  13336. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  13337. }, Mn.prototype.get = function (n) {
  13338. var t = this.__data__;
  13339. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  13340. }, Mn.prototype.has = function (n) {
  13341. var t = this.__data__;
  13342. return qi ? t[n] !== T : ii.call(t, n);
  13343. }, Mn.prototype.set = function (n, t) {
  13344. var r = this.__data__;
  13345. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  13346. }, Tn.prototype.clear = function () {
  13347. this.__data__ = [], this.size = 0;
  13348. }, Tn.prototype.delete = function (n) {
  13349. var t = this.__data__;
  13350. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  13351. }, Tn.prototype.get = function (n) {
  13352. var t = this.__data__;
  13353. return n = ft(t, n), 0 > n ? T : t[n][1];
  13354. }, Tn.prototype.has = function (n) {
  13355. return -1 < ft(this.__data__, n);
  13356. }, Tn.prototype.set = function (n, t) {
  13357. var r = this.__data__,
  13358. e = ft(r, n);
  13359. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  13360. }, Fn.prototype.clear = function () {
  13361. this.size = 0, this.__data__ = {
  13362. hash: new Mn(),
  13363. map: new (Fi || Tn)(),
  13364. string: new Mn()
  13365. };
  13366. }, Fn.prototype.delete = function (n) {
  13367. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  13368. }, Fn.prototype.get = function (n) {
  13369. return be(this, n).get(n);
  13370. }, Fn.prototype.has = function (n) {
  13371. return be(this, n).has(n);
  13372. }, Fn.prototype.set = function (n, t) {
  13373. var r = be(this, n),
  13374. e = r.size;
  13375. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  13376. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  13377. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  13378. }, Nn.prototype.has = function (n) {
  13379. return this.__data__.has(n);
  13380. }, Zn.prototype.clear = function () {
  13381. this.__data__ = new Tn(), this.size = 0;
  13382. }, Zn.prototype.delete = function (n) {
  13383. var t = this.__data__;
  13384. return n = t.delete(n), this.size = t.size, n;
  13385. }, Zn.prototype.get = function (n) {
  13386. return this.__data__.get(n);
  13387. }, Zn.prototype.has = function (n) {
  13388. return this.__data__.has(n);
  13389. }, Zn.prototype.set = function (n, t) {
  13390. var r = this.__data__;
  13391. if (r instanceof Tn) {
  13392. var e = r.__data__;
  13393. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  13394. r = this.__data__ = new Fn(e);
  13395. }
  13396. return r.set(n, t), this.size = r.size, this;
  13397. };
  13398. var eo = Fr(mt),
  13399. uo = Fr(At, true),
  13400. io = Nr(),
  13401. oo = Nr(true),
  13402. fo = Vi ? function (n, t) {
  13403. return Vi.set(n, t), n;
  13404. } : Tu,
  13405. co = mi ? function (n, t) {
  13406. return mi(n, "toString", {
  13407. configurable: true,
  13408. enumerable: false,
  13409. value: Mu(t),
  13410. writable: true
  13411. });
  13412. } : Tu,
  13413. ao = Ai || function (n) {
  13414. return $n.clearTimeout(n);
  13415. },
  13416. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  13417. return new Pi(n);
  13418. } : Nu,
  13419. so = Vi ? function (n) {
  13420. return Vi.get(n);
  13421. } : Nu,
  13422. ho = Ii ? function (n) {
  13423. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  13424. return yi.call(n, t);
  13425. }));
  13426. } : Zu,
  13427. po = Ii ? function (n) {
  13428. for (var t = []; n;) {
  13429. a(t, ho(n)), n = gi(n);
  13430. }
  13431. return t;
  13432. } : Zu,
  13433. _o = Ot;
  13434. ($i && "[object DataView]" != _o(new $i(new ArrayBuffer(1))) || Fi && "[object Map]" != _o(new Fi()) || Ni && "[object Promise]" != _o(Ni.resolve()) || Pi && "[object Set]" != _o(new Pi()) || Zi && "[object WeakMap]" != _o(new Zi())) && (_o = function _o(n) {
  13435. var t = Ot(n);
  13436. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  13437. case Gi:
  13438. return "[object DataView]";
  13439. case Hi:
  13440. return "[object Map]";
  13441. case Ji:
  13442. return "[object Promise]";
  13443. case Yi:
  13444. return "[object Set]";
  13445. case Qi:
  13446. return "[object WeakMap]";
  13447. }
  13448. return t;
  13449. });
  13450. var vo = ei ? pu : qu,
  13451. go = Ue(fo),
  13452. yo = ki || function (n, t) {
  13453. return $n.setTimeout(n, t);
  13454. },
  13455. bo = Ue(co),
  13456. xo = function (n) {
  13457. n = fu(n, function (n) {
  13458. return 500 === t.size && t.clear(), n;
  13459. });
  13460. var t = n.cache;
  13461. return n;
  13462. }(function (n) {
  13463. var t = [];
  13464. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  13465. t.push(e ? u.replace(hn, "$1") : r || n);
  13466. }), t;
  13467. }),
  13468. jo = fr(function (n, t) {
  13469. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  13470. }),
  13471. wo = fr(function (n, t) {
  13472. var r = qe(t);
  13473. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  13474. }),
  13475. mo = fr(function (n, t) {
  13476. var r = qe(t);
  13477. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  13478. }),
  13479. Ao = fr(function (n) {
  13480. var t = c(n, Er);
  13481. return t.length && t[0] === n[0] ? Wt(t) : [];
  13482. }),
  13483. Eo = fr(function (n) {
  13484. var t = qe(n),
  13485. r = c(n, Er);
  13486. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  13487. }),
  13488. ko = fr(function (n) {
  13489. var t = qe(n),
  13490. r = c(n, Er);
  13491. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  13492. }),
  13493. So = fr(Ve),
  13494. Oo = pe(function (n, t) {
  13495. var r = null == n ? 0 : n.length,
  13496. e = ht(n, t);
  13497. return ur(n, c(t, function (n) {
  13498. return Se(n, r) ? +n : n;
  13499. }).sort(Wr)), e;
  13500. }),
  13501. Io = fr(function (n) {
  13502. return br(wt(n, 1, su, true));
  13503. }),
  13504. Ro = fr(function (n) {
  13505. var t = qe(n);
  13506. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  13507. }),
  13508. zo = fr(function (n) {
  13509. var t = qe(n),
  13510. t = typeof t == "function" ? t : T;
  13511. return br(wt(n, 1, su, true), T, t);
  13512. }),
  13513. Wo = fr(function (n, t) {
  13514. return su(n) ? yt(n, t) : [];
  13515. }),
  13516. Bo = fr(function (n) {
  13517. return mr(i(n, su));
  13518. }),
  13519. Lo = fr(function (n) {
  13520. var t = qe(n);
  13521. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  13522. }),
  13523. Uo = fr(function (n) {
  13524. var t = qe(n),
  13525. t = typeof t == "function" ? t : T;
  13526. return mr(i(n, su), T, t);
  13527. }),
  13528. Co = fr(Ge),
  13529. Do = fr(function (n) {
  13530. var t = n.length,
  13531. t = 1 < t ? n[t - 1] : T,
  13532. t = typeof t == "function" ? (n.pop(), t) : T;
  13533. return He(n, t);
  13534. }),
  13535. Mo = pe(function (n) {
  13536. function t(t) {
  13537. return ht(t, n);
  13538. }
  13539. var r = n.length,
  13540. e = r ? n[0] : 0,
  13541. u = this.__wrapped__;
  13542. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  13543. func: Ye,
  13544. args: [t],
  13545. thisArg: T
  13546. }), new On(u, this.__chain__).thru(function (n) {
  13547. return r && !n.length && n.push(T), n;
  13548. })) : this.thru(t);
  13549. }),
  13550. To = Tr(function (n, t, r) {
  13551. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  13552. }),
  13553. $o = Gr(Fe),
  13554. Fo = Gr(Ne),
  13555. No = Tr(function (n, t, r) {
  13556. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  13557. }),
  13558. Po = fr(function (t, r, e) {
  13559. var u = -1,
  13560. i = typeof r == "function",
  13561. o = lu(t) ? Vu(t.length) : [];
  13562. return eo(t, function (t) {
  13563. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  13564. }), o;
  13565. }),
  13566. Zo = Tr(function (n, t, r) {
  13567. st(n, r, t);
  13568. }),
  13569. qo = Tr(function (n, t, r) {
  13570. n[r ? 0 : 1].push(t);
  13571. }, function () {
  13572. return [[], []];
  13573. }),
  13574. Vo = fr(function (n, t) {
  13575. if (null == n) return [];
  13576. var r = t.length;
  13577. return 1 < r && Oe(n, t[0], t[1]) ? t = [] : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), Xt(n, wt(t, 1), []);
  13578. }),
  13579. Ko = Ei || function () {
  13580. return $n.Date.now();
  13581. },
  13582. Go = fr(function (n, t, r) {
  13583. var e = 1;
  13584. if (r.length) var u = L(r, de(Go)),
  13585. e = 32 | e;
  13586. return fe(n, e, t, r, u);
  13587. }),
  13588. Ho = fr(function (n, t, r) {
  13589. var e = 3;
  13590. if (r.length) var u = L(r, de(Ho)),
  13591. e = 32 | e;
  13592. return fe(t, e, n, r, u);
  13593. }),
  13594. Jo = fr(function (n, t) {
  13595. return dt(n, 1, t);
  13596. }),
  13597. Yo = fr(function (n, t, r) {
  13598. return dt(n, ku(t) || 0, r);
  13599. });
  13600. fu.Cache = Fn;
  13601. var Qo = fr(function (t, r) {
  13602. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  13603. var e = r.length;
  13604. return fr(function (u) {
  13605. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  13606. u[i] = r[i].call(this, u[i]);
  13607. }
  13608. return n(t, this, u);
  13609. });
  13610. }),
  13611. Xo = fr(function (n, t) {
  13612. return fe(n, 32, T, t, L(t, de(Xo)));
  13613. }),
  13614. nf = fr(function (n, t) {
  13615. return fe(n, 64, T, t, L(t, de(nf)));
  13616. }),
  13617. tf = pe(function (n, t) {
  13618. return fe(n, 256, T, T, T, t);
  13619. }),
  13620. rf = ee(It),
  13621. ef = ee(function (n, t) {
  13622. return n >= t;
  13623. }),
  13624. uf = Ut(function () {
  13625. return arguments;
  13626. }()) ? Ut : function (n) {
  13627. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  13628. },
  13629. of = Vu.isArray,
  13630. ff = Vn ? k(Vn) : Ct,
  13631. cf = Ri || qu,
  13632. af = Kn ? k(Kn) : Dt,
  13633. lf = Gn ? k(Gn) : Tt,
  13634. sf = Hn ? k(Hn) : Nt,
  13635. hf = Jn ? k(Jn) : Pt,
  13636. pf = Yn ? k(Yn) : Zt,
  13637. _f = ee(Kt),
  13638. vf = ee(function (n, t) {
  13639. return n <= t;
  13640. }),
  13641. gf = $r(function (n, t) {
  13642. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  13643. ii.call(t, r) && ot(n, r, t[r]);
  13644. }
  13645. }),
  13646. df = $r(function (n, t) {
  13647. Cr(t, Wu(t), n);
  13648. }),
  13649. yf = $r(function (n, t, r, e) {
  13650. Cr(t, Wu(t), n, e);
  13651. }),
  13652. bf = $r(function (n, t, r, e) {
  13653. Cr(t, zu(t), n, e);
  13654. }),
  13655. xf = pe(ht),
  13656. jf = fr(function (n, t) {
  13657. n = Yu(n);
  13658. var r = -1,
  13659. e = t.length,
  13660. u = 2 < e ? t[2] : T;
  13661. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  13662. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  13663. var c = i[o],
  13664. a = n[c];
  13665. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  13666. }
  13667. }
  13668. return n;
  13669. }),
  13670. wf = fr(function (t) {
  13671. return t.push(T, ae), n(Sf, T, t);
  13672. }),
  13673. mf = Yr(function (n, t, r) {
  13674. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  13675. }, Mu(Tu)),
  13676. Af = Yr(function (n, t, r) {
  13677. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  13678. }, ye),
  13679. Ef = fr(Lt),
  13680. kf = $r(function (n, t, r) {
  13681. Yt(n, t, r);
  13682. }),
  13683. Sf = $r(function (n, t, r, e) {
  13684. Yt(n, t, r, e);
  13685. }),
  13686. Of = pe(function (n, t) {
  13687. var r = {};
  13688. if (null == n) return r;
  13689. var e = false;
  13690. t = c(t, function (t) {
  13691. return t = Sr(t, n), e || (e = 1 < t.length), t;
  13692. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  13693. for (var u = t.length; u--;) {
  13694. xr(r, t[u]);
  13695. }
  13696. return r;
  13697. }),
  13698. If = pe(function (n, t) {
  13699. return null == n ? {} : nr(n, t);
  13700. }),
  13701. Rf = oe(zu),
  13702. zf = oe(Wu),
  13703. Wf = qr(function (n, t, r) {
  13704. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  13705. }),
  13706. Bf = qr(function (n, t, r) {
  13707. return n + (r ? "-" : "") + t.toLowerCase();
  13708. }),
  13709. Lf = qr(function (n, t, r) {
  13710. return n + (r ? " " : "") + t.toLowerCase();
  13711. }),
  13712. Uf = Zr("toLowerCase"),
  13713. Cf = qr(function (n, t, r) {
  13714. return n + (r ? "_" : "") + t.toLowerCase();
  13715. }),
  13716. Df = qr(function (n, t, r) {
  13717. return n + (r ? " " : "") + Tf(t);
  13718. }),
  13719. Mf = qr(function (n, t, r) {
  13720. return n + (r ? " " : "") + t.toUpperCase();
  13721. }),
  13722. Tf = Zr("toUpperCase"),
  13723. $f = fr(function (t, r) {
  13724. try {
  13725. return n(t, T, r);
  13726. } catch (n) {
  13727. return hu(n) ? n : new Gu(n);
  13728. }
  13729. }),
  13730. Ff = pe(function (n, t) {
  13731. return r(t, function (t) {
  13732. t = De(t), st(n, t, Go(n[t], n));
  13733. }), n;
  13734. }),
  13735. Nf = Hr(),
  13736. Pf = Hr(true),
  13737. Zf = fr(function (n, t) {
  13738. return function (r) {
  13739. return Lt(r, n, t);
  13740. };
  13741. }),
  13742. qf = fr(function (n, t) {
  13743. return function (r) {
  13744. return Lt(n, r, t);
  13745. };
  13746. }),
  13747. Vf = Xr(c),
  13748. Kf = Xr(u),
  13749. Gf = Xr(h),
  13750. Hf = re(),
  13751. Jf = re(true),
  13752. Yf = Qr(function (n, t) {
  13753. return n + t;
  13754. }, 0),
  13755. Qf = ie("ceil"),
  13756. Xf = Qr(function (n, t) {
  13757. return n / t;
  13758. }, 1),
  13759. nc = ie("floor"),
  13760. tc = Qr(function (n, t) {
  13761. return n * t;
  13762. }, 1),
  13763. rc = ie("round"),
  13764. ec = Qr(function (n, t) {
  13765. return n - t;
  13766. }, 0);
  13767. return An.after = function (n, t) {
  13768. if (typeof t != "function") throw new ni("Expected a function");
  13769. return n = Au(n), function () {
  13770. if (1 > --n) return t.apply(this, arguments);
  13771. };
  13772. }, An.ary = ru, An.assign = gf, An.assignIn = df, An.assignInWith = yf, An.assignWith = bf, An.at = xf, An.before = eu, An.bind = Go, An.bindAll = Ff, An.bindKey = Ho, An.castArray = function () {
  13773. if (!arguments.length) return [];
  13774. var n = arguments[0];
  13775. return of(n) ? n : [n];
  13776. }, An.chain = Je, An.chunk = function (n, t, r) {
  13777. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  13778. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  13779. i[u++] = hr(n, e, e += t);
  13780. }
  13781. return i;
  13782. }, An.compact = function (n) {
  13783. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  13784. var i = n[t];
  13785. i && (u[e++] = i);
  13786. }
  13787. return u;
  13788. }, An.concat = function () {
  13789. var n = arguments.length;
  13790. if (!n) return [];
  13791. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  13792. t[n - 1] = arguments[n];
  13793. }
  13794. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  13795. }, An.cond = function (t) {
  13796. var r = null == t ? 0 : t.length,
  13797. e = ye();
  13798. return t = r ? c(t, function (n) {
  13799. if ("function" != typeof n[1]) throw new ni("Expected a function");
  13800. return [e(n[0]), n[1]];
  13801. }) : [], fr(function (e) {
  13802. for (var u = -1; ++u < r;) {
  13803. var i = t[u];
  13804. if (n(i[0], this, e)) return n(i[1], this, e);
  13805. }
  13806. });
  13807. }, An.conforms = function (n) {
  13808. return vt(_t(n, 1));
  13809. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  13810. var r = ro(n);
  13811. return null == t ? r : at(r, t);
  13812. }, An.curry = uu, An.curryRight = iu, An.debounce = ou, An.defaults = jf, An.defaultsDeep = wf, An.defer = Jo, An.delay = Yo, An.difference = jo, An.differenceBy = wo, An.differenceWith = mo, An.drop = function (n, t, r) {
  13813. var e = null == n ? 0 : n.length;
  13814. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  13815. }, An.dropRight = function (n, t, r) {
  13816. var e = null == n ? 0 : n.length;
  13817. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  13818. }, An.dropRightWhile = function (n, t) {
  13819. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  13820. }, An.dropWhile = function (n, t) {
  13821. return n && n.length ? jr(n, ye(t, 3), true) : [];
  13822. }, An.fill = function (n, t, r, e) {
  13823. var u = null == n ? 0 : n.length;
  13824. if (!u) return [];
  13825. for (r && typeof r != "number" && Oe(n, t, r) && (r = 0, e = u), u = n.length, r = Au(r), 0 > r && (r = -r > u ? 0 : u + r), e = e === T || e > u ? u : Au(e), 0 > e && (e += u), e = r > e ? 0 : Eu(e); r < e;) {
  13826. n[r++] = t;
  13827. }
  13828. return n;
  13829. }, An.filter = function (n, t) {
  13830. return (of(n) ? i : jt)(n, ye(t, 3));
  13831. }, An.flatMap = function (n, t) {
  13832. return wt(tu(n, t), 1);
  13833. }, An.flatMapDeep = function (n, t) {
  13834. return wt(tu(n, t), $);
  13835. }, An.flatMapDepth = function (n, t, r) {
  13836. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  13837. }, An.flatten = Pe, An.flattenDeep = function (n) {
  13838. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  13839. }, An.flattenDepth = function (n, t) {
  13840. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  13841. }, An.flip = function (n) {
  13842. return fe(n, 512);
  13843. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  13844. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  13845. var u = n[t];
  13846. e[u[0]] = u[1];
  13847. }
  13848. return e;
  13849. }, An.functions = function (n) {
  13850. return null == n ? [] : Et(n, zu(n));
  13851. }, An.functionsIn = function (n) {
  13852. return null == n ? [] : Et(n, Wu(n));
  13853. }, An.groupBy = No, An.initial = function (n) {
  13854. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  13855. }, An.intersection = Ao, An.intersectionBy = Eo, An.intersectionWith = ko, An.invert = mf, An.invertBy = Af, An.invokeMap = Po, An.iteratee = $u, An.keyBy = Zo, An.keys = zu, An.keysIn = Wu, An.map = tu, An.mapKeys = function (n, t) {
  13856. var r = {};
  13857. return t = ye(t, 3), mt(n, function (n, e, u) {
  13858. st(r, t(n, e, u), n);
  13859. }), r;
  13860. }, An.mapValues = function (n, t) {
  13861. var r = {};
  13862. return t = ye(t, 3), mt(n, function (n, e, u) {
  13863. st(r, e, t(n, e, u));
  13864. }), r;
  13865. }, An.matches = function (n) {
  13866. return Ht(_t(n, 1));
  13867. }, An.matchesProperty = function (n, t) {
  13868. return Jt(n, _t(t, 1));
  13869. }, An.memoize = fu, An.merge = kf, An.mergeWith = Sf, An.method = Zf, An.methodOf = qf, An.mixin = Fu, An.negate = cu, An.nthArg = function (n) {
  13870. return n = Au(n), fr(function (t) {
  13871. return Qt(t, n);
  13872. });
  13873. }, An.omit = Of, An.omitBy = function (n, t) {
  13874. return Bu(n, cu(ye(t)));
  13875. }, An.once = function (n) {
  13876. return eu(2, n);
  13877. }, An.orderBy = function (n, t, r, e) {
  13878. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  13879. }, An.over = Vf, An.overArgs = Qo, An.overEvery = Kf, An.overSome = Gf, An.partial = Xo, An.partialRight = nf, An.partition = qo, An.pick = If, An.pickBy = Bu, An.property = Pu, An.propertyOf = function (n) {
  13880. return function (t) {
  13881. return null == n ? T : kt(n, t);
  13882. };
  13883. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  13884. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  13885. }, An.pullAllWith = function (n, t, r) {
  13886. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  13887. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  13888. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  13889. }, An.remove = function (n, t) {
  13890. var r = [];
  13891. if (!n || !n.length) return r;
  13892. var e = -1,
  13893. u = [],
  13894. i = n.length;
  13895. for (t = ye(t, 3); ++e < i;) {
  13896. var o = n[e];
  13897. t(o, e, n) && (r.push(o), u.push(e));
  13898. }
  13899. return ur(n, u), r;
  13900. }, An.rest = function (n, t) {
  13901. if (typeof n != "function") throw new ni("Expected a function");
  13902. return t = t === T ? t : Au(t), fr(n, t);
  13903. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  13904. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  13905. }, An.set = function (n, t, r) {
  13906. return null == n ? n : lr(n, t, r);
  13907. }, An.setWith = function (n, t, r, e) {
  13908. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  13909. }, An.shuffle = function (n) {
  13910. return (of(n) ? ut : sr)(n);
  13911. }, An.slice = function (n, t, r) {
  13912. var e = null == n ? 0 : n.length;
  13913. return e ? (r && typeof r != "number" && Oe(n, t, r) ? (t = 0, r = e) : (t = null == t ? 0 : Au(t), r = r === T ? e : Au(r)), hr(n, t, r)) : [];
  13914. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  13915. return n && n.length ? gr(n) : [];
  13916. }, An.sortedUniqBy = function (n, t) {
  13917. return n && n.length ? gr(n, ye(t, 2)) : [];
  13918. }, An.split = function (n, t, r) {
  13919. return r && typeof r != "number" && Oe(n, t, r) && (t = r = T), r = r === T ? 4294967295 : r >>> 0, r ? (n = Ou(n)) && (typeof t == "string" || null != t && !sf(t)) && (t = yr(t), !t && Rn.test(n)) ? Or(M(n), 0, r) : n.split(t, r) : [];
  13920. }, An.spread = function (t, r) {
  13921. if (typeof t != "function") throw new ni("Expected a function");
  13922. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  13923. var u = e[r];
  13924. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  13925. });
  13926. }, An.tail = function (n) {
  13927. var t = null == n ? 0 : n.length;
  13928. return t ? hr(n, 1, t) : [];
  13929. }, An.take = function (n, t, r) {
  13930. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  13931. }, An.takeRight = function (n, t, r) {
  13932. var e = null == n ? 0 : n.length;
  13933. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  13934. }, An.takeRightWhile = function (n, t) {
  13935. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  13936. }, An.takeWhile = function (n, t) {
  13937. return n && n.length ? jr(n, ye(t, 3)) : [];
  13938. }, An.tap = function (n, t) {
  13939. return t(n), n;
  13940. }, An.throttle = function (n, t, r) {
  13941. var e = true,
  13942. u = true;
  13943. if (typeof n != "function") throw new ni("Expected a function");
  13944. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  13945. leading: e,
  13946. maxWait: t,
  13947. trailing: u
  13948. });
  13949. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  13950. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  13951. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  13952. var u = of(n),
  13953. i = u || cf(n) || pf(n);
  13954. if (t = ye(t, 4), null == e) {
  13955. var o = n && n.constructor;
  13956. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  13957. }
  13958. return (i ? r : mt)(n, function (n, r, u) {
  13959. return t(e, n, r, u);
  13960. }), e;
  13961. }, An.unary = function (n) {
  13962. return ru(n, 1);
  13963. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  13964. return n && n.length ? br(n) : [];
  13965. }, An.uniqBy = function (n, t) {
  13966. return n && n.length ? br(n, ye(t, 2)) : [];
  13967. }, An.uniqWith = function (n, t) {
  13968. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  13969. }, An.unset = function (n, t) {
  13970. return null == n || xr(n, t);
  13971. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  13972. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  13973. }, An.updateWith = function (n, t, r, e) {
  13974. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  13975. }, An.values = Lu, An.valuesIn = function (n) {
  13976. return null == n ? [] : S(n, Wu(n));
  13977. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  13978. return Xo(kr(t), n);
  13979. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  13980. return Ar(n || [], t || [], ot);
  13981. }, An.zipObjectDeep = function (n, t) {
  13982. return Ar(n || [], t || [], lr);
  13983. }, An.zipWith = Do, An.entries = Rf, An.entriesIn = zf, An.extend = df, An.extendWith = yf, Fu(An, An), An.add = Yf, An.attempt = $f, An.camelCase = Wf, An.capitalize = Uu, An.ceil = Qf, An.clamp = function (n, t, r) {
  13984. return r === T && (r = t, t = T), r !== T && (r = ku(r), r = r === r ? r : 0), t !== T && (t = ku(t), t = t === t ? t : 0), pt(ku(n), t, r);
  13985. }, An.clone = function (n) {
  13986. return _t(n, 4);
  13987. }, An.cloneDeep = function (n) {
  13988. return _t(n, 5);
  13989. }, An.cloneDeepWith = function (n, t) {
  13990. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  13991. }, An.cloneWith = function (n, t) {
  13992. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  13993. }, An.conformsTo = function (n, t) {
  13994. return null == t || gt(n, t, zu(t));
  13995. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  13996. return null == n || n !== n ? t : n;
  13997. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  13998. n = Ou(n), t = yr(t);
  13999. var e = n.length,
  14000. e = r = r === T ? e : pt(Au(r), 0, e);
  14001. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  14002. }, An.eq = au, An.escape = function (n) {
  14003. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  14004. }, An.escapeRegExp = function (n) {
  14005. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  14006. }, An.every = function (n, t, r) {
  14007. var e = of(n) ? u : bt;
  14008. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14009. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  14010. return p(n, ye(t, 3), mt);
  14011. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  14012. return p(n, ye(t, 3), At);
  14013. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  14014. return null == n ? n : io(n, ye(t, 3), Wu);
  14015. }, An.forInRight = function (n, t) {
  14016. return null == n ? n : oo(n, ye(t, 3), Wu);
  14017. }, An.forOwn = function (n, t) {
  14018. return n && mt(n, ye(t, 3));
  14019. }, An.forOwnRight = function (n, t) {
  14020. return n && At(n, ye(t, 3));
  14021. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  14022. return null != n && we(n, t, Rt);
  14023. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  14024. return n = lu(n) ? n : Lu(n), r = r && !e ? Au(r) : 0, e = n.length, 0 > r && (r = Li(e + r, 0)), xu(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r);
  14025. }, An.indexOf = function (n, t, r) {
  14026. var e = null == n ? 0 : n.length;
  14027. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  14028. }, An.inRange = function (n, t, r) {
  14029. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  14030. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  14031. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  14032. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  14033. return du(n) && 1 === n.nodeType && !bu(n);
  14034. }, An.isEmpty = function (n) {
  14035. if (null == n) return true;
  14036. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  14037. var t = _o(n);
  14038. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  14039. if (ze(n)) return !Vt(n).length;
  14040. for (var r in n) {
  14041. if (ii.call(n, r)) return false;
  14042. }
  14043. return true;
  14044. }, An.isEqual = function (n, t) {
  14045. return Mt(n, t);
  14046. }, An.isEqualWith = function (n, t, r) {
  14047. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  14048. return e === T ? Mt(n, t, T, r) : !!e;
  14049. }, An.isError = hu, An.isFinite = function (n) {
  14050. return typeof n == "number" && zi(n);
  14051. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  14052. return n === t || $t(n, t, xe(t));
  14053. }, An.isMatchWith = function (n, t, r) {
  14054. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  14055. }, An.isNaN = function (n) {
  14056. return yu(n) && n != +n;
  14057. }, An.isNative = function (n) {
  14058. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  14059. return Ft(n);
  14060. }, An.isNil = function (n) {
  14061. return null == n;
  14062. }, An.isNull = function (n) {
  14063. return null === n;
  14064. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  14065. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  14066. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  14067. return n === T;
  14068. }, An.isWeakMap = function (n) {
  14069. return du(n) && "[object WeakMap]" == _o(n);
  14070. }, An.isWeakSet = function (n) {
  14071. return du(n) && "[object WeakSet]" == Ot(n);
  14072. }, An.join = function (n, t) {
  14073. return null == n ? "" : Wi.call(n, t);
  14074. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  14075. var e = null == n ? 0 : n.length;
  14076. if (!e) return -1;
  14077. var u = e;
  14078. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  14079. for (r = u + 1; r-- && n[r] !== t;) {
  14080. ;
  14081. }
  14082. n = r;
  14083. } else n = _(n, d, u, true);
  14084. return n;
  14085. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  14086. return n && n.length ? xt(n, Tu, It) : T;
  14087. }, An.maxBy = function (n, t) {
  14088. return n && n.length ? xt(n, ye(t, 2), It) : T;
  14089. }, An.mean = function (n) {
  14090. return y(n, Tu);
  14091. }, An.meanBy = function (n, t) {
  14092. return y(n, ye(t, 2));
  14093. }, An.min = function (n) {
  14094. return n && n.length ? xt(n, Tu, Kt) : T;
  14095. }, An.minBy = function (n, t) {
  14096. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  14097. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  14098. return {};
  14099. }, An.stubString = function () {
  14100. return "";
  14101. }, An.stubTrue = function () {
  14102. return true;
  14103. }, An.multiply = tc, An.nth = function (n, t) {
  14104. return n && n.length ? Qt(n, Au(t)) : T;
  14105. }, An.noConflict = function () {
  14106. return $n._ === this && ($n._ = li), this;
  14107. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  14108. n = Ou(n);
  14109. var e = (t = Au(t)) ? D(n) : 0;
  14110. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  14111. }, An.padEnd = function (n, t, r) {
  14112. n = Ou(n);
  14113. var e = (t = Au(t)) ? D(n) : 0;
  14114. return t && e < t ? n + ne(t - e, r) : n;
  14115. }, An.padStart = function (n, t, r) {
  14116. n = Ou(n);
  14117. var e = (t = Au(t)) ? D(n) : 0;
  14118. return t && e < t ? ne(t - e, r) + n : n;
  14119. }, An.parseInt = function (n, t, r) {
  14120. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  14121. }, An.random = function (n, t, r) {
  14122. if (r && typeof r != "boolean" && Oe(n, t, r) && (t = r = T), r === T && (typeof t == "boolean" ? (r = t, t = T) : typeof n == "boolean" && (r = n, n = T)), n === T && t === T ? (n = 0, t = 1) : (n = mu(n), t === T ? (t = n, n = 0) : t = mu(t)), n > t) {
  14123. var e = n;
  14124. n = t, t = e;
  14125. }
  14126. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  14127. }, An.reduce = function (n, t, r) {
  14128. var e = of(n) ? l : j,
  14129. u = 3 > arguments.length;
  14130. return e(n, ye(t, 4), r, u, eo);
  14131. }, An.reduceRight = function (n, t, r) {
  14132. var e = of(n) ? s : j,
  14133. u = 3 > arguments.length;
  14134. return e(n, ye(t, 4), r, u, uo);
  14135. }, An.repeat = function (n, t, r) {
  14136. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  14137. }, An.replace = function () {
  14138. var n = arguments,
  14139. t = Ou(n[0]);
  14140. return 3 > n.length ? t : t.replace(n[1], n[2]);
  14141. }, An.result = function (n, t, r) {
  14142. t = Sr(t, n);
  14143. var e = -1,
  14144. u = t.length;
  14145. for (u || (u = 1, n = T); ++e < u;) {
  14146. var i = null == n ? T : n[De(t[e])];
  14147. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  14148. }
  14149. return n;
  14150. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  14151. return (of(n) ? Qn : cr)(n);
  14152. }, An.size = function (n) {
  14153. if (null == n) return 0;
  14154. if (lu(n)) return xu(n) ? D(n) : n.length;
  14155. var t = _o(n);
  14156. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  14157. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  14158. var e = of(n) ? h : pr;
  14159. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  14160. }, An.sortedIndex = function (n, t) {
  14161. return _r(n, t);
  14162. }, An.sortedIndexBy = function (n, t, r) {
  14163. return vr(n, t, ye(r, 2));
  14164. }, An.sortedIndexOf = function (n, t) {
  14165. var r = null == n ? 0 : n.length;
  14166. if (r) {
  14167. var e = _r(n, t);
  14168. if (e < r && au(n[e], t)) return e;
  14169. }
  14170. return -1;
  14171. }, An.sortedLastIndex = function (n, t) {
  14172. return _r(n, t, true);
  14173. }, An.sortedLastIndexBy = function (n, t, r) {
  14174. return vr(n, t, ye(r, 2), true);
  14175. }, An.sortedLastIndexOf = function (n, t) {
  14176. if (null == n ? 0 : n.length) {
  14177. var r = _r(n, t, true) - 1;
  14178. if (au(n[r], t)) return r;
  14179. }
  14180. return -1;
  14181. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  14182. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  14183. }, An.subtract = ec, An.sum = function (n) {
  14184. return n && n.length ? m(n, Tu) : 0;
  14185. }, An.sumBy = function (n, t) {
  14186. return n && n.length ? m(n, ye(t, 2)) : 0;
  14187. }, An.template = function (n, t, r) {
  14188. var e = An.templateSettings;
  14189. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  14190. var u,
  14191. i,
  14192. o = zu(r),
  14193. f = S(r, o),
  14194. c = 0;
  14195. r = t.interpolate || jn;
  14196. var a = "__p+='";
  14197. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  14198. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  14199. if (n.replace(r, function (t, r, e, o, f, l) {
  14200. return e || (e = o), a += n.slice(c, l).replace(wn, z), r && (u = true, a += "'+__e(" + r + ")+'"), f && (i = true, a += "';" + f + ";\n__p+='"), e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), c = l + t.length, t;
  14201. }), a += "';", (t = t.variable) || (a = "with(obj){" + a + "}"), a = (i ? a.replace(P, "") : a).replace(Z, "$1").replace(q, "$1;"), a = "function(" + (t || "obj") + "){" + (t ? "" : "obj||(obj={});") + "var __t,__p=''" + (u ? ",__e=_.escape" : "") + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ";") + a + "return __p}", t = $f(function () {
  14202. return Hu(o, l + "return " + a).apply(T, f);
  14203. }), t.source = a, hu(t)) throw t;
  14204. return t;
  14205. }, An.times = function (n, t) {
  14206. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  14207. var r = 4294967295,
  14208. e = Ui(n, 4294967295);
  14209. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  14210. t(r);
  14211. }
  14212. return e;
  14213. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  14214. return Ou(n).toLowerCase();
  14215. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  14216. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  14217. }, An.toString = Ou, An.toUpper = function (n) {
  14218. return Ou(n).toUpperCase();
  14219. }, An.trim = function (n, t, r) {
  14220. return (n = Ou(n)) && (r || t === T) ? n.replace(un, "") : n && (t = yr(t)) ? (n = M(n), r = M(t), t = I(n, r), r = R(n, r) + 1, Or(n, t, r).join("")) : n;
  14221. }, An.trimEnd = function (n, t, r) {
  14222. return (n = Ou(n)) && (r || t === T) ? n.replace(fn, "") : n && (t = yr(t)) ? (n = M(n), t = R(n, M(t)) + 1, Or(n, 0, t).join("")) : n;
  14223. }, An.trimStart = function (n, t, r) {
  14224. return (n = Ou(n)) && (r || t === T) ? n.replace(on, "") : n && (t = yr(t)) ? (n = M(n), t = I(n, M(t)), Or(n, t).join("")) : n;
  14225. }, An.truncate = function (n, t) {
  14226. var r = 30,
  14227. e = "...";
  14228. if (gu(t)) var u = "separator" in t ? t.separator : u,
  14229. r = "length" in t ? Au(t.length) : r,
  14230. e = "omission" in t ? yr(t.omission) : e;
  14231. n = Ou(n);
  14232. var i = n.length;
  14233. if (Rn.test(n)) var o = M(n),
  14234. i = o.length;
  14235. if (r >= i) return n;
  14236. if (i = r - D(e), 1 > i) return e;
  14237. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  14238. if (o && (i += r.length - i), sf(u)) {
  14239. if (n.slice(i).search(u)) {
  14240. var f = r;
  14241. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  14242. var c = o.index;
  14243. }
  14244. r = r.slice(0, c === T ? i : c);
  14245. }
  14246. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  14247. return r + e;
  14248. }, An.unescape = function (n) {
  14249. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  14250. }, An.uniqueId = function (n) {
  14251. var t = ++oi;
  14252. return Ou(n) + t;
  14253. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  14254. var n = {};
  14255. return mt(An, function (t, r) {
  14256. ii.call(An.prototype, r) || (n[r] = t);
  14257. }), n;
  14258. }(), {
  14259. chain: false
  14260. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  14261. An[n].placeholder = An;
  14262. }), r(["drop", "take"], function (n, t) {
  14263. Un.prototype[n] = function (r) {
  14264. r = r === T ? 1 : Li(Au(r), 0);
  14265. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  14266. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  14267. size: Ui(r, 4294967295),
  14268. type: n + (0 > e.__dir__ ? "Right" : "")
  14269. }), e;
  14270. }, Un.prototype[n + "Right"] = function (t) {
  14271. return this.reverse()[n](t).reverse();
  14272. };
  14273. }), r(["filter", "map", "takeWhile"], function (n, t) {
  14274. var r = t + 1,
  14275. e = 1 == r || 3 == r;
  14276. Un.prototype[n] = function (n) {
  14277. var t = this.clone();
  14278. return t.__iteratees__.push({
  14279. iteratee: ye(n, 3),
  14280. type: r
  14281. }), t.__filtered__ = t.__filtered__ || e, t;
  14282. };
  14283. }), r(["head", "last"], function (n, t) {
  14284. var r = "take" + (t ? "Right" : "");
  14285. Un.prototype[n] = function () {
  14286. return this[r](1).value()[0];
  14287. };
  14288. }), r(["initial", "tail"], function (n, t) {
  14289. var r = "drop" + (t ? "" : "Right");
  14290. Un.prototype[n] = function () {
  14291. return this.__filtered__ ? new Un(this) : this[r](1);
  14292. };
  14293. }), Un.prototype.compact = function () {
  14294. return this.filter(Tu);
  14295. }, Un.prototype.find = function (n) {
  14296. return this.filter(n).head();
  14297. }, Un.prototype.findLast = function (n) {
  14298. return this.reverse().find(n);
  14299. }, Un.prototype.invokeMap = fr(function (n, t) {
  14300. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  14301. return Lt(r, n, t);
  14302. });
  14303. }), Un.prototype.reject = function (n) {
  14304. return this.filter(cu(ye(n)));
  14305. }, Un.prototype.slice = function (n, t) {
  14306. n = Au(n);
  14307. var r = this;
  14308. return r.__filtered__ && (0 < n || 0 > t) ? new Un(r) : (0 > n ? r = r.takeRight(-n) : n && (r = r.drop(n)), t !== T && (t = Au(t), r = 0 > t ? r.dropRight(-t) : r.take(t - n)), r);
  14309. }, Un.prototype.takeRightWhile = function (n) {
  14310. return this.reverse().takeWhile(n).reverse();
  14311. }, Un.prototype.toArray = function () {
  14312. return this.take(4294967295);
  14313. }, mt(Un.prototype, function (n, t) {
  14314. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  14315. e = /^(?:head|last)$/.test(t),
  14316. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  14317. i = e || /^find/.test(t);
  14318. u && (An.prototype[t] = function () {
  14319. function t(n) {
  14320. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  14321. }
  14322. var o = this.__wrapped__,
  14323. f = e ? [1] : arguments,
  14324. c = o instanceof Un,
  14325. l = f[0],
  14326. s = c || of(o);
  14327. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  14328. var h = this.__chain__,
  14329. p = !!this.__actions__.length,
  14330. l = i && !h,
  14331. c = c && !p;
  14332. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  14333. func: Ye,
  14334. args: [t],
  14335. thisArg: T
  14336. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  14337. });
  14338. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  14339. var t = ti[n],
  14340. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  14341. e = /^(?:pop|shift)$/.test(n);
  14342. An.prototype[n] = function () {
  14343. var n = arguments;
  14344. if (e && !this.__chain__) {
  14345. var u = this.value();
  14346. return t.apply(of(u) ? u : [], n);
  14347. }
  14348. return this[r](function (r) {
  14349. return t.apply(of(r) ? r : [], n);
  14350. });
  14351. };
  14352. }), mt(Un.prototype, function (n, t) {
  14353. var r = An[t];
  14354. if (r) {
  14355. var e = r.name + "";
  14356. (Ki[e] || (Ki[e] = [])).push({
  14357. name: t,
  14358. func: r
  14359. });
  14360. }
  14361. }), Ki[Jr(T, 2).name] = [{
  14362. name: "wrapper",
  14363. func: T
  14364. }], Un.prototype.clone = function () {
  14365. var n = new Un(this.__wrapped__);
  14366. return n.__actions__ = Ur(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = Ur(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = Ur(this.__views__), n;
  14367. }, Un.prototype.reverse = function () {
  14368. if (this.__filtered__) {
  14369. var n = new Un(this);
  14370. n.__dir__ = -1, n.__filtered__ = true;
  14371. } else n = this.clone(), n.__dir__ *= -1;
  14372. return n;
  14373. }, Un.prototype.value = function () {
  14374. var n,
  14375. t = this.__wrapped__.value(),
  14376. r = this.__dir__,
  14377. e = of(t),
  14378. u = 0 > r,
  14379. i = e ? t.length : 0;
  14380. n = i;
  14381. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  14382. var l = o[c],
  14383. s = l.size;
  14384. switch (l.type) {
  14385. case "drop":
  14386. f += s;
  14387. break;
  14388. case "dropRight":
  14389. n -= s;
  14390. break;
  14391. case "take":
  14392. n = Ui(n, f + s);
  14393. break;
  14394. case "takeRight":
  14395. f = Li(f, n - s);
  14396. }
  14397. }
  14398. if (n = {
  14399. start: f,
  14400. end: n
  14401. }, o = n.start, f = n.end, n = f - o, o = u ? f : o - 1, f = this.__iteratees__, c = f.length, a = 0, l = Ui(n, this.__takeCount__), !e || !u && i == n && l == n) return wr(t, this.__actions__);
  14402. e = [];
  14403. n: for (; n-- && a < l;) {
  14404. for (o += r, u = -1, i = t[o]; ++u < c;) {
  14405. var h = f[u],
  14406. s = h.type,
  14407. h = (0, h.iteratee)(i);
  14408. if (2 == s) i = h;else if (!h) {
  14409. if (1 == s) continue n;
  14410. break n;
  14411. }
  14412. }
  14413. e[a++] = i;
  14414. }
  14415. return e;
  14416. }, An.prototype.at = Mo, An.prototype.chain = function () {
  14417. return Je(this);
  14418. }, An.prototype.commit = function () {
  14419. return new On(this.value(), this.__chain__);
  14420. }, An.prototype.next = function () {
  14421. this.__values__ === T && (this.__values__ = wu(this.value()));
  14422. var n = this.__index__ >= this.__values__.length;
  14423. return {
  14424. done: n,
  14425. value: n ? T : this.__values__[this.__index__++]
  14426. };
  14427. }, An.prototype.plant = function (n) {
  14428. for (var t, r = this; r instanceof En;) {
  14429. var e = $e(r);
  14430. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  14431. var u = e,
  14432. r = r.__wrapped__;
  14433. }
  14434. return u.__wrapped__ = n, t;
  14435. }, An.prototype.reverse = function () {
  14436. var n = this.__wrapped__;
  14437. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  14438. func: Ye,
  14439. args: [Ke],
  14440. thisArg: T
  14441. }), new On(n, this.__chain__)) : this.thru(Ke);
  14442. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  14443. return wr(this.__wrapped__, this.__actions__);
  14444. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  14445. }();
  14446. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  14447. return rt;
  14448. }).call(exports, __webpack_require__, exports, module),
  14449. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  14450. }).call(this);
  14451. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3), __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  14452. /***/ }),
  14453. /***/ 4:
  14454. /*!**********************************************************************!*\
  14455. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14456. \**********************************************************************/
  14457. /*! no static exports found */
  14458. /***/ (function(module, exports) {
  14459. function _interopRequireDefault(obj) {
  14460. return obj && obj.__esModule ? obj : {
  14461. "default": obj
  14462. };
  14463. }
  14464. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14465. /***/ }),
  14466. /***/ 40:
  14467. /*!***********************************!*\
  14468. !*** (webpack)/buildin/module.js ***!
  14469. \***********************************/
  14470. /*! no static exports found */
  14471. /***/ (function(module, exports) {
  14472. module.exports = function(module) {
  14473. if (!module.webpackPolyfill) {
  14474. module.deprecate = function() {};
  14475. module.paths = [];
  14476. // module.parent = undefined by default
  14477. if (!module.children) module.children = [];
  14478. Object.defineProperty(module, "loaded", {
  14479. enumerable: true,
  14480. get: function() {
  14481. return module.l;
  14482. }
  14483. });
  14484. Object.defineProperty(module, "id", {
  14485. enumerable: true,
  14486. get: function() {
  14487. return module.i;
  14488. }
  14489. });
  14490. module.webpackPolyfill = 1;
  14491. }
  14492. return module;
  14493. };
  14494. /***/ }),
  14495. /***/ 41:
  14496. /*!****************************************!*\
  14497. !*** (webpack)/buildin/amd-options.js ***!
  14498. \****************************************/
  14499. /*! no static exports found */
  14500. /***/ (function(module, exports) {
  14501. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14502. module.exports = __webpack_amd_options__;
  14503. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14504. /***/ }),
  14505. /***/ 42:
  14506. /*!****************************************************!*\
  14507. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/index.js ***!
  14508. \****************************************************/
  14509. /*! no static exports found */
  14510. /***/ (function(module, exports, __webpack_require__) {
  14511. "use strict";
  14512. /* WEBPACK VAR INJECTION */(function(uni) {
  14513. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14514. Object.defineProperty(exports, "__esModule", {
  14515. value: true
  14516. });
  14517. exports.default = void 0;
  14518. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14519. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14520. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14521. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14522. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14523. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14524. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14525. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14526. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14527. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14528. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14529. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14530. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14531. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14532. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14533. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14534. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14535. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14536. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14537. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14538. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14539. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14540. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14541. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14542. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14543. // 引入全局mixin
  14544. // 引入关于是否mixin集成小程序分享的配置
  14545. // import wxshare from './libs/mixin/mpShare.js'
  14546. // 全局挂载引入http相关请求拦截插件
  14547. function wranning(str) {
  14548. // 开发环境进行信息输出,主要是一些报错信息
  14549. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14550. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  14551. if (true) {
  14552. console.warn(str);
  14553. }
  14554. }
  14555. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14556. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14557. // let vuexStore = {};
  14558. // try {
  14559. // vuexStore = require("@/store/$u.mixin.js");
  14560. // } catch (e) {
  14561. // //TODO handle the exception
  14562. // }
  14563. // post类型对象参数转为get类型url参数
  14564. var $u = {
  14565. queryParams: _queryParams.default,
  14566. route: _route.default,
  14567. timeFormat: _timeFormat.default,
  14568. date: _timeFormat.default,
  14569. // 另名date
  14570. timeFrom: _timeFrom.default,
  14571. colorGradient: _colorGradient.default.colorGradient,
  14572. colorToRgba: _colorGradient.default.colorToRgba,
  14573. guid: _guid.default,
  14574. color: _color.default,
  14575. sys: _sys.sys,
  14576. os: _sys.os,
  14577. type2icon: _type2icon.default,
  14578. randomArray: _randomArray.default,
  14579. wranning: wranning,
  14580. get: _request.default.get,
  14581. post: _request.default.post,
  14582. put: _request.default.put,
  14583. 'delete': _request.default.delete,
  14584. hexToRgb: _colorGradient.default.hexToRgb,
  14585. rgbToHex: _colorGradient.default.rgbToHex,
  14586. test: _test.default,
  14587. random: _random.default,
  14588. deepClone: _deepClone.default,
  14589. deepMerge: _deepMerge.default,
  14590. getParent: _getParent.default,
  14591. $parent: _$parent.default,
  14592. addUnit: _addUnit.default,
  14593. trim: _trim.default,
  14594. type: ['primary', 'success', 'error', 'warning', 'info'],
  14595. http: _request.default,
  14596. toast: _toast.default,
  14597. config: _config.default,
  14598. // uView配置信息相关,比如版本号
  14599. zIndex: _zIndex.default,
  14600. debounce: _debounce.default,
  14601. throttle: _throttle.default
  14602. };
  14603. // $u挂载到uni对象上
  14604. uni.$u = $u;
  14605. var install = function install(Vue) {
  14606. Vue.mixin(_mixin.default);
  14607. if (Vue.prototype.openShare) {
  14608. Vue.mixin(mpShare);
  14609. }
  14610. // Vue.mixin(vuexStore);
  14611. // 时间格式化,同时两个名称,date和timeFormat
  14612. Vue.filter('timeFormat', function (timestamp, format) {
  14613. return (0, _timeFormat.default)(timestamp, format);
  14614. });
  14615. Vue.filter('date', function (timestamp, format) {
  14616. return (0, _timeFormat.default)(timestamp, format);
  14617. });
  14618. // 将多久以前的方法,注入到全局过滤器
  14619. Vue.filter('timeFrom', function (timestamp, format) {
  14620. return (0, _timeFrom.default)(timestamp, format);
  14621. });
  14622. Vue.prototype.$u = $u;
  14623. };
  14624. var _default = {
  14625. install: install
  14626. };
  14627. exports.default = _default;
  14628. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14629. /***/ }),
  14630. /***/ 43:
  14631. /*!***************************************************************!*\
  14632. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/mixin/mixin.js ***!
  14633. \***************************************************************/
  14634. /*! no static exports found */
  14635. /***/ (function(module, exports, __webpack_require__) {
  14636. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14637. data: function data() {
  14638. return {};
  14639. },
  14640. onLoad: function onLoad() {
  14641. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14642. this.$u.getRect = this.$uGetRect;
  14643. },
  14644. methods: {
  14645. // 查询节点信息
  14646. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14647. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14648. $uGetRect: function $uGetRect(selector, all) {
  14649. var _this = this;
  14650. return new Promise(function (resolve) {
  14651. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14652. if (all && Array.isArray(rect) && rect.length) {
  14653. resolve(rect);
  14654. }
  14655. if (!all && rect) {
  14656. resolve(rect);
  14657. }
  14658. }).exec();
  14659. });
  14660. },
  14661. getParentData: function getParentData() {
  14662. var _this2 = this;
  14663. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14664. // 避免在created中去定义parent变量
  14665. if (!this.parent) this.parent = false;
  14666. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14667. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14668. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14669. this.parent = this.$u.$parent.call(this, parentName);
  14670. if (this.parent) {
  14671. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14672. Object.keys(this.parentData).map(function (key) {
  14673. _this2.parentData[key] = _this2.parent[key];
  14674. });
  14675. }
  14676. },
  14677. // 阻止事件冒泡
  14678. preventEvent: function preventEvent(e) {
  14679. e && e.stopPropagation && e.stopPropagation();
  14680. }
  14681. },
  14682. onReachBottom: function onReachBottom() {
  14683. uni.$emit('uOnReachBottom');
  14684. },
  14685. beforeDestroy: function beforeDestroy() {
  14686. var _this3 = this;
  14687. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14688. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14689. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14690. // 组件销毁时,移除父组件中的children数组中对应的实例
  14691. var childrenList = this.parent.children;
  14692. childrenList.map(function (child, index) {
  14693. // 如果相等,则移除
  14694. if (child === _this3) {
  14695. childrenList.splice(index, 1);
  14696. }
  14697. });
  14698. }
  14699. }
  14700. };
  14701. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14702. /***/ }),
  14703. /***/ 44:
  14704. /*!*****************************************************************!*\
  14705. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/request/index.js ***!
  14706. \*****************************************************************/
  14707. /*! no static exports found */
  14708. /***/ (function(module, exports, __webpack_require__) {
  14709. "use strict";
  14710. /* WEBPACK VAR INJECTION */(function(uni) {
  14711. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14712. Object.defineProperty(exports, "__esModule", {
  14713. value: true
  14714. });
  14715. exports.default = void 0;
  14716. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14717. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14718. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14719. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14720. var Request = /*#__PURE__*/function () {
  14721. function Request() {
  14722. var _this = this;
  14723. (0, _classCallCheck2.default)(this, Request);
  14724. this.config = {
  14725. baseUrl: '',
  14726. // 请求的根域名
  14727. // 默认的请求头
  14728. header: {},
  14729. method: 'POST',
  14730. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14731. dataType: 'json',
  14732. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14733. responseType: 'text',
  14734. showLoading: true,
  14735. // 是否显示请求中的loading
  14736. loadingText: '请求中...',
  14737. loadingTime: 800,
  14738. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14739. timer: null,
  14740. // 定时器
  14741. originalData: false,
  14742. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14743. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14744. };
  14745. // 拦截器
  14746. this.interceptor = {
  14747. // 请求前的拦截
  14748. request: null,
  14749. // 请求后的拦截
  14750. response: null
  14751. };
  14752. // get请求
  14753. this.get = function (url) {
  14754. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14755. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14756. return _this.request({
  14757. method: 'GET',
  14758. url: url,
  14759. header: header,
  14760. data: data
  14761. });
  14762. };
  14763. // post请求
  14764. this.post = function (url) {
  14765. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14766. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14767. return _this.request({
  14768. url: url,
  14769. method: 'POST',
  14770. header: header,
  14771. data: data
  14772. });
  14773. };
  14774. // put请求,不支持支付宝小程序(HX2.6.15)
  14775. this.put = function (url) {
  14776. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14777. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14778. return _this.request({
  14779. url: url,
  14780. method: 'PUT',
  14781. header: header,
  14782. data: data
  14783. });
  14784. };
  14785. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14786. this.delete = function (url) {
  14787. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14788. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14789. return _this.request({
  14790. url: url,
  14791. method: 'DELETE',
  14792. header: header,
  14793. data: data
  14794. });
  14795. };
  14796. }
  14797. (0, _createClass2.default)(Request, [{
  14798. key: "setConfig",
  14799. value:
  14800. // 设置全局默认配置
  14801. function setConfig(customConfig) {
  14802. // 深度合并对象,否则会造成对象深层属性丢失
  14803. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14804. }
  14805. // 主要请求部分
  14806. }, {
  14807. key: "request",
  14808. value: function request() {
  14809. var _this2 = this;
  14810. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14811. // 检查请求拦截
  14812. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14813. var tmpConfig = {};
  14814. var interceptorRequest = this.interceptor.request(options);
  14815. if (interceptorRequest === false) {
  14816. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14817. return new Promise(function () {});
  14818. }
  14819. this.options = interceptorRequest;
  14820. }
  14821. options.dataType = options.dataType || this.config.dataType;
  14822. options.responseType = options.responseType || this.config.responseType;
  14823. options.url = options.url || '';
  14824. options.params = options.params || {};
  14825. options.header = Object.assign({}, this.config.header, options.header);
  14826. options.method = options.method || this.config.method;
  14827. return new Promise(function (resolve, reject) {
  14828. options.complete = function (response) {
  14829. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14830. uni.hideLoading();
  14831. // 清除定时器,如果请求回来了,就无需loading
  14832. clearTimeout(_this2.config.timer);
  14833. _this2.config.timer = null;
  14834. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14835. if (_this2.config.originalData) {
  14836. // 判断是否存在拦截器
  14837. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14838. var resInterceptors = _this2.interceptor.response(response);
  14839. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14840. if (resInterceptors !== false) {
  14841. resolve(resInterceptors);
  14842. } else {
  14843. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14844. reject(response);
  14845. }
  14846. } else {
  14847. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14848. resolve(response);
  14849. }
  14850. } else {
  14851. if (response.statusCode == 200) {
  14852. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14853. var _resInterceptors = _this2.interceptor.response(response.data);
  14854. if (_resInterceptors !== false) {
  14855. resolve(_resInterceptors);
  14856. } else {
  14857. reject(response.data);
  14858. }
  14859. } else {
  14860. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14861. resolve(response.data);
  14862. }
  14863. } else {
  14864. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14865. // if(response.errMsg) {
  14866. // uni.showModal({
  14867. // title: response.errMsg
  14868. // });
  14869. // }
  14870. reject(response);
  14871. }
  14872. }
  14873. };
  14874. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14875. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14876. // 是否显示loading
  14877. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14878. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14879. if (_this2.config.showLoading && !_this2.config.timer) {
  14880. _this2.config.timer = setTimeout(function () {
  14881. uni.showLoading({
  14882. title: _this2.config.loadingText,
  14883. mask: _this2.config.loadingMask
  14884. });
  14885. _this2.config.timer = null;
  14886. }, _this2.config.loadingTime);
  14887. }
  14888. uni.request(options);
  14889. });
  14890. // .catch(res => {
  14891. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14892. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14893. // return new Promise(()=>{});
  14894. // })
  14895. }
  14896. }]);
  14897. return Request;
  14898. }();
  14899. var _default = new Request();
  14900. exports.default = _default;
  14901. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14902. /***/ }),
  14903. /***/ 45:
  14904. /*!**********************************************************************!*\
  14905. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepMerge.js ***!
  14906. \**********************************************************************/
  14907. /*! no static exports found */
  14908. /***/ (function(module, exports, __webpack_require__) {
  14909. "use strict";
  14910. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14911. Object.defineProperty(exports, "__esModule", {
  14912. value: true
  14913. });
  14914. exports.default = void 0;
  14915. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14916. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14917. // JS对象深度合并
  14918. function deepMerge() {
  14919. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14920. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14921. target = (0, _deepClone.default)(target);
  14922. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14923. for (var prop in source) {
  14924. if (!source.hasOwnProperty(prop)) continue;
  14925. if (prop in target) {
  14926. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14927. target[prop] = source[prop];
  14928. } else {
  14929. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14930. target[prop] = source[prop];
  14931. } else {
  14932. if (target[prop].concat && source[prop].concat) {
  14933. target[prop] = target[prop].concat(source[prop]);
  14934. } else {
  14935. target[prop] = deepMerge(target[prop], source[prop]);
  14936. }
  14937. }
  14938. }
  14939. } else {
  14940. target[prop] = source[prop];
  14941. }
  14942. }
  14943. return target;
  14944. }
  14945. var _default = deepMerge;
  14946. exports.default = _default;
  14947. /***/ }),
  14948. /***/ 453:
  14949. /*!***********************************************************************************!*\
  14950. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14951. \***********************************************************************************/
  14952. /*! no static exports found */
  14953. /***/ (function(module, exports, __webpack_require__) {
  14954. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14955. * html 解析器
  14956. * @tutorial https://github.com/jin-yufeng/Parser
  14957. * @version 20201029
  14958. * @author JinYufeng
  14959. * @listens MIT
  14960. */
  14961. var cfg = __webpack_require__(/*! ./config.js */ 454),
  14962. blankChar = cfg.blankChar,
  14963. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 455),
  14964. windowWidth = uni.getSystemInfoSync().windowWidth;
  14965. var emoji;
  14966. function MpHtmlParser(data) {
  14967. var _this = this;
  14968. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14969. this.attrs = {};
  14970. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  14971. this.data = data;
  14972. this.domain = options.domain;
  14973. this.DOM = [];
  14974. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  14975. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  14976. this.options = options;
  14977. this.state = this.Text;
  14978. this.STACK = [];
  14979. // 工具函数
  14980. this.bubble = function () {
  14981. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  14982. if (cfg.richOnlyTags[item.name]) return false;
  14983. item.c = 1;
  14984. }
  14985. return true;
  14986. };
  14987. this.decode = function (val, amp) {
  14988. var i = -1,
  14989. j,
  14990. en;
  14991. while (1) {
  14992. if ((i = val.indexOf('&', i + 1)) == -1) break;
  14993. if ((j = val.indexOf(';', i + 2)) == -1) break;
  14994. if (val[i + 1] == '#') {
  14995. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  14996. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  14997. } else {
  14998. en = val.substring(i + 1, j);
  14999. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  15000. }
  15001. }
  15002. return val;
  15003. };
  15004. this.getUrl = function (url) {
  15005. if (url[0] == '/') {
  15006. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  15007. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  15008. return url;
  15009. };
  15010. this.isClose = function () {
  15011. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  15012. };
  15013. this.section = function () {
  15014. return _this.data.substring(_this.start, _this.i);
  15015. };
  15016. this.parent = function () {
  15017. return _this.STACK[_this.STACK.length - 1];
  15018. };
  15019. this.siblings = function () {
  15020. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15021. };
  15022. }
  15023. MpHtmlParser.prototype.parse = function () {
  15024. if (emoji) this.data = emoji.parseEmoji(this.data);
  15025. for (var c; c = this.data[this.i]; this.i++) {
  15026. this.state(c);
  15027. }
  15028. if (this.state == this.Text) this.setText();
  15029. while (this.STACK.length) {
  15030. this.popNode(this.STACK.pop());
  15031. }
  15032. return this.DOM;
  15033. };
  15034. // 设置属性
  15035. MpHtmlParser.prototype.setAttr = function () {
  15036. var name = this.attrName.toLowerCase(),
  15037. val = this.attrVal;
  15038. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15039. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  15040. }
  15041. this.attrVal = '';
  15042. while (blankChar[this.data[this.i]]) {
  15043. this.i++;
  15044. }
  15045. if (this.isClose()) this.setNode();else {
  15046. this.start = this.i;
  15047. this.state = this.AttrName;
  15048. }
  15049. };
  15050. // 设置文本节点
  15051. MpHtmlParser.prototype.setText = function () {
  15052. var back,
  15053. text = this.section();
  15054. if (!text) return;
  15055. text = cfg.onText && cfg.onText(text, function () {
  15056. return back = true;
  15057. }) || text;
  15058. if (back) {
  15059. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15060. var j = this.start + text.length;
  15061. for (this.i = this.start; this.i < j; this.i++) {
  15062. this.state(this.data[this.i]);
  15063. }
  15064. return;
  15065. }
  15066. if (!this.pre) {
  15067. // 合并空白符
  15068. var flag,
  15069. tmp = [];
  15070. for (var i = text.length, c; c = text[--i];) {
  15071. if (!blankChar[c]) {
  15072. tmp.unshift(c);
  15073. if (!flag) flag = 1;
  15074. } else {
  15075. if (tmp[0] != ' ') tmp.unshift(' ');
  15076. if (c == '\n' && flag == void 0) flag = 0;
  15077. }
  15078. }
  15079. if (flag == 0) return;
  15080. text = tmp.join('');
  15081. }
  15082. this.siblings().push({
  15083. type: 'text',
  15084. text: this.decode(text)
  15085. });
  15086. };
  15087. // 设置元素节点
  15088. MpHtmlParser.prototype.setNode = function () {
  15089. var node = {
  15090. name: this.tagName.toLowerCase(),
  15091. attrs: this.attrs
  15092. },
  15093. close = cfg.selfClosingTags[node.name];
  15094. if (this.options.nodes.length) node.type = 'node';
  15095. this.attrs = {};
  15096. if (!cfg.ignoreTags[node.name]) {
  15097. // 处理属性
  15098. var attrs = node.attrs,
  15099. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15100. styleObj = {};
  15101. if (attrs.id) {
  15102. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15103. }
  15104. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15105. switch (node.name) {
  15106. case 'a':
  15107. case 'ad':
  15108. this.bubble();
  15109. break;
  15110. case 'font':
  15111. if (attrs.color) {
  15112. styleObj['color'] = attrs.color;
  15113. attrs.color = void 0;
  15114. }
  15115. if (attrs.face) {
  15116. styleObj['font-family'] = attrs.face;
  15117. attrs.face = void 0;
  15118. }
  15119. if (attrs.size) {
  15120. var size = parseInt(attrs.size);
  15121. if (size < 1) size = 1;else if (size > 7) size = 7;
  15122. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15123. styleObj['font-size'] = map[size - 1];
  15124. attrs.size = void 0;
  15125. }
  15126. break;
  15127. case 'embed':
  15128. var src = node.attrs.src || '',
  15129. type = node.attrs.type || '';
  15130. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) node.name = 'video';else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes('.aac')) node.name = 'audio';else break;
  15131. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15132. node.attrs.controls = 'T';
  15133. case 'video':
  15134. case 'audio':
  15135. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15136. if (node.name == 'video') {
  15137. if (this.videoNum > 3) node.lazyLoad = 1;
  15138. if (attrs.width) {
  15139. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15140. attrs.width = void 0;
  15141. }
  15142. if (attrs.height) {
  15143. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15144. attrs.height = void 0;
  15145. }
  15146. }
  15147. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15148. attrs.source = [];
  15149. if (attrs.src) {
  15150. attrs.source.push(attrs.src);
  15151. attrs.src = void 0;
  15152. }
  15153. this.bubble();
  15154. break;
  15155. case 'td':
  15156. case 'th':
  15157. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15158. if (item.name == 'table') {
  15159. item.flag = 1;
  15160. break;
  15161. }
  15162. }
  15163. }
  15164. if (attrs.align) {
  15165. if (node.name == 'table') {
  15166. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15167. } else styleObj['text-align'] = attrs.align;
  15168. attrs.align = void 0;
  15169. }
  15170. // 压缩 style
  15171. var styles = style.split(';');
  15172. style = '';
  15173. for (var i = 0, len = styles.length; i < len; i++) {
  15174. var info = styles[i].split(':');
  15175. if (info.length < 2) continue;
  15176. var _key = info[0].trim().toLowerCase(),
  15177. _value = info.slice(1).join(':').trim();
  15178. if (_value[0] == '-' || _value.includes('safe')) style += ";".concat(_key, ":").concat(_value);else if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import')) styleObj[_key] = _value;
  15179. }
  15180. if (node.name == 'img') {
  15181. if (attrs.src && !attrs.ignore) {
  15182. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15183. }
  15184. if (attrs.ignore) {
  15185. style += ';-webkit-touch-callout:none';
  15186. styleObj['max-width'] = '100%';
  15187. }
  15188. var width;
  15189. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15190. if (width) {
  15191. styleObj.width = width;
  15192. attrs.width = '100%';
  15193. if (parseInt(width) > windowWidth) {
  15194. styleObj.height = '';
  15195. if (attrs.height) attrs.height = void 0;
  15196. }
  15197. }
  15198. if (styleObj.height) {
  15199. attrs.height = styleObj.height;
  15200. styleObj.height = '';
  15201. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15202. }
  15203. for (var key in styleObj) {
  15204. var value = styleObj[key];
  15205. if (!value) continue;
  15206. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15207. // 填充链接
  15208. if (value.includes('url')) {
  15209. var j = value.indexOf('(');
  15210. if (j++ != -1) {
  15211. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15212. j++;
  15213. }
  15214. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15215. }
  15216. }
  15217. // 转换 rpx
  15218. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15219. return parseFloat($) * windowWidth / 750 + 'px';
  15220. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15221. style += ";".concat(key, ":").concat(value);
  15222. }
  15223. style = style.substr(1);
  15224. if (style) attrs.style = style;
  15225. if (!close) {
  15226. node.children = [];
  15227. if (node.name == 'pre' && cfg.highlight) {
  15228. this.remove(node);
  15229. this.pre = node.pre = true;
  15230. }
  15231. this.siblings().push(node);
  15232. this.STACK.push(node);
  15233. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15234. } else {
  15235. if (!close) this.remove(node);else if (node.name == 'source') {
  15236. var parent = this.parent();
  15237. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15238. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15239. }
  15240. if (this.data[this.i] == '/') this.i++;
  15241. this.start = this.i + 1;
  15242. this.state = this.Text;
  15243. };
  15244. // 移除标签
  15245. MpHtmlParser.prototype.remove = function (node) {
  15246. var _this2 = this;
  15247. var name = node.name,
  15248. j = this.i;
  15249. // 处理 svg
  15250. var handleSvg = function handleSvg() {
  15251. var src = _this2.data.substring(j, _this2.i + 1);
  15252. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15253. for (var key in node.attrs) {
  15254. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15255. }
  15256. src = '<svg' + src;
  15257. var parent = _this2.parent();
  15258. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15259. _this2.siblings().push({
  15260. name: 'img',
  15261. attrs: {
  15262. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15263. style: node.attrs.style,
  15264. ignore: 'T'
  15265. }
  15266. });
  15267. };
  15268. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15269. while (1) {
  15270. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15271. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15272. return;
  15273. }
  15274. this.start = this.i += 2;
  15275. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15276. this.i++;
  15277. }
  15278. if (this.section().toLowerCase() == name) {
  15279. // 代码块高亮
  15280. if (name == 'pre') {
  15281. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.substr(this.i - 5);
  15282. return this.i = j;
  15283. } else if (name == 'style') this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else if (name == 'title') this.DOM.title = this.data.substring(j + 1, this.i - 7);
  15284. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15285. if (name == 'svg') handleSvg();
  15286. return;
  15287. }
  15288. }
  15289. };
  15290. // 节点出栈处理
  15291. MpHtmlParser.prototype.popNode = function (node) {
  15292. // 空白符处理
  15293. if (node.pre) {
  15294. node.pre = this.pre = void 0;
  15295. for (var i = this.STACK.length; i--;) {
  15296. if (this.STACK[i].pre) this.pre = true;
  15297. }
  15298. }
  15299. var siblings = this.siblings(),
  15300. len = siblings.length,
  15301. childs = node.children;
  15302. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15303. var attrs = node.attrs;
  15304. // 替换一些标签名
  15305. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15306. // 处理列表
  15307. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15308. if ((node.attrs.style || '').includes('list-style:none')) {
  15309. for (var _i = 0, child; child = childs[_i++];) {
  15310. if (child.name == 'li') child.name = 'div';
  15311. }
  15312. } else if (node.name == 'ul') {
  15313. var floor = 1;
  15314. for (var _i2 = this.STACK.length; _i2--;) {
  15315. if (this.STACK[_i2].name == 'ul') floor++;
  15316. }
  15317. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15318. childs[_i3].floor = floor;
  15319. }
  15320. } else {
  15321. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15322. if (_child.name == 'li') {
  15323. _child.type = 'ol';
  15324. _child.num = function (num, type) {
  15325. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15326. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15327. if (type == 'i' || type == 'I') {
  15328. num = (num - 1) % 99 + 1;
  15329. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15330. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15331. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15332. if (type == 'i') return res.toLowerCase();
  15333. return res;
  15334. }
  15335. return num;
  15336. }(num++, attrs.type) + '.';
  15337. }
  15338. }
  15339. }
  15340. }
  15341. // 处理表格
  15342. if (node.name == 'table') {
  15343. var padding = parseFloat(attrs.cellpadding),
  15344. spacing = parseFloat(attrs.cellspacing),
  15345. border = parseFloat(attrs.border);
  15346. if (node.c) {
  15347. if (isNaN(padding)) padding = 2;
  15348. if (isNaN(spacing)) spacing = 2;
  15349. }
  15350. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15351. if (node.flag && node.c) {
  15352. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15353. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15354. var row = 1,
  15355. col = 1,
  15356. colNum,
  15357. trs = [],
  15358. children = [],
  15359. map = {};
  15360. (function f(ns) {
  15361. for (var i = 0; i < ns.length; i++) {
  15362. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15363. }
  15364. })(node.children);
  15365. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15366. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15367. if (td.name == 'td' || td.name == 'th') {
  15368. while (map[row + '.' + col]) {
  15369. col++;
  15370. }
  15371. var cell = {
  15372. name: 'div',
  15373. c: 1,
  15374. attrs: {
  15375. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15376. },
  15377. children: td.children
  15378. };
  15379. if (td.attrs.colspan) {
  15380. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15381. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15382. col += parseInt(td.attrs.colspan) - 1;
  15383. }
  15384. if (td.attrs.rowspan) {
  15385. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15386. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15387. for (var k = 1; k < td.attrs.rowspan; k++) {
  15388. map[row + k + '.' + col] = 1;
  15389. }
  15390. }
  15391. children.push(cell);
  15392. col++;
  15393. }
  15394. }
  15395. if (!colNum) {
  15396. colNum = col - 1;
  15397. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15398. }
  15399. col = 1;
  15400. row++;
  15401. }
  15402. node.children = children;
  15403. } else {
  15404. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15405. if (border || padding) (function f(ns) {
  15406. for (var i = 0, n; n = ns[i]; i++) {
  15407. if (n.name == 'th' || n.name == 'td') {
  15408. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15409. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15410. } else f(n.children || []);
  15411. }
  15412. })(childs);
  15413. }
  15414. if (this.options.autoscroll) {
  15415. var table = Object.assign({}, node);
  15416. node.name = 'div';
  15417. node.attrs = {
  15418. style: 'overflow:scroll'
  15419. };
  15420. node.children = [table];
  15421. }
  15422. }
  15423. this.CssHandler.pop && this.CssHandler.pop(node);
  15424. // 自动压缩
  15425. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15426. };
  15427. // 状态机
  15428. MpHtmlParser.prototype.Text = function (c) {
  15429. if (c == '<') {
  15430. var next = this.data[this.i + 1],
  15431. isLetter = function isLetter(c) {
  15432. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15433. };
  15434. if (isLetter(next)) {
  15435. this.setText();
  15436. this.start = this.i + 1;
  15437. this.state = this.TagName;
  15438. } else if (next == '/') {
  15439. this.setText();
  15440. if (isLetter(this.data[++this.i + 1])) {
  15441. this.start = this.i + 1;
  15442. this.state = this.EndTag;
  15443. } else this.Comment();
  15444. } else if (next == '!' || next == '?') {
  15445. this.setText();
  15446. this.Comment();
  15447. }
  15448. }
  15449. };
  15450. MpHtmlParser.prototype.Comment = function () {
  15451. var key;
  15452. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else key = '>';
  15453. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15454. this.start = this.i + 1;
  15455. this.state = this.Text;
  15456. };
  15457. MpHtmlParser.prototype.TagName = function (c) {
  15458. if (blankChar[c]) {
  15459. this.tagName = this.section();
  15460. while (blankChar[this.data[this.i]]) {
  15461. this.i++;
  15462. }
  15463. if (this.isClose()) this.setNode();else {
  15464. this.start = this.i;
  15465. this.state = this.AttrName;
  15466. }
  15467. } else if (this.isClose()) {
  15468. this.tagName = this.section();
  15469. this.setNode();
  15470. }
  15471. };
  15472. MpHtmlParser.prototype.AttrName = function (c) {
  15473. if (c == '=' || blankChar[c] || this.isClose()) {
  15474. this.attrName = this.section();
  15475. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15476. ;
  15477. }
  15478. if (this.data[this.i] == '=') {
  15479. while (blankChar[this.data[++this.i]]) {
  15480. ;
  15481. }
  15482. this.start = this.i--;
  15483. this.state = this.AttrValue;
  15484. } else this.setAttr();
  15485. }
  15486. };
  15487. MpHtmlParser.prototype.AttrValue = function (c) {
  15488. if (c == '"' || c == "'") {
  15489. this.start++;
  15490. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15491. this.attrVal = this.section();
  15492. this.i++;
  15493. } else {
  15494. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15495. ;
  15496. }
  15497. this.attrVal = this.section();
  15498. }
  15499. this.setAttr();
  15500. };
  15501. MpHtmlParser.prototype.EndTag = function (c) {
  15502. if (blankChar[c] || c == '>' || c == '/') {
  15503. var name = this.section().toLowerCase();
  15504. for (var i = this.STACK.length; i--;) {
  15505. if (this.STACK[i].name == name) break;
  15506. }
  15507. if (i != -1) {
  15508. var node;
  15509. while ((node = this.STACK.pop()).name != name) {
  15510. this.popNode(node);
  15511. }
  15512. this.popNode(node);
  15513. } else if (name == 'p' || name == 'br') this.siblings().push({
  15514. name: name,
  15515. attrs: {}
  15516. });
  15517. this.i = this.data.indexOf('>', this.i);
  15518. this.start = this.i + 1;
  15519. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15520. }
  15521. };
  15522. module.exports = MpHtmlParser;
  15523. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15524. /***/ }),
  15525. /***/ 454:
  15526. /*!*****************************************************************************!*\
  15527. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/config.js ***!
  15528. \*****************************************************************************/
  15529. /*! no static exports found */
  15530. /***/ (function(module, exports, __webpack_require__) {
  15531. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15532. var cfg = {
  15533. // 出错占位图
  15534. errorImg: null,
  15535. // 过滤器函数
  15536. filter: null,
  15537. // 代码高亮函数
  15538. highlight: null,
  15539. // 文本处理函数
  15540. onText: null,
  15541. // 实体编码列表
  15542. entities: {
  15543. quot: '"',
  15544. apos: "'",
  15545. semi: ';',
  15546. nbsp: '\xA0',
  15547. ensp: "\u2002",
  15548. emsp: "\u2003",
  15549. ndash: '–',
  15550. mdash: '—',
  15551. middot: '·',
  15552. lsquo: '‘',
  15553. rsquo: '’',
  15554. ldquo: '“',
  15555. rdquo: '”',
  15556. bull: '•',
  15557. hellip: '…'
  15558. },
  15559. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15560. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15561. // 块级标签,将被转为 div
  15562. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15563. // 将被移除的标签
  15564. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15565. // 只能被 rich-text 显示的标签
  15566. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15567. // 自闭合的标签
  15568. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15569. // 信任的标签
  15570. trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  15571. // 默认的标签样式
  15572. userAgentStyles: {
  15573. address: 'font-style:italic',
  15574. big: 'display:inline;font-size:1.2em',
  15575. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15576. caption: 'display:table-caption;text-align:center',
  15577. center: 'text-align:center',
  15578. cite: 'font-style:italic',
  15579. dd: 'margin-left:40px',
  15580. mark: 'background-color:yellow',
  15581. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15582. s: 'text-decoration:line-through',
  15583. small: 'display:inline;font-size:0.8em',
  15584. u: 'text-decoration:underline'
  15585. }
  15586. };
  15587. function makeMap(str) {
  15588. var map = Object.create(null),
  15589. list = str.split(',');
  15590. for (var i = list.length; i--;) {
  15591. map[list[i]] = true;
  15592. }
  15593. return map;
  15594. }
  15595. if (wx.canIUse('editor')) {
  15596. cfg.blockTags.pre = void 0;
  15597. cfg.ignoreTags.rp = true;
  15598. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15599. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15600. }
  15601. module.exports = cfg;
  15602. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15603. /***/ }),
  15604. /***/ 455:
  15605. /*!*********************************************************************************!*\
  15606. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15607. \*********************************************************************************/
  15608. /*! no static exports found */
  15609. /***/ (function(module, exports, __webpack_require__) {
  15610. var cfg = __webpack_require__(/*! ./config.js */ 454),
  15611. isLetter = function isLetter(c) {
  15612. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15613. };
  15614. function CssHandler(tagStyle) {
  15615. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15616. for (var item in tagStyle) {
  15617. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15618. }
  15619. this.styles = styles;
  15620. }
  15621. CssHandler.prototype.getStyle = function (data) {
  15622. this.styles = new parser(data, this.styles).parse();
  15623. };
  15624. CssHandler.prototype.match = function (name, attrs) {
  15625. var tmp,
  15626. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15627. if (attrs.class) {
  15628. var items = attrs.class.split(' ');
  15629. for (var i = 0, item; item = items[i]; i++) {
  15630. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15631. }
  15632. }
  15633. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15634. return matched;
  15635. };
  15636. module.exports = CssHandler;
  15637. function parser(data, init) {
  15638. this.data = data;
  15639. this.floor = 0;
  15640. this.i = 0;
  15641. this.list = [];
  15642. this.res = init;
  15643. this.state = this.Space;
  15644. }
  15645. parser.prototype.parse = function () {
  15646. for (var c; c = this.data[this.i]; this.i++) {
  15647. this.state(c);
  15648. }
  15649. return this.res;
  15650. };
  15651. parser.prototype.section = function () {
  15652. return this.data.substring(this.start, this.i);
  15653. };
  15654. // 状态机
  15655. parser.prototype.Space = function (c) {
  15656. if (c == '.' || c == '#' || isLetter(c)) {
  15657. this.start = this.i;
  15658. this.state = this.Name;
  15659. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15660. };
  15661. parser.prototype.Comment = function () {
  15662. this.i = this.data.indexOf('*/', this.i) + 1;
  15663. if (!this.i) this.i = this.data.length;
  15664. this.state = this.Space;
  15665. };
  15666. parser.prototype.Ignore = function (c) {
  15667. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15668. this.list = [];
  15669. this.state = this.Space;
  15670. }
  15671. };
  15672. parser.prototype.Name = function (c) {
  15673. if (cfg.blankChar[c]) {
  15674. this.list.push(this.section());
  15675. this.state = this.NameSpace;
  15676. } else if (c == '{') {
  15677. this.list.push(this.section());
  15678. this.Content();
  15679. } else if (c == ',') {
  15680. this.list.push(this.section());
  15681. this.Comma();
  15682. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15683. };
  15684. parser.prototype.NameSpace = function (c) {
  15685. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15686. };
  15687. parser.prototype.Comma = function () {
  15688. while (cfg.blankChar[this.data[++this.i]]) {
  15689. ;
  15690. }
  15691. if (this.data[this.i] == '{') this.Content();else {
  15692. this.start = this.i--;
  15693. this.state = this.Name;
  15694. }
  15695. };
  15696. parser.prototype.Content = function () {
  15697. this.start = ++this.i;
  15698. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15699. var content = this.section();
  15700. for (var i = 0, item; item = this.list[i++];) {
  15701. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15702. }
  15703. this.list = [];
  15704. this.state = this.Space;
  15705. };
  15706. /***/ }),
  15707. /***/ 46:
  15708. /*!**********************************************************************!*\
  15709. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/deepClone.js ***!
  15710. \**********************************************************************/
  15711. /*! no static exports found */
  15712. /***/ (function(module, exports, __webpack_require__) {
  15713. "use strict";
  15714. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15715. Object.defineProperty(exports, "__esModule", {
  15716. value: true
  15717. });
  15718. exports.default = void 0;
  15719. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15720. // 判断arr是否为一个数组,返回一个bool值
  15721. function isArray(arr) {
  15722. return Object.prototype.toString.call(arr) === '[object Array]';
  15723. }
  15724. // 深度克隆
  15725. function deepClone(obj) {
  15726. // 对常见的“非”值,直接返回原来值
  15727. if ([null, undefined, NaN, false].includes(obj)) return obj;
  15728. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  15729. //原始类型直接返回
  15730. return obj;
  15731. }
  15732. var o = isArray(obj) ? [] : {};
  15733. for (var i in obj) {
  15734. if (obj.hasOwnProperty(i)) {
  15735. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  15736. }
  15737. }
  15738. return o;
  15739. }
  15740. var _default = deepClone;
  15741. exports.default = _default;
  15742. /***/ }),
  15743. /***/ 47:
  15744. /*!*****************************************************************!*\
  15745. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/test.js ***!
  15746. \*****************************************************************/
  15747. /*! no static exports found */
  15748. /***/ (function(module, exports, __webpack_require__) {
  15749. "use strict";
  15750. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15751. Object.defineProperty(exports, "__esModule", {
  15752. value: true
  15753. });
  15754. exports.default = void 0;
  15755. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15756. /**
  15757. * 验证电子邮箱格式
  15758. */
  15759. function email(value) {
  15760. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  15761. }
  15762. /**
  15763. * 验证手机格式
  15764. */
  15765. function mobile(value) {
  15766. return /^1[3-9]\d{9}$/.test(value);
  15767. }
  15768. /**
  15769. * 验证URL格式
  15770. */
  15771. function url(value) {
  15772. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  15773. }
  15774. /**
  15775. * 验证日期格式
  15776. */
  15777. function date(value) {
  15778. return !/Invalid|NaN/.test(new Date(value).toString());
  15779. }
  15780. /**
  15781. * 验证ISO类型的日期格式
  15782. */
  15783. function dateISO(value) {
  15784. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  15785. }
  15786. /**
  15787. * 验证十进制数字
  15788. */
  15789. function number(value) {
  15790. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  15791. }
  15792. /**
  15793. * 验证整数
  15794. */
  15795. function digits(value) {
  15796. return /^\d+$/.test(value);
  15797. }
  15798. /**
  15799. * 验证身份证号码
  15800. */
  15801. function idCard(value) {
  15802. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  15803. }
  15804. /**
  15805. * 是否车牌号
  15806. */
  15807. function carNo(value) {
  15808. // 新能源车牌
  15809. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  15810. // 旧车牌
  15811. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  15812. if (value.length === 7) {
  15813. return creg.test(value);
  15814. } else if (value.length === 8) {
  15815. return xreg.test(value);
  15816. } else {
  15817. return false;
  15818. }
  15819. }
  15820. /**
  15821. * 金额,只允许2位小数
  15822. */
  15823. function amount(value) {
  15824. //金额,只允许保留两位小数
  15825. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  15826. }
  15827. /**
  15828. * 中文
  15829. */
  15830. function chinese(value) {
  15831. var reg = /^[\u4e00-\u9fa5]+$/gi;
  15832. return reg.test(value);
  15833. }
  15834. /**
  15835. * 只能输入字母
  15836. */
  15837. function letter(value) {
  15838. return /^[a-zA-Z]*$/.test(value);
  15839. }
  15840. /**
  15841. * 只能是字母或者数字
  15842. */
  15843. function enOrNum(value) {
  15844. //英文或者数字
  15845. var reg = /^[0-9a-zA-Z]*$/g;
  15846. return reg.test(value);
  15847. }
  15848. /**
  15849. * 验证是否包含某个值
  15850. */
  15851. function contains(value, param) {
  15852. return value.indexOf(param) >= 0;
  15853. }
  15854. /**
  15855. * 验证一个值范围[min, max]
  15856. */
  15857. function range(value, param) {
  15858. return value >= param[0] && value <= param[1];
  15859. }
  15860. /**
  15861. * 验证一个长度范围[min, max]
  15862. */
  15863. function rangeLength(value, param) {
  15864. return value.length >= param[0] && value.length <= param[1];
  15865. }
  15866. /**
  15867. * 是否固定电话
  15868. */
  15869. function landline(value) {
  15870. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  15871. return reg.test(value);
  15872. }
  15873. /**
  15874. * 判断是否为空
  15875. */
  15876. function empty(value) {
  15877. switch ((0, _typeof2.default)(value)) {
  15878. case 'undefined':
  15879. return true;
  15880. case 'string':
  15881. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  15882. break;
  15883. case 'boolean':
  15884. if (!value) return true;
  15885. break;
  15886. case 'number':
  15887. if (0 === value || isNaN(value)) return true;
  15888. break;
  15889. case 'object':
  15890. if (null === value || value.length === 0) return true;
  15891. for (var i in value) {
  15892. return false;
  15893. }
  15894. return true;
  15895. }
  15896. return false;
  15897. }
  15898. /**
  15899. * 是否json字符串
  15900. */
  15901. function jsonString(value) {
  15902. if (typeof value == 'string') {
  15903. try {
  15904. var obj = JSON.parse(value);
  15905. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  15906. return true;
  15907. } else {
  15908. return false;
  15909. }
  15910. } catch (e) {
  15911. return false;
  15912. }
  15913. }
  15914. return false;
  15915. }
  15916. /**
  15917. * 是否数组
  15918. */
  15919. function array(value) {
  15920. if (typeof Array.isArray === "function") {
  15921. return Array.isArray(value);
  15922. } else {
  15923. return Object.prototype.toString.call(value) === "[object Array]";
  15924. }
  15925. }
  15926. /**
  15927. * 是否对象
  15928. */
  15929. function object(value) {
  15930. return Object.prototype.toString.call(value) === '[object Object]';
  15931. }
  15932. /**
  15933. * 是否短信验证码
  15934. */
  15935. function code(value) {
  15936. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  15937. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  15938. }
  15939. var _default = {
  15940. email: email,
  15941. mobile: mobile,
  15942. url: url,
  15943. date: date,
  15944. dateISO: dateISO,
  15945. number: number,
  15946. digits: digits,
  15947. idCard: idCard,
  15948. carNo: carNo,
  15949. amount: amount,
  15950. chinese: chinese,
  15951. letter: letter,
  15952. enOrNum: enOrNum,
  15953. contains: contains,
  15954. range: range,
  15955. rangeLength: rangeLength,
  15956. empty: empty,
  15957. isEmpty: empty,
  15958. jsonString: jsonString,
  15959. landline: landline,
  15960. object: object,
  15961. array: array,
  15962. code: code
  15963. };
  15964. exports.default = _default;
  15965. /***/ }),
  15966. /***/ 477:
  15967. /*!*****************************************************************!*\
  15968. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/province.js ***!
  15969. \*****************************************************************/
  15970. /*! no static exports found */
  15971. /***/ (function(module, exports, __webpack_require__) {
  15972. "use strict";
  15973. Object.defineProperty(exports, "__esModule", {
  15974. value: true
  15975. });
  15976. exports.default = void 0;
  15977. var provinceData = [{
  15978. "label": "北京市",
  15979. "value": "11"
  15980. }, {
  15981. "label": "天津市",
  15982. "value": "12"
  15983. }, {
  15984. "label": "河北省",
  15985. "value": "13"
  15986. }, {
  15987. "label": "山西省",
  15988. "value": "14"
  15989. }, {
  15990. "label": "内蒙古自治区",
  15991. "value": "15"
  15992. }, {
  15993. "label": "辽宁省",
  15994. "value": "21"
  15995. }, {
  15996. "label": "吉林省",
  15997. "value": "22"
  15998. }, {
  15999. "label": "黑龙江省",
  16000. "value": "23"
  16001. }, {
  16002. "label": "上海市",
  16003. "value": "31"
  16004. }, {
  16005. "label": "江苏省",
  16006. "value": "32"
  16007. }, {
  16008. "label": "浙江省",
  16009. "value": "33"
  16010. }, {
  16011. "label": "安徽省",
  16012. "value": "34"
  16013. }, {
  16014. "label": "福建省",
  16015. "value": "35"
  16016. }, {
  16017. "label": "江西省",
  16018. "value": "36"
  16019. }, {
  16020. "label": "山东省",
  16021. "value": "37"
  16022. }, {
  16023. "label": "河南省",
  16024. "value": "41"
  16025. }, {
  16026. "label": "湖北省",
  16027. "value": "42"
  16028. }, {
  16029. "label": "湖南省",
  16030. "value": "43"
  16031. }, {
  16032. "label": "广东省",
  16033. "value": "44"
  16034. }, {
  16035. "label": "广西壮族自治区",
  16036. "value": "45"
  16037. }, {
  16038. "label": "海南省",
  16039. "value": "46"
  16040. }, {
  16041. "label": "重庆市",
  16042. "value": "50"
  16043. }, {
  16044. "label": "四川省",
  16045. "value": "51"
  16046. }, {
  16047. "label": "贵州省",
  16048. "value": "52"
  16049. }, {
  16050. "label": "云南省",
  16051. "value": "53"
  16052. }, {
  16053. "label": "西藏自治区",
  16054. "value": "54"
  16055. }, {
  16056. "label": "陕西省",
  16057. "value": "61"
  16058. }, {
  16059. "label": "甘肃省",
  16060. "value": "62"
  16061. }, {
  16062. "label": "青海省",
  16063. "value": "63"
  16064. }, {
  16065. "label": "宁夏回族自治区",
  16066. "value": "64"
  16067. }, {
  16068. "label": "新疆维吾尔自治区",
  16069. "value": "65"
  16070. }, {
  16071. "label": "台湾",
  16072. "value": "66"
  16073. }, {
  16074. "label": "香港",
  16075. "value": "67"
  16076. }, {
  16077. "label": "澳门",
  16078. "value": "68"
  16079. }];
  16080. var _default = provinceData;
  16081. exports.default = _default;
  16082. /***/ }),
  16083. /***/ 478:
  16084. /*!*************************************************************!*\
  16085. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/city.js ***!
  16086. \*************************************************************/
  16087. /*! no static exports found */
  16088. /***/ (function(module, exports, __webpack_require__) {
  16089. "use strict";
  16090. Object.defineProperty(exports, "__esModule", {
  16091. value: true
  16092. });
  16093. exports.default = void 0;
  16094. var cityData = [[{
  16095. "label": "市辖区",
  16096. "value": "1101"
  16097. }], [{
  16098. "label": "市辖区",
  16099. "value": "1201"
  16100. }], [{
  16101. "label": "石家庄市",
  16102. "value": "1301"
  16103. }, {
  16104. "label": "唐山市",
  16105. "value": "1302"
  16106. }, {
  16107. "label": "秦皇岛市",
  16108. "value": "1303"
  16109. }, {
  16110. "label": "邯郸市",
  16111. "value": "1304"
  16112. }, {
  16113. "label": "邢台市",
  16114. "value": "1305"
  16115. }, {
  16116. "label": "保定市",
  16117. "value": "1306"
  16118. }, {
  16119. "label": "张家口市",
  16120. "value": "1307"
  16121. }, {
  16122. "label": "承德市",
  16123. "value": "1308"
  16124. }, {
  16125. "label": "沧州市",
  16126. "value": "1309"
  16127. }, {
  16128. "label": "廊坊市",
  16129. "value": "1310"
  16130. }, {
  16131. "label": "衡水市",
  16132. "value": "1311"
  16133. }], [{
  16134. "label": "太原市",
  16135. "value": "1401"
  16136. }, {
  16137. "label": "大同市",
  16138. "value": "1402"
  16139. }, {
  16140. "label": "阳泉市",
  16141. "value": "1403"
  16142. }, {
  16143. "label": "长治市",
  16144. "value": "1404"
  16145. }, {
  16146. "label": "晋城市",
  16147. "value": "1405"
  16148. }, {
  16149. "label": "朔州市",
  16150. "value": "1406"
  16151. }, {
  16152. "label": "晋中市",
  16153. "value": "1407"
  16154. }, {
  16155. "label": "运城市",
  16156. "value": "1408"
  16157. }, {
  16158. "label": "忻州市",
  16159. "value": "1409"
  16160. }, {
  16161. "label": "临汾市",
  16162. "value": "1410"
  16163. }, {
  16164. "label": "吕梁市",
  16165. "value": "1411"
  16166. }], [{
  16167. "label": "呼和浩特市",
  16168. "value": "1501"
  16169. }, {
  16170. "label": "包头市",
  16171. "value": "1502"
  16172. }, {
  16173. "label": "乌海市",
  16174. "value": "1503"
  16175. }, {
  16176. "label": "赤峰市",
  16177. "value": "1504"
  16178. }, {
  16179. "label": "通辽市",
  16180. "value": "1505"
  16181. }, {
  16182. "label": "鄂尔多斯市",
  16183. "value": "1506"
  16184. }, {
  16185. "label": "呼伦贝尔市",
  16186. "value": "1507"
  16187. }, {
  16188. "label": "巴彦淖尔市",
  16189. "value": "1508"
  16190. }, {
  16191. "label": "乌兰察布市",
  16192. "value": "1509"
  16193. }, {
  16194. "label": "兴安盟",
  16195. "value": "1522"
  16196. }, {
  16197. "label": "锡林郭勒盟",
  16198. "value": "1525"
  16199. }, {
  16200. "label": "阿拉善盟",
  16201. "value": "1529"
  16202. }], [{
  16203. "label": "沈阳市",
  16204. "value": "2101"
  16205. }, {
  16206. "label": "大连市",
  16207. "value": "2102"
  16208. }, {
  16209. "label": "鞍山市",
  16210. "value": "2103"
  16211. }, {
  16212. "label": "抚顺市",
  16213. "value": "2104"
  16214. }, {
  16215. "label": "本溪市",
  16216. "value": "2105"
  16217. }, {
  16218. "label": "丹东市",
  16219. "value": "2106"
  16220. }, {
  16221. "label": "锦州市",
  16222. "value": "2107"
  16223. }, {
  16224. "label": "营口市",
  16225. "value": "2108"
  16226. }, {
  16227. "label": "阜新市",
  16228. "value": "2109"
  16229. }, {
  16230. "label": "辽阳市",
  16231. "value": "2110"
  16232. }, {
  16233. "label": "盘锦市",
  16234. "value": "2111"
  16235. }, {
  16236. "label": "铁岭市",
  16237. "value": "2112"
  16238. }, {
  16239. "label": "朝阳市",
  16240. "value": "2113"
  16241. }, {
  16242. "label": "葫芦岛市",
  16243. "value": "2114"
  16244. }], [{
  16245. "label": "长春市",
  16246. "value": "2201"
  16247. }, {
  16248. "label": "吉林市",
  16249. "value": "2202"
  16250. }, {
  16251. "label": "四平市",
  16252. "value": "2203"
  16253. }, {
  16254. "label": "辽源市",
  16255. "value": "2204"
  16256. }, {
  16257. "label": "通化市",
  16258. "value": "2205"
  16259. }, {
  16260. "label": "白山市",
  16261. "value": "2206"
  16262. }, {
  16263. "label": "松原市",
  16264. "value": "2207"
  16265. }, {
  16266. "label": "白城市",
  16267. "value": "2208"
  16268. }, {
  16269. "label": "延边朝鲜族自治州",
  16270. "value": "2224"
  16271. }], [{
  16272. "label": "哈尔滨市",
  16273. "value": "2301"
  16274. }, {
  16275. "label": "齐齐哈尔市",
  16276. "value": "2302"
  16277. }, {
  16278. "label": "鸡西市",
  16279. "value": "2303"
  16280. }, {
  16281. "label": "鹤岗市",
  16282. "value": "2304"
  16283. }, {
  16284. "label": "双鸭山市",
  16285. "value": "2305"
  16286. }, {
  16287. "label": "大庆市",
  16288. "value": "2306"
  16289. }, {
  16290. "label": "伊春市",
  16291. "value": "2307"
  16292. }, {
  16293. "label": "佳木斯市",
  16294. "value": "2308"
  16295. }, {
  16296. "label": "七台河市",
  16297. "value": "2309"
  16298. }, {
  16299. "label": "牡丹江市",
  16300. "value": "2310"
  16301. }, {
  16302. "label": "黑河市",
  16303. "value": "2311"
  16304. }, {
  16305. "label": "绥化市",
  16306. "value": "2312"
  16307. }, {
  16308. "label": "大兴安岭地区",
  16309. "value": "2327"
  16310. }], [{
  16311. "label": "市辖区",
  16312. "value": "3101"
  16313. }], [{
  16314. "label": "南京市",
  16315. "value": "3201"
  16316. }, {
  16317. "label": "无锡市",
  16318. "value": "3202"
  16319. }, {
  16320. "label": "徐州市",
  16321. "value": "3203"
  16322. }, {
  16323. "label": "常州市",
  16324. "value": "3204"
  16325. }, {
  16326. "label": "苏州市",
  16327. "value": "3205"
  16328. }, {
  16329. "label": "南通市",
  16330. "value": "3206"
  16331. }, {
  16332. "label": "连云港市",
  16333. "value": "3207"
  16334. }, {
  16335. "label": "淮安市",
  16336. "value": "3208"
  16337. }, {
  16338. "label": "盐城市",
  16339. "value": "3209"
  16340. }, {
  16341. "label": "扬州市",
  16342. "value": "3210"
  16343. }, {
  16344. "label": "镇江市",
  16345. "value": "3211"
  16346. }, {
  16347. "label": "泰州市",
  16348. "value": "3212"
  16349. }, {
  16350. "label": "宿迁市",
  16351. "value": "3213"
  16352. }], [{
  16353. "label": "杭州市",
  16354. "value": "3301"
  16355. }, {
  16356. "label": "宁波市",
  16357. "value": "3302"
  16358. }, {
  16359. "label": "温州市",
  16360. "value": "3303"
  16361. }, {
  16362. "label": "嘉兴市",
  16363. "value": "3304"
  16364. }, {
  16365. "label": "湖州市",
  16366. "value": "3305"
  16367. }, {
  16368. "label": "绍兴市",
  16369. "value": "3306"
  16370. }, {
  16371. "label": "金华市",
  16372. "value": "3307"
  16373. }, {
  16374. "label": "衢州市",
  16375. "value": "3308"
  16376. }, {
  16377. "label": "舟山市",
  16378. "value": "3309"
  16379. }, {
  16380. "label": "台州市",
  16381. "value": "3310"
  16382. }, {
  16383. "label": "丽水市",
  16384. "value": "3311"
  16385. }], [{
  16386. "label": "合肥市",
  16387. "value": "3401"
  16388. }, {
  16389. "label": "芜湖市",
  16390. "value": "3402"
  16391. }, {
  16392. "label": "蚌埠市",
  16393. "value": "3403"
  16394. }, {
  16395. "label": "淮南市",
  16396. "value": "3404"
  16397. }, {
  16398. "label": "马鞍山市",
  16399. "value": "3405"
  16400. }, {
  16401. "label": "淮北市",
  16402. "value": "3406"
  16403. }, {
  16404. "label": "铜陵市",
  16405. "value": "3407"
  16406. }, {
  16407. "label": "安庆市",
  16408. "value": "3408"
  16409. }, {
  16410. "label": "黄山市",
  16411. "value": "3410"
  16412. }, {
  16413. "label": "滁州市",
  16414. "value": "3411"
  16415. }, {
  16416. "label": "阜阳市",
  16417. "value": "3412"
  16418. }, {
  16419. "label": "宿州市",
  16420. "value": "3413"
  16421. }, {
  16422. "label": "六安市",
  16423. "value": "3415"
  16424. }, {
  16425. "label": "亳州市",
  16426. "value": "3416"
  16427. }, {
  16428. "label": "池州市",
  16429. "value": "3417"
  16430. }, {
  16431. "label": "宣城市",
  16432. "value": "3418"
  16433. }], [{
  16434. "label": "福州市",
  16435. "value": "3501"
  16436. }, {
  16437. "label": "厦门市",
  16438. "value": "3502"
  16439. }, {
  16440. "label": "莆田市",
  16441. "value": "3503"
  16442. }, {
  16443. "label": "三明市",
  16444. "value": "3504"
  16445. }, {
  16446. "label": "泉州市",
  16447. "value": "3505"
  16448. }, {
  16449. "label": "漳州市",
  16450. "value": "3506"
  16451. }, {
  16452. "label": "南平市",
  16453. "value": "3507"
  16454. }, {
  16455. "label": "龙岩市",
  16456. "value": "3508"
  16457. }, {
  16458. "label": "宁德市",
  16459. "value": "3509"
  16460. }], [{
  16461. "label": "南昌市",
  16462. "value": "3601"
  16463. }, {
  16464. "label": "景德镇市",
  16465. "value": "3602"
  16466. }, {
  16467. "label": "萍乡市",
  16468. "value": "3603"
  16469. }, {
  16470. "label": "九江市",
  16471. "value": "3604"
  16472. }, {
  16473. "label": "新余市",
  16474. "value": "3605"
  16475. }, {
  16476. "label": "鹰潭市",
  16477. "value": "3606"
  16478. }, {
  16479. "label": "赣州市",
  16480. "value": "3607"
  16481. }, {
  16482. "label": "吉安市",
  16483. "value": "3608"
  16484. }, {
  16485. "label": "宜春市",
  16486. "value": "3609"
  16487. }, {
  16488. "label": "抚州市",
  16489. "value": "3610"
  16490. }, {
  16491. "label": "上饶市",
  16492. "value": "3611"
  16493. }], [{
  16494. "label": "济南市",
  16495. "value": "3701"
  16496. }, {
  16497. "label": "青岛市",
  16498. "value": "3702"
  16499. }, {
  16500. "label": "淄博市",
  16501. "value": "3703"
  16502. }, {
  16503. "label": "枣庄市",
  16504. "value": "3704"
  16505. }, {
  16506. "label": "东营市",
  16507. "value": "3705"
  16508. }, {
  16509. "label": "烟台市",
  16510. "value": "3706"
  16511. }, {
  16512. "label": "潍坊市",
  16513. "value": "3707"
  16514. }, {
  16515. "label": "济宁市",
  16516. "value": "3708"
  16517. }, {
  16518. "label": "泰安市",
  16519. "value": "3709"
  16520. }, {
  16521. "label": "威海市",
  16522. "value": "3710"
  16523. }, {
  16524. "label": "日照市",
  16525. "value": "3711"
  16526. }, {
  16527. "label": "莱芜市",
  16528. "value": "3712"
  16529. }, {
  16530. "label": "临沂市",
  16531. "value": "3713"
  16532. }, {
  16533. "label": "德州市",
  16534. "value": "3714"
  16535. }, {
  16536. "label": "聊城市",
  16537. "value": "3715"
  16538. }, {
  16539. "label": "滨州市",
  16540. "value": "3716"
  16541. }, {
  16542. "label": "菏泽市",
  16543. "value": "3717"
  16544. }], [{
  16545. "label": "郑州市",
  16546. "value": "4101"
  16547. }, {
  16548. "label": "开封市",
  16549. "value": "4102"
  16550. }, {
  16551. "label": "洛阳市",
  16552. "value": "4103"
  16553. }, {
  16554. "label": "平顶山市",
  16555. "value": "4104"
  16556. }, {
  16557. "label": "安阳市",
  16558. "value": "4105"
  16559. }, {
  16560. "label": "鹤壁市",
  16561. "value": "4106"
  16562. }, {
  16563. "label": "新乡市",
  16564. "value": "4107"
  16565. }, {
  16566. "label": "焦作市",
  16567. "value": "4108"
  16568. }, {
  16569. "label": "濮阳市",
  16570. "value": "4109"
  16571. }, {
  16572. "label": "许昌市",
  16573. "value": "4110"
  16574. }, {
  16575. "label": "漯河市",
  16576. "value": "4111"
  16577. }, {
  16578. "label": "三门峡市",
  16579. "value": "4112"
  16580. }, {
  16581. "label": "南阳市",
  16582. "value": "4113"
  16583. }, {
  16584. "label": "商丘市",
  16585. "value": "4114"
  16586. }, {
  16587. "label": "信阳市",
  16588. "value": "4115"
  16589. }, {
  16590. "label": "周口市",
  16591. "value": "4116"
  16592. }, {
  16593. "label": "驻马店市",
  16594. "value": "4117"
  16595. }, {
  16596. "label": "省直辖县级行政区划",
  16597. "value": "4190"
  16598. }], [{
  16599. "label": "武汉市",
  16600. "value": "4201"
  16601. }, {
  16602. "label": "黄石市",
  16603. "value": "4202"
  16604. }, {
  16605. "label": "十堰市",
  16606. "value": "4203"
  16607. }, {
  16608. "label": "宜昌市",
  16609. "value": "4205"
  16610. }, {
  16611. "label": "襄阳市",
  16612. "value": "4206"
  16613. }, {
  16614. "label": "鄂州市",
  16615. "value": "4207"
  16616. }, {
  16617. "label": "荆门市",
  16618. "value": "4208"
  16619. }, {
  16620. "label": "孝感市",
  16621. "value": "4209"
  16622. }, {
  16623. "label": "荆州市",
  16624. "value": "4210"
  16625. }, {
  16626. "label": "黄冈市",
  16627. "value": "4211"
  16628. }, {
  16629. "label": "咸宁市",
  16630. "value": "4212"
  16631. }, {
  16632. "label": "随州市",
  16633. "value": "4213"
  16634. }, {
  16635. "label": "恩施土家族苗族自治州",
  16636. "value": "4228"
  16637. }, {
  16638. "label": "省直辖县级行政区划",
  16639. "value": "4290"
  16640. }], [{
  16641. "label": "长沙市",
  16642. "value": "4301"
  16643. }, {
  16644. "label": "株洲市",
  16645. "value": "4302"
  16646. }, {
  16647. "label": "湘潭市",
  16648. "value": "4303"
  16649. }, {
  16650. "label": "衡阳市",
  16651. "value": "4304"
  16652. }, {
  16653. "label": "邵阳市",
  16654. "value": "4305"
  16655. }, {
  16656. "label": "岳阳市",
  16657. "value": "4306"
  16658. }, {
  16659. "label": "常德市",
  16660. "value": "4307"
  16661. }, {
  16662. "label": "张家界市",
  16663. "value": "4308"
  16664. }, {
  16665. "label": "益阳市",
  16666. "value": "4309"
  16667. }, {
  16668. "label": "郴州市",
  16669. "value": "4310"
  16670. }, {
  16671. "label": "永州市",
  16672. "value": "4311"
  16673. }, {
  16674. "label": "怀化市",
  16675. "value": "4312"
  16676. }, {
  16677. "label": "娄底市",
  16678. "value": "4313"
  16679. }, {
  16680. "label": "湘西土家族苗族自治州",
  16681. "value": "4331"
  16682. }], [{
  16683. "label": "广州市",
  16684. "value": "4401"
  16685. }, {
  16686. "label": "韶关市",
  16687. "value": "4402"
  16688. }, {
  16689. "label": "深圳市",
  16690. "value": "4403"
  16691. }, {
  16692. "label": "珠海市",
  16693. "value": "4404"
  16694. }, {
  16695. "label": "汕头市",
  16696. "value": "4405"
  16697. }, {
  16698. "label": "佛山市",
  16699. "value": "4406"
  16700. }, {
  16701. "label": "江门市",
  16702. "value": "4407"
  16703. }, {
  16704. "label": "湛江市",
  16705. "value": "4408"
  16706. }, {
  16707. "label": "茂名市",
  16708. "value": "4409"
  16709. }, {
  16710. "label": "肇庆市",
  16711. "value": "4412"
  16712. }, {
  16713. "label": "惠州市",
  16714. "value": "4413"
  16715. }, {
  16716. "label": "梅州市",
  16717. "value": "4414"
  16718. }, {
  16719. "label": "汕尾市",
  16720. "value": "4415"
  16721. }, {
  16722. "label": "河源市",
  16723. "value": "4416"
  16724. }, {
  16725. "label": "阳江市",
  16726. "value": "4417"
  16727. }, {
  16728. "label": "清远市",
  16729. "value": "4418"
  16730. }, {
  16731. "label": "东莞市",
  16732. "value": "4419"
  16733. }, {
  16734. "label": "中山市",
  16735. "value": "4420"
  16736. }, {
  16737. "label": "潮州市",
  16738. "value": "4451"
  16739. }, {
  16740. "label": "揭阳市",
  16741. "value": "4452"
  16742. }, {
  16743. "label": "云浮市",
  16744. "value": "4453"
  16745. }], [{
  16746. "label": "南宁市",
  16747. "value": "4501"
  16748. }, {
  16749. "label": "柳州市",
  16750. "value": "4502"
  16751. }, {
  16752. "label": "桂林市",
  16753. "value": "4503"
  16754. }, {
  16755. "label": "梧州市",
  16756. "value": "4504"
  16757. }, {
  16758. "label": "北海市",
  16759. "value": "4505"
  16760. }, {
  16761. "label": "防城港市",
  16762. "value": "4506"
  16763. }, {
  16764. "label": "钦州市",
  16765. "value": "4507"
  16766. }, {
  16767. "label": "贵港市",
  16768. "value": "4508"
  16769. }, {
  16770. "label": "玉林市",
  16771. "value": "4509"
  16772. }, {
  16773. "label": "百色市",
  16774. "value": "4510"
  16775. }, {
  16776. "label": "贺州市",
  16777. "value": "4511"
  16778. }, {
  16779. "label": "河池市",
  16780. "value": "4512"
  16781. }, {
  16782. "label": "来宾市",
  16783. "value": "4513"
  16784. }, {
  16785. "label": "崇左市",
  16786. "value": "4514"
  16787. }], [{
  16788. "label": "海口市",
  16789. "value": "4601"
  16790. }, {
  16791. "label": "三亚市",
  16792. "value": "4602"
  16793. }, {
  16794. "label": "三沙市",
  16795. "value": "4603"
  16796. }, {
  16797. "label": "儋州市",
  16798. "value": "4604"
  16799. }, {
  16800. "label": "省直辖县级行政区划",
  16801. "value": "4690"
  16802. }], [{
  16803. "label": "市辖区",
  16804. "value": "5001"
  16805. }, {
  16806. "label": "县",
  16807. "value": "5002"
  16808. }], [{
  16809. "label": "成都市",
  16810. "value": "5101"
  16811. }, {
  16812. "label": "自贡市",
  16813. "value": "5103"
  16814. }, {
  16815. "label": "攀枝花市",
  16816. "value": "5104"
  16817. }, {
  16818. "label": "泸州市",
  16819. "value": "5105"
  16820. }, {
  16821. "label": "德阳市",
  16822. "value": "5106"
  16823. }, {
  16824. "label": "绵阳市",
  16825. "value": "5107"
  16826. }, {
  16827. "label": "广元市",
  16828. "value": "5108"
  16829. }, {
  16830. "label": "遂宁市",
  16831. "value": "5109"
  16832. }, {
  16833. "label": "内江市",
  16834. "value": "5110"
  16835. }, {
  16836. "label": "乐山市",
  16837. "value": "5111"
  16838. }, {
  16839. "label": "南充市",
  16840. "value": "5113"
  16841. }, {
  16842. "label": "眉山市",
  16843. "value": "5114"
  16844. }, {
  16845. "label": "宜宾市",
  16846. "value": "5115"
  16847. }, {
  16848. "label": "广安市",
  16849. "value": "5116"
  16850. }, {
  16851. "label": "达州市",
  16852. "value": "5117"
  16853. }, {
  16854. "label": "雅安市",
  16855. "value": "5118"
  16856. }, {
  16857. "label": "巴中市",
  16858. "value": "5119"
  16859. }, {
  16860. "label": "资阳市",
  16861. "value": "5120"
  16862. }, {
  16863. "label": "阿坝藏族羌族自治州",
  16864. "value": "5132"
  16865. }, {
  16866. "label": "甘孜藏族自治州",
  16867. "value": "5133"
  16868. }, {
  16869. "label": "凉山彝族自治州",
  16870. "value": "5134"
  16871. }], [{
  16872. "label": "贵阳市",
  16873. "value": "5201"
  16874. }, {
  16875. "label": "六盘水市",
  16876. "value": "5202"
  16877. }, {
  16878. "label": "遵义市",
  16879. "value": "5203"
  16880. }, {
  16881. "label": "安顺市",
  16882. "value": "5204"
  16883. }, {
  16884. "label": "毕节市",
  16885. "value": "5205"
  16886. }, {
  16887. "label": "铜仁市",
  16888. "value": "5206"
  16889. }, {
  16890. "label": "黔西南布依族苗族自治州",
  16891. "value": "5223"
  16892. }, {
  16893. "label": "黔东南苗族侗族自治州",
  16894. "value": "5226"
  16895. }, {
  16896. "label": "黔南布依族苗族自治州",
  16897. "value": "5227"
  16898. }], [{
  16899. "label": "昆明市",
  16900. "value": "5301"
  16901. }, {
  16902. "label": "曲靖市",
  16903. "value": "5303"
  16904. }, {
  16905. "label": "玉溪市",
  16906. "value": "5304"
  16907. }, {
  16908. "label": "保山市",
  16909. "value": "5305"
  16910. }, {
  16911. "label": "昭通市",
  16912. "value": "5306"
  16913. }, {
  16914. "label": "丽江市",
  16915. "value": "5307"
  16916. }, {
  16917. "label": "普洱市",
  16918. "value": "5308"
  16919. }, {
  16920. "label": "临沧市",
  16921. "value": "5309"
  16922. }, {
  16923. "label": "楚雄彝族自治州",
  16924. "value": "5323"
  16925. }, {
  16926. "label": "红河哈尼族彝族自治州",
  16927. "value": "5325"
  16928. }, {
  16929. "label": "文山壮族苗族自治州",
  16930. "value": "5326"
  16931. }, {
  16932. "label": "西双版纳傣族自治州",
  16933. "value": "5328"
  16934. }, {
  16935. "label": "大理白族自治州",
  16936. "value": "5329"
  16937. }, {
  16938. "label": "德宏傣族景颇族自治州",
  16939. "value": "5331"
  16940. }, {
  16941. "label": "怒江傈僳族自治州",
  16942. "value": "5333"
  16943. }, {
  16944. "label": "迪庆藏族自治州",
  16945. "value": "5334"
  16946. }], [{
  16947. "label": "拉萨市",
  16948. "value": "5401"
  16949. }, {
  16950. "label": "日喀则市",
  16951. "value": "5402"
  16952. }, {
  16953. "label": "昌都市",
  16954. "value": "5403"
  16955. }, {
  16956. "label": "林芝市",
  16957. "value": "5404"
  16958. }, {
  16959. "label": "山南市",
  16960. "value": "5405"
  16961. }, {
  16962. "label": "那曲地区",
  16963. "value": "5424"
  16964. }, {
  16965. "label": "阿里地区",
  16966. "value": "5425"
  16967. }], [{
  16968. "label": "西安市",
  16969. "value": "6101"
  16970. }, {
  16971. "label": "铜川市",
  16972. "value": "6102"
  16973. }, {
  16974. "label": "宝鸡市",
  16975. "value": "6103"
  16976. }, {
  16977. "label": "咸阳市",
  16978. "value": "6104"
  16979. }, {
  16980. "label": "渭南市",
  16981. "value": "6105"
  16982. }, {
  16983. "label": "延安市",
  16984. "value": "6106"
  16985. }, {
  16986. "label": "汉中市",
  16987. "value": "6107"
  16988. }, {
  16989. "label": "榆林市",
  16990. "value": "6108"
  16991. }, {
  16992. "label": "安康市",
  16993. "value": "6109"
  16994. }, {
  16995. "label": "商洛市",
  16996. "value": "6110"
  16997. }], [{
  16998. "label": "兰州市",
  16999. "value": "6201"
  17000. }, {
  17001. "label": "嘉峪关市",
  17002. "value": "6202"
  17003. }, {
  17004. "label": "金昌市",
  17005. "value": "6203"
  17006. }, {
  17007. "label": "白银市",
  17008. "value": "6204"
  17009. }, {
  17010. "label": "天水市",
  17011. "value": "6205"
  17012. }, {
  17013. "label": "武威市",
  17014. "value": "6206"
  17015. }, {
  17016. "label": "张掖市",
  17017. "value": "6207"
  17018. }, {
  17019. "label": "平凉市",
  17020. "value": "6208"
  17021. }, {
  17022. "label": "酒泉市",
  17023. "value": "6209"
  17024. }, {
  17025. "label": "庆阳市",
  17026. "value": "6210"
  17027. }, {
  17028. "label": "定西市",
  17029. "value": "6211"
  17030. }, {
  17031. "label": "陇南市",
  17032. "value": "6212"
  17033. }, {
  17034. "label": "临夏回族自治州",
  17035. "value": "6229"
  17036. }, {
  17037. "label": "甘南藏族自治州",
  17038. "value": "6230"
  17039. }], [{
  17040. "label": "西宁市",
  17041. "value": "6301"
  17042. }, {
  17043. "label": "海东市",
  17044. "value": "6302"
  17045. }, {
  17046. "label": "海北藏族自治州",
  17047. "value": "6322"
  17048. }, {
  17049. "label": "黄南藏族自治州",
  17050. "value": "6323"
  17051. }, {
  17052. "label": "海南藏族自治州",
  17053. "value": "6325"
  17054. }, {
  17055. "label": "果洛藏族自治州",
  17056. "value": "6326"
  17057. }, {
  17058. "label": "玉树藏族自治州",
  17059. "value": "6327"
  17060. }, {
  17061. "label": "海西蒙古族藏族自治州",
  17062. "value": "6328"
  17063. }], [{
  17064. "label": "银川市",
  17065. "value": "6401"
  17066. }, {
  17067. "label": "石嘴山市",
  17068. "value": "6402"
  17069. }, {
  17070. "label": "吴忠市",
  17071. "value": "6403"
  17072. }, {
  17073. "label": "固原市",
  17074. "value": "6404"
  17075. }, {
  17076. "label": "中卫市",
  17077. "value": "6405"
  17078. }], [{
  17079. "label": "乌鲁木齐市",
  17080. "value": "6501"
  17081. }, {
  17082. "label": "克拉玛依市",
  17083. "value": "6502"
  17084. }, {
  17085. "label": "吐鲁番市",
  17086. "value": "6504"
  17087. }, {
  17088. "label": "哈密市",
  17089. "value": "6505"
  17090. }, {
  17091. "label": "昌吉回族自治州",
  17092. "value": "6523"
  17093. }, {
  17094. "label": "博尔塔拉蒙古自治州",
  17095. "value": "6527"
  17096. }, {
  17097. "label": "巴音郭楞蒙古自治州",
  17098. "value": "6528"
  17099. }, {
  17100. "label": "阿克苏地区",
  17101. "value": "6529"
  17102. }, {
  17103. "label": "克孜勒苏柯尔克孜自治州",
  17104. "value": "6530"
  17105. }, {
  17106. "label": "喀什地区",
  17107. "value": "6531"
  17108. }, {
  17109. "label": "和田地区",
  17110. "value": "6532"
  17111. }, {
  17112. "label": "伊犁哈萨克自治州",
  17113. "value": "6540"
  17114. }, {
  17115. "label": "塔城地区",
  17116. "value": "6542"
  17117. }, {
  17118. "label": "阿勒泰地区",
  17119. "value": "6543"
  17120. }, {
  17121. "label": "自治区直辖县级行政区划",
  17122. "value": "6590"
  17123. }], [{
  17124. "label": "台北",
  17125. "value": "6601"
  17126. }, {
  17127. "label": "高雄",
  17128. "value": "6602"
  17129. }, {
  17130. "label": "基隆",
  17131. "value": "6603"
  17132. }, {
  17133. "label": "台中",
  17134. "value": "6604"
  17135. }, {
  17136. "label": "台南",
  17137. "value": "6605"
  17138. }, {
  17139. "label": "新竹",
  17140. "value": "6606"
  17141. }, {
  17142. "label": "嘉义",
  17143. "value": "6607"
  17144. }, {
  17145. "label": "宜兰",
  17146. "value": "6608"
  17147. }, {
  17148. "label": "桃园",
  17149. "value": "6609"
  17150. }, {
  17151. "label": "苗栗",
  17152. "value": "6610"
  17153. }, {
  17154. "label": "彰化",
  17155. "value": "6611"
  17156. }, {
  17157. "label": "南投",
  17158. "value": "6612"
  17159. }, {
  17160. "label": "云林",
  17161. "value": "6613"
  17162. }, {
  17163. "label": "屏东",
  17164. "value": "6614"
  17165. }, {
  17166. "label": "台东",
  17167. "value": "6615"
  17168. }, {
  17169. "label": "花莲",
  17170. "value": "6616"
  17171. }, {
  17172. "label": "澎湖",
  17173. "value": "6617"
  17174. }], [{
  17175. "label": "香港岛",
  17176. "value": "6701"
  17177. }, {
  17178. "label": "九龙",
  17179. "value": "6702"
  17180. }, {
  17181. "label": "新界",
  17182. "value": "6703"
  17183. }], [{
  17184. "label": "澳门半岛",
  17185. "value": "6801"
  17186. }, {
  17187. "label": "氹仔岛",
  17188. "value": "6802"
  17189. }, {
  17190. "label": "路环岛",
  17191. "value": "6803"
  17192. }, {
  17193. "label": "路氹城",
  17194. "value": "6804"
  17195. }]];
  17196. var _default = cityData;
  17197. exports.default = _default;
  17198. /***/ }),
  17199. /***/ 479:
  17200. /*!*************************************************************!*\
  17201. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/util/area.js ***!
  17202. \*************************************************************/
  17203. /*! no static exports found */
  17204. /***/ (function(module, exports, __webpack_require__) {
  17205. "use strict";
  17206. Object.defineProperty(exports, "__esModule", {
  17207. value: true
  17208. });
  17209. exports.default = void 0;
  17210. var areaData = [[[{
  17211. "label": "东城区",
  17212. "value": "110101"
  17213. }, {
  17214. "label": "西城区",
  17215. "value": "110102"
  17216. }, {
  17217. "label": "朝阳区",
  17218. "value": "110105"
  17219. }, {
  17220. "label": "丰台区",
  17221. "value": "110106"
  17222. }, {
  17223. "label": "石景山区",
  17224. "value": "110107"
  17225. }, {
  17226. "label": "海淀区",
  17227. "value": "110108"
  17228. }, {
  17229. "label": "门头沟区",
  17230. "value": "110109"
  17231. }, {
  17232. "label": "房山区",
  17233. "value": "110111"
  17234. }, {
  17235. "label": "通州区",
  17236. "value": "110112"
  17237. }, {
  17238. "label": "顺义区",
  17239. "value": "110113"
  17240. }, {
  17241. "label": "昌平区",
  17242. "value": "110114"
  17243. }, {
  17244. "label": "大兴区",
  17245. "value": "110115"
  17246. }, {
  17247. "label": "怀柔区",
  17248. "value": "110116"
  17249. }, {
  17250. "label": "平谷区",
  17251. "value": "110117"
  17252. }, {
  17253. "label": "密云区",
  17254. "value": "110118"
  17255. }, {
  17256. "label": "延庆区",
  17257. "value": "110119"
  17258. }]], [[{
  17259. "label": "和平区",
  17260. "value": "120101"
  17261. }, {
  17262. "label": "河东区",
  17263. "value": "120102"
  17264. }, {
  17265. "label": "河西区",
  17266. "value": "120103"
  17267. }, {
  17268. "label": "南开区",
  17269. "value": "120104"
  17270. }, {
  17271. "label": "河北区",
  17272. "value": "120105"
  17273. }, {
  17274. "label": "红桥区",
  17275. "value": "120106"
  17276. }, {
  17277. "label": "东丽区",
  17278. "value": "120110"
  17279. }, {
  17280. "label": "西青区",
  17281. "value": "120111"
  17282. }, {
  17283. "label": "津南区",
  17284. "value": "120112"
  17285. }, {
  17286. "label": "北辰区",
  17287. "value": "120113"
  17288. }, {
  17289. "label": "武清区",
  17290. "value": "120114"
  17291. }, {
  17292. "label": "宝坻区",
  17293. "value": "120115"
  17294. }, {
  17295. "label": "滨海新区",
  17296. "value": "120116"
  17297. }, {
  17298. "label": "宁河区",
  17299. "value": "120117"
  17300. }, {
  17301. "label": "静海区",
  17302. "value": "120118"
  17303. }, {
  17304. "label": "蓟州区",
  17305. "value": "120119"
  17306. }]], [[{
  17307. "label": "长安区",
  17308. "value": "130102"
  17309. }, {
  17310. "label": "桥西区",
  17311. "value": "130104"
  17312. }, {
  17313. "label": "新华区",
  17314. "value": "130105"
  17315. }, {
  17316. "label": "井陉矿区",
  17317. "value": "130107"
  17318. }, {
  17319. "label": "裕华区",
  17320. "value": "130108"
  17321. }, {
  17322. "label": "藁城区",
  17323. "value": "130109"
  17324. }, {
  17325. "label": "鹿泉区",
  17326. "value": "130110"
  17327. }, {
  17328. "label": "栾城区",
  17329. "value": "130111"
  17330. }, {
  17331. "label": "井陉县",
  17332. "value": "130121"
  17333. }, {
  17334. "label": "正定县",
  17335. "value": "130123"
  17336. }, {
  17337. "label": "行唐县",
  17338. "value": "130125"
  17339. }, {
  17340. "label": "灵寿县",
  17341. "value": "130126"
  17342. }, {
  17343. "label": "高邑县",
  17344. "value": "130127"
  17345. }, {
  17346. "label": "深泽县",
  17347. "value": "130128"
  17348. }, {
  17349. "label": "赞皇县",
  17350. "value": "130129"
  17351. }, {
  17352. "label": "无极县",
  17353. "value": "130130"
  17354. }, {
  17355. "label": "平山县",
  17356. "value": "130131"
  17357. }, {
  17358. "label": "元氏县",
  17359. "value": "130132"
  17360. }, {
  17361. "label": "赵县",
  17362. "value": "130133"
  17363. }, {
  17364. "label": "石家庄高新技术产业开发区",
  17365. "value": "130171"
  17366. }, {
  17367. "label": "石家庄循环化工园区",
  17368. "value": "130172"
  17369. }, {
  17370. "label": "辛集市",
  17371. "value": "130181"
  17372. }, {
  17373. "label": "晋州市",
  17374. "value": "130183"
  17375. }, {
  17376. "label": "新乐市",
  17377. "value": "130184"
  17378. }], [{
  17379. "label": "路南区",
  17380. "value": "130202"
  17381. }, {
  17382. "label": "路北区",
  17383. "value": "130203"
  17384. }, {
  17385. "label": "古冶区",
  17386. "value": "130204"
  17387. }, {
  17388. "label": "开平区",
  17389. "value": "130205"
  17390. }, {
  17391. "label": "丰南区",
  17392. "value": "130207"
  17393. }, {
  17394. "label": "丰润区",
  17395. "value": "130208"
  17396. }, {
  17397. "label": "曹妃甸区",
  17398. "value": "130209"
  17399. }, {
  17400. "label": "滦县",
  17401. "value": "130223"
  17402. }, {
  17403. "label": "滦南县",
  17404. "value": "130224"
  17405. }, {
  17406. "label": "乐亭县",
  17407. "value": "130225"
  17408. }, {
  17409. "label": "迁西县",
  17410. "value": "130227"
  17411. }, {
  17412. "label": "玉田县",
  17413. "value": "130229"
  17414. }, {
  17415. "label": "唐山市芦台经济技术开发区",
  17416. "value": "130271"
  17417. }, {
  17418. "label": "唐山市汉沽管理区",
  17419. "value": "130272"
  17420. }, {
  17421. "label": "唐山高新技术产业开发区",
  17422. "value": "130273"
  17423. }, {
  17424. "label": "河北唐山海港经济开发区",
  17425. "value": "130274"
  17426. }, {
  17427. "label": "遵化市",
  17428. "value": "130281"
  17429. }, {
  17430. "label": "迁安市",
  17431. "value": "130283"
  17432. }], [{
  17433. "label": "海港区",
  17434. "value": "130302"
  17435. }, {
  17436. "label": "山海关区",
  17437. "value": "130303"
  17438. }, {
  17439. "label": "北戴河区",
  17440. "value": "130304"
  17441. }, {
  17442. "label": "抚宁区",
  17443. "value": "130306"
  17444. }, {
  17445. "label": "青龙满族自治县",
  17446. "value": "130321"
  17447. }, {
  17448. "label": "昌黎县",
  17449. "value": "130322"
  17450. }, {
  17451. "label": "卢龙县",
  17452. "value": "130324"
  17453. }, {
  17454. "label": "秦皇岛市经济技术开发区",
  17455. "value": "130371"
  17456. }, {
  17457. "label": "北戴河新区",
  17458. "value": "130372"
  17459. }], [{
  17460. "label": "邯山区",
  17461. "value": "130402"
  17462. }, {
  17463. "label": "丛台区",
  17464. "value": "130403"
  17465. }, {
  17466. "label": "复兴区",
  17467. "value": "130404"
  17468. }, {
  17469. "label": "峰峰矿区",
  17470. "value": "130406"
  17471. }, {
  17472. "label": "肥乡区",
  17473. "value": "130407"
  17474. }, {
  17475. "label": "永年区",
  17476. "value": "130408"
  17477. }, {
  17478. "label": "临漳县",
  17479. "value": "130423"
  17480. }, {
  17481. "label": "成安县",
  17482. "value": "130424"
  17483. }, {
  17484. "label": "大名县",
  17485. "value": "130425"
  17486. }, {
  17487. "label": "涉县",
  17488. "value": "130426"
  17489. }, {
  17490. "label": "磁县",
  17491. "value": "130427"
  17492. }, {
  17493. "label": "邱县",
  17494. "value": "130430"
  17495. }, {
  17496. "label": "鸡泽县",
  17497. "value": "130431"
  17498. }, {
  17499. "label": "广平县",
  17500. "value": "130432"
  17501. }, {
  17502. "label": "馆陶县",
  17503. "value": "130433"
  17504. }, {
  17505. "label": "魏县",
  17506. "value": "130434"
  17507. }, {
  17508. "label": "曲周县",
  17509. "value": "130435"
  17510. }, {
  17511. "label": "邯郸经济技术开发区",
  17512. "value": "130471"
  17513. }, {
  17514. "label": "邯郸冀南新区",
  17515. "value": "130473"
  17516. }, {
  17517. "label": "武安市",
  17518. "value": "130481"
  17519. }], [{
  17520. "label": "桥东区",
  17521. "value": "130502"
  17522. }, {
  17523. "label": "桥西区",
  17524. "value": "130503"
  17525. }, {
  17526. "label": "邢台县",
  17527. "value": "130521"
  17528. }, {
  17529. "label": "临城县",
  17530. "value": "130522"
  17531. }, {
  17532. "label": "内丘县",
  17533. "value": "130523"
  17534. }, {
  17535. "label": "柏乡县",
  17536. "value": "130524"
  17537. }, {
  17538. "label": "隆尧县",
  17539. "value": "130525"
  17540. }, {
  17541. "label": "任县",
  17542. "value": "130526"
  17543. }, {
  17544. "label": "南和县",
  17545. "value": "130527"
  17546. }, {
  17547. "label": "宁晋县",
  17548. "value": "130528"
  17549. }, {
  17550. "label": "巨鹿县",
  17551. "value": "130529"
  17552. }, {
  17553. "label": "新河县",
  17554. "value": "130530"
  17555. }, {
  17556. "label": "广宗县",
  17557. "value": "130531"
  17558. }, {
  17559. "label": "平乡县",
  17560. "value": "130532"
  17561. }, {
  17562. "label": "威县",
  17563. "value": "130533"
  17564. }, {
  17565. "label": "清河县",
  17566. "value": "130534"
  17567. }, {
  17568. "label": "临西县",
  17569. "value": "130535"
  17570. }, {
  17571. "label": "河北邢台经济开发区",
  17572. "value": "130571"
  17573. }, {
  17574. "label": "南宫市",
  17575. "value": "130581"
  17576. }, {
  17577. "label": "沙河市",
  17578. "value": "130582"
  17579. }], [{
  17580. "label": "竞秀区",
  17581. "value": "130602"
  17582. }, {
  17583. "label": "莲池区",
  17584. "value": "130606"
  17585. }, {
  17586. "label": "满城区",
  17587. "value": "130607"
  17588. }, {
  17589. "label": "清苑区",
  17590. "value": "130608"
  17591. }, {
  17592. "label": "徐水区",
  17593. "value": "130609"
  17594. }, {
  17595. "label": "涞水县",
  17596. "value": "130623"
  17597. }, {
  17598. "label": "阜平县",
  17599. "value": "130624"
  17600. }, {
  17601. "label": "定兴县",
  17602. "value": "130626"
  17603. }, {
  17604. "label": "唐县",
  17605. "value": "130627"
  17606. }, {
  17607. "label": "高阳县",
  17608. "value": "130628"
  17609. }, {
  17610. "label": "容城县",
  17611. "value": "130629"
  17612. }, {
  17613. "label": "涞源县",
  17614. "value": "130630"
  17615. }, {
  17616. "label": "望都县",
  17617. "value": "130631"
  17618. }, {
  17619. "label": "安新县",
  17620. "value": "130632"
  17621. }, {
  17622. "label": "易县",
  17623. "value": "130633"
  17624. }, {
  17625. "label": "曲阳县",
  17626. "value": "130634"
  17627. }, {
  17628. "label": "蠡县",
  17629. "value": "130635"
  17630. }, {
  17631. "label": "顺平县",
  17632. "value": "130636"
  17633. }, {
  17634. "label": "博野县",
  17635. "value": "130637"
  17636. }, {
  17637. "label": "雄县",
  17638. "value": "130638"
  17639. }, {
  17640. "label": "保定高新技术产业开发区",
  17641. "value": "130671"
  17642. }, {
  17643. "label": "保定白沟新城",
  17644. "value": "130672"
  17645. }, {
  17646. "label": "涿州市",
  17647. "value": "130681"
  17648. }, {
  17649. "label": "定州市",
  17650. "value": "130682"
  17651. }, {
  17652. "label": "安国市",
  17653. "value": "130683"
  17654. }, {
  17655. "label": "高碑店市",
  17656. "value": "130684"
  17657. }], [{
  17658. "label": "桥东区",
  17659. "value": "130702"
  17660. }, {
  17661. "label": "桥西区",
  17662. "value": "130703"
  17663. }, {
  17664. "label": "宣化区",
  17665. "value": "130705"
  17666. }, {
  17667. "label": "下花园区",
  17668. "value": "130706"
  17669. }, {
  17670. "label": "万全区",
  17671. "value": "130708"
  17672. }, {
  17673. "label": "崇礼区",
  17674. "value": "130709"
  17675. }, {
  17676. "label": "张北县",
  17677. "value": "130722"
  17678. }, {
  17679. "label": "康保县",
  17680. "value": "130723"
  17681. }, {
  17682. "label": "沽源县",
  17683. "value": "130724"
  17684. }, {
  17685. "label": "尚义县",
  17686. "value": "130725"
  17687. }, {
  17688. "label": "蔚县",
  17689. "value": "130726"
  17690. }, {
  17691. "label": "阳原县",
  17692. "value": "130727"
  17693. }, {
  17694. "label": "怀安县",
  17695. "value": "130728"
  17696. }, {
  17697. "label": "怀来县",
  17698. "value": "130730"
  17699. }, {
  17700. "label": "涿鹿县",
  17701. "value": "130731"
  17702. }, {
  17703. "label": "赤城县",
  17704. "value": "130732"
  17705. }, {
  17706. "label": "张家口市高新技术产业开发区",
  17707. "value": "130771"
  17708. }, {
  17709. "label": "张家口市察北管理区",
  17710. "value": "130772"
  17711. }, {
  17712. "label": "张家口市塞北管理区",
  17713. "value": "130773"
  17714. }], [{
  17715. "label": "双桥区",
  17716. "value": "130802"
  17717. }, {
  17718. "label": "双滦区",
  17719. "value": "130803"
  17720. }, {
  17721. "label": "鹰手营子矿区",
  17722. "value": "130804"
  17723. }, {
  17724. "label": "承德县",
  17725. "value": "130821"
  17726. }, {
  17727. "label": "兴隆县",
  17728. "value": "130822"
  17729. }, {
  17730. "label": "滦平县",
  17731. "value": "130824"
  17732. }, {
  17733. "label": "隆化县",
  17734. "value": "130825"
  17735. }, {
  17736. "label": "丰宁满族自治县",
  17737. "value": "130826"
  17738. }, {
  17739. "label": "宽城满族自治县",
  17740. "value": "130827"
  17741. }, {
  17742. "label": "围场满族蒙古族自治县",
  17743. "value": "130828"
  17744. }, {
  17745. "label": "承德高新技术产业开发区",
  17746. "value": "130871"
  17747. }, {
  17748. "label": "平泉市",
  17749. "value": "130881"
  17750. }], [{
  17751. "label": "新华区",
  17752. "value": "130902"
  17753. }, {
  17754. "label": "运河区",
  17755. "value": "130903"
  17756. }, {
  17757. "label": "沧县",
  17758. "value": "130921"
  17759. }, {
  17760. "label": "青县",
  17761. "value": "130922"
  17762. }, {
  17763. "label": "东光县",
  17764. "value": "130923"
  17765. }, {
  17766. "label": "海兴县",
  17767. "value": "130924"
  17768. }, {
  17769. "label": "盐山县",
  17770. "value": "130925"
  17771. }, {
  17772. "label": "肃宁县",
  17773. "value": "130926"
  17774. }, {
  17775. "label": "南皮县",
  17776. "value": "130927"
  17777. }, {
  17778. "label": "吴桥县",
  17779. "value": "130928"
  17780. }, {
  17781. "label": "献县",
  17782. "value": "130929"
  17783. }, {
  17784. "label": "孟村回族自治县",
  17785. "value": "130930"
  17786. }, {
  17787. "label": "河北沧州经济开发区",
  17788. "value": "130971"
  17789. }, {
  17790. "label": "沧州高新技术产业开发区",
  17791. "value": "130972"
  17792. }, {
  17793. "label": "沧州渤海新区",
  17794. "value": "130973"
  17795. }, {
  17796. "label": "泊头市",
  17797. "value": "130981"
  17798. }, {
  17799. "label": "任丘市",
  17800. "value": "130982"
  17801. }, {
  17802. "label": "黄骅市",
  17803. "value": "130983"
  17804. }, {
  17805. "label": "河间市",
  17806. "value": "130984"
  17807. }], [{
  17808. "label": "安次区",
  17809. "value": "131002"
  17810. }, {
  17811. "label": "广阳区",
  17812. "value": "131003"
  17813. }, {
  17814. "label": "固安县",
  17815. "value": "131022"
  17816. }, {
  17817. "label": "永清县",
  17818. "value": "131023"
  17819. }, {
  17820. "label": "香河县",
  17821. "value": "131024"
  17822. }, {
  17823. "label": "大城县",
  17824. "value": "131025"
  17825. }, {
  17826. "label": "文安县",
  17827. "value": "131026"
  17828. }, {
  17829. "label": "大厂回族自治县",
  17830. "value": "131028"
  17831. }, {
  17832. "label": "廊坊经济技术开发区",
  17833. "value": "131071"
  17834. }, {
  17835. "label": "霸州市",
  17836. "value": "131081"
  17837. }, {
  17838. "label": "三河市",
  17839. "value": "131082"
  17840. }], [{
  17841. "label": "桃城区",
  17842. "value": "131102"
  17843. }, {
  17844. "label": "冀州区",
  17845. "value": "131103"
  17846. }, {
  17847. "label": "枣强县",
  17848. "value": "131121"
  17849. }, {
  17850. "label": "武邑县",
  17851. "value": "131122"
  17852. }, {
  17853. "label": "武强县",
  17854. "value": "131123"
  17855. }, {
  17856. "label": "饶阳县",
  17857. "value": "131124"
  17858. }, {
  17859. "label": "安平县",
  17860. "value": "131125"
  17861. }, {
  17862. "label": "故城县",
  17863. "value": "131126"
  17864. }, {
  17865. "label": "景县",
  17866. "value": "131127"
  17867. }, {
  17868. "label": "阜城县",
  17869. "value": "131128"
  17870. }, {
  17871. "label": "河北衡水经济开发区",
  17872. "value": "131171"
  17873. }, {
  17874. "label": "衡水滨湖新区",
  17875. "value": "131172"
  17876. }, {
  17877. "label": "深州市",
  17878. "value": "131182"
  17879. }]], [[{
  17880. "label": "小店区",
  17881. "value": "140105"
  17882. }, {
  17883. "label": "迎泽区",
  17884. "value": "140106"
  17885. }, {
  17886. "label": "杏花岭区",
  17887. "value": "140107"
  17888. }, {
  17889. "label": "尖草坪区",
  17890. "value": "140108"
  17891. }, {
  17892. "label": "万柏林区",
  17893. "value": "140109"
  17894. }, {
  17895. "label": "晋源区",
  17896. "value": "140110"
  17897. }, {
  17898. "label": "清徐县",
  17899. "value": "140121"
  17900. }, {
  17901. "label": "阳曲县",
  17902. "value": "140122"
  17903. }, {
  17904. "label": "娄烦县",
  17905. "value": "140123"
  17906. }, {
  17907. "label": "山西转型综合改革示范区",
  17908. "value": "140171"
  17909. }, {
  17910. "label": "古交市",
  17911. "value": "140181"
  17912. }], [{
  17913. "label": "城区",
  17914. "value": "140202"
  17915. }, {
  17916. "label": "矿区",
  17917. "value": "140203"
  17918. }, {
  17919. "label": "南郊区",
  17920. "value": "140211"
  17921. }, {
  17922. "label": "新荣区",
  17923. "value": "140212"
  17924. }, {
  17925. "label": "阳高县",
  17926. "value": "140221"
  17927. }, {
  17928. "label": "天镇县",
  17929. "value": "140222"
  17930. }, {
  17931. "label": "广灵县",
  17932. "value": "140223"
  17933. }, {
  17934. "label": "灵丘县",
  17935. "value": "140224"
  17936. }, {
  17937. "label": "浑源县",
  17938. "value": "140225"
  17939. }, {
  17940. "label": "左云县",
  17941. "value": "140226"
  17942. }, {
  17943. "label": "大同县",
  17944. "value": "140227"
  17945. }, {
  17946. "label": "山西大同经济开发区",
  17947. "value": "140271"
  17948. }], [{
  17949. "label": "城区",
  17950. "value": "140302"
  17951. }, {
  17952. "label": "矿区",
  17953. "value": "140303"
  17954. }, {
  17955. "label": "郊区",
  17956. "value": "140311"
  17957. }, {
  17958. "label": "平定县",
  17959. "value": "140321"
  17960. }, {
  17961. "label": "盂县",
  17962. "value": "140322"
  17963. }, {
  17964. "label": "山西阳泉经济开发区",
  17965. "value": "140371"
  17966. }], [{
  17967. "label": "城区",
  17968. "value": "140402"
  17969. }, {
  17970. "label": "郊区",
  17971. "value": "140411"
  17972. }, {
  17973. "label": "长治县",
  17974. "value": "140421"
  17975. }, {
  17976. "label": "襄垣县",
  17977. "value": "140423"
  17978. }, {
  17979. "label": "屯留县",
  17980. "value": "140424"
  17981. }, {
  17982. "label": "平顺县",
  17983. "value": "140425"
  17984. }, {
  17985. "label": "黎城县",
  17986. "value": "140426"
  17987. }, {
  17988. "label": "壶关县",
  17989. "value": "140427"
  17990. }, {
  17991. "label": "长子县",
  17992. "value": "140428"
  17993. }, {
  17994. "label": "武乡县",
  17995. "value": "140429"
  17996. }, {
  17997. "label": "沁县",
  17998. "value": "140430"
  17999. }, {
  18000. "label": "沁源县",
  18001. "value": "140431"
  18002. }, {
  18003. "label": "山西长治高新技术产业园区",
  18004. "value": "140471"
  18005. }, {
  18006. "label": "潞城市",
  18007. "value": "140481"
  18008. }], [{
  18009. "label": "城区",
  18010. "value": "140502"
  18011. }, {
  18012. "label": "沁水县",
  18013. "value": "140521"
  18014. }, {
  18015. "label": "阳城县",
  18016. "value": "140522"
  18017. }, {
  18018. "label": "陵川县",
  18019. "value": "140524"
  18020. }, {
  18021. "label": "泽州县",
  18022. "value": "140525"
  18023. }, {
  18024. "label": "高平市",
  18025. "value": "140581"
  18026. }], [{
  18027. "label": "朔城区",
  18028. "value": "140602"
  18029. }, {
  18030. "label": "平鲁区",
  18031. "value": "140603"
  18032. }, {
  18033. "label": "山阴县",
  18034. "value": "140621"
  18035. }, {
  18036. "label": "应县",
  18037. "value": "140622"
  18038. }, {
  18039. "label": "右玉县",
  18040. "value": "140623"
  18041. }, {
  18042. "label": "怀仁县",
  18043. "value": "140624"
  18044. }, {
  18045. "label": "山西朔州经济开发区",
  18046. "value": "140671"
  18047. }], [{
  18048. "label": "榆次区",
  18049. "value": "140702"
  18050. }, {
  18051. "label": "榆社县",
  18052. "value": "140721"
  18053. }, {
  18054. "label": "左权县",
  18055. "value": "140722"
  18056. }, {
  18057. "label": "和顺县",
  18058. "value": "140723"
  18059. }, {
  18060. "label": "昔阳县",
  18061. "value": "140724"
  18062. }, {
  18063. "label": "寿阳县",
  18064. "value": "140725"
  18065. }, {
  18066. "label": "太谷县",
  18067. "value": "140726"
  18068. }, {
  18069. "label": "祁县",
  18070. "value": "140727"
  18071. }, {
  18072. "label": "平遥县",
  18073. "value": "140728"
  18074. }, {
  18075. "label": "灵石县",
  18076. "value": "140729"
  18077. }, {
  18078. "label": "介休市",
  18079. "value": "140781"
  18080. }], [{
  18081. "label": "盐湖区",
  18082. "value": "140802"
  18083. }, {
  18084. "label": "临猗县",
  18085. "value": "140821"
  18086. }, {
  18087. "label": "万荣县",
  18088. "value": "140822"
  18089. }, {
  18090. "label": "闻喜县",
  18091. "value": "140823"
  18092. }, {
  18093. "label": "稷山县",
  18094. "value": "140824"
  18095. }, {
  18096. "label": "新绛县",
  18097. "value": "140825"
  18098. }, {
  18099. "label": "绛县",
  18100. "value": "140826"
  18101. }, {
  18102. "label": "垣曲县",
  18103. "value": "140827"
  18104. }, {
  18105. "label": "夏县",
  18106. "value": "140828"
  18107. }, {
  18108. "label": "平陆县",
  18109. "value": "140829"
  18110. }, {
  18111. "label": "芮城县",
  18112. "value": "140830"
  18113. }, {
  18114. "label": "永济市",
  18115. "value": "140881"
  18116. }, {
  18117. "label": "河津市",
  18118. "value": "140882"
  18119. }], [{
  18120. "label": "忻府区",
  18121. "value": "140902"
  18122. }, {
  18123. "label": "定襄县",
  18124. "value": "140921"
  18125. }, {
  18126. "label": "五台县",
  18127. "value": "140922"
  18128. }, {
  18129. "label": "代县",
  18130. "value": "140923"
  18131. }, {
  18132. "label": "繁峙县",
  18133. "value": "140924"
  18134. }, {
  18135. "label": "宁武县",
  18136. "value": "140925"
  18137. }, {
  18138. "label": "静乐县",
  18139. "value": "140926"
  18140. }, {
  18141. "label": "神池县",
  18142. "value": "140927"
  18143. }, {
  18144. "label": "五寨县",
  18145. "value": "140928"
  18146. }, {
  18147. "label": "岢岚县",
  18148. "value": "140929"
  18149. }, {
  18150. "label": "河曲县",
  18151. "value": "140930"
  18152. }, {
  18153. "label": "保德县",
  18154. "value": "140931"
  18155. }, {
  18156. "label": "偏关县",
  18157. "value": "140932"
  18158. }, {
  18159. "label": "五台山风景名胜区",
  18160. "value": "140971"
  18161. }, {
  18162. "label": "原平市",
  18163. "value": "140981"
  18164. }], [{
  18165. "label": "尧都区",
  18166. "value": "141002"
  18167. }, {
  18168. "label": "曲沃县",
  18169. "value": "141021"
  18170. }, {
  18171. "label": "翼城县",
  18172. "value": "141022"
  18173. }, {
  18174. "label": "襄汾县",
  18175. "value": "141023"
  18176. }, {
  18177. "label": "洪洞县",
  18178. "value": "141024"
  18179. }, {
  18180. "label": "古县",
  18181. "value": "141025"
  18182. }, {
  18183. "label": "安泽县",
  18184. "value": "141026"
  18185. }, {
  18186. "label": "浮山县",
  18187. "value": "141027"
  18188. }, {
  18189. "label": "吉县",
  18190. "value": "141028"
  18191. }, {
  18192. "label": "乡宁县",
  18193. "value": "141029"
  18194. }, {
  18195. "label": "大宁县",
  18196. "value": "141030"
  18197. }, {
  18198. "label": "隰县",
  18199. "value": "141031"
  18200. }, {
  18201. "label": "永和县",
  18202. "value": "141032"
  18203. }, {
  18204. "label": "蒲县",
  18205. "value": "141033"
  18206. }, {
  18207. "label": "汾西县",
  18208. "value": "141034"
  18209. }, {
  18210. "label": "侯马市",
  18211. "value": "141081"
  18212. }, {
  18213. "label": "霍州市",
  18214. "value": "141082"
  18215. }], [{
  18216. "label": "离石区",
  18217. "value": "141102"
  18218. }, {
  18219. "label": "文水县",
  18220. "value": "141121"
  18221. }, {
  18222. "label": "交城县",
  18223. "value": "141122"
  18224. }, {
  18225. "label": "兴县",
  18226. "value": "141123"
  18227. }, {
  18228. "label": "临县",
  18229. "value": "141124"
  18230. }, {
  18231. "label": "柳林县",
  18232. "value": "141125"
  18233. }, {
  18234. "label": "石楼县",
  18235. "value": "141126"
  18236. }, {
  18237. "label": "岚县",
  18238. "value": "141127"
  18239. }, {
  18240. "label": "方山县",
  18241. "value": "141128"
  18242. }, {
  18243. "label": "中阳县",
  18244. "value": "141129"
  18245. }, {
  18246. "label": "交口县",
  18247. "value": "141130"
  18248. }, {
  18249. "label": "孝义市",
  18250. "value": "141181"
  18251. }, {
  18252. "label": "汾阳市",
  18253. "value": "141182"
  18254. }]], [[{
  18255. "label": "新城区",
  18256. "value": "150102"
  18257. }, {
  18258. "label": "回民区",
  18259. "value": "150103"
  18260. }, {
  18261. "label": "玉泉区",
  18262. "value": "150104"
  18263. }, {
  18264. "label": "赛罕区",
  18265. "value": "150105"
  18266. }, {
  18267. "label": "土默特左旗",
  18268. "value": "150121"
  18269. }, {
  18270. "label": "托克托县",
  18271. "value": "150122"
  18272. }, {
  18273. "label": "和林格尔县",
  18274. "value": "150123"
  18275. }, {
  18276. "label": "清水河县",
  18277. "value": "150124"
  18278. }, {
  18279. "label": "武川县",
  18280. "value": "150125"
  18281. }, {
  18282. "label": "呼和浩特金海工业园区",
  18283. "value": "150171"
  18284. }, {
  18285. "label": "呼和浩特经济技术开发区",
  18286. "value": "150172"
  18287. }], [{
  18288. "label": "东河区",
  18289. "value": "150202"
  18290. }, {
  18291. "label": "昆都仑区",
  18292. "value": "150203"
  18293. }, {
  18294. "label": "青山区",
  18295. "value": "150204"
  18296. }, {
  18297. "label": "石拐区",
  18298. "value": "150205"
  18299. }, {
  18300. "label": "白云鄂博矿区",
  18301. "value": "150206"
  18302. }, {
  18303. "label": "九原区",
  18304. "value": "150207"
  18305. }, {
  18306. "label": "土默特右旗",
  18307. "value": "150221"
  18308. }, {
  18309. "label": "固阳县",
  18310. "value": "150222"
  18311. }, {
  18312. "label": "达尔罕茂明安联合旗",
  18313. "value": "150223"
  18314. }, {
  18315. "label": "包头稀土高新技术产业开发区",
  18316. "value": "150271"
  18317. }], [{
  18318. "label": "海勃湾区",
  18319. "value": "150302"
  18320. }, {
  18321. "label": "海南区",
  18322. "value": "150303"
  18323. }, {
  18324. "label": "乌达区",
  18325. "value": "150304"
  18326. }], [{
  18327. "label": "红山区",
  18328. "value": "150402"
  18329. }, {
  18330. "label": "元宝山区",
  18331. "value": "150403"
  18332. }, {
  18333. "label": "松山区",
  18334. "value": "150404"
  18335. }, {
  18336. "label": "阿鲁科尔沁旗",
  18337. "value": "150421"
  18338. }, {
  18339. "label": "巴林左旗",
  18340. "value": "150422"
  18341. }, {
  18342. "label": "巴林右旗",
  18343. "value": "150423"
  18344. }, {
  18345. "label": "林西县",
  18346. "value": "150424"
  18347. }, {
  18348. "label": "克什克腾旗",
  18349. "value": "150425"
  18350. }, {
  18351. "label": "翁牛特旗",
  18352. "value": "150426"
  18353. }, {
  18354. "label": "喀喇沁旗",
  18355. "value": "150428"
  18356. }, {
  18357. "label": "宁城县",
  18358. "value": "150429"
  18359. }, {
  18360. "label": "敖汉旗",
  18361. "value": "150430"
  18362. }], [{
  18363. "label": "科尔沁区",
  18364. "value": "150502"
  18365. }, {
  18366. "label": "科尔沁左翼中旗",
  18367. "value": "150521"
  18368. }, {
  18369. "label": "科尔沁左翼后旗",
  18370. "value": "150522"
  18371. }, {
  18372. "label": "开鲁县",
  18373. "value": "150523"
  18374. }, {
  18375. "label": "库伦旗",
  18376. "value": "150524"
  18377. }, {
  18378. "label": "奈曼旗",
  18379. "value": "150525"
  18380. }, {
  18381. "label": "扎鲁特旗",
  18382. "value": "150526"
  18383. }, {
  18384. "label": "通辽经济技术开发区",
  18385. "value": "150571"
  18386. }, {
  18387. "label": "霍林郭勒市",
  18388. "value": "150581"
  18389. }], [{
  18390. "label": "东胜区",
  18391. "value": "150602"
  18392. }, {
  18393. "label": "康巴什区",
  18394. "value": "150603"
  18395. }, {
  18396. "label": "达拉特旗",
  18397. "value": "150621"
  18398. }, {
  18399. "label": "准格尔旗",
  18400. "value": "150622"
  18401. }, {
  18402. "label": "鄂托克前旗",
  18403. "value": "150623"
  18404. }, {
  18405. "label": "鄂托克旗",
  18406. "value": "150624"
  18407. }, {
  18408. "label": "杭锦旗",
  18409. "value": "150625"
  18410. }, {
  18411. "label": "乌审旗",
  18412. "value": "150626"
  18413. }, {
  18414. "label": "伊金霍洛旗",
  18415. "value": "150627"
  18416. }], [{
  18417. "label": "海拉尔区",
  18418. "value": "150702"
  18419. }, {
  18420. "label": "扎赉诺尔区",
  18421. "value": "150703"
  18422. }, {
  18423. "label": "阿荣旗",
  18424. "value": "150721"
  18425. }, {
  18426. "label": "莫力达瓦达斡尔族自治旗",
  18427. "value": "150722"
  18428. }, {
  18429. "label": "鄂伦春自治旗",
  18430. "value": "150723"
  18431. }, {
  18432. "label": "鄂温克族自治旗",
  18433. "value": "150724"
  18434. }, {
  18435. "label": "陈巴尔虎旗",
  18436. "value": "150725"
  18437. }, {
  18438. "label": "新巴尔虎左旗",
  18439. "value": "150726"
  18440. }, {
  18441. "label": "新巴尔虎右旗",
  18442. "value": "150727"
  18443. }, {
  18444. "label": "满洲里市",
  18445. "value": "150781"
  18446. }, {
  18447. "label": "牙克石市",
  18448. "value": "150782"
  18449. }, {
  18450. "label": "扎兰屯市",
  18451. "value": "150783"
  18452. }, {
  18453. "label": "额尔古纳市",
  18454. "value": "150784"
  18455. }, {
  18456. "label": "根河市",
  18457. "value": "150785"
  18458. }], [{
  18459. "label": "临河区",
  18460. "value": "150802"
  18461. }, {
  18462. "label": "五原县",
  18463. "value": "150821"
  18464. }, {
  18465. "label": "磴口县",
  18466. "value": "150822"
  18467. }, {
  18468. "label": "乌拉特前旗",
  18469. "value": "150823"
  18470. }, {
  18471. "label": "乌拉特中旗",
  18472. "value": "150824"
  18473. }, {
  18474. "label": "乌拉特后旗",
  18475. "value": "150825"
  18476. }, {
  18477. "label": "杭锦后旗",
  18478. "value": "150826"
  18479. }], [{
  18480. "label": "集宁区",
  18481. "value": "150902"
  18482. }, {
  18483. "label": "卓资县",
  18484. "value": "150921"
  18485. }, {
  18486. "label": "化德县",
  18487. "value": "150922"
  18488. }, {
  18489. "label": "商都县",
  18490. "value": "150923"
  18491. }, {
  18492. "label": "兴和县",
  18493. "value": "150924"
  18494. }, {
  18495. "label": "凉城县",
  18496. "value": "150925"
  18497. }, {
  18498. "label": "察哈尔右翼前旗",
  18499. "value": "150926"
  18500. }, {
  18501. "label": "察哈尔右翼中旗",
  18502. "value": "150927"
  18503. }, {
  18504. "label": "察哈尔右翼后旗",
  18505. "value": "150928"
  18506. }, {
  18507. "label": "四子王旗",
  18508. "value": "150929"
  18509. }, {
  18510. "label": "丰镇市",
  18511. "value": "150981"
  18512. }], [{
  18513. "label": "乌兰浩特市",
  18514. "value": "152201"
  18515. }, {
  18516. "label": "阿尔山市",
  18517. "value": "152202"
  18518. }, {
  18519. "label": "科尔沁右翼前旗",
  18520. "value": "152221"
  18521. }, {
  18522. "label": "科尔沁右翼中旗",
  18523. "value": "152222"
  18524. }, {
  18525. "label": "扎赉特旗",
  18526. "value": "152223"
  18527. }, {
  18528. "label": "突泉县",
  18529. "value": "152224"
  18530. }], [{
  18531. "label": "二连浩特市",
  18532. "value": "152501"
  18533. }, {
  18534. "label": "锡林浩特市",
  18535. "value": "152502"
  18536. }, {
  18537. "label": "阿巴嘎旗",
  18538. "value": "152522"
  18539. }, {
  18540. "label": "苏尼特左旗",
  18541. "value": "152523"
  18542. }, {
  18543. "label": "苏尼特右旗",
  18544. "value": "152524"
  18545. }, {
  18546. "label": "东乌珠穆沁旗",
  18547. "value": "152525"
  18548. }, {
  18549. "label": "西乌珠穆沁旗",
  18550. "value": "152526"
  18551. }, {
  18552. "label": "太仆寺旗",
  18553. "value": "152527"
  18554. }, {
  18555. "label": "镶黄旗",
  18556. "value": "152528"
  18557. }, {
  18558. "label": "正镶白旗",
  18559. "value": "152529"
  18560. }, {
  18561. "label": "正蓝旗",
  18562. "value": "152530"
  18563. }, {
  18564. "label": "多伦县",
  18565. "value": "152531"
  18566. }, {
  18567. "label": "乌拉盖管委会",
  18568. "value": "152571"
  18569. }], [{
  18570. "label": "阿拉善左旗",
  18571. "value": "152921"
  18572. }, {
  18573. "label": "阿拉善右旗",
  18574. "value": "152922"
  18575. }, {
  18576. "label": "额济纳旗",
  18577. "value": "152923"
  18578. }, {
  18579. "label": "内蒙古阿拉善经济开发区",
  18580. "value": "152971"
  18581. }]], [[{
  18582. "label": "和平区",
  18583. "value": "210102"
  18584. }, {
  18585. "label": "沈河区",
  18586. "value": "210103"
  18587. }, {
  18588. "label": "大东区",
  18589. "value": "210104"
  18590. }, {
  18591. "label": "皇姑区",
  18592. "value": "210105"
  18593. }, {
  18594. "label": "铁西区",
  18595. "value": "210106"
  18596. }, {
  18597. "label": "苏家屯区",
  18598. "value": "210111"
  18599. }, {
  18600. "label": "浑南区",
  18601. "value": "210112"
  18602. }, {
  18603. "label": "沈北新区",
  18604. "value": "210113"
  18605. }, {
  18606. "label": "于洪区",
  18607. "value": "210114"
  18608. }, {
  18609. "label": "辽中区",
  18610. "value": "210115"
  18611. }, {
  18612. "label": "康平县",
  18613. "value": "210123"
  18614. }, {
  18615. "label": "法库县",
  18616. "value": "210124"
  18617. }, {
  18618. "label": "新民市",
  18619. "value": "210181"
  18620. }], [{
  18621. "label": "中山区",
  18622. "value": "210202"
  18623. }, {
  18624. "label": "西岗区",
  18625. "value": "210203"
  18626. }, {
  18627. "label": "沙河口区",
  18628. "value": "210204"
  18629. }, {
  18630. "label": "甘井子区",
  18631. "value": "210211"
  18632. }, {
  18633. "label": "旅顺口区",
  18634. "value": "210212"
  18635. }, {
  18636. "label": "金州区",
  18637. "value": "210213"
  18638. }, {
  18639. "label": "普兰店区",
  18640. "value": "210214"
  18641. }, {
  18642. "label": "长海县",
  18643. "value": "210224"
  18644. }, {
  18645. "label": "瓦房店市",
  18646. "value": "210281"
  18647. }, {
  18648. "label": "庄河市",
  18649. "value": "210283"
  18650. }], [{
  18651. "label": "铁东区",
  18652. "value": "210302"
  18653. }, {
  18654. "label": "铁西区",
  18655. "value": "210303"
  18656. }, {
  18657. "label": "立山区",
  18658. "value": "210304"
  18659. }, {
  18660. "label": "千山区",
  18661. "value": "210311"
  18662. }, {
  18663. "label": "台安县",
  18664. "value": "210321"
  18665. }, {
  18666. "label": "岫岩满族自治县",
  18667. "value": "210323"
  18668. }, {
  18669. "label": "海城市",
  18670. "value": "210381"
  18671. }], [{
  18672. "label": "新抚区",
  18673. "value": "210402"
  18674. }, {
  18675. "label": "东洲区",
  18676. "value": "210403"
  18677. }, {
  18678. "label": "望花区",
  18679. "value": "210404"
  18680. }, {
  18681. "label": "顺城区",
  18682. "value": "210411"
  18683. }, {
  18684. "label": "抚顺县",
  18685. "value": "210421"
  18686. }, {
  18687. "label": "新宾满族自治县",
  18688. "value": "210422"
  18689. }, {
  18690. "label": "清原满族自治县",
  18691. "value": "210423"
  18692. }], [{
  18693. "label": "平山区",
  18694. "value": "210502"
  18695. }, {
  18696. "label": "溪湖区",
  18697. "value": "210503"
  18698. }, {
  18699. "label": "明山区",
  18700. "value": "210504"
  18701. }, {
  18702. "label": "南芬区",
  18703. "value": "210505"
  18704. }, {
  18705. "label": "本溪满族自治县",
  18706. "value": "210521"
  18707. }, {
  18708. "label": "桓仁满族自治县",
  18709. "value": "210522"
  18710. }], [{
  18711. "label": "元宝区",
  18712. "value": "210602"
  18713. }, {
  18714. "label": "振兴区",
  18715. "value": "210603"
  18716. }, {
  18717. "label": "振安区",
  18718. "value": "210604"
  18719. }, {
  18720. "label": "宽甸满族自治县",
  18721. "value": "210624"
  18722. }, {
  18723. "label": "东港市",
  18724. "value": "210681"
  18725. }, {
  18726. "label": "凤城市",
  18727. "value": "210682"
  18728. }], [{
  18729. "label": "古塔区",
  18730. "value": "210702"
  18731. }, {
  18732. "label": "凌河区",
  18733. "value": "210703"
  18734. }, {
  18735. "label": "太和区",
  18736. "value": "210711"
  18737. }, {
  18738. "label": "黑山县",
  18739. "value": "210726"
  18740. }, {
  18741. "label": "义县",
  18742. "value": "210727"
  18743. }, {
  18744. "label": "凌海市",
  18745. "value": "210781"
  18746. }, {
  18747. "label": "北镇市",
  18748. "value": "210782"
  18749. }], [{
  18750. "label": "站前区",
  18751. "value": "210802"
  18752. }, {
  18753. "label": "西市区",
  18754. "value": "210803"
  18755. }, {
  18756. "label": "鲅鱼圈区",
  18757. "value": "210804"
  18758. }, {
  18759. "label": "老边区",
  18760. "value": "210811"
  18761. }, {
  18762. "label": "盖州市",
  18763. "value": "210881"
  18764. }, {
  18765. "label": "大石桥市",
  18766. "value": "210882"
  18767. }], [{
  18768. "label": "海州区",
  18769. "value": "210902"
  18770. }, {
  18771. "label": "新邱区",
  18772. "value": "210903"
  18773. }, {
  18774. "label": "太平区",
  18775. "value": "210904"
  18776. }, {
  18777. "label": "清河门区",
  18778. "value": "210905"
  18779. }, {
  18780. "label": "细河区",
  18781. "value": "210911"
  18782. }, {
  18783. "label": "阜新蒙古族自治县",
  18784. "value": "210921"
  18785. }, {
  18786. "label": "彰武县",
  18787. "value": "210922"
  18788. }], [{
  18789. "label": "白塔区",
  18790. "value": "211002"
  18791. }, {
  18792. "label": "文圣区",
  18793. "value": "211003"
  18794. }, {
  18795. "label": "宏伟区",
  18796. "value": "211004"
  18797. }, {
  18798. "label": "弓长岭区",
  18799. "value": "211005"
  18800. }, {
  18801. "label": "太子河区",
  18802. "value": "211011"
  18803. }, {
  18804. "label": "辽阳县",
  18805. "value": "211021"
  18806. }, {
  18807. "label": "灯塔市",
  18808. "value": "211081"
  18809. }], [{
  18810. "label": "双台子区",
  18811. "value": "211102"
  18812. }, {
  18813. "label": "兴隆台区",
  18814. "value": "211103"
  18815. }, {
  18816. "label": "大洼区",
  18817. "value": "211104"
  18818. }, {
  18819. "label": "盘山县",
  18820. "value": "211122"
  18821. }], [{
  18822. "label": "银州区",
  18823. "value": "211202"
  18824. }, {
  18825. "label": "清河区",
  18826. "value": "211204"
  18827. }, {
  18828. "label": "铁岭县",
  18829. "value": "211221"
  18830. }, {
  18831. "label": "西丰县",
  18832. "value": "211223"
  18833. }, {
  18834. "label": "昌图县",
  18835. "value": "211224"
  18836. }, {
  18837. "label": "调兵山市",
  18838. "value": "211281"
  18839. }, {
  18840. "label": "开原市",
  18841. "value": "211282"
  18842. }], [{
  18843. "label": "双塔区",
  18844. "value": "211302"
  18845. }, {
  18846. "label": "龙城区",
  18847. "value": "211303"
  18848. }, {
  18849. "label": "朝阳县",
  18850. "value": "211321"
  18851. }, {
  18852. "label": "建平县",
  18853. "value": "211322"
  18854. }, {
  18855. "label": "喀喇沁左翼蒙古族自治县",
  18856. "value": "211324"
  18857. }, {
  18858. "label": "北票市",
  18859. "value": "211381"
  18860. }, {
  18861. "label": "凌源市",
  18862. "value": "211382"
  18863. }], [{
  18864. "label": "连山区",
  18865. "value": "211402"
  18866. }, {
  18867. "label": "龙港区",
  18868. "value": "211403"
  18869. }, {
  18870. "label": "南票区",
  18871. "value": "211404"
  18872. }, {
  18873. "label": "绥中县",
  18874. "value": "211421"
  18875. }, {
  18876. "label": "建昌县",
  18877. "value": "211422"
  18878. }, {
  18879. "label": "兴城市",
  18880. "value": "211481"
  18881. }]], [[{
  18882. "label": "南关区",
  18883. "value": "220102"
  18884. }, {
  18885. "label": "宽城区",
  18886. "value": "220103"
  18887. }, {
  18888. "label": "朝阳区",
  18889. "value": "220104"
  18890. }, {
  18891. "label": "二道区",
  18892. "value": "220105"
  18893. }, {
  18894. "label": "绿园区",
  18895. "value": "220106"
  18896. }, {
  18897. "label": "双阳区",
  18898. "value": "220112"
  18899. }, {
  18900. "label": "九台区",
  18901. "value": "220113"
  18902. }, {
  18903. "label": "农安县",
  18904. "value": "220122"
  18905. }, {
  18906. "label": "长春经济技术开发区",
  18907. "value": "220171"
  18908. }, {
  18909. "label": "长春净月高新技术产业开发区",
  18910. "value": "220172"
  18911. }, {
  18912. "label": "长春高新技术产业开发区",
  18913. "value": "220173"
  18914. }, {
  18915. "label": "长春汽车经济技术开发区",
  18916. "value": "220174"
  18917. }, {
  18918. "label": "榆树市",
  18919. "value": "220182"
  18920. }, {
  18921. "label": "德惠市",
  18922. "value": "220183"
  18923. }], [{
  18924. "label": "昌邑区",
  18925. "value": "220202"
  18926. }, {
  18927. "label": "龙潭区",
  18928. "value": "220203"
  18929. }, {
  18930. "label": "船营区",
  18931. "value": "220204"
  18932. }, {
  18933. "label": "丰满区",
  18934. "value": "220211"
  18935. }, {
  18936. "label": "永吉县",
  18937. "value": "220221"
  18938. }, {
  18939. "label": "吉林经济开发区",
  18940. "value": "220271"
  18941. }, {
  18942. "label": "吉林高新技术产业开发区",
  18943. "value": "220272"
  18944. }, {
  18945. "label": "吉林中国新加坡食品区",
  18946. "value": "220273"
  18947. }, {
  18948. "label": "蛟河市",
  18949. "value": "220281"
  18950. }, {
  18951. "label": "桦甸市",
  18952. "value": "220282"
  18953. }, {
  18954. "label": "舒兰市",
  18955. "value": "220283"
  18956. }, {
  18957. "label": "磐石市",
  18958. "value": "220284"
  18959. }], [{
  18960. "label": "铁西区",
  18961. "value": "220302"
  18962. }, {
  18963. "label": "铁东区",
  18964. "value": "220303"
  18965. }, {
  18966. "label": "梨树县",
  18967. "value": "220322"
  18968. }, {
  18969. "label": "伊通满族自治县",
  18970. "value": "220323"
  18971. }, {
  18972. "label": "公主岭市",
  18973. "value": "220381"
  18974. }, {
  18975. "label": "双辽市",
  18976. "value": "220382"
  18977. }], [{
  18978. "label": "龙山区",
  18979. "value": "220402"
  18980. }, {
  18981. "label": "西安区",
  18982. "value": "220403"
  18983. }, {
  18984. "label": "东丰县",
  18985. "value": "220421"
  18986. }, {
  18987. "label": "东辽县",
  18988. "value": "220422"
  18989. }], [{
  18990. "label": "东昌区",
  18991. "value": "220502"
  18992. }, {
  18993. "label": "二道江区",
  18994. "value": "220503"
  18995. }, {
  18996. "label": "通化县",
  18997. "value": "220521"
  18998. }, {
  18999. "label": "辉南县",
  19000. "value": "220523"
  19001. }, {
  19002. "label": "柳河县",
  19003. "value": "220524"
  19004. }, {
  19005. "label": "梅河口市",
  19006. "value": "220581"
  19007. }, {
  19008. "label": "集安市",
  19009. "value": "220582"
  19010. }], [{
  19011. "label": "浑江区",
  19012. "value": "220602"
  19013. }, {
  19014. "label": "江源区",
  19015. "value": "220605"
  19016. }, {
  19017. "label": "抚松县",
  19018. "value": "220621"
  19019. }, {
  19020. "label": "靖宇县",
  19021. "value": "220622"
  19022. }, {
  19023. "label": "长白朝鲜族自治县",
  19024. "value": "220623"
  19025. }, {
  19026. "label": "临江市",
  19027. "value": "220681"
  19028. }], [{
  19029. "label": "宁江区",
  19030. "value": "220702"
  19031. }, {
  19032. "label": "前郭尔罗斯蒙古族自治县",
  19033. "value": "220721"
  19034. }, {
  19035. "label": "长岭县",
  19036. "value": "220722"
  19037. }, {
  19038. "label": "乾安县",
  19039. "value": "220723"
  19040. }, {
  19041. "label": "吉林松原经济开发区",
  19042. "value": "220771"
  19043. }, {
  19044. "label": "扶余市",
  19045. "value": "220781"
  19046. }], [{
  19047. "label": "洮北区",
  19048. "value": "220802"
  19049. }, {
  19050. "label": "镇赉县",
  19051. "value": "220821"
  19052. }, {
  19053. "label": "通榆县",
  19054. "value": "220822"
  19055. }, {
  19056. "label": "吉林白城经济开发区",
  19057. "value": "220871"
  19058. }, {
  19059. "label": "洮南市",
  19060. "value": "220881"
  19061. }, {
  19062. "label": "大安市",
  19063. "value": "220882"
  19064. }], [{
  19065. "label": "延吉市",
  19066. "value": "222401"
  19067. }, {
  19068. "label": "图们市",
  19069. "value": "222402"
  19070. }, {
  19071. "label": "敦化市",
  19072. "value": "222403"
  19073. }, {
  19074. "label": "珲春市",
  19075. "value": "222404"
  19076. }, {
  19077. "label": "龙井市",
  19078. "value": "222405"
  19079. }, {
  19080. "label": "和龙市",
  19081. "value": "222406"
  19082. }, {
  19083. "label": "汪清县",
  19084. "value": "222424"
  19085. }, {
  19086. "label": "安图县",
  19087. "value": "222426"
  19088. }]], [[{
  19089. "label": "道里区",
  19090. "value": "230102"
  19091. }, {
  19092. "label": "南岗区",
  19093. "value": "230103"
  19094. }, {
  19095. "label": "道外区",
  19096. "value": "230104"
  19097. }, {
  19098. "label": "平房区",
  19099. "value": "230108"
  19100. }, {
  19101. "label": "松北区",
  19102. "value": "230109"
  19103. }, {
  19104. "label": "香坊区",
  19105. "value": "230110"
  19106. }, {
  19107. "label": "呼兰区",
  19108. "value": "230111"
  19109. }, {
  19110. "label": "阿城区",
  19111. "value": "230112"
  19112. }, {
  19113. "label": "双城区",
  19114. "value": "230113"
  19115. }, {
  19116. "label": "依兰县",
  19117. "value": "230123"
  19118. }, {
  19119. "label": "方正县",
  19120. "value": "230124"
  19121. }, {
  19122. "label": "宾县",
  19123. "value": "230125"
  19124. }, {
  19125. "label": "巴彦县",
  19126. "value": "230126"
  19127. }, {
  19128. "label": "木兰县",
  19129. "value": "230127"
  19130. }, {
  19131. "label": "通河县",
  19132. "value": "230128"
  19133. }, {
  19134. "label": "延寿县",
  19135. "value": "230129"
  19136. }, {
  19137. "label": "尚志市",
  19138. "value": "230183"
  19139. }, {
  19140. "label": "五常市",
  19141. "value": "230184"
  19142. }], [{
  19143. "label": "龙沙区",
  19144. "value": "230202"
  19145. }, {
  19146. "label": "建华区",
  19147. "value": "230203"
  19148. }, {
  19149. "label": "铁锋区",
  19150. "value": "230204"
  19151. }, {
  19152. "label": "昂昂溪区",
  19153. "value": "230205"
  19154. }, {
  19155. "label": "富拉尔基区",
  19156. "value": "230206"
  19157. }, {
  19158. "label": "碾子山区",
  19159. "value": "230207"
  19160. }, {
  19161. "label": "梅里斯达斡尔族区",
  19162. "value": "230208"
  19163. }, {
  19164. "label": "龙江县",
  19165. "value": "230221"
  19166. }, {
  19167. "label": "依安县",
  19168. "value": "230223"
  19169. }, {
  19170. "label": "泰来县",
  19171. "value": "230224"
  19172. }, {
  19173. "label": "甘南县",
  19174. "value": "230225"
  19175. }, {
  19176. "label": "富裕县",
  19177. "value": "230227"
  19178. }, {
  19179. "label": "克山县",
  19180. "value": "230229"
  19181. }, {
  19182. "label": "克东县",
  19183. "value": "230230"
  19184. }, {
  19185. "label": "拜泉县",
  19186. "value": "230231"
  19187. }, {
  19188. "label": "讷河市",
  19189. "value": "230281"
  19190. }], [{
  19191. "label": "鸡冠区",
  19192. "value": "230302"
  19193. }, {
  19194. "label": "恒山区",
  19195. "value": "230303"
  19196. }, {
  19197. "label": "滴道区",
  19198. "value": "230304"
  19199. }, {
  19200. "label": "梨树区",
  19201. "value": "230305"
  19202. }, {
  19203. "label": "城子河区",
  19204. "value": "230306"
  19205. }, {
  19206. "label": "麻山区",
  19207. "value": "230307"
  19208. }, {
  19209. "label": "鸡东县",
  19210. "value": "230321"
  19211. }, {
  19212. "label": "虎林市",
  19213. "value": "230381"
  19214. }, {
  19215. "label": "密山市",
  19216. "value": "230382"
  19217. }], [{
  19218. "label": "向阳区",
  19219. "value": "230402"
  19220. }, {
  19221. "label": "工农区",
  19222. "value": "230403"
  19223. }, {
  19224. "label": "南山区",
  19225. "value": "230404"
  19226. }, {
  19227. "label": "兴安区",
  19228. "value": "230405"
  19229. }, {
  19230. "label": "东山区",
  19231. "value": "230406"
  19232. }, {
  19233. "label": "兴山区",
  19234. "value": "230407"
  19235. }, {
  19236. "label": "萝北县",
  19237. "value": "230421"
  19238. }, {
  19239. "label": "绥滨县",
  19240. "value": "230422"
  19241. }], [{
  19242. "label": "尖山区",
  19243. "value": "230502"
  19244. }, {
  19245. "label": "岭东区",
  19246. "value": "230503"
  19247. }, {
  19248. "label": "四方台区",
  19249. "value": "230505"
  19250. }, {
  19251. "label": "宝山区",
  19252. "value": "230506"
  19253. }, {
  19254. "label": "集贤县",
  19255. "value": "230521"
  19256. }, {
  19257. "label": "友谊县",
  19258. "value": "230522"
  19259. }, {
  19260. "label": "宝清县",
  19261. "value": "230523"
  19262. }, {
  19263. "label": "饶河县",
  19264. "value": "230524"
  19265. }], [{
  19266. "label": "萨尔图区",
  19267. "value": "230602"
  19268. }, {
  19269. "label": "龙凤区",
  19270. "value": "230603"
  19271. }, {
  19272. "label": "让胡路区",
  19273. "value": "230604"
  19274. }, {
  19275. "label": "红岗区",
  19276. "value": "230605"
  19277. }, {
  19278. "label": "大同区",
  19279. "value": "230606"
  19280. }, {
  19281. "label": "肇州县",
  19282. "value": "230621"
  19283. }, {
  19284. "label": "肇源县",
  19285. "value": "230622"
  19286. }, {
  19287. "label": "林甸县",
  19288. "value": "230623"
  19289. }, {
  19290. "label": "杜尔伯特蒙古族自治县",
  19291. "value": "230624"
  19292. }, {
  19293. "label": "大庆高新技术产业开发区",
  19294. "value": "230671"
  19295. }], [{
  19296. "label": "伊春区",
  19297. "value": "230702"
  19298. }, {
  19299. "label": "南岔区",
  19300. "value": "230703"
  19301. }, {
  19302. "label": "友好区",
  19303. "value": "230704"
  19304. }, {
  19305. "label": "西林区",
  19306. "value": "230705"
  19307. }, {
  19308. "label": "翠峦区",
  19309. "value": "230706"
  19310. }, {
  19311. "label": "新青区",
  19312. "value": "230707"
  19313. }, {
  19314. "label": "美溪区",
  19315. "value": "230708"
  19316. }, {
  19317. "label": "金山屯区",
  19318. "value": "230709"
  19319. }, {
  19320. "label": "五营区",
  19321. "value": "230710"
  19322. }, {
  19323. "label": "乌马河区",
  19324. "value": "230711"
  19325. }, {
  19326. "label": "汤旺河区",
  19327. "value": "230712"
  19328. }, {
  19329. "label": "带岭区",
  19330. "value": "230713"
  19331. }, {
  19332. "label": "乌伊岭区",
  19333. "value": "230714"
  19334. }, {
  19335. "label": "红星区",
  19336. "value": "230715"
  19337. }, {
  19338. "label": "上甘岭区",
  19339. "value": "230716"
  19340. }, {
  19341. "label": "嘉荫县",
  19342. "value": "230722"
  19343. }, {
  19344. "label": "铁力市",
  19345. "value": "230781"
  19346. }], [{
  19347. "label": "向阳区",
  19348. "value": "230803"
  19349. }, {
  19350. "label": "前进区",
  19351. "value": "230804"
  19352. }, {
  19353. "label": "东风区",
  19354. "value": "230805"
  19355. }, {
  19356. "label": "郊区",
  19357. "value": "230811"
  19358. }, {
  19359. "label": "桦南县",
  19360. "value": "230822"
  19361. }, {
  19362. "label": "桦川县",
  19363. "value": "230826"
  19364. }, {
  19365. "label": "汤原县",
  19366. "value": "230828"
  19367. }, {
  19368. "label": "同江市",
  19369. "value": "230881"
  19370. }, {
  19371. "label": "富锦市",
  19372. "value": "230882"
  19373. }, {
  19374. "label": "抚远市",
  19375. "value": "230883"
  19376. }], [{
  19377. "label": "新兴区",
  19378. "value": "230902"
  19379. }, {
  19380. "label": "桃山区",
  19381. "value": "230903"
  19382. }, {
  19383. "label": "茄子河区",
  19384. "value": "230904"
  19385. }, {
  19386. "label": "勃利县",
  19387. "value": "230921"
  19388. }], [{
  19389. "label": "东安区",
  19390. "value": "231002"
  19391. }, {
  19392. "label": "阳明区",
  19393. "value": "231003"
  19394. }, {
  19395. "label": "爱民区",
  19396. "value": "231004"
  19397. }, {
  19398. "label": "西安区",
  19399. "value": "231005"
  19400. }, {
  19401. "label": "林口县",
  19402. "value": "231025"
  19403. }, {
  19404. "label": "牡丹江经济技术开发区",
  19405. "value": "231071"
  19406. }, {
  19407. "label": "绥芬河市",
  19408. "value": "231081"
  19409. }, {
  19410. "label": "海林市",
  19411. "value": "231083"
  19412. }, {
  19413. "label": "宁安市",
  19414. "value": "231084"
  19415. }, {
  19416. "label": "穆棱市",
  19417. "value": "231085"
  19418. }, {
  19419. "label": "东宁市",
  19420. "value": "231086"
  19421. }], [{
  19422. "label": "爱辉区",
  19423. "value": "231102"
  19424. }, {
  19425. "label": "嫩江县",
  19426. "value": "231121"
  19427. }, {
  19428. "label": "逊克县",
  19429. "value": "231123"
  19430. }, {
  19431. "label": "孙吴县",
  19432. "value": "231124"
  19433. }, {
  19434. "label": "北安市",
  19435. "value": "231181"
  19436. }, {
  19437. "label": "五大连池市",
  19438. "value": "231182"
  19439. }], [{
  19440. "label": "北林区",
  19441. "value": "231202"
  19442. }, {
  19443. "label": "望奎县",
  19444. "value": "231221"
  19445. }, {
  19446. "label": "兰西县",
  19447. "value": "231222"
  19448. }, {
  19449. "label": "青冈县",
  19450. "value": "231223"
  19451. }, {
  19452. "label": "庆安县",
  19453. "value": "231224"
  19454. }, {
  19455. "label": "明水县",
  19456. "value": "231225"
  19457. }, {
  19458. "label": "绥棱县",
  19459. "value": "231226"
  19460. }, {
  19461. "label": "安达市",
  19462. "value": "231281"
  19463. }, {
  19464. "label": "肇东市",
  19465. "value": "231282"
  19466. }, {
  19467. "label": "海伦市",
  19468. "value": "231283"
  19469. }], [{
  19470. "label": "加格达奇区",
  19471. "value": "232701"
  19472. }, {
  19473. "label": "松岭区",
  19474. "value": "232702"
  19475. }, {
  19476. "label": "新林区",
  19477. "value": "232703"
  19478. }, {
  19479. "label": "呼中区",
  19480. "value": "232704"
  19481. }, {
  19482. "label": "呼玛县",
  19483. "value": "232721"
  19484. }, {
  19485. "label": "塔河县",
  19486. "value": "232722"
  19487. }, {
  19488. "label": "漠河县",
  19489. "value": "232723"
  19490. }]], [[{
  19491. "label": "黄浦区",
  19492. "value": "310101"
  19493. }, {
  19494. "label": "徐汇区",
  19495. "value": "310104"
  19496. }, {
  19497. "label": "长宁区",
  19498. "value": "310105"
  19499. }, {
  19500. "label": "静安区",
  19501. "value": "310106"
  19502. }, {
  19503. "label": "普陀区",
  19504. "value": "310107"
  19505. }, {
  19506. "label": "虹口区",
  19507. "value": "310109"
  19508. }, {
  19509. "label": "杨浦区",
  19510. "value": "310110"
  19511. }, {
  19512. "label": "闵行区",
  19513. "value": "310112"
  19514. }, {
  19515. "label": "宝山区",
  19516. "value": "310113"
  19517. }, {
  19518. "label": "嘉定区",
  19519. "value": "310114"
  19520. }, {
  19521. "label": "浦东新区",
  19522. "value": "310115"
  19523. }, {
  19524. "label": "金山区",
  19525. "value": "310116"
  19526. }, {
  19527. "label": "松江区",
  19528. "value": "310117"
  19529. }, {
  19530. "label": "青浦区",
  19531. "value": "310118"
  19532. }, {
  19533. "label": "奉贤区",
  19534. "value": "310120"
  19535. }, {
  19536. "label": "崇明区",
  19537. "value": "310151"
  19538. }]], [[{
  19539. "label": "玄武区",
  19540. "value": "320102"
  19541. }, {
  19542. "label": "秦淮区",
  19543. "value": "320104"
  19544. }, {
  19545. "label": "建邺区",
  19546. "value": "320105"
  19547. }, {
  19548. "label": "鼓楼区",
  19549. "value": "320106"
  19550. }, {
  19551. "label": "浦口区",
  19552. "value": "320111"
  19553. }, {
  19554. "label": "栖霞区",
  19555. "value": "320113"
  19556. }, {
  19557. "label": "雨花台区",
  19558. "value": "320114"
  19559. }, {
  19560. "label": "江宁区",
  19561. "value": "320115"
  19562. }, {
  19563. "label": "六合区",
  19564. "value": "320116"
  19565. }, {
  19566. "label": "溧水区",
  19567. "value": "320117"
  19568. }, {
  19569. "label": "高淳区",
  19570. "value": "320118"
  19571. }], [{
  19572. "label": "锡山区",
  19573. "value": "320205"
  19574. }, {
  19575. "label": "惠山区",
  19576. "value": "320206"
  19577. }, {
  19578. "label": "滨湖区",
  19579. "value": "320211"
  19580. }, {
  19581. "label": "梁溪区",
  19582. "value": "320213"
  19583. }, {
  19584. "label": "新吴区",
  19585. "value": "320214"
  19586. }, {
  19587. "label": "江阴市",
  19588. "value": "320281"
  19589. }, {
  19590. "label": "宜兴市",
  19591. "value": "320282"
  19592. }], [{
  19593. "label": "鼓楼区",
  19594. "value": "320302"
  19595. }, {
  19596. "label": "云龙区",
  19597. "value": "320303"
  19598. }, {
  19599. "label": "贾汪区",
  19600. "value": "320305"
  19601. }, {
  19602. "label": "泉山区",
  19603. "value": "320311"
  19604. }, {
  19605. "label": "铜山区",
  19606. "value": "320312"
  19607. }, {
  19608. "label": "丰县",
  19609. "value": "320321"
  19610. }, {
  19611. "label": "沛县",
  19612. "value": "320322"
  19613. }, {
  19614. "label": "睢宁县",
  19615. "value": "320324"
  19616. }, {
  19617. "label": "徐州经济技术开发区",
  19618. "value": "320371"
  19619. }, {
  19620. "label": "新沂市",
  19621. "value": "320381"
  19622. }, {
  19623. "label": "邳州市",
  19624. "value": "320382"
  19625. }], [{
  19626. "label": "天宁区",
  19627. "value": "320402"
  19628. }, {
  19629. "label": "钟楼区",
  19630. "value": "320404"
  19631. }, {
  19632. "label": "新北区",
  19633. "value": "320411"
  19634. }, {
  19635. "label": "武进区",
  19636. "value": "320412"
  19637. }, {
  19638. "label": "金坛区",
  19639. "value": "320413"
  19640. }, {
  19641. "label": "溧阳市",
  19642. "value": "320481"
  19643. }], [{
  19644. "label": "虎丘区",
  19645. "value": "320505"
  19646. }, {
  19647. "label": "吴中区",
  19648. "value": "320506"
  19649. }, {
  19650. "label": "相城区",
  19651. "value": "320507"
  19652. }, {
  19653. "label": "姑苏区",
  19654. "value": "320508"
  19655. }, {
  19656. "label": "吴江区",
  19657. "value": "320509"
  19658. }, {
  19659. "label": "苏州工业园区",
  19660. "value": "320571"
  19661. }, {
  19662. "label": "常熟市",
  19663. "value": "320581"
  19664. }, {
  19665. "label": "张家港市",
  19666. "value": "320582"
  19667. }, {
  19668. "label": "昆山市",
  19669. "value": "320583"
  19670. }, {
  19671. "label": "太仓市",
  19672. "value": "320585"
  19673. }], [{
  19674. "label": "崇川区",
  19675. "value": "320602"
  19676. }, {
  19677. "label": "港闸区",
  19678. "value": "320611"
  19679. }, {
  19680. "label": "通州区",
  19681. "value": "320612"
  19682. }, {
  19683. "label": "海安县",
  19684. "value": "320621"
  19685. }, {
  19686. "label": "如东县",
  19687. "value": "320623"
  19688. }, {
  19689. "label": "南通经济技术开发区",
  19690. "value": "320671"
  19691. }, {
  19692. "label": "启东市",
  19693. "value": "320681"
  19694. }, {
  19695. "label": "如皋市",
  19696. "value": "320682"
  19697. }, {
  19698. "label": "海门市",
  19699. "value": "320684"
  19700. }], [{
  19701. "label": "连云区",
  19702. "value": "320703"
  19703. }, {
  19704. "label": "海州区",
  19705. "value": "320706"
  19706. }, {
  19707. "label": "赣榆区",
  19708. "value": "320707"
  19709. }, {
  19710. "label": "东海县",
  19711. "value": "320722"
  19712. }, {
  19713. "label": "灌云县",
  19714. "value": "320723"
  19715. }, {
  19716. "label": "灌南县",
  19717. "value": "320724"
  19718. }, {
  19719. "label": "连云港经济技术开发区",
  19720. "value": "320771"
  19721. }, {
  19722. "label": "连云港高新技术产业开发区",
  19723. "value": "320772"
  19724. }], [{
  19725. "label": "淮安区",
  19726. "value": "320803"
  19727. }, {
  19728. "label": "淮阴区",
  19729. "value": "320804"
  19730. }, {
  19731. "label": "清江浦区",
  19732. "value": "320812"
  19733. }, {
  19734. "label": "洪泽区",
  19735. "value": "320813"
  19736. }, {
  19737. "label": "涟水县",
  19738. "value": "320826"
  19739. }, {
  19740. "label": "盱眙县",
  19741. "value": "320830"
  19742. }, {
  19743. "label": "金湖县",
  19744. "value": "320831"
  19745. }, {
  19746. "label": "淮安经济技术开发区",
  19747. "value": "320871"
  19748. }], [{
  19749. "label": "亭湖区",
  19750. "value": "320902"
  19751. }, {
  19752. "label": "盐都区",
  19753. "value": "320903"
  19754. }, {
  19755. "label": "大丰区",
  19756. "value": "320904"
  19757. }, {
  19758. "label": "响水县",
  19759. "value": "320921"
  19760. }, {
  19761. "label": "滨海县",
  19762. "value": "320922"
  19763. }, {
  19764. "label": "阜宁县",
  19765. "value": "320923"
  19766. }, {
  19767. "label": "射阳县",
  19768. "value": "320924"
  19769. }, {
  19770. "label": "建湖县",
  19771. "value": "320925"
  19772. }, {
  19773. "label": "盐城经济技术开发区",
  19774. "value": "320971"
  19775. }, {
  19776. "label": "东台市",
  19777. "value": "320981"
  19778. }], [{
  19779. "label": "广陵区",
  19780. "value": "321002"
  19781. }, {
  19782. "label": "邗江区",
  19783. "value": "321003"
  19784. }, {
  19785. "label": "江都区",
  19786. "value": "321012"
  19787. }, {
  19788. "label": "宝应县",
  19789. "value": "321023"
  19790. }, {
  19791. "label": "扬州经济技术开发区",
  19792. "value": "321071"
  19793. }, {
  19794. "label": "仪征市",
  19795. "value": "321081"
  19796. }, {
  19797. "label": "高邮市",
  19798. "value": "321084"
  19799. }], [{
  19800. "label": "京口区",
  19801. "value": "321102"
  19802. }, {
  19803. "label": "润州区",
  19804. "value": "321111"
  19805. }, {
  19806. "label": "丹徒区",
  19807. "value": "321112"
  19808. }, {
  19809. "label": "镇江新区",
  19810. "value": "321171"
  19811. }, {
  19812. "label": "丹阳市",
  19813. "value": "321181"
  19814. }, {
  19815. "label": "扬中市",
  19816. "value": "321182"
  19817. }, {
  19818. "label": "句容市",
  19819. "value": "321183"
  19820. }], [{
  19821. "label": "海陵区",
  19822. "value": "321202"
  19823. }, {
  19824. "label": "高港区",
  19825. "value": "321203"
  19826. }, {
  19827. "label": "姜堰区",
  19828. "value": "321204"
  19829. }, {
  19830. "label": "泰州医药高新技术产业开发区",
  19831. "value": "321271"
  19832. }, {
  19833. "label": "兴化市",
  19834. "value": "321281"
  19835. }, {
  19836. "label": "靖江市",
  19837. "value": "321282"
  19838. }, {
  19839. "label": "泰兴市",
  19840. "value": "321283"
  19841. }], [{
  19842. "label": "宿城区",
  19843. "value": "321302"
  19844. }, {
  19845. "label": "宿豫区",
  19846. "value": "321311"
  19847. }, {
  19848. "label": "沭阳县",
  19849. "value": "321322"
  19850. }, {
  19851. "label": "泗阳县",
  19852. "value": "321323"
  19853. }, {
  19854. "label": "泗洪县",
  19855. "value": "321324"
  19856. }, {
  19857. "label": "宿迁经济技术开发区",
  19858. "value": "321371"
  19859. }]], [[{
  19860. "label": "上城区",
  19861. "value": "330102"
  19862. }, {
  19863. "label": "下城区",
  19864. "value": "330103"
  19865. }, {
  19866. "label": "江干区",
  19867. "value": "330104"
  19868. }, {
  19869. "label": "拱墅区",
  19870. "value": "330105"
  19871. }, {
  19872. "label": "西湖区",
  19873. "value": "330106"
  19874. }, {
  19875. "label": "滨江区",
  19876. "value": "330108"
  19877. }, {
  19878. "label": "萧山区",
  19879. "value": "330109"
  19880. }, {
  19881. "label": "余杭区",
  19882. "value": "330110"
  19883. }, {
  19884. "label": "富阳区",
  19885. "value": "330111"
  19886. }, {
  19887. "label": "临安区",
  19888. "value": "330112"
  19889. }, {
  19890. "label": "桐庐县",
  19891. "value": "330122"
  19892. }, {
  19893. "label": "淳安县",
  19894. "value": "330127"
  19895. }, {
  19896. "label": "建德市",
  19897. "value": "330182"
  19898. }], [{
  19899. "label": "海曙区",
  19900. "value": "330203"
  19901. }, {
  19902. "label": "江北区",
  19903. "value": "330205"
  19904. }, {
  19905. "label": "北仑区",
  19906. "value": "330206"
  19907. }, {
  19908. "label": "镇海区",
  19909. "value": "330211"
  19910. }, {
  19911. "label": "鄞州区",
  19912. "value": "330212"
  19913. }, {
  19914. "label": "奉化区",
  19915. "value": "330213"
  19916. }, {
  19917. "label": "象山县",
  19918. "value": "330225"
  19919. }, {
  19920. "label": "宁海县",
  19921. "value": "330226"
  19922. }, {
  19923. "label": "余姚市",
  19924. "value": "330281"
  19925. }, {
  19926. "label": "慈溪市",
  19927. "value": "330282"
  19928. }], [{
  19929. "label": "鹿城区",
  19930. "value": "330302"
  19931. }, {
  19932. "label": "龙湾区",
  19933. "value": "330303"
  19934. }, {
  19935. "label": "瓯海区",
  19936. "value": "330304"
  19937. }, {
  19938. "label": "洞头区",
  19939. "value": "330305"
  19940. }, {
  19941. "label": "永嘉县",
  19942. "value": "330324"
  19943. }, {
  19944. "label": "平阳县",
  19945. "value": "330326"
  19946. }, {
  19947. "label": "苍南县",
  19948. "value": "330327"
  19949. }, {
  19950. "label": "文成县",
  19951. "value": "330328"
  19952. }, {
  19953. "label": "泰顺县",
  19954. "value": "330329"
  19955. }, {
  19956. "label": "温州经济技术开发区",
  19957. "value": "330371"
  19958. }, {
  19959. "label": "瑞安市",
  19960. "value": "330381"
  19961. }, {
  19962. "label": "乐清市",
  19963. "value": "330382"
  19964. }], [{
  19965. "label": "南湖区",
  19966. "value": "330402"
  19967. }, {
  19968. "label": "秀洲区",
  19969. "value": "330411"
  19970. }, {
  19971. "label": "嘉善县",
  19972. "value": "330421"
  19973. }, {
  19974. "label": "海盐县",
  19975. "value": "330424"
  19976. }, {
  19977. "label": "海宁市",
  19978. "value": "330481"
  19979. }, {
  19980. "label": "平湖市",
  19981. "value": "330482"
  19982. }, {
  19983. "label": "桐乡市",
  19984. "value": "330483"
  19985. }], [{
  19986. "label": "吴兴区",
  19987. "value": "330502"
  19988. }, {
  19989. "label": "南浔区",
  19990. "value": "330503"
  19991. }, {
  19992. "label": "德清县",
  19993. "value": "330521"
  19994. }, {
  19995. "label": "长兴县",
  19996. "value": "330522"
  19997. }, {
  19998. "label": "安吉县",
  19999. "value": "330523"
  20000. }], [{
  20001. "label": "越城区",
  20002. "value": "330602"
  20003. }, {
  20004. "label": "柯桥区",
  20005. "value": "330603"
  20006. }, {
  20007. "label": "上虞区",
  20008. "value": "330604"
  20009. }, {
  20010. "label": "新昌县",
  20011. "value": "330624"
  20012. }, {
  20013. "label": "诸暨市",
  20014. "value": "330681"
  20015. }, {
  20016. "label": "嵊州市",
  20017. "value": "330683"
  20018. }], [{
  20019. "label": "婺城区",
  20020. "value": "330702"
  20021. }, {
  20022. "label": "金东区",
  20023. "value": "330703"
  20024. }, {
  20025. "label": "武义县",
  20026. "value": "330723"
  20027. }, {
  20028. "label": "浦江县",
  20029. "value": "330726"
  20030. }, {
  20031. "label": "磐安县",
  20032. "value": "330727"
  20033. }, {
  20034. "label": "兰溪市",
  20035. "value": "330781"
  20036. }, {
  20037. "label": "义乌市",
  20038. "value": "330782"
  20039. }, {
  20040. "label": "东阳市",
  20041. "value": "330783"
  20042. }, {
  20043. "label": "永康市",
  20044. "value": "330784"
  20045. }], [{
  20046. "label": "柯城区",
  20047. "value": "330802"
  20048. }, {
  20049. "label": "衢江区",
  20050. "value": "330803"
  20051. }, {
  20052. "label": "常山县",
  20053. "value": "330822"
  20054. }, {
  20055. "label": "开化县",
  20056. "value": "330824"
  20057. }, {
  20058. "label": "龙游县",
  20059. "value": "330825"
  20060. }, {
  20061. "label": "江山市",
  20062. "value": "330881"
  20063. }], [{
  20064. "label": "定海区",
  20065. "value": "330902"
  20066. }, {
  20067. "label": "普陀区",
  20068. "value": "330903"
  20069. }, {
  20070. "label": "岱山县",
  20071. "value": "330921"
  20072. }, {
  20073. "label": "嵊泗县",
  20074. "value": "330922"
  20075. }], [{
  20076. "label": "椒江区",
  20077. "value": "331002"
  20078. }, {
  20079. "label": "黄岩区",
  20080. "value": "331003"
  20081. }, {
  20082. "label": "路桥区",
  20083. "value": "331004"
  20084. }, {
  20085. "label": "三门县",
  20086. "value": "331022"
  20087. }, {
  20088. "label": "天台县",
  20089. "value": "331023"
  20090. }, {
  20091. "label": "仙居县",
  20092. "value": "331024"
  20093. }, {
  20094. "label": "温岭市",
  20095. "value": "331081"
  20096. }, {
  20097. "label": "临海市",
  20098. "value": "331082"
  20099. }, {
  20100. "label": "玉环市",
  20101. "value": "331083"
  20102. }], [{
  20103. "label": "莲都区",
  20104. "value": "331102"
  20105. }, {
  20106. "label": "青田县",
  20107. "value": "331121"
  20108. }, {
  20109. "label": "缙云县",
  20110. "value": "331122"
  20111. }, {
  20112. "label": "遂昌县",
  20113. "value": "331123"
  20114. }, {
  20115. "label": "松阳县",
  20116. "value": "331124"
  20117. }, {
  20118. "label": "云和县",
  20119. "value": "331125"
  20120. }, {
  20121. "label": "庆元县",
  20122. "value": "331126"
  20123. }, {
  20124. "label": "景宁畲族自治县",
  20125. "value": "331127"
  20126. }, {
  20127. "label": "龙泉市",
  20128. "value": "331181"
  20129. }]], [[{
  20130. "label": "瑶海区",
  20131. "value": "340102"
  20132. }, {
  20133. "label": "庐阳区",
  20134. "value": "340103"
  20135. }, {
  20136. "label": "蜀山区",
  20137. "value": "340104"
  20138. }, {
  20139. "label": "包河区",
  20140. "value": "340111"
  20141. }, {
  20142. "label": "长丰县",
  20143. "value": "340121"
  20144. }, {
  20145. "label": "肥东县",
  20146. "value": "340122"
  20147. }, {
  20148. "label": "肥西县",
  20149. "value": "340123"
  20150. }, {
  20151. "label": "庐江县",
  20152. "value": "340124"
  20153. }, {
  20154. "label": "合肥高新技术产业开发区",
  20155. "value": "340171"
  20156. }, {
  20157. "label": "合肥经济技术开发区",
  20158. "value": "340172"
  20159. }, {
  20160. "label": "合肥新站高新技术产业开发区",
  20161. "value": "340173"
  20162. }, {
  20163. "label": "巢湖市",
  20164. "value": "340181"
  20165. }], [{
  20166. "label": "镜湖区",
  20167. "value": "340202"
  20168. }, {
  20169. "label": "弋江区",
  20170. "value": "340203"
  20171. }, {
  20172. "label": "鸠江区",
  20173. "value": "340207"
  20174. }, {
  20175. "label": "三山区",
  20176. "value": "340208"
  20177. }, {
  20178. "label": "芜湖县",
  20179. "value": "340221"
  20180. }, {
  20181. "label": "繁昌县",
  20182. "value": "340222"
  20183. }, {
  20184. "label": "南陵县",
  20185. "value": "340223"
  20186. }, {
  20187. "label": "无为县",
  20188. "value": "340225"
  20189. }, {
  20190. "label": "芜湖经济技术开发区",
  20191. "value": "340271"
  20192. }, {
  20193. "label": "安徽芜湖长江大桥经济开发区",
  20194. "value": "340272"
  20195. }], [{
  20196. "label": "龙子湖区",
  20197. "value": "340302"
  20198. }, {
  20199. "label": "蚌山区",
  20200. "value": "340303"
  20201. }, {
  20202. "label": "禹会区",
  20203. "value": "340304"
  20204. }, {
  20205. "label": "淮上区",
  20206. "value": "340311"
  20207. }, {
  20208. "label": "怀远县",
  20209. "value": "340321"
  20210. }, {
  20211. "label": "五河县",
  20212. "value": "340322"
  20213. }, {
  20214. "label": "固镇县",
  20215. "value": "340323"
  20216. }, {
  20217. "label": "蚌埠市高新技术开发区",
  20218. "value": "340371"
  20219. }, {
  20220. "label": "蚌埠市经济开发区",
  20221. "value": "340372"
  20222. }], [{
  20223. "label": "大通区",
  20224. "value": "340402"
  20225. }, {
  20226. "label": "田家庵区",
  20227. "value": "340403"
  20228. }, {
  20229. "label": "谢家集区",
  20230. "value": "340404"
  20231. }, {
  20232. "label": "八公山区",
  20233. "value": "340405"
  20234. }, {
  20235. "label": "潘集区",
  20236. "value": "340406"
  20237. }, {
  20238. "label": "凤台县",
  20239. "value": "340421"
  20240. }, {
  20241. "label": "寿县",
  20242. "value": "340422"
  20243. }], [{
  20244. "label": "花山区",
  20245. "value": "340503"
  20246. }, {
  20247. "label": "雨山区",
  20248. "value": "340504"
  20249. }, {
  20250. "label": "博望区",
  20251. "value": "340506"
  20252. }, {
  20253. "label": "当涂县",
  20254. "value": "340521"
  20255. }, {
  20256. "label": "含山县",
  20257. "value": "340522"
  20258. }, {
  20259. "label": "和县",
  20260. "value": "340523"
  20261. }], [{
  20262. "label": "杜集区",
  20263. "value": "340602"
  20264. }, {
  20265. "label": "相山区",
  20266. "value": "340603"
  20267. }, {
  20268. "label": "烈山区",
  20269. "value": "340604"
  20270. }, {
  20271. "label": "濉溪县",
  20272. "value": "340621"
  20273. }], [{
  20274. "label": "铜官区",
  20275. "value": "340705"
  20276. }, {
  20277. "label": "义安区",
  20278. "value": "340706"
  20279. }, {
  20280. "label": "郊区",
  20281. "value": "340711"
  20282. }, {
  20283. "label": "枞阳县",
  20284. "value": "340722"
  20285. }], [{
  20286. "label": "迎江区",
  20287. "value": "340802"
  20288. }, {
  20289. "label": "大观区",
  20290. "value": "340803"
  20291. }, {
  20292. "label": "宜秀区",
  20293. "value": "340811"
  20294. }, {
  20295. "label": "怀宁县",
  20296. "value": "340822"
  20297. }, {
  20298. "label": "潜山县",
  20299. "value": "340824"
  20300. }, {
  20301. "label": "太湖县",
  20302. "value": "340825"
  20303. }, {
  20304. "label": "宿松县",
  20305. "value": "340826"
  20306. }, {
  20307. "label": "望江县",
  20308. "value": "340827"
  20309. }, {
  20310. "label": "岳西县",
  20311. "value": "340828"
  20312. }, {
  20313. "label": "安徽安庆经济开发区",
  20314. "value": "340871"
  20315. }, {
  20316. "label": "桐城市",
  20317. "value": "340881"
  20318. }], [{
  20319. "label": "屯溪区",
  20320. "value": "341002"
  20321. }, {
  20322. "label": "黄山区",
  20323. "value": "341003"
  20324. }, {
  20325. "label": "徽州区",
  20326. "value": "341004"
  20327. }, {
  20328. "label": "歙县",
  20329. "value": "341021"
  20330. }, {
  20331. "label": "休宁县",
  20332. "value": "341022"
  20333. }, {
  20334. "label": "黟县",
  20335. "value": "341023"
  20336. }, {
  20337. "label": "祁门县",
  20338. "value": "341024"
  20339. }], [{
  20340. "label": "琅琊区",
  20341. "value": "341102"
  20342. }, {
  20343. "label": "南谯区",
  20344. "value": "341103"
  20345. }, {
  20346. "label": "来安县",
  20347. "value": "341122"
  20348. }, {
  20349. "label": "全椒县",
  20350. "value": "341124"
  20351. }, {
  20352. "label": "定远县",
  20353. "value": "341125"
  20354. }, {
  20355. "label": "凤阳县",
  20356. "value": "341126"
  20357. }, {
  20358. "label": "苏滁现代产业园",
  20359. "value": "341171"
  20360. }, {
  20361. "label": "滁州经济技术开发区",
  20362. "value": "341172"
  20363. }, {
  20364. "label": "天长市",
  20365. "value": "341181"
  20366. }, {
  20367. "label": "明光市",
  20368. "value": "341182"
  20369. }], [{
  20370. "label": "颍州区",
  20371. "value": "341202"
  20372. }, {
  20373. "label": "颍东区",
  20374. "value": "341203"
  20375. }, {
  20376. "label": "颍泉区",
  20377. "value": "341204"
  20378. }, {
  20379. "label": "临泉县",
  20380. "value": "341221"
  20381. }, {
  20382. "label": "太和县",
  20383. "value": "341222"
  20384. }, {
  20385. "label": "阜南县",
  20386. "value": "341225"
  20387. }, {
  20388. "label": "颍上县",
  20389. "value": "341226"
  20390. }, {
  20391. "label": "阜阳合肥现代产业园区",
  20392. "value": "341271"
  20393. }, {
  20394. "label": "阜阳经济技术开发区",
  20395. "value": "341272"
  20396. }, {
  20397. "label": "界首市",
  20398. "value": "341282"
  20399. }], [{
  20400. "label": "埇桥区",
  20401. "value": "341302"
  20402. }, {
  20403. "label": "砀山县",
  20404. "value": "341321"
  20405. }, {
  20406. "label": "萧县",
  20407. "value": "341322"
  20408. }, {
  20409. "label": "灵璧县",
  20410. "value": "341323"
  20411. }, {
  20412. "label": "泗县",
  20413. "value": "341324"
  20414. }, {
  20415. "label": "宿州马鞍山现代产业园区",
  20416. "value": "341371"
  20417. }, {
  20418. "label": "宿州经济技术开发区",
  20419. "value": "341372"
  20420. }], [{
  20421. "label": "金安区",
  20422. "value": "341502"
  20423. }, {
  20424. "label": "裕安区",
  20425. "value": "341503"
  20426. }, {
  20427. "label": "叶集区",
  20428. "value": "341504"
  20429. }, {
  20430. "label": "霍邱县",
  20431. "value": "341522"
  20432. }, {
  20433. "label": "舒城县",
  20434. "value": "341523"
  20435. }, {
  20436. "label": "金寨县",
  20437. "value": "341524"
  20438. }, {
  20439. "label": "霍山县",
  20440. "value": "341525"
  20441. }], [{
  20442. "label": "谯城区",
  20443. "value": "341602"
  20444. }, {
  20445. "label": "涡阳县",
  20446. "value": "341621"
  20447. }, {
  20448. "label": "蒙城县",
  20449. "value": "341622"
  20450. }, {
  20451. "label": "利辛县",
  20452. "value": "341623"
  20453. }], [{
  20454. "label": "贵池区",
  20455. "value": "341702"
  20456. }, {
  20457. "label": "东至县",
  20458. "value": "341721"
  20459. }, {
  20460. "label": "石台县",
  20461. "value": "341722"
  20462. }, {
  20463. "label": "青阳县",
  20464. "value": "341723"
  20465. }], [{
  20466. "label": "宣州区",
  20467. "value": "341802"
  20468. }, {
  20469. "label": "郎溪县",
  20470. "value": "341821"
  20471. }, {
  20472. "label": "广德县",
  20473. "value": "341822"
  20474. }, {
  20475. "label": "泾县",
  20476. "value": "341823"
  20477. }, {
  20478. "label": "绩溪县",
  20479. "value": "341824"
  20480. }, {
  20481. "label": "旌德县",
  20482. "value": "341825"
  20483. }, {
  20484. "label": "宣城市经济开发区",
  20485. "value": "341871"
  20486. }, {
  20487. "label": "宁国市",
  20488. "value": "341881"
  20489. }]], [[{
  20490. "label": "鼓楼区",
  20491. "value": "350102"
  20492. }, {
  20493. "label": "台江区",
  20494. "value": "350103"
  20495. }, {
  20496. "label": "仓山区",
  20497. "value": "350104"
  20498. }, {
  20499. "label": "马尾区",
  20500. "value": "350105"
  20501. }, {
  20502. "label": "晋安区",
  20503. "value": "350111"
  20504. }, {
  20505. "label": "闽侯县",
  20506. "value": "350121"
  20507. }, {
  20508. "label": "连江县",
  20509. "value": "350122"
  20510. }, {
  20511. "label": "罗源县",
  20512. "value": "350123"
  20513. }, {
  20514. "label": "闽清县",
  20515. "value": "350124"
  20516. }, {
  20517. "label": "永泰县",
  20518. "value": "350125"
  20519. }, {
  20520. "label": "平潭县",
  20521. "value": "350128"
  20522. }, {
  20523. "label": "福清市",
  20524. "value": "350181"
  20525. }, {
  20526. "label": "长乐市",
  20527. "value": "350182"
  20528. }], [{
  20529. "label": "思明区",
  20530. "value": "350203"
  20531. }, {
  20532. "label": "海沧区",
  20533. "value": "350205"
  20534. }, {
  20535. "label": "湖里区",
  20536. "value": "350206"
  20537. }, {
  20538. "label": "集美区",
  20539. "value": "350211"
  20540. }, {
  20541. "label": "同安区",
  20542. "value": "350212"
  20543. }, {
  20544. "label": "翔安区",
  20545. "value": "350213"
  20546. }], [{
  20547. "label": "城厢区",
  20548. "value": "350302"
  20549. }, {
  20550. "label": "涵江区",
  20551. "value": "350303"
  20552. }, {
  20553. "label": "荔城区",
  20554. "value": "350304"
  20555. }, {
  20556. "label": "秀屿区",
  20557. "value": "350305"
  20558. }, {
  20559. "label": "仙游县",
  20560. "value": "350322"
  20561. }], [{
  20562. "label": "梅列区",
  20563. "value": "350402"
  20564. }, {
  20565. "label": "三元区",
  20566. "value": "350403"
  20567. }, {
  20568. "label": "明溪县",
  20569. "value": "350421"
  20570. }, {
  20571. "label": "清流县",
  20572. "value": "350423"
  20573. }, {
  20574. "label": "宁化县",
  20575. "value": "350424"
  20576. }, {
  20577. "label": "大田县",
  20578. "value": "350425"
  20579. }, {
  20580. "label": "尤溪县",
  20581. "value": "350426"
  20582. }, {
  20583. "label": "沙县",
  20584. "value": "350427"
  20585. }, {
  20586. "label": "将乐县",
  20587. "value": "350428"
  20588. }, {
  20589. "label": "泰宁县",
  20590. "value": "350429"
  20591. }, {
  20592. "label": "建宁县",
  20593. "value": "350430"
  20594. }, {
  20595. "label": "永安市",
  20596. "value": "350481"
  20597. }], [{
  20598. "label": "鲤城区",
  20599. "value": "350502"
  20600. }, {
  20601. "label": "丰泽区",
  20602. "value": "350503"
  20603. }, {
  20604. "label": "洛江区",
  20605. "value": "350504"
  20606. }, {
  20607. "label": "泉港区",
  20608. "value": "350505"
  20609. }, {
  20610. "label": "惠安县",
  20611. "value": "350521"
  20612. }, {
  20613. "label": "安溪县",
  20614. "value": "350524"
  20615. }, {
  20616. "label": "永春县",
  20617. "value": "350525"
  20618. }, {
  20619. "label": "德化县",
  20620. "value": "350526"
  20621. }, {
  20622. "label": "金门县",
  20623. "value": "350527"
  20624. }, {
  20625. "label": "石狮市",
  20626. "value": "350581"
  20627. }, {
  20628. "label": "晋江市",
  20629. "value": "350582"
  20630. }, {
  20631. "label": "南安市",
  20632. "value": "350583"
  20633. }], [{
  20634. "label": "芗城区",
  20635. "value": "350602"
  20636. }, {
  20637. "label": "龙文区",
  20638. "value": "350603"
  20639. }, {
  20640. "label": "云霄县",
  20641. "value": "350622"
  20642. }, {
  20643. "label": "漳浦县",
  20644. "value": "350623"
  20645. }, {
  20646. "label": "诏安县",
  20647. "value": "350624"
  20648. }, {
  20649. "label": "长泰县",
  20650. "value": "350625"
  20651. }, {
  20652. "label": "东山县",
  20653. "value": "350626"
  20654. }, {
  20655. "label": "南靖县",
  20656. "value": "350627"
  20657. }, {
  20658. "label": "平和县",
  20659. "value": "350628"
  20660. }, {
  20661. "label": "华安县",
  20662. "value": "350629"
  20663. }, {
  20664. "label": "龙海市",
  20665. "value": "350681"
  20666. }], [{
  20667. "label": "延平区",
  20668. "value": "350702"
  20669. }, {
  20670. "label": "建阳区",
  20671. "value": "350703"
  20672. }, {
  20673. "label": "顺昌县",
  20674. "value": "350721"
  20675. }, {
  20676. "label": "浦城县",
  20677. "value": "350722"
  20678. }, {
  20679. "label": "光泽县",
  20680. "value": "350723"
  20681. }, {
  20682. "label": "松溪县",
  20683. "value": "350724"
  20684. }, {
  20685. "label": "政和县",
  20686. "value": "350725"
  20687. }, {
  20688. "label": "邵武市",
  20689. "value": "350781"
  20690. }, {
  20691. "label": "武夷山市",
  20692. "value": "350782"
  20693. }, {
  20694. "label": "建瓯市",
  20695. "value": "350783"
  20696. }], [{
  20697. "label": "新罗区",
  20698. "value": "350802"
  20699. }, {
  20700. "label": "永定区",
  20701. "value": "350803"
  20702. }, {
  20703. "label": "长汀县",
  20704. "value": "350821"
  20705. }, {
  20706. "label": "上杭县",
  20707. "value": "350823"
  20708. }, {
  20709. "label": "武平县",
  20710. "value": "350824"
  20711. }, {
  20712. "label": "连城县",
  20713. "value": "350825"
  20714. }, {
  20715. "label": "漳平市",
  20716. "value": "350881"
  20717. }], [{
  20718. "label": "蕉城区",
  20719. "value": "350902"
  20720. }, {
  20721. "label": "霞浦县",
  20722. "value": "350921"
  20723. }, {
  20724. "label": "古田县",
  20725. "value": "350922"
  20726. }, {
  20727. "label": "屏南县",
  20728. "value": "350923"
  20729. }, {
  20730. "label": "寿宁县",
  20731. "value": "350924"
  20732. }, {
  20733. "label": "周宁县",
  20734. "value": "350925"
  20735. }, {
  20736. "label": "柘荣县",
  20737. "value": "350926"
  20738. }, {
  20739. "label": "福安市",
  20740. "value": "350981"
  20741. }, {
  20742. "label": "福鼎市",
  20743. "value": "350982"
  20744. }]], [[{
  20745. "label": "东湖区",
  20746. "value": "360102"
  20747. }, {
  20748. "label": "西湖区",
  20749. "value": "360103"
  20750. }, {
  20751. "label": "青云谱区",
  20752. "value": "360104"
  20753. }, {
  20754. "label": "湾里区",
  20755. "value": "360105"
  20756. }, {
  20757. "label": "青山湖区",
  20758. "value": "360111"
  20759. }, {
  20760. "label": "新建区",
  20761. "value": "360112"
  20762. }, {
  20763. "label": "南昌县",
  20764. "value": "360121"
  20765. }, {
  20766. "label": "安义县",
  20767. "value": "360123"
  20768. }, {
  20769. "label": "进贤县",
  20770. "value": "360124"
  20771. }], [{
  20772. "label": "昌江区",
  20773. "value": "360202"
  20774. }, {
  20775. "label": "珠山区",
  20776. "value": "360203"
  20777. }, {
  20778. "label": "浮梁县",
  20779. "value": "360222"
  20780. }, {
  20781. "label": "乐平市",
  20782. "value": "360281"
  20783. }], [{
  20784. "label": "安源区",
  20785. "value": "360302"
  20786. }, {
  20787. "label": "湘东区",
  20788. "value": "360313"
  20789. }, {
  20790. "label": "莲花县",
  20791. "value": "360321"
  20792. }, {
  20793. "label": "上栗县",
  20794. "value": "360322"
  20795. }, {
  20796. "label": "芦溪县",
  20797. "value": "360323"
  20798. }], [{
  20799. "label": "濂溪区",
  20800. "value": "360402"
  20801. }, {
  20802. "label": "浔阳区",
  20803. "value": "360403"
  20804. }, {
  20805. "label": "柴桑区",
  20806. "value": "360404"
  20807. }, {
  20808. "label": "武宁县",
  20809. "value": "360423"
  20810. }, {
  20811. "label": "修水县",
  20812. "value": "360424"
  20813. }, {
  20814. "label": "永修县",
  20815. "value": "360425"
  20816. }, {
  20817. "label": "德安县",
  20818. "value": "360426"
  20819. }, {
  20820. "label": "都昌县",
  20821. "value": "360428"
  20822. }, {
  20823. "label": "湖口县",
  20824. "value": "360429"
  20825. }, {
  20826. "label": "彭泽县",
  20827. "value": "360430"
  20828. }, {
  20829. "label": "瑞昌市",
  20830. "value": "360481"
  20831. }, {
  20832. "label": "共青城市",
  20833. "value": "360482"
  20834. }, {
  20835. "label": "庐山市",
  20836. "value": "360483"
  20837. }], [{
  20838. "label": "渝水区",
  20839. "value": "360502"
  20840. }, {
  20841. "label": "分宜县",
  20842. "value": "360521"
  20843. }], [{
  20844. "label": "月湖区",
  20845. "value": "360602"
  20846. }, {
  20847. "label": "余江县",
  20848. "value": "360622"
  20849. }, {
  20850. "label": "贵溪市",
  20851. "value": "360681"
  20852. }], [{
  20853. "label": "章贡区",
  20854. "value": "360702"
  20855. }, {
  20856. "label": "南康区",
  20857. "value": "360703"
  20858. }, {
  20859. "label": "赣县区",
  20860. "value": "360704"
  20861. }, {
  20862. "label": "信丰县",
  20863. "value": "360722"
  20864. }, {
  20865. "label": "大余县",
  20866. "value": "360723"
  20867. }, {
  20868. "label": "上犹县",
  20869. "value": "360724"
  20870. }, {
  20871. "label": "崇义县",
  20872. "value": "360725"
  20873. }, {
  20874. "label": "安远县",
  20875. "value": "360726"
  20876. }, {
  20877. "label": "龙南县",
  20878. "value": "360727"
  20879. }, {
  20880. "label": "定南县",
  20881. "value": "360728"
  20882. }, {
  20883. "label": "全南县",
  20884. "value": "360729"
  20885. }, {
  20886. "label": "宁都县",
  20887. "value": "360730"
  20888. }, {
  20889. "label": "于都县",
  20890. "value": "360731"
  20891. }, {
  20892. "label": "兴国县",
  20893. "value": "360732"
  20894. }, {
  20895. "label": "会昌县",
  20896. "value": "360733"
  20897. }, {
  20898. "label": "寻乌县",
  20899. "value": "360734"
  20900. }, {
  20901. "label": "石城县",
  20902. "value": "360735"
  20903. }, {
  20904. "label": "瑞金市",
  20905. "value": "360781"
  20906. }], [{
  20907. "label": "吉州区",
  20908. "value": "360802"
  20909. }, {
  20910. "label": "青原区",
  20911. "value": "360803"
  20912. }, {
  20913. "label": "吉安县",
  20914. "value": "360821"
  20915. }, {
  20916. "label": "吉水县",
  20917. "value": "360822"
  20918. }, {
  20919. "label": "峡江县",
  20920. "value": "360823"
  20921. }, {
  20922. "label": "新干县",
  20923. "value": "360824"
  20924. }, {
  20925. "label": "永丰县",
  20926. "value": "360825"
  20927. }, {
  20928. "label": "泰和县",
  20929. "value": "360826"
  20930. }, {
  20931. "label": "遂川县",
  20932. "value": "360827"
  20933. }, {
  20934. "label": "万安县",
  20935. "value": "360828"
  20936. }, {
  20937. "label": "安福县",
  20938. "value": "360829"
  20939. }, {
  20940. "label": "永新县",
  20941. "value": "360830"
  20942. }, {
  20943. "label": "井冈山市",
  20944. "value": "360881"
  20945. }], [{
  20946. "label": "袁州区",
  20947. "value": "360902"
  20948. }, {
  20949. "label": "奉新县",
  20950. "value": "360921"
  20951. }, {
  20952. "label": "万载县",
  20953. "value": "360922"
  20954. }, {
  20955. "label": "上高县",
  20956. "value": "360923"
  20957. }, {
  20958. "label": "宜丰县",
  20959. "value": "360924"
  20960. }, {
  20961. "label": "靖安县",
  20962. "value": "360925"
  20963. }, {
  20964. "label": "铜鼓县",
  20965. "value": "360926"
  20966. }, {
  20967. "label": "丰城市",
  20968. "value": "360981"
  20969. }, {
  20970. "label": "樟树市",
  20971. "value": "360982"
  20972. }, {
  20973. "label": "高安市",
  20974. "value": "360983"
  20975. }], [{
  20976. "label": "临川区",
  20977. "value": "361002"
  20978. }, {
  20979. "label": "东乡区",
  20980. "value": "361003"
  20981. }, {
  20982. "label": "南城县",
  20983. "value": "361021"
  20984. }, {
  20985. "label": "黎川县",
  20986. "value": "361022"
  20987. }, {
  20988. "label": "南丰县",
  20989. "value": "361023"
  20990. }, {
  20991. "label": "崇仁县",
  20992. "value": "361024"
  20993. }, {
  20994. "label": "乐安县",
  20995. "value": "361025"
  20996. }, {
  20997. "label": "宜黄县",
  20998. "value": "361026"
  20999. }, {
  21000. "label": "金溪县",
  21001. "value": "361027"
  21002. }, {
  21003. "label": "资溪县",
  21004. "value": "361028"
  21005. }, {
  21006. "label": "广昌县",
  21007. "value": "361030"
  21008. }], [{
  21009. "label": "信州区",
  21010. "value": "361102"
  21011. }, {
  21012. "label": "广丰区",
  21013. "value": "361103"
  21014. }, {
  21015. "label": "上饶县",
  21016. "value": "361121"
  21017. }, {
  21018. "label": "玉山县",
  21019. "value": "361123"
  21020. }, {
  21021. "label": "铅山县",
  21022. "value": "361124"
  21023. }, {
  21024. "label": "横峰县",
  21025. "value": "361125"
  21026. }, {
  21027. "label": "弋阳县",
  21028. "value": "361126"
  21029. }, {
  21030. "label": "余干县",
  21031. "value": "361127"
  21032. }, {
  21033. "label": "鄱阳县",
  21034. "value": "361128"
  21035. }, {
  21036. "label": "万年县",
  21037. "value": "361129"
  21038. }, {
  21039. "label": "婺源县",
  21040. "value": "361130"
  21041. }, {
  21042. "label": "德兴市",
  21043. "value": "361181"
  21044. }]], [[{
  21045. "label": "历下区",
  21046. "value": "370102"
  21047. }, {
  21048. "label": "市中区",
  21049. "value": "370103"
  21050. }, {
  21051. "label": "槐荫区",
  21052. "value": "370104"
  21053. }, {
  21054. "label": "天桥区",
  21055. "value": "370105"
  21056. }, {
  21057. "label": "历城区",
  21058. "value": "370112"
  21059. }, {
  21060. "label": "长清区",
  21061. "value": "370113"
  21062. }, {
  21063. "label": "章丘区",
  21064. "value": "370114"
  21065. }, {
  21066. "label": "平阴县",
  21067. "value": "370124"
  21068. }, {
  21069. "label": "济阳县",
  21070. "value": "370125"
  21071. }, {
  21072. "label": "商河县",
  21073. "value": "370126"
  21074. }, {
  21075. "label": "济南高新技术产业开发区",
  21076. "value": "370171"
  21077. }], [{
  21078. "label": "市南区",
  21079. "value": "370202"
  21080. }, {
  21081. "label": "市北区",
  21082. "value": "370203"
  21083. }, {
  21084. "label": "黄岛区",
  21085. "value": "370211"
  21086. }, {
  21087. "label": "崂山区",
  21088. "value": "370212"
  21089. }, {
  21090. "label": "李沧区",
  21091. "value": "370213"
  21092. }, {
  21093. "label": "城阳区",
  21094. "value": "370214"
  21095. }, {
  21096. "label": "即墨区",
  21097. "value": "370215"
  21098. }, {
  21099. "label": "青岛高新技术产业开发区",
  21100. "value": "370271"
  21101. }, {
  21102. "label": "胶州市",
  21103. "value": "370281"
  21104. }, {
  21105. "label": "平度市",
  21106. "value": "370283"
  21107. }, {
  21108. "label": "莱西市",
  21109. "value": "370285"
  21110. }], [{
  21111. "label": "淄川区",
  21112. "value": "370302"
  21113. }, {
  21114. "label": "张店区",
  21115. "value": "370303"
  21116. }, {
  21117. "label": "博山区",
  21118. "value": "370304"
  21119. }, {
  21120. "label": "临淄区",
  21121. "value": "370305"
  21122. }, {
  21123. "label": "周村区",
  21124. "value": "370306"
  21125. }, {
  21126. "label": "桓台县",
  21127. "value": "370321"
  21128. }, {
  21129. "label": "高青县",
  21130. "value": "370322"
  21131. }, {
  21132. "label": "沂源县",
  21133. "value": "370323"
  21134. }], [{
  21135. "label": "市中区",
  21136. "value": "370402"
  21137. }, {
  21138. "label": "薛城区",
  21139. "value": "370403"
  21140. }, {
  21141. "label": "峄城区",
  21142. "value": "370404"
  21143. }, {
  21144. "label": "台儿庄区",
  21145. "value": "370405"
  21146. }, {
  21147. "label": "山亭区",
  21148. "value": "370406"
  21149. }, {
  21150. "label": "滕州市",
  21151. "value": "370481"
  21152. }], [{
  21153. "label": "东营区",
  21154. "value": "370502"
  21155. }, {
  21156. "label": "河口区",
  21157. "value": "370503"
  21158. }, {
  21159. "label": "垦利区",
  21160. "value": "370505"
  21161. }, {
  21162. "label": "利津县",
  21163. "value": "370522"
  21164. }, {
  21165. "label": "广饶县",
  21166. "value": "370523"
  21167. }, {
  21168. "label": "东营经济技术开发区",
  21169. "value": "370571"
  21170. }, {
  21171. "label": "东营港经济开发区",
  21172. "value": "370572"
  21173. }], [{
  21174. "label": "芝罘区",
  21175. "value": "370602"
  21176. }, {
  21177. "label": "福山区",
  21178. "value": "370611"
  21179. }, {
  21180. "label": "牟平区",
  21181. "value": "370612"
  21182. }, {
  21183. "label": "莱山区",
  21184. "value": "370613"
  21185. }, {
  21186. "label": "长岛县",
  21187. "value": "370634"
  21188. }, {
  21189. "label": "烟台高新技术产业开发区",
  21190. "value": "370671"
  21191. }, {
  21192. "label": "烟台经济技术开发区",
  21193. "value": "370672"
  21194. }, {
  21195. "label": "龙口市",
  21196. "value": "370681"
  21197. }, {
  21198. "label": "莱阳市",
  21199. "value": "370682"
  21200. }, {
  21201. "label": "莱州市",
  21202. "value": "370683"
  21203. }, {
  21204. "label": "蓬莱市",
  21205. "value": "370684"
  21206. }, {
  21207. "label": "招远市",
  21208. "value": "370685"
  21209. }, {
  21210. "label": "栖霞市",
  21211. "value": "370686"
  21212. }, {
  21213. "label": "海阳市",
  21214. "value": "370687"
  21215. }], [{
  21216. "label": "潍城区",
  21217. "value": "370702"
  21218. }, {
  21219. "label": "寒亭区",
  21220. "value": "370703"
  21221. }, {
  21222. "label": "坊子区",
  21223. "value": "370704"
  21224. }, {
  21225. "label": "奎文区",
  21226. "value": "370705"
  21227. }, {
  21228. "label": "临朐县",
  21229. "value": "370724"
  21230. }, {
  21231. "label": "昌乐县",
  21232. "value": "370725"
  21233. }, {
  21234. "label": "潍坊滨海经济技术开发区",
  21235. "value": "370772"
  21236. }, {
  21237. "label": "青州市",
  21238. "value": "370781"
  21239. }, {
  21240. "label": "诸城市",
  21241. "value": "370782"
  21242. }, {
  21243. "label": "寿光市",
  21244. "value": "370783"
  21245. }, {
  21246. "label": "安丘市",
  21247. "value": "370784"
  21248. }, {
  21249. "label": "高密市",
  21250. "value": "370785"
  21251. }, {
  21252. "label": "昌邑市",
  21253. "value": "370786"
  21254. }], [{
  21255. "label": "任城区",
  21256. "value": "370811"
  21257. }, {
  21258. "label": "兖州区",
  21259. "value": "370812"
  21260. }, {
  21261. "label": "微山县",
  21262. "value": "370826"
  21263. }, {
  21264. "label": "鱼台县",
  21265. "value": "370827"
  21266. }, {
  21267. "label": "金乡县",
  21268. "value": "370828"
  21269. }, {
  21270. "label": "嘉祥县",
  21271. "value": "370829"
  21272. }, {
  21273. "label": "汶上县",
  21274. "value": "370830"
  21275. }, {
  21276. "label": "泗水县",
  21277. "value": "370831"
  21278. }, {
  21279. "label": "梁山县",
  21280. "value": "370832"
  21281. }, {
  21282. "label": "济宁高新技术产业开发区",
  21283. "value": "370871"
  21284. }, {
  21285. "label": "曲阜市",
  21286. "value": "370881"
  21287. }, {
  21288. "label": "邹城市",
  21289. "value": "370883"
  21290. }], [{
  21291. "label": "泰山区",
  21292. "value": "370902"
  21293. }, {
  21294. "label": "岱岳区",
  21295. "value": "370911"
  21296. }, {
  21297. "label": "宁阳县",
  21298. "value": "370921"
  21299. }, {
  21300. "label": "东平县",
  21301. "value": "370923"
  21302. }, {
  21303. "label": "新泰市",
  21304. "value": "370982"
  21305. }, {
  21306. "label": "肥城市",
  21307. "value": "370983"
  21308. }], [{
  21309. "label": "环翠区",
  21310. "value": "371002"
  21311. }, {
  21312. "label": "文登区",
  21313. "value": "371003"
  21314. }, {
  21315. "label": "威海火炬高技术产业开发区",
  21316. "value": "371071"
  21317. }, {
  21318. "label": "威海经济技术开发区",
  21319. "value": "371072"
  21320. }, {
  21321. "label": "威海临港经济技术开发区",
  21322. "value": "371073"
  21323. }, {
  21324. "label": "荣成市",
  21325. "value": "371082"
  21326. }, {
  21327. "label": "乳山市",
  21328. "value": "371083"
  21329. }], [{
  21330. "label": "东港区",
  21331. "value": "371102"
  21332. }, {
  21333. "label": "岚山区",
  21334. "value": "371103"
  21335. }, {
  21336. "label": "五莲县",
  21337. "value": "371121"
  21338. }, {
  21339. "label": "莒县",
  21340. "value": "371122"
  21341. }, {
  21342. "label": "日照经济技术开发区",
  21343. "value": "371171"
  21344. }, {
  21345. "label": "日照国际海洋城",
  21346. "value": "371172"
  21347. }], [{
  21348. "label": "莱城区",
  21349. "value": "371202"
  21350. }, {
  21351. "label": "钢城区",
  21352. "value": "371203"
  21353. }], [{
  21354. "label": "兰山区",
  21355. "value": "371302"
  21356. }, {
  21357. "label": "罗庄区",
  21358. "value": "371311"
  21359. }, {
  21360. "label": "河东区",
  21361. "value": "371312"
  21362. }, {
  21363. "label": "沂南县",
  21364. "value": "371321"
  21365. }, {
  21366. "label": "郯城县",
  21367. "value": "371322"
  21368. }, {
  21369. "label": "沂水县",
  21370. "value": "371323"
  21371. }, {
  21372. "label": "兰陵县",
  21373. "value": "371324"
  21374. }, {
  21375. "label": "费县",
  21376. "value": "371325"
  21377. }, {
  21378. "label": "平邑县",
  21379. "value": "371326"
  21380. }, {
  21381. "label": "莒南县",
  21382. "value": "371327"
  21383. }, {
  21384. "label": "蒙阴县",
  21385. "value": "371328"
  21386. }, {
  21387. "label": "临沭县",
  21388. "value": "371329"
  21389. }, {
  21390. "label": "临沂高新技术产业开发区",
  21391. "value": "371371"
  21392. }, {
  21393. "label": "临沂经济技术开发区",
  21394. "value": "371372"
  21395. }, {
  21396. "label": "临沂临港经济开发区",
  21397. "value": "371373"
  21398. }], [{
  21399. "label": "德城区",
  21400. "value": "371402"
  21401. }, {
  21402. "label": "陵城区",
  21403. "value": "371403"
  21404. }, {
  21405. "label": "宁津县",
  21406. "value": "371422"
  21407. }, {
  21408. "label": "庆云县",
  21409. "value": "371423"
  21410. }, {
  21411. "label": "临邑县",
  21412. "value": "371424"
  21413. }, {
  21414. "label": "齐河县",
  21415. "value": "371425"
  21416. }, {
  21417. "label": "平原县",
  21418. "value": "371426"
  21419. }, {
  21420. "label": "夏津县",
  21421. "value": "371427"
  21422. }, {
  21423. "label": "武城县",
  21424. "value": "371428"
  21425. }, {
  21426. "label": "德州经济技术开发区",
  21427. "value": "371471"
  21428. }, {
  21429. "label": "德州运河经济开发区",
  21430. "value": "371472"
  21431. }, {
  21432. "label": "乐陵市",
  21433. "value": "371481"
  21434. }, {
  21435. "label": "禹城市",
  21436. "value": "371482"
  21437. }], [{
  21438. "label": "东昌府区",
  21439. "value": "371502"
  21440. }, {
  21441. "label": "阳谷县",
  21442. "value": "371521"
  21443. }, {
  21444. "label": "莘县",
  21445. "value": "371522"
  21446. }, {
  21447. "label": "茌平县",
  21448. "value": "371523"
  21449. }, {
  21450. "label": "东阿县",
  21451. "value": "371524"
  21452. }, {
  21453. "label": "冠县",
  21454. "value": "371525"
  21455. }, {
  21456. "label": "高唐县",
  21457. "value": "371526"
  21458. }, {
  21459. "label": "临清市",
  21460. "value": "371581"
  21461. }], [{
  21462. "label": "滨城区",
  21463. "value": "371602"
  21464. }, {
  21465. "label": "沾化区",
  21466. "value": "371603"
  21467. }, {
  21468. "label": "惠民县",
  21469. "value": "371621"
  21470. }, {
  21471. "label": "阳信县",
  21472. "value": "371622"
  21473. }, {
  21474. "label": "无棣县",
  21475. "value": "371623"
  21476. }, {
  21477. "label": "博兴县",
  21478. "value": "371625"
  21479. }, {
  21480. "label": "邹平县",
  21481. "value": "371626"
  21482. }], [{
  21483. "label": "牡丹区",
  21484. "value": "371702"
  21485. }, {
  21486. "label": "定陶区",
  21487. "value": "371703"
  21488. }, {
  21489. "label": "曹县",
  21490. "value": "371721"
  21491. }, {
  21492. "label": "单县",
  21493. "value": "371722"
  21494. }, {
  21495. "label": "成武县",
  21496. "value": "371723"
  21497. }, {
  21498. "label": "巨野县",
  21499. "value": "371724"
  21500. }, {
  21501. "label": "郓城县",
  21502. "value": "371725"
  21503. }, {
  21504. "label": "鄄城县",
  21505. "value": "371726"
  21506. }, {
  21507. "label": "东明县",
  21508. "value": "371728"
  21509. }, {
  21510. "label": "菏泽经济技术开发区",
  21511. "value": "371771"
  21512. }, {
  21513. "label": "菏泽高新技术开发区",
  21514. "value": "371772"
  21515. }]], [[{
  21516. "label": "中原区",
  21517. "value": "410102"
  21518. }, {
  21519. "label": "二七区",
  21520. "value": "410103"
  21521. }, {
  21522. "label": "管城回族区",
  21523. "value": "410104"
  21524. }, {
  21525. "label": "金水区",
  21526. "value": "410105"
  21527. }, {
  21528. "label": "上街区",
  21529. "value": "410106"
  21530. }, {
  21531. "label": "惠济区",
  21532. "value": "410108"
  21533. }, {
  21534. "label": "中牟县",
  21535. "value": "410122"
  21536. }, {
  21537. "label": "郑州经济技术开发区",
  21538. "value": "410171"
  21539. }, {
  21540. "label": "郑州高新技术产业开发区",
  21541. "value": "410172"
  21542. }, {
  21543. "label": "郑州航空港经济综合实验区",
  21544. "value": "410173"
  21545. }, {
  21546. "label": "巩义市",
  21547. "value": "410181"
  21548. }, {
  21549. "label": "荥阳市",
  21550. "value": "410182"
  21551. }, {
  21552. "label": "新密市",
  21553. "value": "410183"
  21554. }, {
  21555. "label": "新郑市",
  21556. "value": "410184"
  21557. }, {
  21558. "label": "登封市",
  21559. "value": "410185"
  21560. }], [{
  21561. "label": "龙亭区",
  21562. "value": "410202"
  21563. }, {
  21564. "label": "顺河回族区",
  21565. "value": "410203"
  21566. }, {
  21567. "label": "鼓楼区",
  21568. "value": "410204"
  21569. }, {
  21570. "label": "禹王台区",
  21571. "value": "410205"
  21572. }, {
  21573. "label": "祥符区",
  21574. "value": "410212"
  21575. }, {
  21576. "label": "杞县",
  21577. "value": "410221"
  21578. }, {
  21579. "label": "通许县",
  21580. "value": "410222"
  21581. }, {
  21582. "label": "尉氏县",
  21583. "value": "410223"
  21584. }, {
  21585. "label": "兰考县",
  21586. "value": "410225"
  21587. }], [{
  21588. "label": "老城区",
  21589. "value": "410302"
  21590. }, {
  21591. "label": "西工区",
  21592. "value": "410303"
  21593. }, {
  21594. "label": "瀍河回族区",
  21595. "value": "410304"
  21596. }, {
  21597. "label": "涧西区",
  21598. "value": "410305"
  21599. }, {
  21600. "label": "吉利区",
  21601. "value": "410306"
  21602. }, {
  21603. "label": "洛龙区",
  21604. "value": "410311"
  21605. }, {
  21606. "label": "孟津县",
  21607. "value": "410322"
  21608. }, {
  21609. "label": "新安县",
  21610. "value": "410323"
  21611. }, {
  21612. "label": "栾川县",
  21613. "value": "410324"
  21614. }, {
  21615. "label": "嵩县",
  21616. "value": "410325"
  21617. }, {
  21618. "label": "汝阳县",
  21619. "value": "410326"
  21620. }, {
  21621. "label": "宜阳县",
  21622. "value": "410327"
  21623. }, {
  21624. "label": "洛宁县",
  21625. "value": "410328"
  21626. }, {
  21627. "label": "伊川县",
  21628. "value": "410329"
  21629. }, {
  21630. "label": "洛阳高新技术产业开发区",
  21631. "value": "410371"
  21632. }, {
  21633. "label": "偃师市",
  21634. "value": "410381"
  21635. }], [{
  21636. "label": "新华区",
  21637. "value": "410402"
  21638. }, {
  21639. "label": "卫东区",
  21640. "value": "410403"
  21641. }, {
  21642. "label": "石龙区",
  21643. "value": "410404"
  21644. }, {
  21645. "label": "湛河区",
  21646. "value": "410411"
  21647. }, {
  21648. "label": "宝丰县",
  21649. "value": "410421"
  21650. }, {
  21651. "label": "叶县",
  21652. "value": "410422"
  21653. }, {
  21654. "label": "鲁山县",
  21655. "value": "410423"
  21656. }, {
  21657. "label": "郏县",
  21658. "value": "410425"
  21659. }, {
  21660. "label": "平顶山高新技术产业开发区",
  21661. "value": "410471"
  21662. }, {
  21663. "label": "平顶山市新城区",
  21664. "value": "410472"
  21665. }, {
  21666. "label": "舞钢市",
  21667. "value": "410481"
  21668. }, {
  21669. "label": "汝州市",
  21670. "value": "410482"
  21671. }], [{
  21672. "label": "文峰区",
  21673. "value": "410502"
  21674. }, {
  21675. "label": "北关区",
  21676. "value": "410503"
  21677. }, {
  21678. "label": "殷都区",
  21679. "value": "410505"
  21680. }, {
  21681. "label": "龙安区",
  21682. "value": "410506"
  21683. }, {
  21684. "label": "安阳县",
  21685. "value": "410522"
  21686. }, {
  21687. "label": "汤阴县",
  21688. "value": "410523"
  21689. }, {
  21690. "label": "滑县",
  21691. "value": "410526"
  21692. }, {
  21693. "label": "内黄县",
  21694. "value": "410527"
  21695. }, {
  21696. "label": "安阳高新技术产业开发区",
  21697. "value": "410571"
  21698. }, {
  21699. "label": "林州市",
  21700. "value": "410581"
  21701. }], [{
  21702. "label": "鹤山区",
  21703. "value": "410602"
  21704. }, {
  21705. "label": "山城区",
  21706. "value": "410603"
  21707. }, {
  21708. "label": "淇滨区",
  21709. "value": "410611"
  21710. }, {
  21711. "label": "浚县",
  21712. "value": "410621"
  21713. }, {
  21714. "label": "淇县",
  21715. "value": "410622"
  21716. }, {
  21717. "label": "鹤壁经济技术开发区",
  21718. "value": "410671"
  21719. }], [{
  21720. "label": "红旗区",
  21721. "value": "410702"
  21722. }, {
  21723. "label": "卫滨区",
  21724. "value": "410703"
  21725. }, {
  21726. "label": "凤泉区",
  21727. "value": "410704"
  21728. }, {
  21729. "label": "牧野区",
  21730. "value": "410711"
  21731. }, {
  21732. "label": "新乡县",
  21733. "value": "410721"
  21734. }, {
  21735. "label": "获嘉县",
  21736. "value": "410724"
  21737. }, {
  21738. "label": "原阳县",
  21739. "value": "410725"
  21740. }, {
  21741. "label": "延津县",
  21742. "value": "410726"
  21743. }, {
  21744. "label": "封丘县",
  21745. "value": "410727"
  21746. }, {
  21747. "label": "长垣县",
  21748. "value": "410728"
  21749. }, {
  21750. "label": "新乡高新技术产业开发区",
  21751. "value": "410771"
  21752. }, {
  21753. "label": "新乡经济技术开发区",
  21754. "value": "410772"
  21755. }, {
  21756. "label": "新乡市平原城乡一体化示范区",
  21757. "value": "410773"
  21758. }, {
  21759. "label": "卫辉市",
  21760. "value": "410781"
  21761. }, {
  21762. "label": "辉县市",
  21763. "value": "410782"
  21764. }], [{
  21765. "label": "解放区",
  21766. "value": "410802"
  21767. }, {
  21768. "label": "中站区",
  21769. "value": "410803"
  21770. }, {
  21771. "label": "马村区",
  21772. "value": "410804"
  21773. }, {
  21774. "label": "山阳区",
  21775. "value": "410811"
  21776. }, {
  21777. "label": "修武县",
  21778. "value": "410821"
  21779. }, {
  21780. "label": "博爱县",
  21781. "value": "410822"
  21782. }, {
  21783. "label": "武陟县",
  21784. "value": "410823"
  21785. }, {
  21786. "label": "温县",
  21787. "value": "410825"
  21788. }, {
  21789. "label": "焦作城乡一体化示范区",
  21790. "value": "410871"
  21791. }, {
  21792. "label": "沁阳市",
  21793. "value": "410882"
  21794. }, {
  21795. "label": "孟州市",
  21796. "value": "410883"
  21797. }], [{
  21798. "label": "华龙区",
  21799. "value": "410902"
  21800. }, {
  21801. "label": "清丰县",
  21802. "value": "410922"
  21803. }, {
  21804. "label": "南乐县",
  21805. "value": "410923"
  21806. }, {
  21807. "label": "范县",
  21808. "value": "410926"
  21809. }, {
  21810. "label": "台前县",
  21811. "value": "410927"
  21812. }, {
  21813. "label": "濮阳县",
  21814. "value": "410928"
  21815. }, {
  21816. "label": "河南濮阳工业园区",
  21817. "value": "410971"
  21818. }, {
  21819. "label": "濮阳经济技术开发区",
  21820. "value": "410972"
  21821. }], [{
  21822. "label": "魏都区",
  21823. "value": "411002"
  21824. }, {
  21825. "label": "建安区",
  21826. "value": "411003"
  21827. }, {
  21828. "label": "鄢陵县",
  21829. "value": "411024"
  21830. }, {
  21831. "label": "襄城县",
  21832. "value": "411025"
  21833. }, {
  21834. "label": "许昌经济技术开发区",
  21835. "value": "411071"
  21836. }, {
  21837. "label": "禹州市",
  21838. "value": "411081"
  21839. }, {
  21840. "label": "长葛市",
  21841. "value": "411082"
  21842. }], [{
  21843. "label": "源汇区",
  21844. "value": "411102"
  21845. }, {
  21846. "label": "郾城区",
  21847. "value": "411103"
  21848. }, {
  21849. "label": "召陵区",
  21850. "value": "411104"
  21851. }, {
  21852. "label": "舞阳县",
  21853. "value": "411121"
  21854. }, {
  21855. "label": "临颍县",
  21856. "value": "411122"
  21857. }, {
  21858. "label": "漯河经济技术开发区",
  21859. "value": "411171"
  21860. }], [{
  21861. "label": "湖滨区",
  21862. "value": "411202"
  21863. }, {
  21864. "label": "陕州区",
  21865. "value": "411203"
  21866. }, {
  21867. "label": "渑池县",
  21868. "value": "411221"
  21869. }, {
  21870. "label": "卢氏县",
  21871. "value": "411224"
  21872. }, {
  21873. "label": "河南三门峡经济开发区",
  21874. "value": "411271"
  21875. }, {
  21876. "label": "义马市",
  21877. "value": "411281"
  21878. }, {
  21879. "label": "灵宝市",
  21880. "value": "411282"
  21881. }], [{
  21882. "label": "宛城区",
  21883. "value": "411302"
  21884. }, {
  21885. "label": "卧龙区",
  21886. "value": "411303"
  21887. }, {
  21888. "label": "南召县",
  21889. "value": "411321"
  21890. }, {
  21891. "label": "方城县",
  21892. "value": "411322"
  21893. }, {
  21894. "label": "西峡县",
  21895. "value": "411323"
  21896. }, {
  21897. "label": "镇平县",
  21898. "value": "411324"
  21899. }, {
  21900. "label": "内乡县",
  21901. "value": "411325"
  21902. }, {
  21903. "label": "淅川县",
  21904. "value": "411326"
  21905. }, {
  21906. "label": "社旗县",
  21907. "value": "411327"
  21908. }, {
  21909. "label": "唐河县",
  21910. "value": "411328"
  21911. }, {
  21912. "label": "新野县",
  21913. "value": "411329"
  21914. }, {
  21915. "label": "桐柏县",
  21916. "value": "411330"
  21917. }, {
  21918. "label": "南阳高新技术产业开发区",
  21919. "value": "411371"
  21920. }, {
  21921. "label": "南阳市城乡一体化示范区",
  21922. "value": "411372"
  21923. }, {
  21924. "label": "邓州市",
  21925. "value": "411381"
  21926. }], [{
  21927. "label": "梁园区",
  21928. "value": "411402"
  21929. }, {
  21930. "label": "睢阳区",
  21931. "value": "411403"
  21932. }, {
  21933. "label": "民权县",
  21934. "value": "411421"
  21935. }, {
  21936. "label": "睢县",
  21937. "value": "411422"
  21938. }, {
  21939. "label": "宁陵县",
  21940. "value": "411423"
  21941. }, {
  21942. "label": "柘城县",
  21943. "value": "411424"
  21944. }, {
  21945. "label": "虞城县",
  21946. "value": "411425"
  21947. }, {
  21948. "label": "夏邑县",
  21949. "value": "411426"
  21950. }, {
  21951. "label": "豫东综合物流产业聚集区",
  21952. "value": "411471"
  21953. }, {
  21954. "label": "河南商丘经济开发区",
  21955. "value": "411472"
  21956. }, {
  21957. "label": "永城市",
  21958. "value": "411481"
  21959. }], [{
  21960. "label": "浉河区",
  21961. "value": "411502"
  21962. }, {
  21963. "label": "平桥区",
  21964. "value": "411503"
  21965. }, {
  21966. "label": "罗山县",
  21967. "value": "411521"
  21968. }, {
  21969. "label": "光山县",
  21970. "value": "411522"
  21971. }, {
  21972. "label": "新县",
  21973. "value": "411523"
  21974. }, {
  21975. "label": "商城县",
  21976. "value": "411524"
  21977. }, {
  21978. "label": "固始县",
  21979. "value": "411525"
  21980. }, {
  21981. "label": "潢川县",
  21982. "value": "411526"
  21983. }, {
  21984. "label": "淮滨县",
  21985. "value": "411527"
  21986. }, {
  21987. "label": "息县",
  21988. "value": "411528"
  21989. }, {
  21990. "label": "信阳高新技术产业开发区",
  21991. "value": "411571"
  21992. }], [{
  21993. "label": "川汇区",
  21994. "value": "411602"
  21995. }, {
  21996. "label": "扶沟县",
  21997. "value": "411621"
  21998. }, {
  21999. "label": "西华县",
  22000. "value": "411622"
  22001. }, {
  22002. "label": "商水县",
  22003. "value": "411623"
  22004. }, {
  22005. "label": "沈丘县",
  22006. "value": "411624"
  22007. }, {
  22008. "label": "郸城县",
  22009. "value": "411625"
  22010. }, {
  22011. "label": "淮阳县",
  22012. "value": "411626"
  22013. }, {
  22014. "label": "太康县",
  22015. "value": "411627"
  22016. }, {
  22017. "label": "鹿邑县",
  22018. "value": "411628"
  22019. }, {
  22020. "label": "河南周口经济开发区",
  22021. "value": "411671"
  22022. }, {
  22023. "label": "项城市",
  22024. "value": "411681"
  22025. }], [{
  22026. "label": "驿城区",
  22027. "value": "411702"
  22028. }, {
  22029. "label": "西平县",
  22030. "value": "411721"
  22031. }, {
  22032. "label": "上蔡县",
  22033. "value": "411722"
  22034. }, {
  22035. "label": "平舆县",
  22036. "value": "411723"
  22037. }, {
  22038. "label": "正阳县",
  22039. "value": "411724"
  22040. }, {
  22041. "label": "确山县",
  22042. "value": "411725"
  22043. }, {
  22044. "label": "泌阳县",
  22045. "value": "411726"
  22046. }, {
  22047. "label": "汝南县",
  22048. "value": "411727"
  22049. }, {
  22050. "label": "遂平县",
  22051. "value": "411728"
  22052. }, {
  22053. "label": "新蔡县",
  22054. "value": "411729"
  22055. }, {
  22056. "label": "河南驻马店经济开发区",
  22057. "value": "411771"
  22058. }], [{
  22059. "label": "济源市",
  22060. "value": "419001"
  22061. }]], [[{
  22062. "label": "江岸区",
  22063. "value": "420102"
  22064. }, {
  22065. "label": "江汉区",
  22066. "value": "420103"
  22067. }, {
  22068. "label": "硚口区",
  22069. "value": "420104"
  22070. }, {
  22071. "label": "汉阳区",
  22072. "value": "420105"
  22073. }, {
  22074. "label": "武昌区",
  22075. "value": "420106"
  22076. }, {
  22077. "label": "青山区",
  22078. "value": "420107"
  22079. }, {
  22080. "label": "洪山区",
  22081. "value": "420111"
  22082. }, {
  22083. "label": "东西湖区",
  22084. "value": "420112"
  22085. }, {
  22086. "label": "汉南区",
  22087. "value": "420113"
  22088. }, {
  22089. "label": "蔡甸区",
  22090. "value": "420114"
  22091. }, {
  22092. "label": "江夏区",
  22093. "value": "420115"
  22094. }, {
  22095. "label": "黄陂区",
  22096. "value": "420116"
  22097. }, {
  22098. "label": "新洲区",
  22099. "value": "420117"
  22100. }], [{
  22101. "label": "黄石港区",
  22102. "value": "420202"
  22103. }, {
  22104. "label": "西塞山区",
  22105. "value": "420203"
  22106. }, {
  22107. "label": "下陆区",
  22108. "value": "420204"
  22109. }, {
  22110. "label": "铁山区",
  22111. "value": "420205"
  22112. }, {
  22113. "label": "阳新县",
  22114. "value": "420222"
  22115. }, {
  22116. "label": "大冶市",
  22117. "value": "420281"
  22118. }], [{
  22119. "label": "茅箭区",
  22120. "value": "420302"
  22121. }, {
  22122. "label": "张湾区",
  22123. "value": "420303"
  22124. }, {
  22125. "label": "郧阳区",
  22126. "value": "420304"
  22127. }, {
  22128. "label": "郧西县",
  22129. "value": "420322"
  22130. }, {
  22131. "label": "竹山县",
  22132. "value": "420323"
  22133. }, {
  22134. "label": "竹溪县",
  22135. "value": "420324"
  22136. }, {
  22137. "label": "房县",
  22138. "value": "420325"
  22139. }, {
  22140. "label": "丹江口市",
  22141. "value": "420381"
  22142. }], [{
  22143. "label": "西陵区",
  22144. "value": "420502"
  22145. }, {
  22146. "label": "伍家岗区",
  22147. "value": "420503"
  22148. }, {
  22149. "label": "点军区",
  22150. "value": "420504"
  22151. }, {
  22152. "label": "猇亭区",
  22153. "value": "420505"
  22154. }, {
  22155. "label": "夷陵区",
  22156. "value": "420506"
  22157. }, {
  22158. "label": "远安县",
  22159. "value": "420525"
  22160. }, {
  22161. "label": "兴山县",
  22162. "value": "420526"
  22163. }, {
  22164. "label": "秭归县",
  22165. "value": "420527"
  22166. }, {
  22167. "label": "长阳土家族自治县",
  22168. "value": "420528"
  22169. }, {
  22170. "label": "五峰土家族自治县",
  22171. "value": "420529"
  22172. }, {
  22173. "label": "宜都市",
  22174. "value": "420581"
  22175. }, {
  22176. "label": "当阳市",
  22177. "value": "420582"
  22178. }, {
  22179. "label": "枝江市",
  22180. "value": "420583"
  22181. }], [{
  22182. "label": "襄城区",
  22183. "value": "420602"
  22184. }, {
  22185. "label": "樊城区",
  22186. "value": "420606"
  22187. }, {
  22188. "label": "襄州区",
  22189. "value": "420607"
  22190. }, {
  22191. "label": "南漳县",
  22192. "value": "420624"
  22193. }, {
  22194. "label": "谷城县",
  22195. "value": "420625"
  22196. }, {
  22197. "label": "保康县",
  22198. "value": "420626"
  22199. }, {
  22200. "label": "老河口市",
  22201. "value": "420682"
  22202. }, {
  22203. "label": "枣阳市",
  22204. "value": "420683"
  22205. }, {
  22206. "label": "宜城市",
  22207. "value": "420684"
  22208. }], [{
  22209. "label": "梁子湖区",
  22210. "value": "420702"
  22211. }, {
  22212. "label": "华容区",
  22213. "value": "420703"
  22214. }, {
  22215. "label": "鄂城区",
  22216. "value": "420704"
  22217. }], [{
  22218. "label": "东宝区",
  22219. "value": "420802"
  22220. }, {
  22221. "label": "掇刀区",
  22222. "value": "420804"
  22223. }, {
  22224. "label": "京山县",
  22225. "value": "420821"
  22226. }, {
  22227. "label": "沙洋县",
  22228. "value": "420822"
  22229. }, {
  22230. "label": "钟祥市",
  22231. "value": "420881"
  22232. }], [{
  22233. "label": "孝南区",
  22234. "value": "420902"
  22235. }, {
  22236. "label": "孝昌县",
  22237. "value": "420921"
  22238. }, {
  22239. "label": "大悟县",
  22240. "value": "420922"
  22241. }, {
  22242. "label": "云梦县",
  22243. "value": "420923"
  22244. }, {
  22245. "label": "应城市",
  22246. "value": "420981"
  22247. }, {
  22248. "label": "安陆市",
  22249. "value": "420982"
  22250. }, {
  22251. "label": "汉川市",
  22252. "value": "420984"
  22253. }], [{
  22254. "label": "沙市区",
  22255. "value": "421002"
  22256. }, {
  22257. "label": "荆州区",
  22258. "value": "421003"
  22259. }, {
  22260. "label": "公安县",
  22261. "value": "421022"
  22262. }, {
  22263. "label": "监利县",
  22264. "value": "421023"
  22265. }, {
  22266. "label": "江陵县",
  22267. "value": "421024"
  22268. }, {
  22269. "label": "荆州经济技术开发区",
  22270. "value": "421071"
  22271. }, {
  22272. "label": "石首市",
  22273. "value": "421081"
  22274. }, {
  22275. "label": "洪湖市",
  22276. "value": "421083"
  22277. }, {
  22278. "label": "松滋市",
  22279. "value": "421087"
  22280. }], [{
  22281. "label": "黄州区",
  22282. "value": "421102"
  22283. }, {
  22284. "label": "团风县",
  22285. "value": "421121"
  22286. }, {
  22287. "label": "红安县",
  22288. "value": "421122"
  22289. }, {
  22290. "label": "罗田县",
  22291. "value": "421123"
  22292. }, {
  22293. "label": "英山县",
  22294. "value": "421124"
  22295. }, {
  22296. "label": "浠水县",
  22297. "value": "421125"
  22298. }, {
  22299. "label": "蕲春县",
  22300. "value": "421126"
  22301. }, {
  22302. "label": "黄梅县",
  22303. "value": "421127"
  22304. }, {
  22305. "label": "龙感湖管理区",
  22306. "value": "421171"
  22307. }, {
  22308. "label": "麻城市",
  22309. "value": "421181"
  22310. }, {
  22311. "label": "武穴市",
  22312. "value": "421182"
  22313. }], [{
  22314. "label": "咸安区",
  22315. "value": "421202"
  22316. }, {
  22317. "label": "嘉鱼县",
  22318. "value": "421221"
  22319. }, {
  22320. "label": "通城县",
  22321. "value": "421222"
  22322. }, {
  22323. "label": "崇阳县",
  22324. "value": "421223"
  22325. }, {
  22326. "label": "通山县",
  22327. "value": "421224"
  22328. }, {
  22329. "label": "赤壁市",
  22330. "value": "421281"
  22331. }], [{
  22332. "label": "曾都区",
  22333. "value": "421303"
  22334. }, {
  22335. "label": "随县",
  22336. "value": "421321"
  22337. }, {
  22338. "label": "广水市",
  22339. "value": "421381"
  22340. }], [{
  22341. "label": "恩施市",
  22342. "value": "422801"
  22343. }, {
  22344. "label": "利川市",
  22345. "value": "422802"
  22346. }, {
  22347. "label": "建始县",
  22348. "value": "422822"
  22349. }, {
  22350. "label": "巴东县",
  22351. "value": "422823"
  22352. }, {
  22353. "label": "宣恩县",
  22354. "value": "422825"
  22355. }, {
  22356. "label": "咸丰县",
  22357. "value": "422826"
  22358. }, {
  22359. "label": "来凤县",
  22360. "value": "422827"
  22361. }, {
  22362. "label": "鹤峰县",
  22363. "value": "422828"
  22364. }], [{
  22365. "label": "仙桃市",
  22366. "value": "429004"
  22367. }, {
  22368. "label": "潜江市",
  22369. "value": "429005"
  22370. }, {
  22371. "label": "天门市",
  22372. "value": "429006"
  22373. }, {
  22374. "label": "神农架林区",
  22375. "value": "429021"
  22376. }]], [[{
  22377. "label": "芙蓉区",
  22378. "value": "430102"
  22379. }, {
  22380. "label": "天心区",
  22381. "value": "430103"
  22382. }, {
  22383. "label": "岳麓区",
  22384. "value": "430104"
  22385. }, {
  22386. "label": "开福区",
  22387. "value": "430105"
  22388. }, {
  22389. "label": "雨花区",
  22390. "value": "430111"
  22391. }, {
  22392. "label": "望城区",
  22393. "value": "430112"
  22394. }, {
  22395. "label": "长沙县",
  22396. "value": "430121"
  22397. }, {
  22398. "label": "浏阳市",
  22399. "value": "430181"
  22400. }, {
  22401. "label": "宁乡市",
  22402. "value": "430182"
  22403. }], [{
  22404. "label": "荷塘区",
  22405. "value": "430202"
  22406. }, {
  22407. "label": "芦淞区",
  22408. "value": "430203"
  22409. }, {
  22410. "label": "石峰区",
  22411. "value": "430204"
  22412. }, {
  22413. "label": "天元区",
  22414. "value": "430211"
  22415. }, {
  22416. "label": "株洲县",
  22417. "value": "430221"
  22418. }, {
  22419. "label": "攸县",
  22420. "value": "430223"
  22421. }, {
  22422. "label": "茶陵县",
  22423. "value": "430224"
  22424. }, {
  22425. "label": "炎陵县",
  22426. "value": "430225"
  22427. }, {
  22428. "label": "云龙示范区",
  22429. "value": "430271"
  22430. }, {
  22431. "label": "醴陵市",
  22432. "value": "430281"
  22433. }], [{
  22434. "label": "雨湖区",
  22435. "value": "430302"
  22436. }, {
  22437. "label": "岳塘区",
  22438. "value": "430304"
  22439. }, {
  22440. "label": "湘潭县",
  22441. "value": "430321"
  22442. }, {
  22443. "label": "湖南湘潭高新技术产业园区",
  22444. "value": "430371"
  22445. }, {
  22446. "label": "湘潭昭山示范区",
  22447. "value": "430372"
  22448. }, {
  22449. "label": "湘潭九华示范区",
  22450. "value": "430373"
  22451. }, {
  22452. "label": "湘乡市",
  22453. "value": "430381"
  22454. }, {
  22455. "label": "韶山市",
  22456. "value": "430382"
  22457. }], [{
  22458. "label": "珠晖区",
  22459. "value": "430405"
  22460. }, {
  22461. "label": "雁峰区",
  22462. "value": "430406"
  22463. }, {
  22464. "label": "石鼓区",
  22465. "value": "430407"
  22466. }, {
  22467. "label": "蒸湘区",
  22468. "value": "430408"
  22469. }, {
  22470. "label": "南岳区",
  22471. "value": "430412"
  22472. }, {
  22473. "label": "衡阳县",
  22474. "value": "430421"
  22475. }, {
  22476. "label": "衡南县",
  22477. "value": "430422"
  22478. }, {
  22479. "label": "衡山县",
  22480. "value": "430423"
  22481. }, {
  22482. "label": "衡东县",
  22483. "value": "430424"
  22484. }, {
  22485. "label": "祁东县",
  22486. "value": "430426"
  22487. }, {
  22488. "label": "衡阳综合保税区",
  22489. "value": "430471"
  22490. }, {
  22491. "label": "湖南衡阳高新技术产业园区",
  22492. "value": "430472"
  22493. }, {
  22494. "label": "湖南衡阳松木经济开发区",
  22495. "value": "430473"
  22496. }, {
  22497. "label": "耒阳市",
  22498. "value": "430481"
  22499. }, {
  22500. "label": "常宁市",
  22501. "value": "430482"
  22502. }], [{
  22503. "label": "双清区",
  22504. "value": "430502"
  22505. }, {
  22506. "label": "大祥区",
  22507. "value": "430503"
  22508. }, {
  22509. "label": "北塔区",
  22510. "value": "430511"
  22511. }, {
  22512. "label": "邵东县",
  22513. "value": "430521"
  22514. }, {
  22515. "label": "新邵县",
  22516. "value": "430522"
  22517. }, {
  22518. "label": "邵阳县",
  22519. "value": "430523"
  22520. }, {
  22521. "label": "隆回县",
  22522. "value": "430524"
  22523. }, {
  22524. "label": "洞口县",
  22525. "value": "430525"
  22526. }, {
  22527. "label": "绥宁县",
  22528. "value": "430527"
  22529. }, {
  22530. "label": "新宁县",
  22531. "value": "430528"
  22532. }, {
  22533. "label": "城步苗族自治县",
  22534. "value": "430529"
  22535. }, {
  22536. "label": "武冈市",
  22537. "value": "430581"
  22538. }], [{
  22539. "label": "岳阳楼区",
  22540. "value": "430602"
  22541. }, {
  22542. "label": "云溪区",
  22543. "value": "430603"
  22544. }, {
  22545. "label": "君山区",
  22546. "value": "430611"
  22547. }, {
  22548. "label": "岳阳县",
  22549. "value": "430621"
  22550. }, {
  22551. "label": "华容县",
  22552. "value": "430623"
  22553. }, {
  22554. "label": "湘阴县",
  22555. "value": "430624"
  22556. }, {
  22557. "label": "平江县",
  22558. "value": "430626"
  22559. }, {
  22560. "label": "岳阳市屈原管理区",
  22561. "value": "430671"
  22562. }, {
  22563. "label": "汨罗市",
  22564. "value": "430681"
  22565. }, {
  22566. "label": "临湘市",
  22567. "value": "430682"
  22568. }], [{
  22569. "label": "武陵区",
  22570. "value": "430702"
  22571. }, {
  22572. "label": "鼎城区",
  22573. "value": "430703"
  22574. }, {
  22575. "label": "安乡县",
  22576. "value": "430721"
  22577. }, {
  22578. "label": "汉寿县",
  22579. "value": "430722"
  22580. }, {
  22581. "label": "澧县",
  22582. "value": "430723"
  22583. }, {
  22584. "label": "临澧县",
  22585. "value": "430724"
  22586. }, {
  22587. "label": "桃源县",
  22588. "value": "430725"
  22589. }, {
  22590. "label": "石门县",
  22591. "value": "430726"
  22592. }, {
  22593. "label": "常德市西洞庭管理区",
  22594. "value": "430771"
  22595. }, {
  22596. "label": "津市市",
  22597. "value": "430781"
  22598. }], [{
  22599. "label": "永定区",
  22600. "value": "430802"
  22601. }, {
  22602. "label": "武陵源区",
  22603. "value": "430811"
  22604. }, {
  22605. "label": "慈利县",
  22606. "value": "430821"
  22607. }, {
  22608. "label": "桑植县",
  22609. "value": "430822"
  22610. }], [{
  22611. "label": "资阳区",
  22612. "value": "430902"
  22613. }, {
  22614. "label": "赫山区",
  22615. "value": "430903"
  22616. }, {
  22617. "label": "南县",
  22618. "value": "430921"
  22619. }, {
  22620. "label": "桃江县",
  22621. "value": "430922"
  22622. }, {
  22623. "label": "安化县",
  22624. "value": "430923"
  22625. }, {
  22626. "label": "益阳市大通湖管理区",
  22627. "value": "430971"
  22628. }, {
  22629. "label": "湖南益阳高新技术产业园区",
  22630. "value": "430972"
  22631. }, {
  22632. "label": "沅江市",
  22633. "value": "430981"
  22634. }], [{
  22635. "label": "北湖区",
  22636. "value": "431002"
  22637. }, {
  22638. "label": "苏仙区",
  22639. "value": "431003"
  22640. }, {
  22641. "label": "桂阳县",
  22642. "value": "431021"
  22643. }, {
  22644. "label": "宜章县",
  22645. "value": "431022"
  22646. }, {
  22647. "label": "永兴县",
  22648. "value": "431023"
  22649. }, {
  22650. "label": "嘉禾县",
  22651. "value": "431024"
  22652. }, {
  22653. "label": "临武县",
  22654. "value": "431025"
  22655. }, {
  22656. "label": "汝城县",
  22657. "value": "431026"
  22658. }, {
  22659. "label": "桂东县",
  22660. "value": "431027"
  22661. }, {
  22662. "label": "安仁县",
  22663. "value": "431028"
  22664. }, {
  22665. "label": "资兴市",
  22666. "value": "431081"
  22667. }], [{
  22668. "label": "零陵区",
  22669. "value": "431102"
  22670. }, {
  22671. "label": "冷水滩区",
  22672. "value": "431103"
  22673. }, {
  22674. "label": "祁阳县",
  22675. "value": "431121"
  22676. }, {
  22677. "label": "东安县",
  22678. "value": "431122"
  22679. }, {
  22680. "label": "双牌县",
  22681. "value": "431123"
  22682. }, {
  22683. "label": "道县",
  22684. "value": "431124"
  22685. }, {
  22686. "label": "江永县",
  22687. "value": "431125"
  22688. }, {
  22689. "label": "宁远县",
  22690. "value": "431126"
  22691. }, {
  22692. "label": "蓝山县",
  22693. "value": "431127"
  22694. }, {
  22695. "label": "新田县",
  22696. "value": "431128"
  22697. }, {
  22698. "label": "江华瑶族自治县",
  22699. "value": "431129"
  22700. }, {
  22701. "label": "永州经济技术开发区",
  22702. "value": "431171"
  22703. }, {
  22704. "label": "永州市金洞管理区",
  22705. "value": "431172"
  22706. }, {
  22707. "label": "永州市回龙圩管理区",
  22708. "value": "431173"
  22709. }], [{
  22710. "label": "鹤城区",
  22711. "value": "431202"
  22712. }, {
  22713. "label": "中方县",
  22714. "value": "431221"
  22715. }, {
  22716. "label": "沅陵县",
  22717. "value": "431222"
  22718. }, {
  22719. "label": "辰溪县",
  22720. "value": "431223"
  22721. }, {
  22722. "label": "溆浦县",
  22723. "value": "431224"
  22724. }, {
  22725. "label": "会同县",
  22726. "value": "431225"
  22727. }, {
  22728. "label": "麻阳苗族自治县",
  22729. "value": "431226"
  22730. }, {
  22731. "label": "新晃侗族自治县",
  22732. "value": "431227"
  22733. }, {
  22734. "label": "芷江侗族自治县",
  22735. "value": "431228"
  22736. }, {
  22737. "label": "靖州苗族侗族自治县",
  22738. "value": "431229"
  22739. }, {
  22740. "label": "通道侗族自治县",
  22741. "value": "431230"
  22742. }, {
  22743. "label": "怀化市洪江管理区",
  22744. "value": "431271"
  22745. }, {
  22746. "label": "洪江市",
  22747. "value": "431281"
  22748. }], [{
  22749. "label": "娄星区",
  22750. "value": "431302"
  22751. }, {
  22752. "label": "双峰县",
  22753. "value": "431321"
  22754. }, {
  22755. "label": "新化县",
  22756. "value": "431322"
  22757. }, {
  22758. "label": "冷水江市",
  22759. "value": "431381"
  22760. }, {
  22761. "label": "涟源市",
  22762. "value": "431382"
  22763. }], [{
  22764. "label": "吉首市",
  22765. "value": "433101"
  22766. }, {
  22767. "label": "泸溪县",
  22768. "value": "433122"
  22769. }, {
  22770. "label": "凤凰县",
  22771. "value": "433123"
  22772. }, {
  22773. "label": "花垣县",
  22774. "value": "433124"
  22775. }, {
  22776. "label": "保靖县",
  22777. "value": "433125"
  22778. }, {
  22779. "label": "古丈县",
  22780. "value": "433126"
  22781. }, {
  22782. "label": "永顺县",
  22783. "value": "433127"
  22784. }, {
  22785. "label": "龙山县",
  22786. "value": "433130"
  22787. }, {
  22788. "label": "湖南吉首经济开发区",
  22789. "value": "433172"
  22790. }, {
  22791. "label": "湖南永顺经济开发区",
  22792. "value": "433173"
  22793. }]], [[{
  22794. "label": "荔湾区",
  22795. "value": "440103"
  22796. }, {
  22797. "label": "越秀区",
  22798. "value": "440104"
  22799. }, {
  22800. "label": "海珠区",
  22801. "value": "440105"
  22802. }, {
  22803. "label": "天河区",
  22804. "value": "440106"
  22805. }, {
  22806. "label": "白云区",
  22807. "value": "440111"
  22808. }, {
  22809. "label": "黄埔区",
  22810. "value": "440112"
  22811. }, {
  22812. "label": "番禺区",
  22813. "value": "440113"
  22814. }, {
  22815. "label": "花都区",
  22816. "value": "440114"
  22817. }, {
  22818. "label": "南沙区",
  22819. "value": "440115"
  22820. }, {
  22821. "label": "从化区",
  22822. "value": "440117"
  22823. }, {
  22824. "label": "增城区",
  22825. "value": "440118"
  22826. }], [{
  22827. "label": "武江区",
  22828. "value": "440203"
  22829. }, {
  22830. "label": "浈江区",
  22831. "value": "440204"
  22832. }, {
  22833. "label": "曲江区",
  22834. "value": "440205"
  22835. }, {
  22836. "label": "始兴县",
  22837. "value": "440222"
  22838. }, {
  22839. "label": "仁化县",
  22840. "value": "440224"
  22841. }, {
  22842. "label": "翁源县",
  22843. "value": "440229"
  22844. }, {
  22845. "label": "乳源瑶族自治县",
  22846. "value": "440232"
  22847. }, {
  22848. "label": "新丰县",
  22849. "value": "440233"
  22850. }, {
  22851. "label": "乐昌市",
  22852. "value": "440281"
  22853. }, {
  22854. "label": "南雄市",
  22855. "value": "440282"
  22856. }], [{
  22857. "label": "罗湖区",
  22858. "value": "440303"
  22859. }, {
  22860. "label": "福田区",
  22861. "value": "440304"
  22862. }, {
  22863. "label": "南山区",
  22864. "value": "440305"
  22865. }, {
  22866. "label": "宝安区",
  22867. "value": "440306"
  22868. }, {
  22869. "label": "龙岗区",
  22870. "value": "440307"
  22871. }, {
  22872. "label": "盐田区",
  22873. "value": "440308"
  22874. }, {
  22875. "label": "龙华区",
  22876. "value": "440309"
  22877. }, {
  22878. "label": "坪山区",
  22879. "value": "440310"
  22880. }], [{
  22881. "label": "香洲区",
  22882. "value": "440402"
  22883. }, {
  22884. "label": "斗门区",
  22885. "value": "440403"
  22886. }, {
  22887. "label": "金湾区",
  22888. "value": "440404"
  22889. }], [{
  22890. "label": "龙湖区",
  22891. "value": "440507"
  22892. }, {
  22893. "label": "金平区",
  22894. "value": "440511"
  22895. }, {
  22896. "label": "濠江区",
  22897. "value": "440512"
  22898. }, {
  22899. "label": "潮阳区",
  22900. "value": "440513"
  22901. }, {
  22902. "label": "潮南区",
  22903. "value": "440514"
  22904. }, {
  22905. "label": "澄海区",
  22906. "value": "440515"
  22907. }, {
  22908. "label": "南澳县",
  22909. "value": "440523"
  22910. }], [{
  22911. "label": "禅城区",
  22912. "value": "440604"
  22913. }, {
  22914. "label": "南海区",
  22915. "value": "440605"
  22916. }, {
  22917. "label": "顺德区",
  22918. "value": "440606"
  22919. }, {
  22920. "label": "三水区",
  22921. "value": "440607"
  22922. }, {
  22923. "label": "高明区",
  22924. "value": "440608"
  22925. }], [{
  22926. "label": "蓬江区",
  22927. "value": "440703"
  22928. }, {
  22929. "label": "江海区",
  22930. "value": "440704"
  22931. }, {
  22932. "label": "新会区",
  22933. "value": "440705"
  22934. }, {
  22935. "label": "台山市",
  22936. "value": "440781"
  22937. }, {
  22938. "label": "开平市",
  22939. "value": "440783"
  22940. }, {
  22941. "label": "鹤山市",
  22942. "value": "440784"
  22943. }, {
  22944. "label": "恩平市",
  22945. "value": "440785"
  22946. }], [{
  22947. "label": "赤坎区",
  22948. "value": "440802"
  22949. }, {
  22950. "label": "霞山区",
  22951. "value": "440803"
  22952. }, {
  22953. "label": "坡头区",
  22954. "value": "440804"
  22955. }, {
  22956. "label": "麻章区",
  22957. "value": "440811"
  22958. }, {
  22959. "label": "遂溪县",
  22960. "value": "440823"
  22961. }, {
  22962. "label": "徐闻县",
  22963. "value": "440825"
  22964. }, {
  22965. "label": "廉江市",
  22966. "value": "440881"
  22967. }, {
  22968. "label": "雷州市",
  22969. "value": "440882"
  22970. }, {
  22971. "label": "吴川市",
  22972. "value": "440883"
  22973. }], [{
  22974. "label": "茂南区",
  22975. "value": "440902"
  22976. }, {
  22977. "label": "电白区",
  22978. "value": "440904"
  22979. }, {
  22980. "label": "高州市",
  22981. "value": "440981"
  22982. }, {
  22983. "label": "化州市",
  22984. "value": "440982"
  22985. }, {
  22986. "label": "信宜市",
  22987. "value": "440983"
  22988. }], [{
  22989. "label": "端州区",
  22990. "value": "441202"
  22991. }, {
  22992. "label": "鼎湖区",
  22993. "value": "441203"
  22994. }, {
  22995. "label": "高要区",
  22996. "value": "441204"
  22997. }, {
  22998. "label": "广宁县",
  22999. "value": "441223"
  23000. }, {
  23001. "label": "怀集县",
  23002. "value": "441224"
  23003. }, {
  23004. "label": "封开县",
  23005. "value": "441225"
  23006. }, {
  23007. "label": "德庆县",
  23008. "value": "441226"
  23009. }, {
  23010. "label": "四会市",
  23011. "value": "441284"
  23012. }], [{
  23013. "label": "惠城区",
  23014. "value": "441302"
  23015. }, {
  23016. "label": "惠阳区",
  23017. "value": "441303"
  23018. }, {
  23019. "label": "博罗县",
  23020. "value": "441322"
  23021. }, {
  23022. "label": "惠东县",
  23023. "value": "441323"
  23024. }, {
  23025. "label": "龙门县",
  23026. "value": "441324"
  23027. }], [{
  23028. "label": "梅江区",
  23029. "value": "441402"
  23030. }, {
  23031. "label": "梅县区",
  23032. "value": "441403"
  23033. }, {
  23034. "label": "大埔县",
  23035. "value": "441422"
  23036. }, {
  23037. "label": "丰顺县",
  23038. "value": "441423"
  23039. }, {
  23040. "label": "五华县",
  23041. "value": "441424"
  23042. }, {
  23043. "label": "平远县",
  23044. "value": "441426"
  23045. }, {
  23046. "label": "蕉岭县",
  23047. "value": "441427"
  23048. }, {
  23049. "label": "兴宁市",
  23050. "value": "441481"
  23051. }], [{
  23052. "label": "城区",
  23053. "value": "441502"
  23054. }, {
  23055. "label": "海丰县",
  23056. "value": "441521"
  23057. }, {
  23058. "label": "陆河县",
  23059. "value": "441523"
  23060. }, {
  23061. "label": "陆丰市",
  23062. "value": "441581"
  23063. }], [{
  23064. "label": "源城区",
  23065. "value": "441602"
  23066. }, {
  23067. "label": "紫金县",
  23068. "value": "441621"
  23069. }, {
  23070. "label": "龙川县",
  23071. "value": "441622"
  23072. }, {
  23073. "label": "连平县",
  23074. "value": "441623"
  23075. }, {
  23076. "label": "和平县",
  23077. "value": "441624"
  23078. }, {
  23079. "label": "东源县",
  23080. "value": "441625"
  23081. }], [{
  23082. "label": "江城区",
  23083. "value": "441702"
  23084. }, {
  23085. "label": "阳东区",
  23086. "value": "441704"
  23087. }, {
  23088. "label": "阳西县",
  23089. "value": "441721"
  23090. }, {
  23091. "label": "阳春市",
  23092. "value": "441781"
  23093. }], [{
  23094. "label": "清城区",
  23095. "value": "441802"
  23096. }, {
  23097. "label": "清新区",
  23098. "value": "441803"
  23099. }, {
  23100. "label": "佛冈县",
  23101. "value": "441821"
  23102. }, {
  23103. "label": "阳山县",
  23104. "value": "441823"
  23105. }, {
  23106. "label": "连山壮族瑶族自治县",
  23107. "value": "441825"
  23108. }, {
  23109. "label": "连南瑶族自治县",
  23110. "value": "441826"
  23111. }, {
  23112. "label": "英德市",
  23113. "value": "441881"
  23114. }, {
  23115. "label": "连州市",
  23116. "value": "441882"
  23117. }], [{
  23118. "label": "东莞市",
  23119. "value": "441900"
  23120. }], [{
  23121. "label": "中山市",
  23122. "value": "442000"
  23123. }], [{
  23124. "label": "湘桥区",
  23125. "value": "445102"
  23126. }, {
  23127. "label": "潮安区",
  23128. "value": "445103"
  23129. }, {
  23130. "label": "饶平县",
  23131. "value": "445122"
  23132. }], [{
  23133. "label": "榕城区",
  23134. "value": "445202"
  23135. }, {
  23136. "label": "揭东区",
  23137. "value": "445203"
  23138. }, {
  23139. "label": "揭西县",
  23140. "value": "445222"
  23141. }, {
  23142. "label": "惠来县",
  23143. "value": "445224"
  23144. }, {
  23145. "label": "普宁市",
  23146. "value": "445281"
  23147. }], [{
  23148. "label": "云城区",
  23149. "value": "445302"
  23150. }, {
  23151. "label": "云安区",
  23152. "value": "445303"
  23153. }, {
  23154. "label": "新兴县",
  23155. "value": "445321"
  23156. }, {
  23157. "label": "郁南县",
  23158. "value": "445322"
  23159. }, {
  23160. "label": "罗定市",
  23161. "value": "445381"
  23162. }]], [[{
  23163. "label": "兴宁区",
  23164. "value": "450102"
  23165. }, {
  23166. "label": "青秀区",
  23167. "value": "450103"
  23168. }, {
  23169. "label": "江南区",
  23170. "value": "450105"
  23171. }, {
  23172. "label": "西乡塘区",
  23173. "value": "450107"
  23174. }, {
  23175. "label": "良庆区",
  23176. "value": "450108"
  23177. }, {
  23178. "label": "邕宁区",
  23179. "value": "450109"
  23180. }, {
  23181. "label": "武鸣区",
  23182. "value": "450110"
  23183. }, {
  23184. "label": "隆安县",
  23185. "value": "450123"
  23186. }, {
  23187. "label": "马山县",
  23188. "value": "450124"
  23189. }, {
  23190. "label": "上林县",
  23191. "value": "450125"
  23192. }, {
  23193. "label": "宾阳县",
  23194. "value": "450126"
  23195. }, {
  23196. "label": "横县",
  23197. "value": "450127"
  23198. }], [{
  23199. "label": "城中区",
  23200. "value": "450202"
  23201. }, {
  23202. "label": "鱼峰区",
  23203. "value": "450203"
  23204. }, {
  23205. "label": "柳南区",
  23206. "value": "450204"
  23207. }, {
  23208. "label": "柳北区",
  23209. "value": "450205"
  23210. }, {
  23211. "label": "柳江区",
  23212. "value": "450206"
  23213. }, {
  23214. "label": "柳城县",
  23215. "value": "450222"
  23216. }, {
  23217. "label": "鹿寨县",
  23218. "value": "450223"
  23219. }, {
  23220. "label": "融安县",
  23221. "value": "450224"
  23222. }, {
  23223. "label": "融水苗族自治县",
  23224. "value": "450225"
  23225. }, {
  23226. "label": "三江侗族自治县",
  23227. "value": "450226"
  23228. }], [{
  23229. "label": "秀峰区",
  23230. "value": "450302"
  23231. }, {
  23232. "label": "叠彩区",
  23233. "value": "450303"
  23234. }, {
  23235. "label": "象山区",
  23236. "value": "450304"
  23237. }, {
  23238. "label": "七星区",
  23239. "value": "450305"
  23240. }, {
  23241. "label": "雁山区",
  23242. "value": "450311"
  23243. }, {
  23244. "label": "临桂区",
  23245. "value": "450312"
  23246. }, {
  23247. "label": "阳朔县",
  23248. "value": "450321"
  23249. }, {
  23250. "label": "灵川县",
  23251. "value": "450323"
  23252. }, {
  23253. "label": "全州县",
  23254. "value": "450324"
  23255. }, {
  23256. "label": "兴安县",
  23257. "value": "450325"
  23258. }, {
  23259. "label": "永福县",
  23260. "value": "450326"
  23261. }, {
  23262. "label": "灌阳县",
  23263. "value": "450327"
  23264. }, {
  23265. "label": "龙胜各族自治县",
  23266. "value": "450328"
  23267. }, {
  23268. "label": "资源县",
  23269. "value": "450329"
  23270. }, {
  23271. "label": "平乐县",
  23272. "value": "450330"
  23273. }, {
  23274. "label": "荔浦县",
  23275. "value": "450331"
  23276. }, {
  23277. "label": "恭城瑶族自治县",
  23278. "value": "450332"
  23279. }], [{
  23280. "label": "万秀区",
  23281. "value": "450403"
  23282. }, {
  23283. "label": "长洲区",
  23284. "value": "450405"
  23285. }, {
  23286. "label": "龙圩区",
  23287. "value": "450406"
  23288. }, {
  23289. "label": "苍梧县",
  23290. "value": "450421"
  23291. }, {
  23292. "label": "藤县",
  23293. "value": "450422"
  23294. }, {
  23295. "label": "蒙山县",
  23296. "value": "450423"
  23297. }, {
  23298. "label": "岑溪市",
  23299. "value": "450481"
  23300. }], [{
  23301. "label": "海城区",
  23302. "value": "450502"
  23303. }, {
  23304. "label": "银海区",
  23305. "value": "450503"
  23306. }, {
  23307. "label": "铁山港区",
  23308. "value": "450512"
  23309. }, {
  23310. "label": "合浦县",
  23311. "value": "450521"
  23312. }], [{
  23313. "label": "港口区",
  23314. "value": "450602"
  23315. }, {
  23316. "label": "防城区",
  23317. "value": "450603"
  23318. }, {
  23319. "label": "上思县",
  23320. "value": "450621"
  23321. }, {
  23322. "label": "东兴市",
  23323. "value": "450681"
  23324. }], [{
  23325. "label": "钦南区",
  23326. "value": "450702"
  23327. }, {
  23328. "label": "钦北区",
  23329. "value": "450703"
  23330. }, {
  23331. "label": "灵山县",
  23332. "value": "450721"
  23333. }, {
  23334. "label": "浦北县",
  23335. "value": "450722"
  23336. }], [{
  23337. "label": "港北区",
  23338. "value": "450802"
  23339. }, {
  23340. "label": "港南区",
  23341. "value": "450803"
  23342. }, {
  23343. "label": "覃塘区",
  23344. "value": "450804"
  23345. }, {
  23346. "label": "平南县",
  23347. "value": "450821"
  23348. }, {
  23349. "label": "桂平市",
  23350. "value": "450881"
  23351. }], [{
  23352. "label": "玉州区",
  23353. "value": "450902"
  23354. }, {
  23355. "label": "福绵区",
  23356. "value": "450903"
  23357. }, {
  23358. "label": "容县",
  23359. "value": "450921"
  23360. }, {
  23361. "label": "陆川县",
  23362. "value": "450922"
  23363. }, {
  23364. "label": "博白县",
  23365. "value": "450923"
  23366. }, {
  23367. "label": "兴业县",
  23368. "value": "450924"
  23369. }, {
  23370. "label": "北流市",
  23371. "value": "450981"
  23372. }], [{
  23373. "label": "右江区",
  23374. "value": "451002"
  23375. }, {
  23376. "label": "田阳县",
  23377. "value": "451021"
  23378. }, {
  23379. "label": "田东县",
  23380. "value": "451022"
  23381. }, {
  23382. "label": "平果县",
  23383. "value": "451023"
  23384. }, {
  23385. "label": "德保县",
  23386. "value": "451024"
  23387. }, {
  23388. "label": "那坡县",
  23389. "value": "451026"
  23390. }, {
  23391. "label": "凌云县",
  23392. "value": "451027"
  23393. }, {
  23394. "label": "乐业县",
  23395. "value": "451028"
  23396. }, {
  23397. "label": "田林县",
  23398. "value": "451029"
  23399. }, {
  23400. "label": "西林县",
  23401. "value": "451030"
  23402. }, {
  23403. "label": "隆林各族自治县",
  23404. "value": "451031"
  23405. }, {
  23406. "label": "靖西市",
  23407. "value": "451081"
  23408. }], [{
  23409. "label": "八步区",
  23410. "value": "451102"
  23411. }, {
  23412. "label": "平桂区",
  23413. "value": "451103"
  23414. }, {
  23415. "label": "昭平县",
  23416. "value": "451121"
  23417. }, {
  23418. "label": "钟山县",
  23419. "value": "451122"
  23420. }, {
  23421. "label": "富川瑶族自治县",
  23422. "value": "451123"
  23423. }], [{
  23424. "label": "金城江区",
  23425. "value": "451202"
  23426. }, {
  23427. "label": "宜州区",
  23428. "value": "451203"
  23429. }, {
  23430. "label": "南丹县",
  23431. "value": "451221"
  23432. }, {
  23433. "label": "天峨县",
  23434. "value": "451222"
  23435. }, {
  23436. "label": "凤山县",
  23437. "value": "451223"
  23438. }, {
  23439. "label": "东兰县",
  23440. "value": "451224"
  23441. }, {
  23442. "label": "罗城仫佬族自治县",
  23443. "value": "451225"
  23444. }, {
  23445. "label": "环江毛南族自治县",
  23446. "value": "451226"
  23447. }, {
  23448. "label": "巴马瑶族自治县",
  23449. "value": "451227"
  23450. }, {
  23451. "label": "都安瑶族自治县",
  23452. "value": "451228"
  23453. }, {
  23454. "label": "大化瑶族自治县",
  23455. "value": "451229"
  23456. }], [{
  23457. "label": "兴宾区",
  23458. "value": "451302"
  23459. }, {
  23460. "label": "忻城县",
  23461. "value": "451321"
  23462. }, {
  23463. "label": "象州县",
  23464. "value": "451322"
  23465. }, {
  23466. "label": "武宣县",
  23467. "value": "451323"
  23468. }, {
  23469. "label": "金秀瑶族自治县",
  23470. "value": "451324"
  23471. }, {
  23472. "label": "合山市",
  23473. "value": "451381"
  23474. }], [{
  23475. "label": "江州区",
  23476. "value": "451402"
  23477. }, {
  23478. "label": "扶绥县",
  23479. "value": "451421"
  23480. }, {
  23481. "label": "宁明县",
  23482. "value": "451422"
  23483. }, {
  23484. "label": "龙州县",
  23485. "value": "451423"
  23486. }, {
  23487. "label": "大新县",
  23488. "value": "451424"
  23489. }, {
  23490. "label": "天等县",
  23491. "value": "451425"
  23492. }, {
  23493. "label": "凭祥市",
  23494. "value": "451481"
  23495. }]], [[{
  23496. "label": "秀英区",
  23497. "value": "460105"
  23498. }, {
  23499. "label": "龙华区",
  23500. "value": "460106"
  23501. }, {
  23502. "label": "琼山区",
  23503. "value": "460107"
  23504. }, {
  23505. "label": "美兰区",
  23506. "value": "460108"
  23507. }], [{
  23508. "label": "海棠区",
  23509. "value": "460202"
  23510. }, {
  23511. "label": "吉阳区",
  23512. "value": "460203"
  23513. }, {
  23514. "label": "天涯区",
  23515. "value": "460204"
  23516. }, {
  23517. "label": "崖州区",
  23518. "value": "460205"
  23519. }], [{
  23520. "label": "西沙群岛",
  23521. "value": "460321"
  23522. }, {
  23523. "label": "南沙群岛",
  23524. "value": "460322"
  23525. }, {
  23526. "label": "中沙群岛的岛礁及其海域",
  23527. "value": "460323"
  23528. }], [{
  23529. "label": "儋州市",
  23530. "value": "460400"
  23531. }], [{
  23532. "label": "五指山市",
  23533. "value": "469001"
  23534. }, {
  23535. "label": "琼海市",
  23536. "value": "469002"
  23537. }, {
  23538. "label": "文昌市",
  23539. "value": "469005"
  23540. }, {
  23541. "label": "万宁市",
  23542. "value": "469006"
  23543. }, {
  23544. "label": "东方市",
  23545. "value": "469007"
  23546. }, {
  23547. "label": "定安县",
  23548. "value": "469021"
  23549. }, {
  23550. "label": "屯昌县",
  23551. "value": "469022"
  23552. }, {
  23553. "label": "澄迈县",
  23554. "value": "469023"
  23555. }, {
  23556. "label": "临高县",
  23557. "value": "469024"
  23558. }, {
  23559. "label": "白沙黎族自治县",
  23560. "value": "469025"
  23561. }, {
  23562. "label": "昌江黎族自治县",
  23563. "value": "469026"
  23564. }, {
  23565. "label": "乐东黎族自治县",
  23566. "value": "469027"
  23567. }, {
  23568. "label": "陵水黎族自治县",
  23569. "value": "469028"
  23570. }, {
  23571. "label": "保亭黎族苗族自治县",
  23572. "value": "469029"
  23573. }, {
  23574. "label": "琼中黎族苗族自治县",
  23575. "value": "469030"
  23576. }]], [[{
  23577. "label": "万州区",
  23578. "value": "500101"
  23579. }, {
  23580. "label": "涪陵区",
  23581. "value": "500102"
  23582. }, {
  23583. "label": "渝中区",
  23584. "value": "500103"
  23585. }, {
  23586. "label": "大渡口区",
  23587. "value": "500104"
  23588. }, {
  23589. "label": "江北区",
  23590. "value": "500105"
  23591. }, {
  23592. "label": "沙坪坝区",
  23593. "value": "500106"
  23594. }, {
  23595. "label": "九龙坡区",
  23596. "value": "500107"
  23597. }, {
  23598. "label": "南岸区",
  23599. "value": "500108"
  23600. }, {
  23601. "label": "北碚区",
  23602. "value": "500109"
  23603. }, {
  23604. "label": "綦江区",
  23605. "value": "500110"
  23606. }, {
  23607. "label": "大足区",
  23608. "value": "500111"
  23609. }, {
  23610. "label": "渝北区",
  23611. "value": "500112"
  23612. }, {
  23613. "label": "巴南区",
  23614. "value": "500113"
  23615. }, {
  23616. "label": "黔江区",
  23617. "value": "500114"
  23618. }, {
  23619. "label": "长寿区",
  23620. "value": "500115"
  23621. }, {
  23622. "label": "江津区",
  23623. "value": "500116"
  23624. }, {
  23625. "label": "合川区",
  23626. "value": "500117"
  23627. }, {
  23628. "label": "永川区",
  23629. "value": "500118"
  23630. }, {
  23631. "label": "南川区",
  23632. "value": "500119"
  23633. }, {
  23634. "label": "璧山区",
  23635. "value": "500120"
  23636. }, {
  23637. "label": "铜梁区",
  23638. "value": "500151"
  23639. }, {
  23640. "label": "潼南区",
  23641. "value": "500152"
  23642. }, {
  23643. "label": "荣昌区",
  23644. "value": "500153"
  23645. }, {
  23646. "label": "开州区",
  23647. "value": "500154"
  23648. }, {
  23649. "label": "梁平区",
  23650. "value": "500155"
  23651. }, {
  23652. "label": "武隆区",
  23653. "value": "500156"
  23654. }], [{
  23655. "label": "城口县",
  23656. "value": "500229"
  23657. }, {
  23658. "label": "丰都县",
  23659. "value": "500230"
  23660. }, {
  23661. "label": "垫江县",
  23662. "value": "500231"
  23663. }, {
  23664. "label": "忠县",
  23665. "value": "500233"
  23666. }, {
  23667. "label": "云阳县",
  23668. "value": "500235"
  23669. }, {
  23670. "label": "奉节县",
  23671. "value": "500236"
  23672. }, {
  23673. "label": "巫山县",
  23674. "value": "500237"
  23675. }, {
  23676. "label": "巫溪县",
  23677. "value": "500238"
  23678. }, {
  23679. "label": "石柱土家族自治县",
  23680. "value": "500240"
  23681. }, {
  23682. "label": "秀山土家族苗族自治县",
  23683. "value": "500241"
  23684. }, {
  23685. "label": "酉阳土家族苗族自治县",
  23686. "value": "500242"
  23687. }, {
  23688. "label": "彭水苗族土家族自治县",
  23689. "value": "500243"
  23690. }]], [[{
  23691. "label": "锦江区",
  23692. "value": "510104"
  23693. }, {
  23694. "label": "青羊区",
  23695. "value": "510105"
  23696. }, {
  23697. "label": "金牛区",
  23698. "value": "510106"
  23699. }, {
  23700. "label": "武侯区",
  23701. "value": "510107"
  23702. }, {
  23703. "label": "成华区",
  23704. "value": "510108"
  23705. }, {
  23706. "label": "龙泉驿区",
  23707. "value": "510112"
  23708. }, {
  23709. "label": "青白江区",
  23710. "value": "510113"
  23711. }, {
  23712. "label": "新都区",
  23713. "value": "510114"
  23714. }, {
  23715. "label": "温江区",
  23716. "value": "510115"
  23717. }, {
  23718. "label": "双流区",
  23719. "value": "510116"
  23720. }, {
  23721. "label": "郫都区",
  23722. "value": "510117"
  23723. }, {
  23724. "label": "金堂县",
  23725. "value": "510121"
  23726. }, {
  23727. "label": "大邑县",
  23728. "value": "510129"
  23729. }, {
  23730. "label": "蒲江县",
  23731. "value": "510131"
  23732. }, {
  23733. "label": "新津县",
  23734. "value": "510132"
  23735. }, {
  23736. "label": "都江堰市",
  23737. "value": "510181"
  23738. }, {
  23739. "label": "彭州市",
  23740. "value": "510182"
  23741. }, {
  23742. "label": "邛崃市",
  23743. "value": "510183"
  23744. }, {
  23745. "label": "崇州市",
  23746. "value": "510184"
  23747. }, {
  23748. "label": "简阳市",
  23749. "value": "510185"
  23750. }], [{
  23751. "label": "自流井区",
  23752. "value": "510302"
  23753. }, {
  23754. "label": "贡井区",
  23755. "value": "510303"
  23756. }, {
  23757. "label": "大安区",
  23758. "value": "510304"
  23759. }, {
  23760. "label": "沿滩区",
  23761. "value": "510311"
  23762. }, {
  23763. "label": "荣县",
  23764. "value": "510321"
  23765. }, {
  23766. "label": "富顺县",
  23767. "value": "510322"
  23768. }], [{
  23769. "label": "东区",
  23770. "value": "510402"
  23771. }, {
  23772. "label": "西区",
  23773. "value": "510403"
  23774. }, {
  23775. "label": "仁和区",
  23776. "value": "510411"
  23777. }, {
  23778. "label": "米易县",
  23779. "value": "510421"
  23780. }, {
  23781. "label": "盐边县",
  23782. "value": "510422"
  23783. }], [{
  23784. "label": "江阳区",
  23785. "value": "510502"
  23786. }, {
  23787. "label": "纳溪区",
  23788. "value": "510503"
  23789. }, {
  23790. "label": "龙马潭区",
  23791. "value": "510504"
  23792. }, {
  23793. "label": "泸县",
  23794. "value": "510521"
  23795. }, {
  23796. "label": "合江县",
  23797. "value": "510522"
  23798. }, {
  23799. "label": "叙永县",
  23800. "value": "510524"
  23801. }, {
  23802. "label": "古蔺县",
  23803. "value": "510525"
  23804. }], [{
  23805. "label": "旌阳区",
  23806. "value": "510603"
  23807. }, {
  23808. "label": "罗江区",
  23809. "value": "510604"
  23810. }, {
  23811. "label": "中江县",
  23812. "value": "510623"
  23813. }, {
  23814. "label": "广汉市",
  23815. "value": "510681"
  23816. }, {
  23817. "label": "什邡市",
  23818. "value": "510682"
  23819. }, {
  23820. "label": "绵竹市",
  23821. "value": "510683"
  23822. }], [{
  23823. "label": "涪城区",
  23824. "value": "510703"
  23825. }, {
  23826. "label": "游仙区",
  23827. "value": "510704"
  23828. }, {
  23829. "label": "安州区",
  23830. "value": "510705"
  23831. }, {
  23832. "label": "三台县",
  23833. "value": "510722"
  23834. }, {
  23835. "label": "盐亭县",
  23836. "value": "510723"
  23837. }, {
  23838. "label": "梓潼县",
  23839. "value": "510725"
  23840. }, {
  23841. "label": "北川羌族自治县",
  23842. "value": "510726"
  23843. }, {
  23844. "label": "平武县",
  23845. "value": "510727"
  23846. }, {
  23847. "label": "江油市",
  23848. "value": "510781"
  23849. }], [{
  23850. "label": "利州区",
  23851. "value": "510802"
  23852. }, {
  23853. "label": "昭化区",
  23854. "value": "510811"
  23855. }, {
  23856. "label": "朝天区",
  23857. "value": "510812"
  23858. }, {
  23859. "label": "旺苍县",
  23860. "value": "510821"
  23861. }, {
  23862. "label": "青川县",
  23863. "value": "510822"
  23864. }, {
  23865. "label": "剑阁县",
  23866. "value": "510823"
  23867. }, {
  23868. "label": "苍溪县",
  23869. "value": "510824"
  23870. }], [{
  23871. "label": "船山区",
  23872. "value": "510903"
  23873. }, {
  23874. "label": "安居区",
  23875. "value": "510904"
  23876. }, {
  23877. "label": "蓬溪县",
  23878. "value": "510921"
  23879. }, {
  23880. "label": "射洪县",
  23881. "value": "510922"
  23882. }, {
  23883. "label": "大英县",
  23884. "value": "510923"
  23885. }], [{
  23886. "label": "市中区",
  23887. "value": "511002"
  23888. }, {
  23889. "label": "东兴区",
  23890. "value": "511011"
  23891. }, {
  23892. "label": "威远县",
  23893. "value": "511024"
  23894. }, {
  23895. "label": "资中县",
  23896. "value": "511025"
  23897. }, {
  23898. "label": "内江经济开发区",
  23899. "value": "511071"
  23900. }, {
  23901. "label": "隆昌市",
  23902. "value": "511083"
  23903. }], [{
  23904. "label": "市中区",
  23905. "value": "511102"
  23906. }, {
  23907. "label": "沙湾区",
  23908. "value": "511111"
  23909. }, {
  23910. "label": "五通桥区",
  23911. "value": "511112"
  23912. }, {
  23913. "label": "金口河区",
  23914. "value": "511113"
  23915. }, {
  23916. "label": "犍为县",
  23917. "value": "511123"
  23918. }, {
  23919. "label": "井研县",
  23920. "value": "511124"
  23921. }, {
  23922. "label": "夹江县",
  23923. "value": "511126"
  23924. }, {
  23925. "label": "沐川县",
  23926. "value": "511129"
  23927. }, {
  23928. "label": "峨边彝族自治县",
  23929. "value": "511132"
  23930. }, {
  23931. "label": "马边彝族自治县",
  23932. "value": "511133"
  23933. }, {
  23934. "label": "峨眉山市",
  23935. "value": "511181"
  23936. }], [{
  23937. "label": "顺庆区",
  23938. "value": "511302"
  23939. }, {
  23940. "label": "高坪区",
  23941. "value": "511303"
  23942. }, {
  23943. "label": "嘉陵区",
  23944. "value": "511304"
  23945. }, {
  23946. "label": "南部县",
  23947. "value": "511321"
  23948. }, {
  23949. "label": "营山县",
  23950. "value": "511322"
  23951. }, {
  23952. "label": "蓬安县",
  23953. "value": "511323"
  23954. }, {
  23955. "label": "仪陇县",
  23956. "value": "511324"
  23957. }, {
  23958. "label": "西充县",
  23959. "value": "511325"
  23960. }, {
  23961. "label": "阆中市",
  23962. "value": "511381"
  23963. }], [{
  23964. "label": "东坡区",
  23965. "value": "511402"
  23966. }, {
  23967. "label": "彭山区",
  23968. "value": "511403"
  23969. }, {
  23970. "label": "仁寿县",
  23971. "value": "511421"
  23972. }, {
  23973. "label": "洪雅县",
  23974. "value": "511423"
  23975. }, {
  23976. "label": "丹棱县",
  23977. "value": "511424"
  23978. }, {
  23979. "label": "青神县",
  23980. "value": "511425"
  23981. }], [{
  23982. "label": "翠屏区",
  23983. "value": "511502"
  23984. }, {
  23985. "label": "南溪区",
  23986. "value": "511503"
  23987. }, {
  23988. "label": "宜宾县",
  23989. "value": "511521"
  23990. }, {
  23991. "label": "江安县",
  23992. "value": "511523"
  23993. }, {
  23994. "label": "长宁县",
  23995. "value": "511524"
  23996. }, {
  23997. "label": "高县",
  23998. "value": "511525"
  23999. }, {
  24000. "label": "珙县",
  24001. "value": "511526"
  24002. }, {
  24003. "label": "筠连县",
  24004. "value": "511527"
  24005. }, {
  24006. "label": "兴文县",
  24007. "value": "511528"
  24008. }, {
  24009. "label": "屏山县",
  24010. "value": "511529"
  24011. }], [{
  24012. "label": "广安区",
  24013. "value": "511602"
  24014. }, {
  24015. "label": "前锋区",
  24016. "value": "511603"
  24017. }, {
  24018. "label": "岳池县",
  24019. "value": "511621"
  24020. }, {
  24021. "label": "武胜县",
  24022. "value": "511622"
  24023. }, {
  24024. "label": "邻水县",
  24025. "value": "511623"
  24026. }, {
  24027. "label": "华蓥市",
  24028. "value": "511681"
  24029. }], [{
  24030. "label": "通川区",
  24031. "value": "511702"
  24032. }, {
  24033. "label": "达川区",
  24034. "value": "511703"
  24035. }, {
  24036. "label": "宣汉县",
  24037. "value": "511722"
  24038. }, {
  24039. "label": "开江县",
  24040. "value": "511723"
  24041. }, {
  24042. "label": "大竹县",
  24043. "value": "511724"
  24044. }, {
  24045. "label": "渠县",
  24046. "value": "511725"
  24047. }, {
  24048. "label": "达州经济开发区",
  24049. "value": "511771"
  24050. }, {
  24051. "label": "万源市",
  24052. "value": "511781"
  24053. }], [{
  24054. "label": "雨城区",
  24055. "value": "511802"
  24056. }, {
  24057. "label": "名山区",
  24058. "value": "511803"
  24059. }, {
  24060. "label": "荥经县",
  24061. "value": "511822"
  24062. }, {
  24063. "label": "汉源县",
  24064. "value": "511823"
  24065. }, {
  24066. "label": "石棉县",
  24067. "value": "511824"
  24068. }, {
  24069. "label": "天全县",
  24070. "value": "511825"
  24071. }, {
  24072. "label": "芦山县",
  24073. "value": "511826"
  24074. }, {
  24075. "label": "宝兴县",
  24076. "value": "511827"
  24077. }], [{
  24078. "label": "巴州区",
  24079. "value": "511902"
  24080. }, {
  24081. "label": "恩阳区",
  24082. "value": "511903"
  24083. }, {
  24084. "label": "通江县",
  24085. "value": "511921"
  24086. }, {
  24087. "label": "南江县",
  24088. "value": "511922"
  24089. }, {
  24090. "label": "平昌县",
  24091. "value": "511923"
  24092. }, {
  24093. "label": "巴中经济开发区",
  24094. "value": "511971"
  24095. }], [{
  24096. "label": "雁江区",
  24097. "value": "512002"
  24098. }, {
  24099. "label": "安岳县",
  24100. "value": "512021"
  24101. }, {
  24102. "label": "乐至县",
  24103. "value": "512022"
  24104. }], [{
  24105. "label": "马尔康市",
  24106. "value": "513201"
  24107. }, {
  24108. "label": "汶川县",
  24109. "value": "513221"
  24110. }, {
  24111. "label": "理县",
  24112. "value": "513222"
  24113. }, {
  24114. "label": "茂县",
  24115. "value": "513223"
  24116. }, {
  24117. "label": "松潘县",
  24118. "value": "513224"
  24119. }, {
  24120. "label": "九寨沟县",
  24121. "value": "513225"
  24122. }, {
  24123. "label": "金川县",
  24124. "value": "513226"
  24125. }, {
  24126. "label": "小金县",
  24127. "value": "513227"
  24128. }, {
  24129. "label": "黑水县",
  24130. "value": "513228"
  24131. }, {
  24132. "label": "壤塘县",
  24133. "value": "513230"
  24134. }, {
  24135. "label": "阿坝县",
  24136. "value": "513231"
  24137. }, {
  24138. "label": "若尔盖县",
  24139. "value": "513232"
  24140. }, {
  24141. "label": "红原县",
  24142. "value": "513233"
  24143. }], [{
  24144. "label": "康定市",
  24145. "value": "513301"
  24146. }, {
  24147. "label": "泸定县",
  24148. "value": "513322"
  24149. }, {
  24150. "label": "丹巴县",
  24151. "value": "513323"
  24152. }, {
  24153. "label": "九龙县",
  24154. "value": "513324"
  24155. }, {
  24156. "label": "雅江县",
  24157. "value": "513325"
  24158. }, {
  24159. "label": "道孚县",
  24160. "value": "513326"
  24161. }, {
  24162. "label": "炉霍县",
  24163. "value": "513327"
  24164. }, {
  24165. "label": "甘孜县",
  24166. "value": "513328"
  24167. }, {
  24168. "label": "新龙县",
  24169. "value": "513329"
  24170. }, {
  24171. "label": "德格县",
  24172. "value": "513330"
  24173. }, {
  24174. "label": "白玉县",
  24175. "value": "513331"
  24176. }, {
  24177. "label": "石渠县",
  24178. "value": "513332"
  24179. }, {
  24180. "label": "色达县",
  24181. "value": "513333"
  24182. }, {
  24183. "label": "理塘县",
  24184. "value": "513334"
  24185. }, {
  24186. "label": "巴塘县",
  24187. "value": "513335"
  24188. }, {
  24189. "label": "乡城县",
  24190. "value": "513336"
  24191. }, {
  24192. "label": "稻城县",
  24193. "value": "513337"
  24194. }, {
  24195. "label": "得荣县",
  24196. "value": "513338"
  24197. }], [{
  24198. "label": "西昌市",
  24199. "value": "513401"
  24200. }, {
  24201. "label": "木里藏族自治县",
  24202. "value": "513422"
  24203. }, {
  24204. "label": "盐源县",
  24205. "value": "513423"
  24206. }, {
  24207. "label": "德昌县",
  24208. "value": "513424"
  24209. }, {
  24210. "label": "会理县",
  24211. "value": "513425"
  24212. }, {
  24213. "label": "会东县",
  24214. "value": "513426"
  24215. }, {
  24216. "label": "宁南县",
  24217. "value": "513427"
  24218. }, {
  24219. "label": "普格县",
  24220. "value": "513428"
  24221. }, {
  24222. "label": "布拖县",
  24223. "value": "513429"
  24224. }, {
  24225. "label": "金阳县",
  24226. "value": "513430"
  24227. }, {
  24228. "label": "昭觉县",
  24229. "value": "513431"
  24230. }, {
  24231. "label": "喜德县",
  24232. "value": "513432"
  24233. }, {
  24234. "label": "冕宁县",
  24235. "value": "513433"
  24236. }, {
  24237. "label": "越西县",
  24238. "value": "513434"
  24239. }, {
  24240. "label": "甘洛县",
  24241. "value": "513435"
  24242. }, {
  24243. "label": "美姑县",
  24244. "value": "513436"
  24245. }, {
  24246. "label": "雷波县",
  24247. "value": "513437"
  24248. }]], [[{
  24249. "label": "南明区",
  24250. "value": "520102"
  24251. }, {
  24252. "label": "云岩区",
  24253. "value": "520103"
  24254. }, {
  24255. "label": "花溪区",
  24256. "value": "520111"
  24257. }, {
  24258. "label": "乌当区",
  24259. "value": "520112"
  24260. }, {
  24261. "label": "白云区",
  24262. "value": "520113"
  24263. }, {
  24264. "label": "观山湖区",
  24265. "value": "520115"
  24266. }, {
  24267. "label": "开阳县",
  24268. "value": "520121"
  24269. }, {
  24270. "label": "息烽县",
  24271. "value": "520122"
  24272. }, {
  24273. "label": "修文县",
  24274. "value": "520123"
  24275. }, {
  24276. "label": "清镇市",
  24277. "value": "520181"
  24278. }], [{
  24279. "label": "钟山区",
  24280. "value": "520201"
  24281. }, {
  24282. "label": "六枝特区",
  24283. "value": "520203"
  24284. }, {
  24285. "label": "水城县",
  24286. "value": "520221"
  24287. }, {
  24288. "label": "盘州市",
  24289. "value": "520281"
  24290. }], [{
  24291. "label": "红花岗区",
  24292. "value": "520302"
  24293. }, {
  24294. "label": "汇川区",
  24295. "value": "520303"
  24296. }, {
  24297. "label": "播州区",
  24298. "value": "520304"
  24299. }, {
  24300. "label": "桐梓县",
  24301. "value": "520322"
  24302. }, {
  24303. "label": "绥阳县",
  24304. "value": "520323"
  24305. }, {
  24306. "label": "正安县",
  24307. "value": "520324"
  24308. }, {
  24309. "label": "道真仡佬族苗族自治县",
  24310. "value": "520325"
  24311. }, {
  24312. "label": "务川仡佬族苗族自治县",
  24313. "value": "520326"
  24314. }, {
  24315. "label": "凤冈县",
  24316. "value": "520327"
  24317. }, {
  24318. "label": "湄潭县",
  24319. "value": "520328"
  24320. }, {
  24321. "label": "余庆县",
  24322. "value": "520329"
  24323. }, {
  24324. "label": "习水县",
  24325. "value": "520330"
  24326. }, {
  24327. "label": "赤水市",
  24328. "value": "520381"
  24329. }, {
  24330. "label": "仁怀市",
  24331. "value": "520382"
  24332. }], [{
  24333. "label": "西秀区",
  24334. "value": "520402"
  24335. }, {
  24336. "label": "平坝区",
  24337. "value": "520403"
  24338. }, {
  24339. "label": "普定县",
  24340. "value": "520422"
  24341. }, {
  24342. "label": "镇宁布依族苗族自治县",
  24343. "value": "520423"
  24344. }, {
  24345. "label": "关岭布依族苗族自治县",
  24346. "value": "520424"
  24347. }, {
  24348. "label": "紫云苗族布依族自治县",
  24349. "value": "520425"
  24350. }], [{
  24351. "label": "七星关区",
  24352. "value": "520502"
  24353. }, {
  24354. "label": "大方县",
  24355. "value": "520521"
  24356. }, {
  24357. "label": "黔西县",
  24358. "value": "520522"
  24359. }, {
  24360. "label": "金沙县",
  24361. "value": "520523"
  24362. }, {
  24363. "label": "织金县",
  24364. "value": "520524"
  24365. }, {
  24366. "label": "纳雍县",
  24367. "value": "520525"
  24368. }, {
  24369. "label": "威宁彝族回族苗族自治县",
  24370. "value": "520526"
  24371. }, {
  24372. "label": "赫章县",
  24373. "value": "520527"
  24374. }], [{
  24375. "label": "碧江区",
  24376. "value": "520602"
  24377. }, {
  24378. "label": "万山区",
  24379. "value": "520603"
  24380. }, {
  24381. "label": "江口县",
  24382. "value": "520621"
  24383. }, {
  24384. "label": "玉屏侗族自治县",
  24385. "value": "520622"
  24386. }, {
  24387. "label": "石阡县",
  24388. "value": "520623"
  24389. }, {
  24390. "label": "思南县",
  24391. "value": "520624"
  24392. }, {
  24393. "label": "印江土家族苗族自治县",
  24394. "value": "520625"
  24395. }, {
  24396. "label": "德江县",
  24397. "value": "520626"
  24398. }, {
  24399. "label": "沿河土家族自治县",
  24400. "value": "520627"
  24401. }, {
  24402. "label": "松桃苗族自治县",
  24403. "value": "520628"
  24404. }], [{
  24405. "label": "兴义市",
  24406. "value": "522301"
  24407. }, {
  24408. "label": "兴仁县",
  24409. "value": "522322"
  24410. }, {
  24411. "label": "普安县",
  24412. "value": "522323"
  24413. }, {
  24414. "label": "晴隆县",
  24415. "value": "522324"
  24416. }, {
  24417. "label": "贞丰县",
  24418. "value": "522325"
  24419. }, {
  24420. "label": "望谟县",
  24421. "value": "522326"
  24422. }, {
  24423. "label": "册亨县",
  24424. "value": "522327"
  24425. }, {
  24426. "label": "安龙县",
  24427. "value": "522328"
  24428. }], [{
  24429. "label": "凯里市",
  24430. "value": "522601"
  24431. }, {
  24432. "label": "黄平县",
  24433. "value": "522622"
  24434. }, {
  24435. "label": "施秉县",
  24436. "value": "522623"
  24437. }, {
  24438. "label": "三穗县",
  24439. "value": "522624"
  24440. }, {
  24441. "label": "镇远县",
  24442. "value": "522625"
  24443. }, {
  24444. "label": "岑巩县",
  24445. "value": "522626"
  24446. }, {
  24447. "label": "天柱县",
  24448. "value": "522627"
  24449. }, {
  24450. "label": "锦屏县",
  24451. "value": "522628"
  24452. }, {
  24453. "label": "剑河县",
  24454. "value": "522629"
  24455. }, {
  24456. "label": "台江县",
  24457. "value": "522630"
  24458. }, {
  24459. "label": "黎平县",
  24460. "value": "522631"
  24461. }, {
  24462. "label": "榕江县",
  24463. "value": "522632"
  24464. }, {
  24465. "label": "从江县",
  24466. "value": "522633"
  24467. }, {
  24468. "label": "雷山县",
  24469. "value": "522634"
  24470. }, {
  24471. "label": "麻江县",
  24472. "value": "522635"
  24473. }, {
  24474. "label": "丹寨县",
  24475. "value": "522636"
  24476. }], [{
  24477. "label": "都匀市",
  24478. "value": "522701"
  24479. }, {
  24480. "label": "福泉市",
  24481. "value": "522702"
  24482. }, {
  24483. "label": "荔波县",
  24484. "value": "522722"
  24485. }, {
  24486. "label": "贵定县",
  24487. "value": "522723"
  24488. }, {
  24489. "label": "瓮安县",
  24490. "value": "522725"
  24491. }, {
  24492. "label": "独山县",
  24493. "value": "522726"
  24494. }, {
  24495. "label": "平塘县",
  24496. "value": "522727"
  24497. }, {
  24498. "label": "罗甸县",
  24499. "value": "522728"
  24500. }, {
  24501. "label": "长顺县",
  24502. "value": "522729"
  24503. }, {
  24504. "label": "龙里县",
  24505. "value": "522730"
  24506. }, {
  24507. "label": "惠水县",
  24508. "value": "522731"
  24509. }, {
  24510. "label": "三都水族自治县",
  24511. "value": "522732"
  24512. }]], [[{
  24513. "label": "五华区",
  24514. "value": "530102"
  24515. }, {
  24516. "label": "盘龙区",
  24517. "value": "530103"
  24518. }, {
  24519. "label": "官渡区",
  24520. "value": "530111"
  24521. }, {
  24522. "label": "西山区",
  24523. "value": "530112"
  24524. }, {
  24525. "label": "东川区",
  24526. "value": "530113"
  24527. }, {
  24528. "label": "呈贡区",
  24529. "value": "530114"
  24530. }, {
  24531. "label": "晋宁区",
  24532. "value": "530115"
  24533. }, {
  24534. "label": "富民县",
  24535. "value": "530124"
  24536. }, {
  24537. "label": "宜良县",
  24538. "value": "530125"
  24539. }, {
  24540. "label": "石林彝族自治县",
  24541. "value": "530126"
  24542. }, {
  24543. "label": "嵩明县",
  24544. "value": "530127"
  24545. }, {
  24546. "label": "禄劝彝族苗族自治县",
  24547. "value": "530128"
  24548. }, {
  24549. "label": "寻甸回族彝族自治县",
  24550. "value": "530129"
  24551. }, {
  24552. "label": "安宁市",
  24553. "value": "530181"
  24554. }], [{
  24555. "label": "麒麟区",
  24556. "value": "530302"
  24557. }, {
  24558. "label": "沾益区",
  24559. "value": "530303"
  24560. }, {
  24561. "label": "马龙县",
  24562. "value": "530321"
  24563. }, {
  24564. "label": "陆良县",
  24565. "value": "530322"
  24566. }, {
  24567. "label": "师宗县",
  24568. "value": "530323"
  24569. }, {
  24570. "label": "罗平县",
  24571. "value": "530324"
  24572. }, {
  24573. "label": "富源县",
  24574. "value": "530325"
  24575. }, {
  24576. "label": "会泽县",
  24577. "value": "530326"
  24578. }, {
  24579. "label": "宣威市",
  24580. "value": "530381"
  24581. }], [{
  24582. "label": "红塔区",
  24583. "value": "530402"
  24584. }, {
  24585. "label": "江川区",
  24586. "value": "530403"
  24587. }, {
  24588. "label": "澄江县",
  24589. "value": "530422"
  24590. }, {
  24591. "label": "通海县",
  24592. "value": "530423"
  24593. }, {
  24594. "label": "华宁县",
  24595. "value": "530424"
  24596. }, {
  24597. "label": "易门县",
  24598. "value": "530425"
  24599. }, {
  24600. "label": "峨山彝族自治县",
  24601. "value": "530426"
  24602. }, {
  24603. "label": "新平彝族傣族自治县",
  24604. "value": "530427"
  24605. }, {
  24606. "label": "元江哈尼族彝族傣族自治县",
  24607. "value": "530428"
  24608. }], [{
  24609. "label": "隆阳区",
  24610. "value": "530502"
  24611. }, {
  24612. "label": "施甸县",
  24613. "value": "530521"
  24614. }, {
  24615. "label": "龙陵县",
  24616. "value": "530523"
  24617. }, {
  24618. "label": "昌宁县",
  24619. "value": "530524"
  24620. }, {
  24621. "label": "腾冲市",
  24622. "value": "530581"
  24623. }], [{
  24624. "label": "昭阳区",
  24625. "value": "530602"
  24626. }, {
  24627. "label": "鲁甸县",
  24628. "value": "530621"
  24629. }, {
  24630. "label": "巧家县",
  24631. "value": "530622"
  24632. }, {
  24633. "label": "盐津县",
  24634. "value": "530623"
  24635. }, {
  24636. "label": "大关县",
  24637. "value": "530624"
  24638. }, {
  24639. "label": "永善县",
  24640. "value": "530625"
  24641. }, {
  24642. "label": "绥江县",
  24643. "value": "530626"
  24644. }, {
  24645. "label": "镇雄县",
  24646. "value": "530627"
  24647. }, {
  24648. "label": "彝良县",
  24649. "value": "530628"
  24650. }, {
  24651. "label": "威信县",
  24652. "value": "530629"
  24653. }, {
  24654. "label": "水富县",
  24655. "value": "530630"
  24656. }], [{
  24657. "label": "古城区",
  24658. "value": "530702"
  24659. }, {
  24660. "label": "玉龙纳西族自治县",
  24661. "value": "530721"
  24662. }, {
  24663. "label": "永胜县",
  24664. "value": "530722"
  24665. }, {
  24666. "label": "华坪县",
  24667. "value": "530723"
  24668. }, {
  24669. "label": "宁蒗彝族自治县",
  24670. "value": "530724"
  24671. }], [{
  24672. "label": "思茅区",
  24673. "value": "530802"
  24674. }, {
  24675. "label": "宁洱哈尼族彝族自治县",
  24676. "value": "530821"
  24677. }, {
  24678. "label": "墨江哈尼族自治县",
  24679. "value": "530822"
  24680. }, {
  24681. "label": "景东彝族自治县",
  24682. "value": "530823"
  24683. }, {
  24684. "label": "景谷傣族彝族自治县",
  24685. "value": "530824"
  24686. }, {
  24687. "label": "镇沅彝族哈尼族拉祜族自治县",
  24688. "value": "530825"
  24689. }, {
  24690. "label": "江城哈尼族彝族自治县",
  24691. "value": "530826"
  24692. }, {
  24693. "label": "孟连傣族拉祜族佤族自治县",
  24694. "value": "530827"
  24695. }, {
  24696. "label": "澜沧拉祜族自治县",
  24697. "value": "530828"
  24698. }, {
  24699. "label": "西盟佤族自治县",
  24700. "value": "530829"
  24701. }], [{
  24702. "label": "临翔区",
  24703. "value": "530902"
  24704. }, {
  24705. "label": "凤庆县",
  24706. "value": "530921"
  24707. }, {
  24708. "label": "云县",
  24709. "value": "530922"
  24710. }, {
  24711. "label": "永德县",
  24712. "value": "530923"
  24713. }, {
  24714. "label": "镇康县",
  24715. "value": "530924"
  24716. }, {
  24717. "label": "双江拉祜族佤族布朗族傣族自治县",
  24718. "value": "530925"
  24719. }, {
  24720. "label": "耿马傣族佤族自治县",
  24721. "value": "530926"
  24722. }, {
  24723. "label": "沧源佤族自治县",
  24724. "value": "530927"
  24725. }], [{
  24726. "label": "楚雄市",
  24727. "value": "532301"
  24728. }, {
  24729. "label": "双柏县",
  24730. "value": "532322"
  24731. }, {
  24732. "label": "牟定县",
  24733. "value": "532323"
  24734. }, {
  24735. "label": "南华县",
  24736. "value": "532324"
  24737. }, {
  24738. "label": "姚安县",
  24739. "value": "532325"
  24740. }, {
  24741. "label": "大姚县",
  24742. "value": "532326"
  24743. }, {
  24744. "label": "永仁县",
  24745. "value": "532327"
  24746. }, {
  24747. "label": "元谋县",
  24748. "value": "532328"
  24749. }, {
  24750. "label": "武定县",
  24751. "value": "532329"
  24752. }, {
  24753. "label": "禄丰县",
  24754. "value": "532331"
  24755. }], [{
  24756. "label": "个旧市",
  24757. "value": "532501"
  24758. }, {
  24759. "label": "开远市",
  24760. "value": "532502"
  24761. }, {
  24762. "label": "蒙自市",
  24763. "value": "532503"
  24764. }, {
  24765. "label": "弥勒市",
  24766. "value": "532504"
  24767. }, {
  24768. "label": "屏边苗族自治县",
  24769. "value": "532523"
  24770. }, {
  24771. "label": "建水县",
  24772. "value": "532524"
  24773. }, {
  24774. "label": "石屏县",
  24775. "value": "532525"
  24776. }, {
  24777. "label": "泸西县",
  24778. "value": "532527"
  24779. }, {
  24780. "label": "元阳县",
  24781. "value": "532528"
  24782. }, {
  24783. "label": "红河县",
  24784. "value": "532529"
  24785. }, {
  24786. "label": "金平苗族瑶族傣族自治县",
  24787. "value": "532530"
  24788. }, {
  24789. "label": "绿春县",
  24790. "value": "532531"
  24791. }, {
  24792. "label": "河口瑶族自治县",
  24793. "value": "532532"
  24794. }], [{
  24795. "label": "文山市",
  24796. "value": "532601"
  24797. }, {
  24798. "label": "砚山县",
  24799. "value": "532622"
  24800. }, {
  24801. "label": "西畴县",
  24802. "value": "532623"
  24803. }, {
  24804. "label": "麻栗坡县",
  24805. "value": "532624"
  24806. }, {
  24807. "label": "马关县",
  24808. "value": "532625"
  24809. }, {
  24810. "label": "丘北县",
  24811. "value": "532626"
  24812. }, {
  24813. "label": "广南县",
  24814. "value": "532627"
  24815. }, {
  24816. "label": "富宁县",
  24817. "value": "532628"
  24818. }], [{
  24819. "label": "景洪市",
  24820. "value": "532801"
  24821. }, {
  24822. "label": "勐海县",
  24823. "value": "532822"
  24824. }, {
  24825. "label": "勐腊县",
  24826. "value": "532823"
  24827. }], [{
  24828. "label": "大理市",
  24829. "value": "532901"
  24830. }, {
  24831. "label": "漾濞彝族自治县",
  24832. "value": "532922"
  24833. }, {
  24834. "label": "祥云县",
  24835. "value": "532923"
  24836. }, {
  24837. "label": "宾川县",
  24838. "value": "532924"
  24839. }, {
  24840. "label": "弥渡县",
  24841. "value": "532925"
  24842. }, {
  24843. "label": "南涧彝族自治县",
  24844. "value": "532926"
  24845. }, {
  24846. "label": "巍山彝族回族自治县",
  24847. "value": "532927"
  24848. }, {
  24849. "label": "永平县",
  24850. "value": "532928"
  24851. }, {
  24852. "label": "云龙县",
  24853. "value": "532929"
  24854. }, {
  24855. "label": "洱源县",
  24856. "value": "532930"
  24857. }, {
  24858. "label": "剑川县",
  24859. "value": "532931"
  24860. }, {
  24861. "label": "鹤庆县",
  24862. "value": "532932"
  24863. }], [{
  24864. "label": "瑞丽市",
  24865. "value": "533102"
  24866. }, {
  24867. "label": "芒市",
  24868. "value": "533103"
  24869. }, {
  24870. "label": "梁河县",
  24871. "value": "533122"
  24872. }, {
  24873. "label": "盈江县",
  24874. "value": "533123"
  24875. }, {
  24876. "label": "陇川县",
  24877. "value": "533124"
  24878. }], [{
  24879. "label": "泸水市",
  24880. "value": "533301"
  24881. }, {
  24882. "label": "福贡县",
  24883. "value": "533323"
  24884. }, {
  24885. "label": "贡山独龙族怒族自治县",
  24886. "value": "533324"
  24887. }, {
  24888. "label": "兰坪白族普米族自治县",
  24889. "value": "533325"
  24890. }], [{
  24891. "label": "香格里拉市",
  24892. "value": "533401"
  24893. }, {
  24894. "label": "德钦县",
  24895. "value": "533422"
  24896. }, {
  24897. "label": "维西傈僳族自治县",
  24898. "value": "533423"
  24899. }]], [[{
  24900. "label": "城关区",
  24901. "value": "540102"
  24902. }, {
  24903. "label": "堆龙德庆区",
  24904. "value": "540103"
  24905. }, {
  24906. "label": "林周县",
  24907. "value": "540121"
  24908. }, {
  24909. "label": "当雄县",
  24910. "value": "540122"
  24911. }, {
  24912. "label": "尼木县",
  24913. "value": "540123"
  24914. }, {
  24915. "label": "曲水县",
  24916. "value": "540124"
  24917. }, {
  24918. "label": "达孜县",
  24919. "value": "540126"
  24920. }, {
  24921. "label": "墨竹工卡县",
  24922. "value": "540127"
  24923. }, {
  24924. "label": "格尔木藏青工业园区",
  24925. "value": "540171"
  24926. }, {
  24927. "label": "拉萨经济技术开发区",
  24928. "value": "540172"
  24929. }, {
  24930. "label": "西藏文化旅游创意园区",
  24931. "value": "540173"
  24932. }, {
  24933. "label": "达孜工业园区",
  24934. "value": "540174"
  24935. }], [{
  24936. "label": "桑珠孜区",
  24937. "value": "540202"
  24938. }, {
  24939. "label": "南木林县",
  24940. "value": "540221"
  24941. }, {
  24942. "label": "江孜县",
  24943. "value": "540222"
  24944. }, {
  24945. "label": "定日县",
  24946. "value": "540223"
  24947. }, {
  24948. "label": "萨迦县",
  24949. "value": "540224"
  24950. }, {
  24951. "label": "拉孜县",
  24952. "value": "540225"
  24953. }, {
  24954. "label": "昂仁县",
  24955. "value": "540226"
  24956. }, {
  24957. "label": "谢通门县",
  24958. "value": "540227"
  24959. }, {
  24960. "label": "白朗县",
  24961. "value": "540228"
  24962. }, {
  24963. "label": "仁布县",
  24964. "value": "540229"
  24965. }, {
  24966. "label": "康马县",
  24967. "value": "540230"
  24968. }, {
  24969. "label": "定结县",
  24970. "value": "540231"
  24971. }, {
  24972. "label": "仲巴县",
  24973. "value": "540232"
  24974. }, {
  24975. "label": "亚东县",
  24976. "value": "540233"
  24977. }, {
  24978. "label": "吉隆县",
  24979. "value": "540234"
  24980. }, {
  24981. "label": "聂拉木县",
  24982. "value": "540235"
  24983. }, {
  24984. "label": "萨嘎县",
  24985. "value": "540236"
  24986. }, {
  24987. "label": "岗巴县",
  24988. "value": "540237"
  24989. }], [{
  24990. "label": "卡若区",
  24991. "value": "540302"
  24992. }, {
  24993. "label": "江达县",
  24994. "value": "540321"
  24995. }, {
  24996. "label": "贡觉县",
  24997. "value": "540322"
  24998. }, {
  24999. "label": "类乌齐县",
  25000. "value": "540323"
  25001. }, {
  25002. "label": "丁青县",
  25003. "value": "540324"
  25004. }, {
  25005. "label": "察雅县",
  25006. "value": "540325"
  25007. }, {
  25008. "label": "八宿县",
  25009. "value": "540326"
  25010. }, {
  25011. "label": "左贡县",
  25012. "value": "540327"
  25013. }, {
  25014. "label": "芒康县",
  25015. "value": "540328"
  25016. }, {
  25017. "label": "洛隆县",
  25018. "value": "540329"
  25019. }, {
  25020. "label": "边坝县",
  25021. "value": "540330"
  25022. }], [{
  25023. "label": "巴宜区",
  25024. "value": "540402"
  25025. }, {
  25026. "label": "工布江达县",
  25027. "value": "540421"
  25028. }, {
  25029. "label": "米林县",
  25030. "value": "540422"
  25031. }, {
  25032. "label": "墨脱县",
  25033. "value": "540423"
  25034. }, {
  25035. "label": "波密县",
  25036. "value": "540424"
  25037. }, {
  25038. "label": "察隅县",
  25039. "value": "540425"
  25040. }, {
  25041. "label": "朗县",
  25042. "value": "540426"
  25043. }], [{
  25044. "label": "乃东区",
  25045. "value": "540502"
  25046. }, {
  25047. "label": "扎囊县",
  25048. "value": "540521"
  25049. }, {
  25050. "label": "贡嘎县",
  25051. "value": "540522"
  25052. }, {
  25053. "label": "桑日县",
  25054. "value": "540523"
  25055. }, {
  25056. "label": "琼结县",
  25057. "value": "540524"
  25058. }, {
  25059. "label": "曲松县",
  25060. "value": "540525"
  25061. }, {
  25062. "label": "措美县",
  25063. "value": "540526"
  25064. }, {
  25065. "label": "洛扎县",
  25066. "value": "540527"
  25067. }, {
  25068. "label": "加查县",
  25069. "value": "540528"
  25070. }, {
  25071. "label": "隆子县",
  25072. "value": "540529"
  25073. }, {
  25074. "label": "错那县",
  25075. "value": "540530"
  25076. }, {
  25077. "label": "浪卡子县",
  25078. "value": "540531"
  25079. }], [{
  25080. "label": "那曲县",
  25081. "value": "542421"
  25082. }, {
  25083. "label": "嘉黎县",
  25084. "value": "542422"
  25085. }, {
  25086. "label": "比如县",
  25087. "value": "542423"
  25088. }, {
  25089. "label": "聂荣县",
  25090. "value": "542424"
  25091. }, {
  25092. "label": "安多县",
  25093. "value": "542425"
  25094. }, {
  25095. "label": "申扎县",
  25096. "value": "542426"
  25097. }, {
  25098. "label": "索县",
  25099. "value": "542427"
  25100. }, {
  25101. "label": "班戈县",
  25102. "value": "542428"
  25103. }, {
  25104. "label": "巴青县",
  25105. "value": "542429"
  25106. }, {
  25107. "label": "尼玛县",
  25108. "value": "542430"
  25109. }, {
  25110. "label": "双湖县",
  25111. "value": "542431"
  25112. }], [{
  25113. "label": "普兰县",
  25114. "value": "542521"
  25115. }, {
  25116. "label": "札达县",
  25117. "value": "542522"
  25118. }, {
  25119. "label": "噶尔县",
  25120. "value": "542523"
  25121. }, {
  25122. "label": "日土县",
  25123. "value": "542524"
  25124. }, {
  25125. "label": "革吉县",
  25126. "value": "542525"
  25127. }, {
  25128. "label": "改则县",
  25129. "value": "542526"
  25130. }, {
  25131. "label": "措勤县",
  25132. "value": "542527"
  25133. }]], [[{
  25134. "label": "新城区",
  25135. "value": "610102"
  25136. }, {
  25137. "label": "碑林区",
  25138. "value": "610103"
  25139. }, {
  25140. "label": "莲湖区",
  25141. "value": "610104"
  25142. }, {
  25143. "label": "灞桥区",
  25144. "value": "610111"
  25145. }, {
  25146. "label": "未央区",
  25147. "value": "610112"
  25148. }, {
  25149. "label": "雁塔区",
  25150. "value": "610113"
  25151. }, {
  25152. "label": "阎良区",
  25153. "value": "610114"
  25154. }, {
  25155. "label": "临潼区",
  25156. "value": "610115"
  25157. }, {
  25158. "label": "长安区",
  25159. "value": "610116"
  25160. }, {
  25161. "label": "高陵区",
  25162. "value": "610117"
  25163. }, {
  25164. "label": "鄠邑区",
  25165. "value": "610118"
  25166. }, {
  25167. "label": "蓝田县",
  25168. "value": "610122"
  25169. }, {
  25170. "label": "周至县",
  25171. "value": "610124"
  25172. }], [{
  25173. "label": "王益区",
  25174. "value": "610202"
  25175. }, {
  25176. "label": "印台区",
  25177. "value": "610203"
  25178. }, {
  25179. "label": "耀州区",
  25180. "value": "610204"
  25181. }, {
  25182. "label": "宜君县",
  25183. "value": "610222"
  25184. }], [{
  25185. "label": "渭滨区",
  25186. "value": "610302"
  25187. }, {
  25188. "label": "金台区",
  25189. "value": "610303"
  25190. }, {
  25191. "label": "陈仓区",
  25192. "value": "610304"
  25193. }, {
  25194. "label": "凤翔县",
  25195. "value": "610322"
  25196. }, {
  25197. "label": "岐山县",
  25198. "value": "610323"
  25199. }, {
  25200. "label": "扶风县",
  25201. "value": "610324"
  25202. }, {
  25203. "label": "眉县",
  25204. "value": "610326"
  25205. }, {
  25206. "label": "陇县",
  25207. "value": "610327"
  25208. }, {
  25209. "label": "千阳县",
  25210. "value": "610328"
  25211. }, {
  25212. "label": "麟游县",
  25213. "value": "610329"
  25214. }, {
  25215. "label": "凤县",
  25216. "value": "610330"
  25217. }, {
  25218. "label": "太白县",
  25219. "value": "610331"
  25220. }], [{
  25221. "label": "秦都区",
  25222. "value": "610402"
  25223. }, {
  25224. "label": "杨陵区",
  25225. "value": "610403"
  25226. }, {
  25227. "label": "渭城区",
  25228. "value": "610404"
  25229. }, {
  25230. "label": "三原县",
  25231. "value": "610422"
  25232. }, {
  25233. "label": "泾阳县",
  25234. "value": "610423"
  25235. }, {
  25236. "label": "乾县",
  25237. "value": "610424"
  25238. }, {
  25239. "label": "礼泉县",
  25240. "value": "610425"
  25241. }, {
  25242. "label": "永寿县",
  25243. "value": "610426"
  25244. }, {
  25245. "label": "彬县",
  25246. "value": "610427"
  25247. }, {
  25248. "label": "长武县",
  25249. "value": "610428"
  25250. }, {
  25251. "label": "旬邑县",
  25252. "value": "610429"
  25253. }, {
  25254. "label": "淳化县",
  25255. "value": "610430"
  25256. }, {
  25257. "label": "武功县",
  25258. "value": "610431"
  25259. }, {
  25260. "label": "兴平市",
  25261. "value": "610481"
  25262. }], [{
  25263. "label": "临渭区",
  25264. "value": "610502"
  25265. }, {
  25266. "label": "华州区",
  25267. "value": "610503"
  25268. }, {
  25269. "label": "潼关县",
  25270. "value": "610522"
  25271. }, {
  25272. "label": "大荔县",
  25273. "value": "610523"
  25274. }, {
  25275. "label": "合阳县",
  25276. "value": "610524"
  25277. }, {
  25278. "label": "澄城县",
  25279. "value": "610525"
  25280. }, {
  25281. "label": "蒲城县",
  25282. "value": "610526"
  25283. }, {
  25284. "label": "白水县",
  25285. "value": "610527"
  25286. }, {
  25287. "label": "富平县",
  25288. "value": "610528"
  25289. }, {
  25290. "label": "韩城市",
  25291. "value": "610581"
  25292. }, {
  25293. "label": "华阴市",
  25294. "value": "610582"
  25295. }], [{
  25296. "label": "宝塔区",
  25297. "value": "610602"
  25298. }, {
  25299. "label": "安塞区",
  25300. "value": "610603"
  25301. }, {
  25302. "label": "延长县",
  25303. "value": "610621"
  25304. }, {
  25305. "label": "延川县",
  25306. "value": "610622"
  25307. }, {
  25308. "label": "子长县",
  25309. "value": "610623"
  25310. }, {
  25311. "label": "志丹县",
  25312. "value": "610625"
  25313. }, {
  25314. "label": "吴起县",
  25315. "value": "610626"
  25316. }, {
  25317. "label": "甘泉县",
  25318. "value": "610627"
  25319. }, {
  25320. "label": "富县",
  25321. "value": "610628"
  25322. }, {
  25323. "label": "洛川县",
  25324. "value": "610629"
  25325. }, {
  25326. "label": "宜川县",
  25327. "value": "610630"
  25328. }, {
  25329. "label": "黄龙县",
  25330. "value": "610631"
  25331. }, {
  25332. "label": "黄陵县",
  25333. "value": "610632"
  25334. }], [{
  25335. "label": "汉台区",
  25336. "value": "610702"
  25337. }, {
  25338. "label": "南郑区",
  25339. "value": "610703"
  25340. }, {
  25341. "label": "城固县",
  25342. "value": "610722"
  25343. }, {
  25344. "label": "洋县",
  25345. "value": "610723"
  25346. }, {
  25347. "label": "西乡县",
  25348. "value": "610724"
  25349. }, {
  25350. "label": "勉县",
  25351. "value": "610725"
  25352. }, {
  25353. "label": "宁强县",
  25354. "value": "610726"
  25355. }, {
  25356. "label": "略阳县",
  25357. "value": "610727"
  25358. }, {
  25359. "label": "镇巴县",
  25360. "value": "610728"
  25361. }, {
  25362. "label": "留坝县",
  25363. "value": "610729"
  25364. }, {
  25365. "label": "佛坪县",
  25366. "value": "610730"
  25367. }], [{
  25368. "label": "榆阳区",
  25369. "value": "610802"
  25370. }, {
  25371. "label": "横山区",
  25372. "value": "610803"
  25373. }, {
  25374. "label": "府谷县",
  25375. "value": "610822"
  25376. }, {
  25377. "label": "靖边县",
  25378. "value": "610824"
  25379. }, {
  25380. "label": "定边县",
  25381. "value": "610825"
  25382. }, {
  25383. "label": "绥德县",
  25384. "value": "610826"
  25385. }, {
  25386. "label": "米脂县",
  25387. "value": "610827"
  25388. }, {
  25389. "label": "佳县",
  25390. "value": "610828"
  25391. }, {
  25392. "label": "吴堡县",
  25393. "value": "610829"
  25394. }, {
  25395. "label": "清涧县",
  25396. "value": "610830"
  25397. }, {
  25398. "label": "子洲县",
  25399. "value": "610831"
  25400. }, {
  25401. "label": "神木市",
  25402. "value": "610881"
  25403. }], [{
  25404. "label": "汉滨区",
  25405. "value": "610902"
  25406. }, {
  25407. "label": "汉阴县",
  25408. "value": "610921"
  25409. }, {
  25410. "label": "石泉县",
  25411. "value": "610922"
  25412. }, {
  25413. "label": "宁陕县",
  25414. "value": "610923"
  25415. }, {
  25416. "label": "紫阳县",
  25417. "value": "610924"
  25418. }, {
  25419. "label": "岚皋县",
  25420. "value": "610925"
  25421. }, {
  25422. "label": "平利县",
  25423. "value": "610926"
  25424. }, {
  25425. "label": "镇坪县",
  25426. "value": "610927"
  25427. }, {
  25428. "label": "旬阳县",
  25429. "value": "610928"
  25430. }, {
  25431. "label": "白河县",
  25432. "value": "610929"
  25433. }], [{
  25434. "label": "商州区",
  25435. "value": "611002"
  25436. }, {
  25437. "label": "洛南县",
  25438. "value": "611021"
  25439. }, {
  25440. "label": "丹凤县",
  25441. "value": "611022"
  25442. }, {
  25443. "label": "商南县",
  25444. "value": "611023"
  25445. }, {
  25446. "label": "山阳县",
  25447. "value": "611024"
  25448. }, {
  25449. "label": "镇安县",
  25450. "value": "611025"
  25451. }, {
  25452. "label": "柞水县",
  25453. "value": "611026"
  25454. }]], [[{
  25455. "label": "城关区",
  25456. "value": "620102"
  25457. }, {
  25458. "label": "七里河区",
  25459. "value": "620103"
  25460. }, {
  25461. "label": "西固区",
  25462. "value": "620104"
  25463. }, {
  25464. "label": "安宁区",
  25465. "value": "620105"
  25466. }, {
  25467. "label": "红古区",
  25468. "value": "620111"
  25469. }, {
  25470. "label": "永登县",
  25471. "value": "620121"
  25472. }, {
  25473. "label": "皋兰县",
  25474. "value": "620122"
  25475. }, {
  25476. "label": "榆中县",
  25477. "value": "620123"
  25478. }, {
  25479. "label": "兰州新区",
  25480. "value": "620171"
  25481. }], [{
  25482. "label": "嘉峪关市",
  25483. "value": "620201"
  25484. }], [{
  25485. "label": "金川区",
  25486. "value": "620302"
  25487. }, {
  25488. "label": "永昌县",
  25489. "value": "620321"
  25490. }], [{
  25491. "label": "白银区",
  25492. "value": "620402"
  25493. }, {
  25494. "label": "平川区",
  25495. "value": "620403"
  25496. }, {
  25497. "label": "靖远县",
  25498. "value": "620421"
  25499. }, {
  25500. "label": "会宁县",
  25501. "value": "620422"
  25502. }, {
  25503. "label": "景泰县",
  25504. "value": "620423"
  25505. }], [{
  25506. "label": "秦州区",
  25507. "value": "620502"
  25508. }, {
  25509. "label": "麦积区",
  25510. "value": "620503"
  25511. }, {
  25512. "label": "清水县",
  25513. "value": "620521"
  25514. }, {
  25515. "label": "秦安县",
  25516. "value": "620522"
  25517. }, {
  25518. "label": "甘谷县",
  25519. "value": "620523"
  25520. }, {
  25521. "label": "武山县",
  25522. "value": "620524"
  25523. }, {
  25524. "label": "张家川回族自治县",
  25525. "value": "620525"
  25526. }], [{
  25527. "label": "凉州区",
  25528. "value": "620602"
  25529. }, {
  25530. "label": "民勤县",
  25531. "value": "620621"
  25532. }, {
  25533. "label": "古浪县",
  25534. "value": "620622"
  25535. }, {
  25536. "label": "天祝藏族自治县",
  25537. "value": "620623"
  25538. }], [{
  25539. "label": "甘州区",
  25540. "value": "620702"
  25541. }, {
  25542. "label": "肃南裕固族自治县",
  25543. "value": "620721"
  25544. }, {
  25545. "label": "民乐县",
  25546. "value": "620722"
  25547. }, {
  25548. "label": "临泽县",
  25549. "value": "620723"
  25550. }, {
  25551. "label": "高台县",
  25552. "value": "620724"
  25553. }, {
  25554. "label": "山丹县",
  25555. "value": "620725"
  25556. }], [{
  25557. "label": "崆峒区",
  25558. "value": "620802"
  25559. }, {
  25560. "label": "泾川县",
  25561. "value": "620821"
  25562. }, {
  25563. "label": "灵台县",
  25564. "value": "620822"
  25565. }, {
  25566. "label": "崇信县",
  25567. "value": "620823"
  25568. }, {
  25569. "label": "华亭县",
  25570. "value": "620824"
  25571. }, {
  25572. "label": "庄浪县",
  25573. "value": "620825"
  25574. }, {
  25575. "label": "静宁县",
  25576. "value": "620826"
  25577. }, {
  25578. "label": "平凉工业园区",
  25579. "value": "620871"
  25580. }], [{
  25581. "label": "肃州区",
  25582. "value": "620902"
  25583. }, {
  25584. "label": "金塔县",
  25585. "value": "620921"
  25586. }, {
  25587. "label": "瓜州县",
  25588. "value": "620922"
  25589. }, {
  25590. "label": "肃北蒙古族自治县",
  25591. "value": "620923"
  25592. }, {
  25593. "label": "阿克塞哈萨克族自治县",
  25594. "value": "620924"
  25595. }, {
  25596. "label": "玉门市",
  25597. "value": "620981"
  25598. }, {
  25599. "label": "敦煌市",
  25600. "value": "620982"
  25601. }], [{
  25602. "label": "西峰区",
  25603. "value": "621002"
  25604. }, {
  25605. "label": "庆城县",
  25606. "value": "621021"
  25607. }, {
  25608. "label": "环县",
  25609. "value": "621022"
  25610. }, {
  25611. "label": "华池县",
  25612. "value": "621023"
  25613. }, {
  25614. "label": "合水县",
  25615. "value": "621024"
  25616. }, {
  25617. "label": "正宁县",
  25618. "value": "621025"
  25619. }, {
  25620. "label": "宁县",
  25621. "value": "621026"
  25622. }, {
  25623. "label": "镇原县",
  25624. "value": "621027"
  25625. }], [{
  25626. "label": "安定区",
  25627. "value": "621102"
  25628. }, {
  25629. "label": "通渭县",
  25630. "value": "621121"
  25631. }, {
  25632. "label": "陇西县",
  25633. "value": "621122"
  25634. }, {
  25635. "label": "渭源县",
  25636. "value": "621123"
  25637. }, {
  25638. "label": "临洮县",
  25639. "value": "621124"
  25640. }, {
  25641. "label": "漳县",
  25642. "value": "621125"
  25643. }, {
  25644. "label": "岷县",
  25645. "value": "621126"
  25646. }], [{
  25647. "label": "武都区",
  25648. "value": "621202"
  25649. }, {
  25650. "label": "成县",
  25651. "value": "621221"
  25652. }, {
  25653. "label": "文县",
  25654. "value": "621222"
  25655. }, {
  25656. "label": "宕昌县",
  25657. "value": "621223"
  25658. }, {
  25659. "label": "康县",
  25660. "value": "621224"
  25661. }, {
  25662. "label": "西和县",
  25663. "value": "621225"
  25664. }, {
  25665. "label": "礼县",
  25666. "value": "621226"
  25667. }, {
  25668. "label": "徽县",
  25669. "value": "621227"
  25670. }, {
  25671. "label": "两当县",
  25672. "value": "621228"
  25673. }], [{
  25674. "label": "临夏市",
  25675. "value": "622901"
  25676. }, {
  25677. "label": "临夏县",
  25678. "value": "622921"
  25679. }, {
  25680. "label": "康乐县",
  25681. "value": "622922"
  25682. }, {
  25683. "label": "永靖县",
  25684. "value": "622923"
  25685. }, {
  25686. "label": "广河县",
  25687. "value": "622924"
  25688. }, {
  25689. "label": "和政县",
  25690. "value": "622925"
  25691. }, {
  25692. "label": "东乡族自治县",
  25693. "value": "622926"
  25694. }, {
  25695. "label": "积石山保安族东乡族撒拉族自治县",
  25696. "value": "622927"
  25697. }], [{
  25698. "label": "合作市",
  25699. "value": "623001"
  25700. }, {
  25701. "label": "临潭县",
  25702. "value": "623021"
  25703. }, {
  25704. "label": "卓尼县",
  25705. "value": "623022"
  25706. }, {
  25707. "label": "舟曲县",
  25708. "value": "623023"
  25709. }, {
  25710. "label": "迭部县",
  25711. "value": "623024"
  25712. }, {
  25713. "label": "玛曲县",
  25714. "value": "623025"
  25715. }, {
  25716. "label": "碌曲县",
  25717. "value": "623026"
  25718. }, {
  25719. "label": "夏河县",
  25720. "value": "623027"
  25721. }]], [[{
  25722. "label": "城东区",
  25723. "value": "630102"
  25724. }, {
  25725. "label": "城中区",
  25726. "value": "630103"
  25727. }, {
  25728. "label": "城西区",
  25729. "value": "630104"
  25730. }, {
  25731. "label": "城北区",
  25732. "value": "630105"
  25733. }, {
  25734. "label": "大通回族土族自治县",
  25735. "value": "630121"
  25736. }, {
  25737. "label": "湟中县",
  25738. "value": "630122"
  25739. }, {
  25740. "label": "湟源县",
  25741. "value": "630123"
  25742. }], [{
  25743. "label": "乐都区",
  25744. "value": "630202"
  25745. }, {
  25746. "label": "平安区",
  25747. "value": "630203"
  25748. }, {
  25749. "label": "民和回族土族自治县",
  25750. "value": "630222"
  25751. }, {
  25752. "label": "互助土族自治县",
  25753. "value": "630223"
  25754. }, {
  25755. "label": "化隆回族自治县",
  25756. "value": "630224"
  25757. }, {
  25758. "label": "循化撒拉族自治县",
  25759. "value": "630225"
  25760. }], [{
  25761. "label": "门源回族自治县",
  25762. "value": "632221"
  25763. }, {
  25764. "label": "祁连县",
  25765. "value": "632222"
  25766. }, {
  25767. "label": "海晏县",
  25768. "value": "632223"
  25769. }, {
  25770. "label": "刚察县",
  25771. "value": "632224"
  25772. }], [{
  25773. "label": "同仁县",
  25774. "value": "632321"
  25775. }, {
  25776. "label": "尖扎县",
  25777. "value": "632322"
  25778. }, {
  25779. "label": "泽库县",
  25780. "value": "632323"
  25781. }, {
  25782. "label": "河南蒙古族自治县",
  25783. "value": "632324"
  25784. }], [{
  25785. "label": "共和县",
  25786. "value": "632521"
  25787. }, {
  25788. "label": "同德县",
  25789. "value": "632522"
  25790. }, {
  25791. "label": "贵德县",
  25792. "value": "632523"
  25793. }, {
  25794. "label": "兴海县",
  25795. "value": "632524"
  25796. }, {
  25797. "label": "贵南县",
  25798. "value": "632525"
  25799. }], [{
  25800. "label": "玛沁县",
  25801. "value": "632621"
  25802. }, {
  25803. "label": "班玛县",
  25804. "value": "632622"
  25805. }, {
  25806. "label": "甘德县",
  25807. "value": "632623"
  25808. }, {
  25809. "label": "达日县",
  25810. "value": "632624"
  25811. }, {
  25812. "label": "久治县",
  25813. "value": "632625"
  25814. }, {
  25815. "label": "玛多县",
  25816. "value": "632626"
  25817. }], [{
  25818. "label": "玉树市",
  25819. "value": "632701"
  25820. }, {
  25821. "label": "杂多县",
  25822. "value": "632722"
  25823. }, {
  25824. "label": "称多县",
  25825. "value": "632723"
  25826. }, {
  25827. "label": "治多县",
  25828. "value": "632724"
  25829. }, {
  25830. "label": "囊谦县",
  25831. "value": "632725"
  25832. }, {
  25833. "label": "曲麻莱县",
  25834. "value": "632726"
  25835. }], [{
  25836. "label": "格尔木市",
  25837. "value": "632801"
  25838. }, {
  25839. "label": "德令哈市",
  25840. "value": "632802"
  25841. }, {
  25842. "label": "乌兰县",
  25843. "value": "632821"
  25844. }, {
  25845. "label": "都兰县",
  25846. "value": "632822"
  25847. }, {
  25848. "label": "天峻县",
  25849. "value": "632823"
  25850. }, {
  25851. "label": "大柴旦行政委员会",
  25852. "value": "632857"
  25853. }, {
  25854. "label": "冷湖行政委员会",
  25855. "value": "632858"
  25856. }, {
  25857. "label": "茫崖行政委员会",
  25858. "value": "632859"
  25859. }]], [[{
  25860. "label": "兴庆区",
  25861. "value": "640104"
  25862. }, {
  25863. "label": "西夏区",
  25864. "value": "640105"
  25865. }, {
  25866. "label": "金凤区",
  25867. "value": "640106"
  25868. }, {
  25869. "label": "永宁县",
  25870. "value": "640121"
  25871. }, {
  25872. "label": "贺兰县",
  25873. "value": "640122"
  25874. }, {
  25875. "label": "灵武市",
  25876. "value": "640181"
  25877. }], [{
  25878. "label": "大武口区",
  25879. "value": "640202"
  25880. }, {
  25881. "label": "惠农区",
  25882. "value": "640205"
  25883. }, {
  25884. "label": "平罗县",
  25885. "value": "640221"
  25886. }], [{
  25887. "label": "利通区",
  25888. "value": "640302"
  25889. }, {
  25890. "label": "红寺堡区",
  25891. "value": "640303"
  25892. }, {
  25893. "label": "盐池县",
  25894. "value": "640323"
  25895. }, {
  25896. "label": "同心县",
  25897. "value": "640324"
  25898. }, {
  25899. "label": "青铜峡市",
  25900. "value": "640381"
  25901. }], [{
  25902. "label": "原州区",
  25903. "value": "640402"
  25904. }, {
  25905. "label": "西吉县",
  25906. "value": "640422"
  25907. }, {
  25908. "label": "隆德县",
  25909. "value": "640423"
  25910. }, {
  25911. "label": "泾源县",
  25912. "value": "640424"
  25913. }, {
  25914. "label": "彭阳县",
  25915. "value": "640425"
  25916. }], [{
  25917. "label": "沙坡头区",
  25918. "value": "640502"
  25919. }, {
  25920. "label": "中宁县",
  25921. "value": "640521"
  25922. }, {
  25923. "label": "海原县",
  25924. "value": "640522"
  25925. }]], [[{
  25926. "label": "天山区",
  25927. "value": "650102"
  25928. }, {
  25929. "label": "沙依巴克区",
  25930. "value": "650103"
  25931. }, {
  25932. "label": "新市区",
  25933. "value": "650104"
  25934. }, {
  25935. "label": "水磨沟区",
  25936. "value": "650105"
  25937. }, {
  25938. "label": "头屯河区",
  25939. "value": "650106"
  25940. }, {
  25941. "label": "达坂城区",
  25942. "value": "650107"
  25943. }, {
  25944. "label": "米东区",
  25945. "value": "650109"
  25946. }, {
  25947. "label": "乌鲁木齐县",
  25948. "value": "650121"
  25949. }, {
  25950. "label": "乌鲁木齐经济技术开发区",
  25951. "value": "650171"
  25952. }, {
  25953. "label": "乌鲁木齐高新技术产业开发区",
  25954. "value": "650172"
  25955. }], [{
  25956. "label": "独山子区",
  25957. "value": "650202"
  25958. }, {
  25959. "label": "克拉玛依区",
  25960. "value": "650203"
  25961. }, {
  25962. "label": "白碱滩区",
  25963. "value": "650204"
  25964. }, {
  25965. "label": "乌尔禾区",
  25966. "value": "650205"
  25967. }], [{
  25968. "label": "高昌区",
  25969. "value": "650402"
  25970. }, {
  25971. "label": "鄯善县",
  25972. "value": "650421"
  25973. }, {
  25974. "label": "托克逊县",
  25975. "value": "650422"
  25976. }], [{
  25977. "label": "伊州区",
  25978. "value": "650502"
  25979. }, {
  25980. "label": "巴里坤哈萨克自治县",
  25981. "value": "650521"
  25982. }, {
  25983. "label": "伊吾县",
  25984. "value": "650522"
  25985. }], [{
  25986. "label": "昌吉市",
  25987. "value": "652301"
  25988. }, {
  25989. "label": "阜康市",
  25990. "value": "652302"
  25991. }, {
  25992. "label": "呼图壁县",
  25993. "value": "652323"
  25994. }, {
  25995. "label": "玛纳斯县",
  25996. "value": "652324"
  25997. }, {
  25998. "label": "奇台县",
  25999. "value": "652325"
  26000. }, {
  26001. "label": "吉木萨尔县",
  26002. "value": "652327"
  26003. }, {
  26004. "label": "木垒哈萨克自治县",
  26005. "value": "652328"
  26006. }], [{
  26007. "label": "博乐市",
  26008. "value": "652701"
  26009. }, {
  26010. "label": "阿拉山口市",
  26011. "value": "652702"
  26012. }, {
  26013. "label": "精河县",
  26014. "value": "652722"
  26015. }, {
  26016. "label": "温泉县",
  26017. "value": "652723"
  26018. }], [{
  26019. "label": "库尔勒市",
  26020. "value": "652801"
  26021. }, {
  26022. "label": "轮台县",
  26023. "value": "652822"
  26024. }, {
  26025. "label": "尉犁县",
  26026. "value": "652823"
  26027. }, {
  26028. "label": "若羌县",
  26029. "value": "652824"
  26030. }, {
  26031. "label": "且末县",
  26032. "value": "652825"
  26033. }, {
  26034. "label": "焉耆回族自治县",
  26035. "value": "652826"
  26036. }, {
  26037. "label": "和静县",
  26038. "value": "652827"
  26039. }, {
  26040. "label": "和硕县",
  26041. "value": "652828"
  26042. }, {
  26043. "label": "博湖县",
  26044. "value": "652829"
  26045. }, {
  26046. "label": "库尔勒经济技术开发区",
  26047. "value": "652871"
  26048. }], [{
  26049. "label": "阿克苏市",
  26050. "value": "652901"
  26051. }, {
  26052. "label": "温宿县",
  26053. "value": "652922"
  26054. }, {
  26055. "label": "库车县",
  26056. "value": "652923"
  26057. }, {
  26058. "label": "沙雅县",
  26059. "value": "652924"
  26060. }, {
  26061. "label": "新和县",
  26062. "value": "652925"
  26063. }, {
  26064. "label": "拜城县",
  26065. "value": "652926"
  26066. }, {
  26067. "label": "乌什县",
  26068. "value": "652927"
  26069. }, {
  26070. "label": "阿瓦提县",
  26071. "value": "652928"
  26072. }, {
  26073. "label": "柯坪县",
  26074. "value": "652929"
  26075. }], [{
  26076. "label": "阿图什市",
  26077. "value": "653001"
  26078. }, {
  26079. "label": "阿克陶县",
  26080. "value": "653022"
  26081. }, {
  26082. "label": "阿合奇县",
  26083. "value": "653023"
  26084. }, {
  26085. "label": "乌恰县",
  26086. "value": "653024"
  26087. }], [{
  26088. "label": "喀什市",
  26089. "value": "653101"
  26090. }, {
  26091. "label": "疏附县",
  26092. "value": "653121"
  26093. }, {
  26094. "label": "疏勒县",
  26095. "value": "653122"
  26096. }, {
  26097. "label": "英吉沙县",
  26098. "value": "653123"
  26099. }, {
  26100. "label": "泽普县",
  26101. "value": "653124"
  26102. }, {
  26103. "label": "莎车县",
  26104. "value": "653125"
  26105. }, {
  26106. "label": "叶城县",
  26107. "value": "653126"
  26108. }, {
  26109. "label": "麦盖提县",
  26110. "value": "653127"
  26111. }, {
  26112. "label": "岳普湖县",
  26113. "value": "653128"
  26114. }, {
  26115. "label": "伽师县",
  26116. "value": "653129"
  26117. }, {
  26118. "label": "巴楚县",
  26119. "value": "653130"
  26120. }, {
  26121. "label": "塔什库尔干塔吉克自治县",
  26122. "value": "653131"
  26123. }], [{
  26124. "label": "和田市",
  26125. "value": "653201"
  26126. }, {
  26127. "label": "和田县",
  26128. "value": "653221"
  26129. }, {
  26130. "label": "墨玉县",
  26131. "value": "653222"
  26132. }, {
  26133. "label": "皮山县",
  26134. "value": "653223"
  26135. }, {
  26136. "label": "洛浦县",
  26137. "value": "653224"
  26138. }, {
  26139. "label": "策勒县",
  26140. "value": "653225"
  26141. }, {
  26142. "label": "于田县",
  26143. "value": "653226"
  26144. }, {
  26145. "label": "民丰县",
  26146. "value": "653227"
  26147. }], [{
  26148. "label": "伊宁市",
  26149. "value": "654002"
  26150. }, {
  26151. "label": "奎屯市",
  26152. "value": "654003"
  26153. }, {
  26154. "label": "霍尔果斯市",
  26155. "value": "654004"
  26156. }, {
  26157. "label": "伊宁县",
  26158. "value": "654021"
  26159. }, {
  26160. "label": "察布查尔锡伯自治县",
  26161. "value": "654022"
  26162. }, {
  26163. "label": "霍城县",
  26164. "value": "654023"
  26165. }, {
  26166. "label": "巩留县",
  26167. "value": "654024"
  26168. }, {
  26169. "label": "新源县",
  26170. "value": "654025"
  26171. }, {
  26172. "label": "昭苏县",
  26173. "value": "654026"
  26174. }, {
  26175. "label": "特克斯县",
  26176. "value": "654027"
  26177. }, {
  26178. "label": "尼勒克县",
  26179. "value": "654028"
  26180. }], [{
  26181. "label": "塔城市",
  26182. "value": "654201"
  26183. }, {
  26184. "label": "乌苏市",
  26185. "value": "654202"
  26186. }, {
  26187. "label": "额敏县",
  26188. "value": "654221"
  26189. }, {
  26190. "label": "沙湾县",
  26191. "value": "654223"
  26192. }, {
  26193. "label": "托里县",
  26194. "value": "654224"
  26195. }, {
  26196. "label": "裕民县",
  26197. "value": "654225"
  26198. }, {
  26199. "label": "和布克赛尔蒙古自治县",
  26200. "value": "654226"
  26201. }], [{
  26202. "label": "阿勒泰市",
  26203. "value": "654301"
  26204. }, {
  26205. "label": "布尔津县",
  26206. "value": "654321"
  26207. }, {
  26208. "label": "富蕴县",
  26209. "value": "654322"
  26210. }, {
  26211. "label": "福海县",
  26212. "value": "654323"
  26213. }, {
  26214. "label": "哈巴河县",
  26215. "value": "654324"
  26216. }, {
  26217. "label": "青河县",
  26218. "value": "654325"
  26219. }, {
  26220. "label": "吉木乃县",
  26221. "value": "654326"
  26222. }], [{
  26223. "label": "石河子市",
  26224. "value": "659001"
  26225. }, {
  26226. "label": "阿拉尔市",
  26227. "value": "659002"
  26228. }, {
  26229. "label": "图木舒克市",
  26230. "value": "659003"
  26231. }, {
  26232. "label": "五家渠市",
  26233. "value": "659004"
  26234. }, {
  26235. "label": "铁门关市",
  26236. "value": "659006"
  26237. }]], [[{
  26238. "label": "台北",
  26239. "value": "660101"
  26240. }], [{
  26241. "label": "高雄",
  26242. "value": "660201"
  26243. }], [{
  26244. "label": "基隆",
  26245. "value": "660301"
  26246. }], [{
  26247. "label": "台中",
  26248. "value": "660401"
  26249. }], [{
  26250. "label": "台南",
  26251. "value": "660501"
  26252. }], [{
  26253. "label": "新竹",
  26254. "value": "660601"
  26255. }], [{
  26256. "label": "嘉义",
  26257. "value": "660701"
  26258. }], [{
  26259. "label": "宜兰",
  26260. "value": "660801"
  26261. }], [{
  26262. "label": "桃园",
  26263. "value": "660901"
  26264. }], [{
  26265. "label": "苗栗",
  26266. "value": "661001"
  26267. }], [{
  26268. "label": "彰化",
  26269. "value": "661101"
  26270. }], [{
  26271. "label": "南投",
  26272. "value": "661201"
  26273. }], [{
  26274. "label": "云林",
  26275. "value": "661301"
  26276. }], [{
  26277. "label": "屏东",
  26278. "value": "661401"
  26279. }], [{
  26280. "label": "台东",
  26281. "value": "661501"
  26282. }], [{
  26283. "label": "花莲",
  26284. "value": "661601"
  26285. }], [{
  26286. "label": "澎湖",
  26287. "value": "661701"
  26288. }]], [[{
  26289. "label": "香港岛",
  26290. "value": "670101"
  26291. }], [{
  26292. "label": "九龙",
  26293. "value": "670201"
  26294. }], [{
  26295. "label": "新界",
  26296. "value": "670301"
  26297. }]], [[{
  26298. "label": "澳门半岛",
  26299. "value": "680101"
  26300. }], [{
  26301. "label": "氹仔岛",
  26302. "value": "680201"
  26303. }], [{
  26304. "label": "路环岛",
  26305. "value": "680301"
  26306. }], [{
  26307. "label": "路氹城",
  26308. "value": "680401"
  26309. }]]];
  26310. var _default = areaData;
  26311. exports.default = _default;
  26312. /***/ }),
  26313. /***/ 48:
  26314. /*!************************************************************************!*\
  26315. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/queryParams.js ***!
  26316. \************************************************************************/
  26317. /*! no static exports found */
  26318. /***/ (function(module, exports, __webpack_require__) {
  26319. "use strict";
  26320. Object.defineProperty(exports, "__esModule", {
  26321. value: true
  26322. });
  26323. exports.default = void 0;
  26324. /**
  26325. * 对象转url参数
  26326. * @param {*} data,对象
  26327. * @param {*} isPrefix,是否自动加上"?"
  26328. */
  26329. function queryParams() {
  26330. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26331. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  26332. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  26333. var prefix = isPrefix ? '?' : '';
  26334. var _result = [];
  26335. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  26336. var _loop = function _loop(key) {
  26337. var value = data[key];
  26338. // 去掉为空的参数
  26339. if (['', undefined, null].indexOf(value) >= 0) {
  26340. return "continue";
  26341. }
  26342. // 如果值为数组,另行处理
  26343. if (value.constructor === Array) {
  26344. // e.g. {ids: [1, 2, 3]}
  26345. switch (arrayFormat) {
  26346. case 'indices':
  26347. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  26348. for (var i = 0; i < value.length; i++) {
  26349. _result.push(key + '[' + i + ']=' + value[i]);
  26350. }
  26351. break;
  26352. case 'brackets':
  26353. // 结果: ids[]=1&ids[]=2&ids[]=3
  26354. value.forEach(function (_value) {
  26355. _result.push(key + '[]=' + _value);
  26356. });
  26357. break;
  26358. case 'repeat':
  26359. // 结果: ids=1&ids=2&ids=3
  26360. value.forEach(function (_value) {
  26361. _result.push(key + '=' + _value);
  26362. });
  26363. break;
  26364. case 'comma':
  26365. // 结果: ids=1,2,3
  26366. var commaStr = "";
  26367. value.forEach(function (_value) {
  26368. commaStr += (commaStr ? "," : "") + _value;
  26369. });
  26370. _result.push(key + '=' + commaStr);
  26371. break;
  26372. default:
  26373. value.forEach(function (_value) {
  26374. _result.push(key + '[]=' + _value);
  26375. });
  26376. }
  26377. } else {
  26378. _result.push(key + '=' + value);
  26379. }
  26380. };
  26381. for (var key in data) {
  26382. var _ret = _loop(key);
  26383. if (_ret === "continue") continue;
  26384. }
  26385. return _result.length ? prefix + _result.join('&') : '';
  26386. }
  26387. var _default = queryParams;
  26388. exports.default = _default;
  26389. /***/ }),
  26390. /***/ 49:
  26391. /*!******************************************************************!*\
  26392. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/route.js ***!
  26393. \******************************************************************/
  26394. /*! no static exports found */
  26395. /***/ (function(module, exports, __webpack_require__) {
  26396. "use strict";
  26397. /* WEBPACK VAR INJECTION */(function(uni) {
  26398. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26399. Object.defineProperty(exports, "__esModule", {
  26400. value: true
  26401. });
  26402. exports.default = void 0;
  26403. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26404. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26405. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26406. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26407. /**
  26408. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  26409. * 并且带有路由拦截功能
  26410. */
  26411. var Router = /*#__PURE__*/function () {
  26412. function Router() {
  26413. (0, _classCallCheck2.default)(this, Router);
  26414. // 原始属性定义
  26415. this.config = {
  26416. type: 'navigateTo',
  26417. url: '',
  26418. delta: 1,
  26419. // navigateBack页面后退时,回退的层数
  26420. params: {},
  26421. // 传递的参数
  26422. animationType: 'pop-in',
  26423. // 窗口动画,只在APP有效
  26424. animationDuration: 300,
  26425. // 窗口动画持续时间,单位毫秒,只在APP有效
  26426. intercept: false // 是否需要拦截
  26427. };
  26428. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  26429. // 这里在构造函数中进行this绑定
  26430. this.route = this.route.bind(this);
  26431. }
  26432. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  26433. (0, _createClass2.default)(Router, [{
  26434. key: "addRootPath",
  26435. value: function addRootPath(url) {
  26436. return url[0] === '/' ? url : "/".concat(url);
  26437. }
  26438. // 整合路由参数
  26439. }, {
  26440. key: "mixinParam",
  26441. value: function mixinParam(url, params) {
  26442. url = url && this.addRootPath(url);
  26443. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  26444. // 如果有url中有get参数,转换后无需带上"?"
  26445. var query = '';
  26446. if (/.*\/.*\?.*=.*/.test(url)) {
  26447. // object对象转为get类型的参数
  26448. query = uni.$u.queryParams(params, false);
  26449. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  26450. return url += "&" + query;
  26451. } else {
  26452. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  26453. query = uni.$u.queryParams(params);
  26454. return url += query;
  26455. }
  26456. }
  26457. // 对外的方法名称
  26458. }, {
  26459. key: "route",
  26460. value: function () {
  26461. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  26462. var options,
  26463. params,
  26464. mergeConfig,
  26465. isNext,
  26466. _args = arguments;
  26467. return _regenerator.default.wrap(function _callee$(_context) {
  26468. while (1) {
  26469. switch (_context.prev = _context.next) {
  26470. case 0:
  26471. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  26472. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  26473. // 合并用户的配置和内部的默认配置
  26474. mergeConfig = {};
  26475. if (typeof options === 'string') {
  26476. // 如果options为字符串,则为route(url, params)的形式
  26477. mergeConfig.url = this.mixinParam(options, params);
  26478. mergeConfig.type = 'navigateTo';
  26479. } else {
  26480. mergeConfig = uni.$u.deepClone(options, this.config);
  26481. // 否则正常使用mergeConfig中的url和params进行拼接
  26482. mergeConfig.url = this.mixinParam(options.url, options.params);
  26483. }
  26484. if (params.intercept) {
  26485. this.config.intercept = params.intercept;
  26486. }
  26487. // params参数也带给拦截器
  26488. mergeConfig.params = params;
  26489. // 合并内外部参数
  26490. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  26491. // 判断用户是否定义了拦截器
  26492. if (!(typeof uni.$u.routeIntercept === 'function')) {
  26493. _context.next = 14;
  26494. break;
  26495. }
  26496. _context.next = 10;
  26497. return new Promise(function (resolve, reject) {
  26498. uni.$u.routeIntercept(mergeConfig, resolve);
  26499. });
  26500. case 10:
  26501. isNext = _context.sent;
  26502. // 如果isNext为true,则执行路由跳转
  26503. isNext && this.openPage(mergeConfig);
  26504. _context.next = 15;
  26505. break;
  26506. case 14:
  26507. this.openPage(mergeConfig);
  26508. case 15:
  26509. case "end":
  26510. return _context.stop();
  26511. }
  26512. }
  26513. }, _callee, this);
  26514. }));
  26515. function route() {
  26516. return _route.apply(this, arguments);
  26517. }
  26518. return route;
  26519. }() // 执行路由跳转
  26520. }, {
  26521. key: "openPage",
  26522. value: function openPage(config) {
  26523. // 解构参数
  26524. var url = config.url,
  26525. type = config.type,
  26526. delta = config.delta,
  26527. animationType = config.animationType,
  26528. animationDuration = config.animationDuration;
  26529. if (config.type == 'navigateTo' || config.type == 'to') {
  26530. uni.navigateTo({
  26531. url: url,
  26532. animationType: animationType,
  26533. animationDuration: animationDuration
  26534. });
  26535. }
  26536. if (config.type == 'redirectTo' || config.type == 'redirect') {
  26537. uni.redirectTo({
  26538. url: url
  26539. });
  26540. }
  26541. if (config.type == 'switchTab' || config.type == 'tab') {
  26542. uni.switchTab({
  26543. url: url
  26544. });
  26545. }
  26546. if (config.type == 'reLaunch' || config.type == 'launch') {
  26547. uni.reLaunch({
  26548. url: url
  26549. });
  26550. }
  26551. if (config.type == 'navigateBack' || config.type == 'back') {
  26552. uni.navigateBack({
  26553. delta: delta
  26554. });
  26555. }
  26556. }
  26557. }]);
  26558. return Router;
  26559. }();
  26560. var _default = new Router().route;
  26561. exports.default = _default;
  26562. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  26563. /***/ }),
  26564. /***/ 494:
  26565. /*!************************************************************************************!*\
  26566. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  26567. \************************************************************************************/
  26568. /*! no static exports found */
  26569. /***/ (function(module, exports, __webpack_require__) {
  26570. "use strict";
  26571. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  26572. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26573. Object.defineProperty(exports, "__esModule", {
  26574. value: true
  26575. });
  26576. exports.default = void 0;
  26577. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26578. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 495));
  26579. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  26580. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  26581. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  26582. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26583. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  26584. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 496));
  26585. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 497));
  26586. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 498));
  26587. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 499));
  26588. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26589. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26590. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  26591. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 501));
  26592. 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(_e35) { throw _e35; }, 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(_e36) { didErr = true; err = _e36; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  26593. 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); }
  26594. 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; }
  26595. 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; }
  26596. 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; }
  26597. 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); }; }
  26598. 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; } }
  26599. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  26600. function n(e) {
  26601. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  26602. }
  26603. function s(e, t, n) {
  26604. return e(n = {
  26605. path: t,
  26606. exports: {},
  26607. require: function require(e, t) {
  26608. return function () {
  26609. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  26610. }(null == t && n.path);
  26611. }
  26612. }, n.exports), n.exports;
  26613. }
  26614. var r = s(function (e, t) {
  26615. var n;
  26616. e.exports = (n = n || function (e, t) {
  26617. var n = Object.create || function () {
  26618. function e() {}
  26619. return function (t) {
  26620. var n;
  26621. return e.prototype = t, n = new e(), e.prototype = null, n;
  26622. };
  26623. }(),
  26624. s = {},
  26625. r = s.lib = {},
  26626. i = r.Base = {
  26627. extend: function extend(e) {
  26628. var t = n(this);
  26629. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  26630. t.$super.init.apply(this, arguments);
  26631. }), t.init.prototype = t, t.$super = this, t;
  26632. },
  26633. create: function create() {
  26634. var e = this.extend();
  26635. return e.init.apply(e, arguments), e;
  26636. },
  26637. init: function init() {},
  26638. mixIn: function mixIn(e) {
  26639. for (var t in e) {
  26640. e.hasOwnProperty(t) && (this[t] = e[t]);
  26641. }
  26642. e.hasOwnProperty("toString") && (this.toString = e.toString);
  26643. },
  26644. clone: function clone() {
  26645. return this.init.prototype.extend(this);
  26646. }
  26647. },
  26648. o = r.WordArray = i.extend({
  26649. init: function init(e, n) {
  26650. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  26651. },
  26652. toString: function toString(e) {
  26653. return (e || c).stringify(this);
  26654. },
  26655. concat: function concat(e) {
  26656. var t = this.words,
  26657. n = e.words,
  26658. s = this.sigBytes,
  26659. r = e.sigBytes;
  26660. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  26661. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  26662. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  26663. } else for (i = 0; i < r; i += 4) {
  26664. t[s + i >>> 2] = n[i >>> 2];
  26665. }
  26666. return this.sigBytes += r, this;
  26667. },
  26668. clamp: function clamp() {
  26669. var t = this.words,
  26670. n = this.sigBytes;
  26671. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  26672. },
  26673. clone: function clone() {
  26674. var e = i.clone.call(this);
  26675. return e.words = this.words.slice(0), e;
  26676. },
  26677. random: function random(t) {
  26678. for (var n, s = [], r = function r(t) {
  26679. t = t;
  26680. var n = 987654321,
  26681. s = 4294967295;
  26682. return function () {
  26683. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  26684. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  26685. };
  26686. }, i = 0; i < t; i += 4) {
  26687. var a = r(4294967296 * (n || e.random()));
  26688. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  26689. }
  26690. return new o.init(s, t);
  26691. }
  26692. }),
  26693. a = s.enc = {},
  26694. c = a.Hex = {
  26695. stringify: function stringify(e) {
  26696. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26697. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26698. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  26699. }
  26700. return s.join("");
  26701. },
  26702. parse: function parse(e) {
  26703. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  26704. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  26705. }
  26706. return new o.init(n, t / 2);
  26707. }
  26708. },
  26709. u = a.Latin1 = {
  26710. stringify: function stringify(e) {
  26711. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26712. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26713. s.push(String.fromCharCode(i));
  26714. }
  26715. return s.join("");
  26716. },
  26717. parse: function parse(e) {
  26718. for (var t = e.length, n = [], s = 0; s < t; s++) {
  26719. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  26720. }
  26721. return new o.init(n, t);
  26722. }
  26723. },
  26724. h = a.Utf8 = {
  26725. stringify: function stringify(e) {
  26726. try {
  26727. return decodeURIComponent(escape(u.stringify(e)));
  26728. } catch (e) {
  26729. throw new Error("Malformed UTF-8 data");
  26730. }
  26731. },
  26732. parse: function parse(e) {
  26733. return u.parse(unescape(encodeURIComponent(e)));
  26734. }
  26735. },
  26736. l = r.BufferedBlockAlgorithm = i.extend({
  26737. reset: function reset() {
  26738. this._data = new o.init(), this._nDataBytes = 0;
  26739. },
  26740. _append: function _append(e) {
  26741. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  26742. },
  26743. _process: function _process(t) {
  26744. var n = this._data,
  26745. s = n.words,
  26746. r = n.sigBytes,
  26747. i = this.blockSize,
  26748. a = r / (4 * i),
  26749. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  26750. u = e.min(4 * c, r);
  26751. if (c) {
  26752. for (var h = 0; h < c; h += i) {
  26753. this._doProcessBlock(s, h);
  26754. }
  26755. var l = s.splice(0, c);
  26756. n.sigBytes -= u;
  26757. }
  26758. return new o.init(l, u);
  26759. },
  26760. clone: function clone() {
  26761. var e = i.clone.call(this);
  26762. return e._data = this._data.clone(), e;
  26763. },
  26764. _minBufferSize: 0
  26765. });
  26766. r.Hasher = l.extend({
  26767. cfg: i.extend(),
  26768. init: function init(e) {
  26769. this.cfg = this.cfg.extend(e), this.reset();
  26770. },
  26771. reset: function reset() {
  26772. l.reset.call(this), this._doReset();
  26773. },
  26774. update: function update(e) {
  26775. return this._append(e), this._process(), this;
  26776. },
  26777. finalize: function finalize(e) {
  26778. return e && this._append(e), this._doFinalize();
  26779. },
  26780. blockSize: 16,
  26781. _createHelper: function _createHelper(e) {
  26782. return function (t, n) {
  26783. return new e.init(n).finalize(t);
  26784. };
  26785. },
  26786. _createHmacHelper: function _createHmacHelper(e) {
  26787. return function (t, n) {
  26788. return new d.HMAC.init(e, n).finalize(t);
  26789. };
  26790. }
  26791. });
  26792. var d = s.algo = {};
  26793. return s;
  26794. }(Math), n);
  26795. }),
  26796. i = r,
  26797. o = (s(function (e, t) {
  26798. var n;
  26799. e.exports = (n = i, function (e) {
  26800. var t = n,
  26801. s = t.lib,
  26802. r = s.WordArray,
  26803. i = s.Hasher,
  26804. o = t.algo,
  26805. a = [];
  26806. !function () {
  26807. for (var t = 0; t < 64; t++) {
  26808. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  26809. }
  26810. }();
  26811. var c = o.MD5 = i.extend({
  26812. _doReset: function _doReset() {
  26813. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  26814. },
  26815. _doProcessBlock: function _doProcessBlock(e, t) {
  26816. for (var n = 0; n < 16; n++) {
  26817. var s = t + n,
  26818. r = e[s];
  26819. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  26820. }
  26821. var i = this._hash.words,
  26822. o = e[t + 0],
  26823. c = e[t + 1],
  26824. p = e[t + 2],
  26825. f = e[t + 3],
  26826. g = e[t + 4],
  26827. m = e[t + 5],
  26828. y = e[t + 6],
  26829. _ = e[t + 7],
  26830. w = e[t + 8],
  26831. v = e[t + 9],
  26832. I = e[t + 10],
  26833. S = e[t + 11],
  26834. b = e[t + 12],
  26835. k = e[t + 13],
  26836. C = e[t + 14],
  26837. T = e[t + 15],
  26838. P = i[0],
  26839. A = i[1],
  26840. E = i[2],
  26841. O = i[3];
  26842. 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, I, 17, a[10]), A = u(A, E, O, P, S, 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, C, 17, a[14]), P = h(P, A = u(A, E, O, P, T, 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, S, 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, I, 9, a[21]), E = h(E, O, P, A, T, 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, C, 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, S, 16, a[34]), A = l(A, E, O, P, C, 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, I, 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, T, 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, C, 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, I, 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, T, 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, S, 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;
  26843. },
  26844. _doFinalize: function _doFinalize() {
  26845. var t = this._data,
  26846. n = t.words,
  26847. s = 8 * this._nDataBytes,
  26848. r = 8 * t.sigBytes;
  26849. n[r >>> 5] |= 128 << 24 - r % 32;
  26850. var i = e.floor(s / 4294967296),
  26851. o = s;
  26852. 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();
  26853. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  26854. var h = c[u];
  26855. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  26856. }
  26857. return a;
  26858. },
  26859. clone: function clone() {
  26860. var e = i.clone.call(this);
  26861. return e._hash = this._hash.clone(), e;
  26862. }
  26863. });
  26864. function u(e, t, n, s, r, i, o) {
  26865. var a = e + (t & n | ~t & s) + r + o;
  26866. return (a << i | a >>> 32 - i) + t;
  26867. }
  26868. function h(e, t, n, s, r, i, o) {
  26869. var a = e + (t & s | n & ~s) + r + o;
  26870. return (a << i | a >>> 32 - i) + t;
  26871. }
  26872. function l(e, t, n, s, r, i, o) {
  26873. var a = e + (t ^ n ^ s) + r + o;
  26874. return (a << i | a >>> 32 - i) + t;
  26875. }
  26876. function d(e, t, n, s, r, i, o) {
  26877. var a = e + (n ^ (t | ~s)) + r + o;
  26878. return (a << i | a >>> 32 - i) + t;
  26879. }
  26880. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  26881. }(Math), n.MD5);
  26882. }), s(function (e, t) {
  26883. var n;
  26884. e.exports = (n = i, void function () {
  26885. var e = n,
  26886. t = e.lib.Base,
  26887. s = e.enc.Utf8;
  26888. e.algo.HMAC = t.extend({
  26889. init: function init(e, t) {
  26890. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  26891. var n = e.blockSize,
  26892. r = 4 * n;
  26893. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  26894. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  26895. a[u] ^= 1549556828, c[u] ^= 909522486;
  26896. }
  26897. i.sigBytes = o.sigBytes = r, this.reset();
  26898. },
  26899. reset: function reset() {
  26900. var e = this._hasher;
  26901. e.reset(), e.update(this._iKey);
  26902. },
  26903. update: function update(e) {
  26904. return this._hasher.update(e), this;
  26905. },
  26906. finalize: function finalize(e) {
  26907. var t = this._hasher,
  26908. n = t.finalize(e);
  26909. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  26910. }
  26911. });
  26912. }());
  26913. }), s(function (e, t) {
  26914. e.exports = i.HmacMD5;
  26915. })),
  26916. a = s(function (e, t) {
  26917. e.exports = i.enc.Utf8;
  26918. }),
  26919. c = s(function (e, t) {
  26920. var n;
  26921. e.exports = (n = i, function () {
  26922. var e = n,
  26923. t = e.lib.WordArray;
  26924. function s(e, n, s) {
  26925. for (var r = [], i = 0, o = 0; o < n; o++) {
  26926. if (o % 4) {
  26927. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  26928. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  26929. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  26930. }
  26931. }
  26932. return t.create(r, i);
  26933. }
  26934. e.enc.Base64 = {
  26935. stringify: function stringify(e) {
  26936. var t = e.words,
  26937. n = e.sigBytes,
  26938. s = this._map;
  26939. e.clamp();
  26940. for (var r = [], i = 0; i < n; i += 3) {
  26941. 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++) {
  26942. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  26943. }
  26944. }
  26945. var c = s.charAt(64);
  26946. if (c) for (; r.length % 4;) {
  26947. r.push(c);
  26948. }
  26949. return r.join("");
  26950. },
  26951. parse: function parse(e) {
  26952. var t = e.length,
  26953. n = this._map,
  26954. r = this._reverseMap;
  26955. if (!r) {
  26956. r = this._reverseMap = [];
  26957. for (var i = 0; i < n.length; i++) {
  26958. r[n.charCodeAt(i)] = i;
  26959. }
  26960. }
  26961. var o = n.charAt(64);
  26962. if (o) {
  26963. var a = e.indexOf(o);
  26964. -1 !== a && (t = a);
  26965. }
  26966. return s(e, t, r);
  26967. },
  26968. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  26969. };
  26970. }(), n.enc.Base64);
  26971. });
  26972. var u = "FUNCTION",
  26973. h = "OBJECT",
  26974. l = "CLIENT_DB",
  26975. d = "pending",
  26976. p = "fullfilled",
  26977. f = "rejected";
  26978. function g(e) {
  26979. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  26980. }
  26981. function m(e) {
  26982. return "object" === g(e);
  26983. }
  26984. function y(e) {
  26985. return "function" == typeof e;
  26986. }
  26987. function _(e) {
  26988. return function () {
  26989. try {
  26990. return e.apply(e, arguments);
  26991. } catch (e) {
  26992. console.error(e);
  26993. }
  26994. };
  26995. }
  26996. var w = "REJECTED",
  26997. v = "NOT_PENDING";
  26998. var I = /*#__PURE__*/function () {
  26999. function I() {
  27000. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27001. e = _ref.createPromise,
  27002. _ref$retryRule = _ref.retryRule,
  27003. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  27004. (0, _classCallCheck2.default)(this, I);
  27005. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  27006. }
  27007. (0, _createClass2.default)(I, [{
  27008. key: "needRetry",
  27009. get: function get() {
  27010. if (!this.status) return !0;
  27011. switch (this.retryRule) {
  27012. case w:
  27013. return this.status === f;
  27014. case v:
  27015. return this.status !== d;
  27016. }
  27017. }
  27018. }, {
  27019. key: "exec",
  27020. value: function exec() {
  27021. var _this = this;
  27022. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  27023. return _this.status = p, Promise.resolve(e);
  27024. }, function (e) {
  27025. return _this.status = f, Promise.reject(e);
  27026. }), this.promise) : this.promise;
  27027. }
  27028. }]);
  27029. return I;
  27030. }();
  27031. function S(e) {
  27032. return e && "string" == typeof e ? JSON.parse(e) : e;
  27033. }
  27034. var b = "development" === "development",
  27035. k = "mp-weixin",
  27036. C = "true" === undefined || !0 === undefined,
  27037. T = S([]),
  27038. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  27039. A = S(undefined),
  27040. E = S(undefined) || [],
  27041. O = true;
  27042. var x = "";
  27043. try {
  27044. x = (__webpack_require__(/*! uni-stat-config */ 502).default || __webpack_require__(/*! uni-stat-config */ 502)).appid;
  27045. } catch (e) {}
  27046. var R = {};
  27047. function U(e) {
  27048. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27049. var n, s;
  27050. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  27051. }
  27052. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  27053. var L = ["invoke", "success", "fail", "complete"],
  27054. N = U("_globalUniCloudInterceptor");
  27055. function D(e, t) {
  27056. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  27057. L.indexOf(n) > -1 && function (e, t, n) {
  27058. var s = N[e][t];
  27059. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  27060. }(e, n, t[n]);
  27061. });
  27062. }
  27063. function F(e, t) {
  27064. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  27065. L.indexOf(n) > -1 && function (e, t, n) {
  27066. var s = N[e][t];
  27067. if (!s) return;
  27068. var r = s.indexOf(n);
  27069. r > -1 && s.splice(r, 1);
  27070. }(e, n, t[n]);
  27071. }) : delete N[e];
  27072. }
  27073. function q(e, t) {
  27074. return e && 0 !== e.length ? e.reduce(function (e, n) {
  27075. return e.then(function () {
  27076. return n(t);
  27077. });
  27078. }, Promise.resolve()) : Promise.resolve();
  27079. }
  27080. function M(e, t) {
  27081. return N[e] && N[e][t] || [];
  27082. }
  27083. function K(e) {
  27084. D("callObject", e);
  27085. }
  27086. var j = U("_globalUniCloudListener"),
  27087. B = "response",
  27088. $ = "needLogin",
  27089. W = "refreshToken",
  27090. z = "clientdb",
  27091. J = "cloudfunction",
  27092. H = "cloudobject";
  27093. function G(e) {
  27094. return j[e] || (j[e] = []), j[e];
  27095. }
  27096. function V(e, t) {
  27097. var n = G(e);
  27098. n.includes(t) || n.push(t);
  27099. }
  27100. function Y(e, t) {
  27101. var n = G(e),
  27102. s = n.indexOf(t);
  27103. -1 !== s && n.splice(s, 1);
  27104. }
  27105. function Q(e, t) {
  27106. var n = G(e);
  27107. for (var _e2 = 0; _e2 < n.length; _e2++) {
  27108. (0, n[_e2])(t);
  27109. }
  27110. }
  27111. var X,
  27112. Z = !1;
  27113. function ee() {
  27114. return X || (X = new Promise(function (e) {
  27115. Z && e(), function t() {
  27116. if ("function" == typeof getCurrentPages) {
  27117. var _t2 = getCurrentPages();
  27118. _t2 && _t2[0] && (Z = !0, e());
  27119. }
  27120. Z || setTimeout(function () {
  27121. t();
  27122. }, 30);
  27123. }();
  27124. }), X);
  27125. }
  27126. function te(e) {
  27127. var t = {};
  27128. for (var _n2 in e) {
  27129. var _s2 = e[_n2];
  27130. y(_s2) && (t[_n2] = _(_s2));
  27131. }
  27132. return t;
  27133. }
  27134. var ne = /*#__PURE__*/function (_Error) {
  27135. (0, _inherits2.default)(ne, _Error);
  27136. var _super = _createSuper(ne);
  27137. function ne(e) {
  27138. var _this2;
  27139. (0, _classCallCheck2.default)(this, ne);
  27140. _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;
  27141. return _this2;
  27142. }
  27143. (0, _createClass2.default)(ne, [{
  27144. key: "toJson",
  27145. value: function toJson() {
  27146. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  27147. if (!(e >= 10)) return e++, {
  27148. errCode: this.errCode,
  27149. errMsg: this.errMsg,
  27150. errSubject: this.errSubject,
  27151. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  27152. };
  27153. }
  27154. }]);
  27155. return ne;
  27156. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  27157. var se = {
  27158. request: function request(e) {
  27159. return uni.request(e);
  27160. },
  27161. uploadFile: function uploadFile(e) {
  27162. return uni.uploadFile(e);
  27163. },
  27164. setStorageSync: function setStorageSync(e, t) {
  27165. return uni.setStorageSync(e, t);
  27166. },
  27167. getStorageSync: function getStorageSync(e) {
  27168. return uni.getStorageSync(e);
  27169. },
  27170. removeStorageSync: function removeStorageSync(e) {
  27171. return uni.removeStorageSync(e);
  27172. },
  27173. clearStorageSync: function clearStorageSync() {
  27174. return uni.clearStorageSync();
  27175. }
  27176. };
  27177. function re() {
  27178. return {
  27179. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  27180. tokenExpired: se.getStorageSync("uni_id_token_expired")
  27181. };
  27182. }
  27183. function ie() {
  27184. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27185. e = _ref2.token,
  27186. t = _ref2.tokenExpired;
  27187. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  27188. }
  27189. var oe, ae;
  27190. function ce() {
  27191. return oe || (oe = uni.getSystemInfoSync()), oe;
  27192. }
  27193. function ue() {
  27194. var e, t;
  27195. try {
  27196. if (uni.getLaunchOptionsSync) {
  27197. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  27198. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  27199. _n3 = _uni$getLaunchOptions.scene,
  27200. _s3 = _uni$getLaunchOptions.channel;
  27201. e = _s3, t = _n3;
  27202. }
  27203. } catch (e) {}
  27204. return {
  27205. channel: e,
  27206. scene: t
  27207. };
  27208. }
  27209. function he() {
  27210. var e = uni.getLocale && uni.getLocale() || "en";
  27211. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  27212. locale: e,
  27213. LOCALE: e
  27214. });
  27215. var t = ce(),
  27216. n = t.deviceId,
  27217. s = t.osName,
  27218. r = t.uniPlatform,
  27219. i = t.appId,
  27220. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  27221. for (var _e3 = 0; _e3 < o.length; _e3++) {
  27222. delete t[o[_e3]];
  27223. }
  27224. return ae = _objectSpread(_objectSpread({
  27225. PLATFORM: r,
  27226. OS: s,
  27227. APPID: i,
  27228. DEVICEID: n
  27229. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  27230. locale: e,
  27231. LOCALE: e
  27232. });
  27233. }
  27234. var le = {
  27235. sign: function sign(e, t) {
  27236. var n = "";
  27237. return Object.keys(e).sort().forEach(function (t) {
  27238. e[t] && (n = n + "&" + t + "=" + e[t]);
  27239. }), n = n.slice(1), o(n, t).toString();
  27240. },
  27241. wrappedRequest: function wrappedRequest(e, t) {
  27242. return new Promise(function (n, s) {
  27243. t(Object.assign(e, {
  27244. complete: function complete(e) {
  27245. e || (e = {}), b && "web" === P && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  27246. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  27247. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  27248. code: "SYS_ERR",
  27249. message: e.errMsg || "request:fail",
  27250. requestId: t
  27251. }));
  27252. var r = e.data;
  27253. if (r.error) return s(new ne({
  27254. code: r.error.code,
  27255. message: r.error.message,
  27256. requestId: t
  27257. }));
  27258. r.result = r.data, r.requestId = t, delete r.data, n(r);
  27259. }
  27260. }));
  27261. });
  27262. },
  27263. toBase64: function toBase64(e) {
  27264. return c.stringify(a.parse(e));
  27265. }
  27266. },
  27267. de = {
  27268. "uniCloud.init.paramRequired": "{param} required",
  27269. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27270. };
  27271. var _e4 = (0, _uniI18n.initVueI18n)({
  27272. "zh-Hans": {
  27273. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27274. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27275. },
  27276. "zh-Hant": {
  27277. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27278. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27279. },
  27280. en: de,
  27281. fr: {
  27282. "uniCloud.init.paramRequired": "{param} required",
  27283. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27284. },
  27285. es: {
  27286. "uniCloud.init.paramRequired": "{param} required",
  27287. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27288. },
  27289. ja: de
  27290. }, "zh-Hans"),
  27291. pe = _e4.t;
  27292. var fe = /*#__PURE__*/function () {
  27293. function fe(e) {
  27294. var _this3 = this;
  27295. (0, _classCallCheck2.default)(this, fe);
  27296. ["spaceId", "clientSecret"].forEach(function (t) {
  27297. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  27298. param: t
  27299. }));
  27300. }), this.config = Object.assign({}, {
  27301. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  27302. }, 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 = se, this._getAccessTokenPromiseHub = new I({
  27303. createPromise: function createPromise() {
  27304. return _this3.requestAuth(_this3.setupRequest({
  27305. method: "serverless.auth.user.anonymousAuthorize",
  27306. params: "{}"
  27307. }, "auth")).then(function (e) {
  27308. if (!e.result || !e.result.accessToken) throw new ne({
  27309. code: "AUTH_FAILED",
  27310. message: "获取accessToken失败"
  27311. });
  27312. _this3.setAccessToken(e.result.accessToken);
  27313. });
  27314. },
  27315. retryRule: v
  27316. });
  27317. }
  27318. (0, _createClass2.default)(fe, [{
  27319. key: "hasAccessToken",
  27320. get: function get() {
  27321. return !!this.accessToken;
  27322. }
  27323. }, {
  27324. key: "setAccessToken",
  27325. value: function setAccessToken(e) {
  27326. this.accessToken = e;
  27327. }
  27328. }, {
  27329. key: "requestWrapped",
  27330. value: function requestWrapped(e) {
  27331. return le.wrappedRequest(e, this.adapter.request);
  27332. }
  27333. }, {
  27334. key: "requestAuth",
  27335. value: function requestAuth(e) {
  27336. return this.requestWrapped(e);
  27337. }
  27338. }, {
  27339. key: "request",
  27340. value: function request(e, t) {
  27341. var _this4 = this;
  27342. return Promise.resolve().then(function () {
  27343. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  27344. return new Promise(function (e, n) {
  27345. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  27346. }).then(function () {
  27347. return _this4.getAccessToken();
  27348. }).then(function () {
  27349. var t = _this4.rebuildRequest(e);
  27350. return _this4.request(t, !0);
  27351. });
  27352. }) : _this4.getAccessToken().then(function () {
  27353. var t = _this4.rebuildRequest(e);
  27354. return _this4.request(t, !0);
  27355. });
  27356. });
  27357. }
  27358. }, {
  27359. key: "rebuildRequest",
  27360. value: function rebuildRequest(e) {
  27361. var t = Object.assign({}, e);
  27362. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = le.sign(t.data, this.config.clientSecret), t;
  27363. }
  27364. }, {
  27365. key: "setupRequest",
  27366. value: function setupRequest(e, t) {
  27367. var n = Object.assign({}, e, {
  27368. spaceId: this.config.spaceId,
  27369. timestamp: Date.now()
  27370. }),
  27371. s = {
  27372. "Content-Type": "application/json"
  27373. };
  27374. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  27375. url: this.config.requestUrl,
  27376. method: "POST",
  27377. data: n,
  27378. dataType: "json",
  27379. header: s
  27380. };
  27381. }
  27382. }, {
  27383. key: "getAccessToken",
  27384. value: function getAccessToken() {
  27385. return this._getAccessTokenPromiseHub.exec();
  27386. }
  27387. }, {
  27388. key: "authorize",
  27389. value: function () {
  27390. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  27391. return _regenerator.default.wrap(function _callee$(_context) {
  27392. while (1) {
  27393. switch (_context.prev = _context.next) {
  27394. case 0:
  27395. _context.next = 2;
  27396. return this.getAccessToken();
  27397. case 2:
  27398. case "end":
  27399. return _context.stop();
  27400. }
  27401. }
  27402. }, _callee, this);
  27403. }));
  27404. function authorize() {
  27405. return _authorize.apply(this, arguments);
  27406. }
  27407. return authorize;
  27408. }()
  27409. }, {
  27410. key: "callFunction",
  27411. value: function callFunction(e) {
  27412. var t = {
  27413. method: "serverless.function.runtime.invoke",
  27414. params: JSON.stringify({
  27415. functionTarget: e.name,
  27416. functionArgs: e.data || {}
  27417. })
  27418. };
  27419. return this.request(this.setupRequest(t));
  27420. }
  27421. }, {
  27422. key: "getOSSUploadOptionsFromPath",
  27423. value: function getOSSUploadOptionsFromPath(e) {
  27424. var t = {
  27425. method: "serverless.file.resource.generateProximalSign",
  27426. params: JSON.stringify(e)
  27427. };
  27428. return this.request(this.setupRequest(t));
  27429. }
  27430. }, {
  27431. key: "uploadFileToOSS",
  27432. value: function uploadFileToOSS(_ref3) {
  27433. var _this5 = this;
  27434. var e = _ref3.url,
  27435. t = _ref3.formData,
  27436. n = _ref3.name,
  27437. s = _ref3.filePath,
  27438. r = _ref3.fileType,
  27439. i = _ref3.onUploadProgress;
  27440. return new Promise(function (o, a) {
  27441. var c = _this5.adapter.uploadFile({
  27442. url: e,
  27443. formData: t,
  27444. name: n,
  27445. filePath: s,
  27446. fileType: r,
  27447. header: {
  27448. "X-OSS-server-side-encrpytion": "AES256"
  27449. },
  27450. success: function success(e) {
  27451. e && e.statusCode < 400 ? o(e) : a(new ne({
  27452. code: "UPLOAD_FAILED",
  27453. message: "文件上传失败"
  27454. }));
  27455. },
  27456. fail: function fail(e) {
  27457. a(new ne({
  27458. code: e.code || "UPLOAD_FAILED",
  27459. message: e.message || e.errMsg || "文件上传失败"
  27460. }));
  27461. }
  27462. });
  27463. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  27464. i({
  27465. loaded: e.totalBytesSent,
  27466. total: e.totalBytesExpectedToSend
  27467. });
  27468. });
  27469. });
  27470. }
  27471. }, {
  27472. key: "reportOSSUpload",
  27473. value: function reportOSSUpload(e) {
  27474. var t = {
  27475. method: "serverless.file.resource.report",
  27476. params: JSON.stringify(e)
  27477. };
  27478. return this.request(this.setupRequest(t));
  27479. }
  27480. }, {
  27481. key: "uploadFile",
  27482. value: function () {
  27483. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  27484. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  27485. return _regenerator.default.wrap(function _callee2$(_context2) {
  27486. while (1) {
  27487. switch (_context2.prev = _context2.next) {
  27488. case 0:
  27489. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, _ref4$cloudPathAsReal = _ref4.cloudPathAsRealPath, s = _ref4$cloudPathAsReal === void 0 ? !1 : _ref4$cloudPathAsReal, r = _ref4.onUploadProgress, i = _ref4.config;
  27490. if (!("string" !== g(t))) {
  27491. _context2.next = 3;
  27492. break;
  27493. }
  27494. throw new ne({
  27495. code: "INVALID_PARAM",
  27496. message: "cloudPath必须为字符串类型"
  27497. });
  27498. case 3:
  27499. if (t = t.trim()) {
  27500. _context2.next = 5;
  27501. break;
  27502. }
  27503. throw new ne({
  27504. code: "INVALID_PARAM",
  27505. message: "cloudPath不可为空"
  27506. });
  27507. case 5:
  27508. if (!/:\/\//.test(t)) {
  27509. _context2.next = 7;
  27510. break;
  27511. }
  27512. throw new ne({
  27513. code: "INVALID_PARAM",
  27514. message: "cloudPath不合法"
  27515. });
  27516. case 7:
  27517. o = i && i.envType || this.config.envType;
  27518. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  27519. _context2.next = 10;
  27520. break;
  27521. }
  27522. throw new ne({
  27523. code: "INVALID_PARAM",
  27524. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  27525. });
  27526. case 10:
  27527. _context2.next = 12;
  27528. return this.getOSSUploadOptionsFromPath({
  27529. env: o,
  27530. filename: s ? t.split("/").pop() : t,
  27531. fileId: s ? t : void 0
  27532. });
  27533. case 12:
  27534. a = _context2.sent.result;
  27535. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  27536. u = a.securityToken;
  27537. h = a.accessKeyId;
  27538. l = a.signature;
  27539. d = a.host;
  27540. p = a.ossPath;
  27541. f = a.id;
  27542. m = a.policy;
  27543. y = a.ossCallbackUrl;
  27544. _ = {
  27545. "Cache-Control": "max-age=2592000",
  27546. "Content-Disposition": "attachment",
  27547. OSSAccessKeyId: h,
  27548. Signature: l,
  27549. host: d,
  27550. id: f,
  27551. key: p,
  27552. policy: m,
  27553. success_action_status: 200
  27554. };
  27555. if (u && (_["x-oss-security-token"] = u), y) {
  27556. _e5 = JSON.stringify({
  27557. callbackUrl: y,
  27558. callbackBody: JSON.stringify({
  27559. fileId: f,
  27560. spaceId: this.config.spaceId
  27561. }),
  27562. callbackBodyType: "application/json"
  27563. });
  27564. _.callback = le.toBase64(_e5);
  27565. }
  27566. w = {
  27567. url: "https://" + a.host,
  27568. formData: _,
  27569. fileName: "file",
  27570. name: "file",
  27571. filePath: e,
  27572. fileType: n
  27573. };
  27574. _context2.next = 27;
  27575. return this.uploadFileToOSS(Object.assign({}, w, {
  27576. onUploadProgress: r
  27577. }));
  27578. case 27:
  27579. if (!y) {
  27580. _context2.next = 29;
  27581. break;
  27582. }
  27583. return _context2.abrupt("return", {
  27584. success: !0,
  27585. filePath: e,
  27586. fileID: c
  27587. });
  27588. case 29:
  27589. _context2.next = 31;
  27590. return this.reportOSSUpload({
  27591. id: f
  27592. });
  27593. case 31:
  27594. if (!_context2.sent.success) {
  27595. _context2.next = 33;
  27596. break;
  27597. }
  27598. return _context2.abrupt("return", {
  27599. success: !0,
  27600. filePath: e,
  27601. fileID: c
  27602. });
  27603. case 33:
  27604. throw new ne({
  27605. code: "UPLOAD_FAILED",
  27606. message: "文件上传失败"
  27607. });
  27608. case 34:
  27609. case "end":
  27610. return _context2.stop();
  27611. }
  27612. }
  27613. }, _callee2, this);
  27614. }));
  27615. function uploadFile(_x) {
  27616. return _uploadFile.apply(this, arguments);
  27617. }
  27618. return uploadFile;
  27619. }()
  27620. }, {
  27621. key: "getTempFileURL",
  27622. value: function getTempFileURL() {
  27623. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27624. e = _ref5.fileList;
  27625. return new Promise(function (t, n) {
  27626. Array.isArray(e) && 0 !== e.length || n(new ne({
  27627. code: "INVALID_PARAM",
  27628. message: "fileList的元素必须是非空的字符串"
  27629. })), t({
  27630. fileList: e.map(function (e) {
  27631. return {
  27632. fileID: e,
  27633. tempFileURL: e
  27634. };
  27635. })
  27636. });
  27637. });
  27638. }
  27639. }, {
  27640. key: "getFileInfo",
  27641. value: function () {
  27642. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  27643. var _ref6,
  27644. e,
  27645. t,
  27646. _args3 = arguments;
  27647. return _regenerator.default.wrap(function _callee3$(_context3) {
  27648. while (1) {
  27649. switch (_context3.prev = _context3.next) {
  27650. case 0:
  27651. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  27652. if (!(!Array.isArray(e) || 0 === e.length)) {
  27653. _context3.next = 3;
  27654. break;
  27655. }
  27656. throw new ne({
  27657. code: "INVALID_PARAM",
  27658. message: "fileList的元素必须是非空的字符串"
  27659. });
  27660. case 3:
  27661. t = {
  27662. method: "serverless.file.resource.info",
  27663. params: JSON.stringify({
  27664. id: e.map(function (e) {
  27665. return e.split("?")[0];
  27666. }).join(",")
  27667. })
  27668. };
  27669. _context3.next = 6;
  27670. return this.request(this.setupRequest(t));
  27671. case 6:
  27672. _context3.t0 = _context3.sent.result;
  27673. return _context3.abrupt("return", {
  27674. fileList: _context3.t0
  27675. });
  27676. case 8:
  27677. case "end":
  27678. return _context3.stop();
  27679. }
  27680. }
  27681. }, _callee3, this);
  27682. }));
  27683. function getFileInfo() {
  27684. return _getFileInfo.apply(this, arguments);
  27685. }
  27686. return getFileInfo;
  27687. }()
  27688. }]);
  27689. return fe;
  27690. }();
  27691. var ge = {
  27692. init: function init(e) {
  27693. var t = new fe(e),
  27694. n = {
  27695. signInAnonymously: function signInAnonymously() {
  27696. return t.authorize();
  27697. },
  27698. getLoginState: function getLoginState() {
  27699. return Promise.resolve(!1);
  27700. }
  27701. };
  27702. return t.auth = function () {
  27703. return n;
  27704. }, t.customAuth = t.auth, t;
  27705. }
  27706. };
  27707. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  27708. var ye;
  27709. !function (e) {
  27710. e.local = "local", e.none = "none", e.session = "session";
  27711. }(ye || (ye = {}));
  27712. var _e = function _e() {};
  27713. var we = function we() {
  27714. var e;
  27715. if (!Promise) {
  27716. e = function e() {}, e.promise = {};
  27717. var _t3 = function _t3() {
  27718. throw new ne({
  27719. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  27720. });
  27721. };
  27722. return Object.defineProperty(e.promise, "then", {
  27723. get: _t3
  27724. }), Object.defineProperty(e.promise, "catch", {
  27725. get: _t3
  27726. }), e;
  27727. }
  27728. var t = new Promise(function (t, n) {
  27729. e = function e(_e6, s) {
  27730. return _e6 ? n(_e6) : t(s);
  27731. };
  27732. });
  27733. return e.promise = t, e;
  27734. };
  27735. function ve(e) {
  27736. return void 0 === e;
  27737. }
  27738. function Ie(e) {
  27739. return "[object Null]" === Object.prototype.toString.call(e);
  27740. }
  27741. var Se;
  27742. function be(e) {
  27743. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  27744. var n;
  27745. var _iterator = _createForOfIteratorHelper(t),
  27746. _step;
  27747. try {
  27748. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  27749. var _e7 = _step.value;
  27750. var _t4 = _e7.isMatch,
  27751. _n4 = _e7.genAdapter,
  27752. _s4 = _e7.runtime;
  27753. if (_t4()) return {
  27754. adapter: _n4(),
  27755. runtime: _s4
  27756. };
  27757. }
  27758. } catch (err) {
  27759. _iterator.e(err);
  27760. } finally {
  27761. _iterator.f();
  27762. }
  27763. }
  27764. !function (e) {
  27765. e.WEB = "web", e.WX_MP = "wx_mp";
  27766. }(Se || (Se = {}));
  27767. var ke = {
  27768. adapter: null,
  27769. runtime: void 0
  27770. },
  27771. Ce = ["anonymousUuidKey"];
  27772. var Te = /*#__PURE__*/function (_e8) {
  27773. (0, _inherits2.default)(Te, _e8);
  27774. var _super2 = _createSuper(Te);
  27775. function Te() {
  27776. var _this6;
  27777. (0, _classCallCheck2.default)(this, Te);
  27778. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  27779. return _this6;
  27780. }
  27781. (0, _createClass2.default)(Te, [{
  27782. key: "setItem",
  27783. value: function setItem(e, t) {
  27784. ke.adapter.root.tcbObject[e] = t;
  27785. }
  27786. }, {
  27787. key: "getItem",
  27788. value: function getItem(e) {
  27789. return ke.adapter.root.tcbObject[e];
  27790. }
  27791. }, {
  27792. key: "removeItem",
  27793. value: function removeItem(e) {
  27794. delete ke.adapter.root.tcbObject[e];
  27795. }
  27796. }, {
  27797. key: "clear",
  27798. value: function clear() {
  27799. delete ke.adapter.root.tcbObject;
  27800. }
  27801. }]);
  27802. return Te;
  27803. }(_e);
  27804. function Pe(e, t) {
  27805. switch (e) {
  27806. case "local":
  27807. return t.localStorage || new Te();
  27808. case "none":
  27809. return new Te();
  27810. default:
  27811. return t.sessionStorage || new Te();
  27812. }
  27813. }
  27814. var Ae = /*#__PURE__*/function () {
  27815. function Ae(e) {
  27816. (0, _classCallCheck2.default)(this, Ae);
  27817. if (!this._storage) {
  27818. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  27819. var _t5 = "access_token_".concat(e.env),
  27820. _n5 = "access_token_expire_".concat(e.env),
  27821. _s5 = "refresh_token_".concat(e.env),
  27822. _r = "anonymous_uuid_".concat(e.env),
  27823. _i = "login_type_".concat(e.env),
  27824. _o = "user_info_".concat(e.env);
  27825. this.keys = {
  27826. accessTokenKey: _t5,
  27827. accessTokenExpireKey: _n5,
  27828. refreshTokenKey: _s5,
  27829. anonymousUuidKey: _r,
  27830. loginTypeKey: _i,
  27831. userInfoKey: _o
  27832. };
  27833. }
  27834. }
  27835. (0, _createClass2.default)(Ae, [{
  27836. key: "updatePersistence",
  27837. value: function updatePersistence(e) {
  27838. if (e === this._persistence) return;
  27839. var t = "local" === this._persistence;
  27840. this._persistence = e;
  27841. var n = Pe(e, ke.adapter);
  27842. for (var _e9 in this.keys) {
  27843. var _s6 = this.keys[_e9];
  27844. if (t && Ce.includes(_e9)) continue;
  27845. var _r2 = this._storage.getItem(_s6);
  27846. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  27847. }
  27848. this._storage = n;
  27849. }
  27850. }, {
  27851. key: "setStore",
  27852. value: function setStore(e, t, n) {
  27853. if (!this._storage) return;
  27854. var s = {
  27855. version: n || "localCachev1",
  27856. content: t
  27857. },
  27858. r = JSON.stringify(s);
  27859. try {
  27860. this._storage.setItem(e, r);
  27861. } catch (e) {
  27862. throw e;
  27863. }
  27864. }
  27865. }, {
  27866. key: "getStore",
  27867. value: function getStore(e, t) {
  27868. try {
  27869. if (!this._storage) return;
  27870. } catch (e) {
  27871. return "";
  27872. }
  27873. t = t || "localCachev1";
  27874. var n = this._storage.getItem(e);
  27875. if (!n) return "";
  27876. if (n.indexOf(t) >= 0) {
  27877. return JSON.parse(n).content;
  27878. }
  27879. return "";
  27880. }
  27881. }, {
  27882. key: "removeStore",
  27883. value: function removeStore(e) {
  27884. this._storage.removeItem(e);
  27885. }
  27886. }]);
  27887. return Ae;
  27888. }();
  27889. var Ee = {},
  27890. Oe = {};
  27891. function xe(e) {
  27892. return Ee[e];
  27893. }
  27894. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  27895. (0, _classCallCheck2.default)(this, Re);
  27896. this.data = t || null, this.name = e;
  27897. });
  27898. var Ue = /*#__PURE__*/function (_Re) {
  27899. (0, _inherits2.default)(Ue, _Re);
  27900. var _super3 = _createSuper(Ue);
  27901. function Ue(e, t) {
  27902. var _this7;
  27903. (0, _classCallCheck2.default)(this, Ue);
  27904. _this7 = _super3.call(this, "error", {
  27905. error: e,
  27906. data: t
  27907. }), _this7.error = e;
  27908. return _this7;
  27909. }
  27910. return (0, _createClass2.default)(Ue);
  27911. }(Re);
  27912. var Le = new ( /*#__PURE__*/function () {
  27913. function _class() {
  27914. (0, _classCallCheck2.default)(this, _class);
  27915. this._listeners = {};
  27916. }
  27917. (0, _createClass2.default)(_class, [{
  27918. key: "on",
  27919. value: function on(e, t) {
  27920. return function (e, t, n) {
  27921. n[e] = n[e] || [], n[e].push(t);
  27922. }(e, t, this._listeners), this;
  27923. }
  27924. }, {
  27925. key: "off",
  27926. value: function off(e, t) {
  27927. return function (e, t, n) {
  27928. if (n && n[e]) {
  27929. var _s7 = n[e].indexOf(t);
  27930. -1 !== _s7 && n[e].splice(_s7, 1);
  27931. }
  27932. }(e, t, this._listeners), this;
  27933. }
  27934. }, {
  27935. key: "fire",
  27936. value: function fire(e, t) {
  27937. if (e instanceof Ue) return console.error(e.error), this;
  27938. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  27939. var s = n.name;
  27940. if (this._listens(s)) {
  27941. n.target = this;
  27942. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  27943. var _iterator2 = _createForOfIteratorHelper(_e10),
  27944. _step2;
  27945. try {
  27946. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  27947. var _t6 = _step2.value;
  27948. _t6.call(this, n);
  27949. }
  27950. } catch (err) {
  27951. _iterator2.e(err);
  27952. } finally {
  27953. _iterator2.f();
  27954. }
  27955. }
  27956. return this;
  27957. }
  27958. }, {
  27959. key: "_listens",
  27960. value: function _listens(e) {
  27961. return this._listeners[e] && this._listeners[e].length > 0;
  27962. }
  27963. }]);
  27964. return _class;
  27965. }())();
  27966. function Ne(e, t) {
  27967. Le.on(e, t);
  27968. }
  27969. function De(e) {
  27970. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27971. Le.fire(e, t);
  27972. }
  27973. function Fe(e, t) {
  27974. Le.off(e, t);
  27975. }
  27976. var qe = "loginStateChanged",
  27977. Me = "loginStateExpire",
  27978. Ke = "loginTypeChanged",
  27979. je = "anonymousConverted",
  27980. Be = "refreshAccessToken";
  27981. var $e;
  27982. !function (e) {
  27983. 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";
  27984. }($e || ($e = {}));
  27985. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  27986. ze = {
  27987. "X-SDK-Version": "1.3.5"
  27988. };
  27989. function Je(e, t, n) {
  27990. var s = e[t];
  27991. e[t] = function (t) {
  27992. var r = {},
  27993. i = {};
  27994. n.forEach(function (n) {
  27995. var _n$call = n.call(e, t),
  27996. s = _n$call.data,
  27997. o = _n$call.headers;
  27998. Object.assign(r, s), Object.assign(i, o);
  27999. });
  28000. var o = t.data;
  28001. return o && function () {
  28002. var e;
  28003. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  28004. o.append(_e11, r[_e11]);
  28005. }
  28006. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  28007. };
  28008. }
  28009. function He() {
  28010. var e = Math.random().toString(16).slice(2);
  28011. return {
  28012. data: {
  28013. seqId: e
  28014. },
  28015. headers: _objectSpread(_objectSpread({}, ze), {}, {
  28016. "x-seqid": e
  28017. })
  28018. };
  28019. }
  28020. var Ge = /*#__PURE__*/function () {
  28021. function Ge() {
  28022. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  28023. (0, _classCallCheck2.default)(this, Ge);
  28024. var t;
  28025. this.config = e, this._reqClass = new ke.adapter.reqClass({
  28026. timeout: this.config.timeout,
  28027. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  28028. restrictedMethods: ["post"]
  28029. }), this._cache = xe(this.config.env), this._localCache = (t = this.config.env, Oe[t]), Je(this._reqClass, "post", [He]), Je(this._reqClass, "upload", [He]), Je(this._reqClass, "download", [He]);
  28030. }
  28031. (0, _createClass2.default)(Ge, [{
  28032. key: "post",
  28033. value: function () {
  28034. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  28035. return _regenerator.default.wrap(function _callee4$(_context4) {
  28036. while (1) {
  28037. switch (_context4.prev = _context4.next) {
  28038. case 0:
  28039. _context4.next = 2;
  28040. return this._reqClass.post(e);
  28041. case 2:
  28042. return _context4.abrupt("return", _context4.sent);
  28043. case 3:
  28044. case "end":
  28045. return _context4.stop();
  28046. }
  28047. }
  28048. }, _callee4, this);
  28049. }));
  28050. function post(_x2) {
  28051. return _post.apply(this, arguments);
  28052. }
  28053. return post;
  28054. }()
  28055. }, {
  28056. key: "upload",
  28057. value: function () {
  28058. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  28059. return _regenerator.default.wrap(function _callee5$(_context5) {
  28060. while (1) {
  28061. switch (_context5.prev = _context5.next) {
  28062. case 0:
  28063. _context5.next = 2;
  28064. return this._reqClass.upload(e);
  28065. case 2:
  28066. return _context5.abrupt("return", _context5.sent);
  28067. case 3:
  28068. case "end":
  28069. return _context5.stop();
  28070. }
  28071. }
  28072. }, _callee5, this);
  28073. }));
  28074. function upload(_x3) {
  28075. return _upload.apply(this, arguments);
  28076. }
  28077. return upload;
  28078. }()
  28079. }, {
  28080. key: "download",
  28081. value: function () {
  28082. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  28083. return _regenerator.default.wrap(function _callee6$(_context6) {
  28084. while (1) {
  28085. switch (_context6.prev = _context6.next) {
  28086. case 0:
  28087. _context6.next = 2;
  28088. return this._reqClass.download(e);
  28089. case 2:
  28090. return _context6.abrupt("return", _context6.sent);
  28091. case 3:
  28092. case "end":
  28093. return _context6.stop();
  28094. }
  28095. }
  28096. }, _callee6, this);
  28097. }));
  28098. function download(_x4) {
  28099. return _download.apply(this, arguments);
  28100. }
  28101. return download;
  28102. }()
  28103. }, {
  28104. key: "refreshAccessToken",
  28105. value: function () {
  28106. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  28107. var e, t;
  28108. return _regenerator.default.wrap(function _callee7$(_context7) {
  28109. while (1) {
  28110. switch (_context7.prev = _context7.next) {
  28111. case 0:
  28112. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  28113. _context7.prev = 1;
  28114. _context7.next = 4;
  28115. return this._refreshAccessTokenPromise;
  28116. case 4:
  28117. e = _context7.sent;
  28118. _context7.next = 10;
  28119. break;
  28120. case 7:
  28121. _context7.prev = 7;
  28122. _context7.t0 = _context7["catch"](1);
  28123. t = _context7.t0;
  28124. case 10:
  28125. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  28126. _context7.next = 12;
  28127. break;
  28128. }
  28129. throw t;
  28130. case 12:
  28131. return _context7.abrupt("return", e);
  28132. case 13:
  28133. case "end":
  28134. return _context7.stop();
  28135. }
  28136. }
  28137. }, _callee7, this, [[1, 7]]);
  28138. }));
  28139. function refreshAccessToken() {
  28140. return _refreshAccessToken2.apply(this, arguments);
  28141. }
  28142. return refreshAccessToken;
  28143. }()
  28144. }, {
  28145. key: "_refreshAccessToken",
  28146. value: function () {
  28147. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  28148. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  28149. return _regenerator.default.wrap(function _callee8$(_context8) {
  28150. while (1) {
  28151. switch (_context8.prev = _context8.next) {
  28152. case 0:
  28153. _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;
  28154. this._cache.removeStore(e), this._cache.removeStore(t);
  28155. i = this._cache.getStore(n);
  28156. if (i) {
  28157. _context8.next = 5;
  28158. break;
  28159. }
  28160. throw new ne({
  28161. message: "未登录CloudBase"
  28162. });
  28163. case 5:
  28164. o = {
  28165. refresh_token: i
  28166. };
  28167. _context8.next = 8;
  28168. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  28169. case 8:
  28170. a = _context8.sent;
  28171. if (!a.data.code) {
  28172. _context8.next = 21;
  28173. break;
  28174. }
  28175. _e12 = a.data.code;
  28176. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  28177. _context8.next = 20;
  28178. break;
  28179. }
  28180. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  28181. _context8.next = 19;
  28182. break;
  28183. }
  28184. _e13 = this._cache.getStore(r);
  28185. _t7 = this._cache.getStore(n);
  28186. _context8.next = 17;
  28187. return this.send("auth.signInAnonymously", {
  28188. anonymous_uuid: _e13,
  28189. refresh_token: _t7
  28190. });
  28191. case 17:
  28192. _s8 = _context8.sent;
  28193. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  28194. case 19:
  28195. De(Me), this._cache.removeStore(n);
  28196. case 20:
  28197. throw new ne({
  28198. code: a.data.code,
  28199. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  28200. });
  28201. case 21:
  28202. if (!a.data.access_token) {
  28203. _context8.next = 23;
  28204. break;
  28205. }
  28206. return _context8.abrupt("return", (De(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  28207. accessToken: a.data.access_token,
  28208. accessTokenExpire: a.data.access_token_expire
  28209. }));
  28210. case 23:
  28211. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  28212. case 24:
  28213. case "end":
  28214. return _context8.stop();
  28215. }
  28216. }
  28217. }, _callee8, this);
  28218. }));
  28219. function _refreshAccessToken() {
  28220. return _refreshAccessToken3.apply(this, arguments);
  28221. }
  28222. return _refreshAccessToken;
  28223. }()
  28224. }, {
  28225. key: "getAccessToken",
  28226. value: function () {
  28227. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  28228. var _this$_cache$keys2, e, t, n, s, r, i;
  28229. return _regenerator.default.wrap(function _callee9$(_context9) {
  28230. while (1) {
  28231. switch (_context9.prev = _context9.next) {
  28232. case 0:
  28233. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  28234. if (this._cache.getStore(n)) {
  28235. _context9.next = 3;
  28236. break;
  28237. }
  28238. throw new ne({
  28239. message: "refresh token不存在,登录状态异常"
  28240. });
  28241. case 3:
  28242. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  28243. _context9.t0 = this._shouldRefreshAccessTokenHook;
  28244. if (!_context9.t0) {
  28245. _context9.next = 9;
  28246. break;
  28247. }
  28248. _context9.next = 8;
  28249. return this._shouldRefreshAccessTokenHook(s, r);
  28250. case 8:
  28251. _context9.t0 = !_context9.sent;
  28252. case 9:
  28253. _context9.t1 = _context9.t0;
  28254. if (!_context9.t1) {
  28255. _context9.next = 12;
  28256. break;
  28257. }
  28258. i = !1;
  28259. case 12:
  28260. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  28261. accessToken: s,
  28262. accessTokenExpire: r
  28263. });
  28264. case 13:
  28265. case "end":
  28266. return _context9.stop();
  28267. }
  28268. }
  28269. }, _callee9, this);
  28270. }));
  28271. function getAccessToken() {
  28272. return _getAccessToken.apply(this, arguments);
  28273. }
  28274. return getAccessToken;
  28275. }()
  28276. }, {
  28277. key: "request",
  28278. value: function () {
  28279. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  28280. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  28281. return _regenerator.default.wrap(function _callee10$(_context10) {
  28282. while (1) {
  28283. switch (_context10.prev = _context10.next) {
  28284. case 0:
  28285. s = "x-tcb-trace_".concat(this.config.env);
  28286. r = "application/x-www-form-urlencoded";
  28287. i = _objectSpread({
  28288. action: e,
  28289. env: this.config.env,
  28290. dataVersion: "2019-08-16"
  28291. }, t);
  28292. if (!(-1 === We.indexOf(e))) {
  28293. _context10.next = 10;
  28294. break;
  28295. }
  28296. _e14 = this._cache.keys.refreshTokenKey;
  28297. _context10.t0 = this._cache.getStore(_e14);
  28298. if (!_context10.t0) {
  28299. _context10.next = 10;
  28300. break;
  28301. }
  28302. _context10.next = 9;
  28303. return this.getAccessToken();
  28304. case 9:
  28305. i.access_token = _context10.sent.accessToken;
  28306. case 10:
  28307. if ("storage.uploadFile" === e) {
  28308. o = new FormData();
  28309. for (_e15 in o) {
  28310. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  28311. }
  28312. r = "multipart/form-data";
  28313. } else {
  28314. r = "application/json", o = {};
  28315. for (_e16 in i) {
  28316. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  28317. }
  28318. }
  28319. a = {
  28320. headers: {
  28321. "content-type": r
  28322. }
  28323. };
  28324. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  28325. c = this._localCache.getStore(s);
  28326. c && (a.headers["X-TCB-Trace"] = c);
  28327. u = t.parse, h = t.inQuery, l = t.search;
  28328. d = {
  28329. env: this.config.env
  28330. };
  28331. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  28332. p = function (e, t) {
  28333. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  28334. var s = /\?/.test(t);
  28335. var r = "";
  28336. for (var _e17 in n) {
  28337. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  28338. }
  28339. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  28340. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  28341. l && (p += l);
  28342. _context10.next = 22;
  28343. return this.post(_objectSpread({
  28344. url: p,
  28345. data: o
  28346. }, a));
  28347. case 22:
  28348. f = _context10.sent;
  28349. g = f.header && f.header["x-tcb-trace"];
  28350. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  28351. _context10.next = 26;
  28352. break;
  28353. }
  28354. throw new ne({
  28355. code: "NETWORK_ERROR",
  28356. message: "network request error"
  28357. });
  28358. case 26:
  28359. return _context10.abrupt("return", f);
  28360. case 27:
  28361. case "end":
  28362. return _context10.stop();
  28363. }
  28364. }
  28365. }, _callee10, this);
  28366. }));
  28367. function request(_x5, _x6, _x7) {
  28368. return _request.apply(this, arguments);
  28369. }
  28370. return request;
  28371. }()
  28372. }, {
  28373. key: "send",
  28374. value: function () {
  28375. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  28376. var t,
  28377. n,
  28378. _n6,
  28379. _args11 = arguments;
  28380. return _regenerator.default.wrap(function _callee11$(_context11) {
  28381. while (1) {
  28382. switch (_context11.prev = _context11.next) {
  28383. case 0:
  28384. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  28385. _context11.next = 3;
  28386. return this.request(e, t, {
  28387. onUploadProgress: t.onUploadProgress
  28388. });
  28389. case 3:
  28390. n = _context11.sent;
  28391. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  28392. _context11.next = 13;
  28393. break;
  28394. }
  28395. _context11.next = 7;
  28396. return this.refreshAccessToken();
  28397. case 7:
  28398. _context11.next = 9;
  28399. return this.request(e, t, {
  28400. onUploadProgress: t.onUploadProgress
  28401. });
  28402. case 9:
  28403. _n6 = _context11.sent;
  28404. if (!_n6.data.code) {
  28405. _context11.next = 12;
  28406. break;
  28407. }
  28408. throw new ne({
  28409. code: _n6.data.code,
  28410. message: _n6.data.message
  28411. });
  28412. case 12:
  28413. return _context11.abrupt("return", _n6.data);
  28414. case 13:
  28415. if (!n.data.code) {
  28416. _context11.next = 15;
  28417. break;
  28418. }
  28419. throw new ne({
  28420. code: n.data.code,
  28421. message: n.data.message
  28422. });
  28423. case 15:
  28424. return _context11.abrupt("return", n.data);
  28425. case 16:
  28426. case "end":
  28427. return _context11.stop();
  28428. }
  28429. }
  28430. }, _callee11, this);
  28431. }));
  28432. function send(_x8) {
  28433. return _send.apply(this, arguments);
  28434. }
  28435. return send;
  28436. }()
  28437. }, {
  28438. key: "setRefreshToken",
  28439. value: function setRefreshToken(e) {
  28440. var _this$_cache$keys3 = this._cache.keys,
  28441. t = _this$_cache$keys3.accessTokenKey,
  28442. n = _this$_cache$keys3.accessTokenExpireKey,
  28443. s = _this$_cache$keys3.refreshTokenKey;
  28444. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28445. }
  28446. }]);
  28447. return Ge;
  28448. }();
  28449. var Ve = {};
  28450. function Ye(e) {
  28451. return Ve[e];
  28452. }
  28453. var Qe = /*#__PURE__*/function () {
  28454. function Qe(e) {
  28455. (0, _classCallCheck2.default)(this, Qe);
  28456. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  28457. }
  28458. (0, _createClass2.default)(Qe, [{
  28459. key: "setRefreshToken",
  28460. value: function setRefreshToken(e) {
  28461. var _this$_cache$keys4 = this._cache.keys,
  28462. t = _this$_cache$keys4.accessTokenKey,
  28463. n = _this$_cache$keys4.accessTokenExpireKey,
  28464. s = _this$_cache$keys4.refreshTokenKey;
  28465. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28466. }
  28467. }, {
  28468. key: "setAccessToken",
  28469. value: function setAccessToken(e, t) {
  28470. var _this$_cache$keys5 = this._cache.keys,
  28471. n = _this$_cache$keys5.accessTokenKey,
  28472. s = _this$_cache$keys5.accessTokenExpireKey;
  28473. this._cache.setStore(n, e), this._cache.setStore(s, t);
  28474. }
  28475. }, {
  28476. key: "refreshUserInfo",
  28477. value: function () {
  28478. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  28479. var _yield$this$_request$, e;
  28480. return _regenerator.default.wrap(function _callee12$(_context12) {
  28481. while (1) {
  28482. switch (_context12.prev = _context12.next) {
  28483. case 0:
  28484. _context12.next = 2;
  28485. return this._request.send("auth.getUserInfo", {});
  28486. case 2:
  28487. _yield$this$_request$ = _context12.sent;
  28488. e = _yield$this$_request$.data;
  28489. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  28490. case 5:
  28491. case "end":
  28492. return _context12.stop();
  28493. }
  28494. }
  28495. }, _callee12, this);
  28496. }));
  28497. function refreshUserInfo() {
  28498. return _refreshUserInfo.apply(this, arguments);
  28499. }
  28500. return refreshUserInfo;
  28501. }()
  28502. }, {
  28503. key: "setLocalUserInfo",
  28504. value: function setLocalUserInfo(e) {
  28505. var t = this._cache.keys.userInfoKey;
  28506. this._cache.setStore(t, e);
  28507. }
  28508. }]);
  28509. return Qe;
  28510. }();
  28511. var Xe = /*#__PURE__*/function () {
  28512. function Xe(e) {
  28513. (0, _classCallCheck2.default)(this, Xe);
  28514. if (!e) throw new ne({
  28515. code: "PARAM_ERROR",
  28516. message: "envId is not defined"
  28517. });
  28518. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  28519. }
  28520. (0, _createClass2.default)(Xe, [{
  28521. key: "linkWithTicket",
  28522. value: function linkWithTicket(e) {
  28523. if ("string" != typeof e) throw new ne({
  28524. code: "PARAM_ERROR",
  28525. message: "ticket must be string"
  28526. });
  28527. return this._request.send("auth.linkWithTicket", {
  28528. ticket: e
  28529. });
  28530. }
  28531. }, {
  28532. key: "linkWithRedirect",
  28533. value: function linkWithRedirect(e) {
  28534. e.signInWithRedirect();
  28535. }
  28536. }, {
  28537. key: "updatePassword",
  28538. value: function updatePassword(e, t) {
  28539. return this._request.send("auth.updatePassword", {
  28540. oldPassword: t,
  28541. newPassword: e
  28542. });
  28543. }
  28544. }, {
  28545. key: "updateEmail",
  28546. value: function updateEmail(e) {
  28547. return this._request.send("auth.updateEmail", {
  28548. newEmail: e
  28549. });
  28550. }
  28551. }, {
  28552. key: "updateUsername",
  28553. value: function updateUsername(e) {
  28554. if ("string" != typeof e) throw new ne({
  28555. code: "PARAM_ERROR",
  28556. message: "username must be a string"
  28557. });
  28558. return this._request.send("auth.updateUsername", {
  28559. username: e
  28560. });
  28561. }
  28562. }, {
  28563. key: "getLinkedUidList",
  28564. value: function () {
  28565. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  28566. var _yield$this$_request$2, e, t, n;
  28567. return _regenerator.default.wrap(function _callee13$(_context13) {
  28568. while (1) {
  28569. switch (_context13.prev = _context13.next) {
  28570. case 0:
  28571. _context13.next = 2;
  28572. return this._request.send("auth.getLinkedUidList", {});
  28573. case 2:
  28574. _yield$this$_request$2 = _context13.sent;
  28575. e = _yield$this$_request$2.data;
  28576. t = !1;
  28577. n = e.users;
  28578. return _context13.abrupt("return", (n.forEach(function (e) {
  28579. e.wxOpenId && e.wxPublicId && (t = !0);
  28580. }), {
  28581. users: n,
  28582. hasPrimaryUid: t
  28583. }));
  28584. case 7:
  28585. case "end":
  28586. return _context13.stop();
  28587. }
  28588. }
  28589. }, _callee13, this);
  28590. }));
  28591. function getLinkedUidList() {
  28592. return _getLinkedUidList.apply(this, arguments);
  28593. }
  28594. return getLinkedUidList;
  28595. }()
  28596. }, {
  28597. key: "setPrimaryUid",
  28598. value: function setPrimaryUid(e) {
  28599. return this._request.send("auth.setPrimaryUid", {
  28600. uid: e
  28601. });
  28602. }
  28603. }, {
  28604. key: "unlink",
  28605. value: function unlink(e) {
  28606. return this._request.send("auth.unlink", {
  28607. platform: e
  28608. });
  28609. }
  28610. }, {
  28611. key: "update",
  28612. value: function () {
  28613. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  28614. var t, n, s, r, i, o, _yield$this$_request$3, a;
  28615. return _regenerator.default.wrap(function _callee14$(_context14) {
  28616. while (1) {
  28617. switch (_context14.prev = _context14.next) {
  28618. case 0:
  28619. t = e.nickName;
  28620. n = e.gender;
  28621. s = e.avatarUrl;
  28622. r = e.province;
  28623. i = e.country;
  28624. o = e.city;
  28625. _context14.next = 8;
  28626. return this._request.send("auth.updateUserInfo", {
  28627. nickName: t,
  28628. gender: n,
  28629. avatarUrl: s,
  28630. province: r,
  28631. country: i,
  28632. city: o
  28633. });
  28634. case 8:
  28635. _yield$this$_request$3 = _context14.sent;
  28636. a = _yield$this$_request$3.data;
  28637. this.setLocalUserInfo(a);
  28638. case 11:
  28639. case "end":
  28640. return _context14.stop();
  28641. }
  28642. }
  28643. }, _callee14, this);
  28644. }));
  28645. function update(_x9) {
  28646. return _update.apply(this, arguments);
  28647. }
  28648. return update;
  28649. }()
  28650. }, {
  28651. key: "refresh",
  28652. value: function () {
  28653. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  28654. var _yield$this$_request$4, e;
  28655. return _regenerator.default.wrap(function _callee15$(_context15) {
  28656. while (1) {
  28657. switch (_context15.prev = _context15.next) {
  28658. case 0:
  28659. _context15.next = 2;
  28660. return this._request.send("auth.getUserInfo", {});
  28661. case 2:
  28662. _yield$this$_request$4 = _context15.sent;
  28663. e = _yield$this$_request$4.data;
  28664. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  28665. case 5:
  28666. case "end":
  28667. return _context15.stop();
  28668. }
  28669. }
  28670. }, _callee15, this);
  28671. }));
  28672. function refresh() {
  28673. return _refresh.apply(this, arguments);
  28674. }
  28675. return refresh;
  28676. }()
  28677. }, {
  28678. key: "setUserInfo",
  28679. value: function setUserInfo() {
  28680. var _this8 = this;
  28681. var e = this._cache.keys.userInfoKey,
  28682. t = this._cache.getStore(e);
  28683. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  28684. _this8[e] = t[e];
  28685. }), this.location = {
  28686. country: t.country,
  28687. province: t.province,
  28688. city: t.city
  28689. };
  28690. }
  28691. }, {
  28692. key: "setLocalUserInfo",
  28693. value: function setLocalUserInfo(e) {
  28694. var t = this._cache.keys.userInfoKey;
  28695. this._cache.setStore(t, e), this.setUserInfo();
  28696. }
  28697. }]);
  28698. return Xe;
  28699. }();
  28700. var Ze = /*#__PURE__*/function () {
  28701. function Ze(e) {
  28702. (0, _classCallCheck2.default)(this, Ze);
  28703. if (!e) throw new ne({
  28704. code: "PARAM_ERROR",
  28705. message: "envId is not defined"
  28706. });
  28707. this._cache = xe(e);
  28708. var _this$_cache$keys6 = this._cache.keys,
  28709. t = _this$_cache$keys6.refreshTokenKey,
  28710. n = _this$_cache$keys6.accessTokenKey,
  28711. s = _this$_cache$keys6.accessTokenExpireKey,
  28712. r = this._cache.getStore(t),
  28713. i = this._cache.getStore(n),
  28714. o = this._cache.getStore(s);
  28715. this.credential = {
  28716. refreshToken: r,
  28717. accessToken: i,
  28718. accessTokenExpire: o
  28719. }, this.user = new Xe(e);
  28720. }
  28721. (0, _createClass2.default)(Ze, [{
  28722. key: "isAnonymousAuth",
  28723. get: function get() {
  28724. return this.loginType === $e.ANONYMOUS;
  28725. }
  28726. }, {
  28727. key: "isCustomAuth",
  28728. get: function get() {
  28729. return this.loginType === $e.CUSTOM;
  28730. }
  28731. }, {
  28732. key: "isWeixinAuth",
  28733. get: function get() {
  28734. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  28735. }
  28736. }, {
  28737. key: "loginType",
  28738. get: function get() {
  28739. return this._cache.getStore(this._cache.keys.loginTypeKey);
  28740. }
  28741. }]);
  28742. return Ze;
  28743. }();
  28744. var et = /*#__PURE__*/function (_Qe) {
  28745. (0, _inherits2.default)(et, _Qe);
  28746. var _super4 = _createSuper(et);
  28747. function et() {
  28748. (0, _classCallCheck2.default)(this, et);
  28749. return _super4.apply(this, arguments);
  28750. }
  28751. (0, _createClass2.default)(et, [{
  28752. key: "signIn",
  28753. value: function () {
  28754. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  28755. var _this$_cache$keys7, e, t, n, s, r, _e18;
  28756. return _regenerator.default.wrap(function _callee16$(_context16) {
  28757. while (1) {
  28758. switch (_context16.prev = _context16.next) {
  28759. case 0:
  28760. this._cache.updatePersistence("local");
  28761. _this$_cache$keys7 = this._cache.keys;
  28762. e = _this$_cache$keys7.anonymousUuidKey;
  28763. t = _this$_cache$keys7.refreshTokenKey;
  28764. n = this._cache.getStore(e) || void 0;
  28765. s = this._cache.getStore(t) || void 0;
  28766. _context16.next = 8;
  28767. return this._request.send("auth.signInAnonymously", {
  28768. anonymous_uuid: n,
  28769. refresh_token: s
  28770. });
  28771. case 8:
  28772. r = _context16.sent;
  28773. if (!(r.uuid && r.refresh_token)) {
  28774. _context16.next = 20;
  28775. break;
  28776. }
  28777. this._setAnonymousUUID(r.uuid);
  28778. this.setRefreshToken(r.refresh_token);
  28779. _context16.next = 14;
  28780. return this._request.refreshAccessToken();
  28781. case 14:
  28782. De(qe);
  28783. De(Ke, {
  28784. env: this.config.env,
  28785. loginType: $e.ANONYMOUS,
  28786. persistence: "local"
  28787. });
  28788. _e18 = new Ze(this.config.env);
  28789. _context16.next = 19;
  28790. return _e18.user.refresh();
  28791. case 19:
  28792. return _context16.abrupt("return", _e18);
  28793. case 20:
  28794. throw new ne({
  28795. message: "匿名登录失败"
  28796. });
  28797. case 21:
  28798. case "end":
  28799. return _context16.stop();
  28800. }
  28801. }
  28802. }, _callee16, this);
  28803. }));
  28804. function signIn() {
  28805. return _signIn.apply(this, arguments);
  28806. }
  28807. return signIn;
  28808. }()
  28809. }, {
  28810. key: "linkAndRetrieveDataWithTicket",
  28811. value: function () {
  28812. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  28813. var _this$_cache$keys8, t, n, s, r, i;
  28814. return _regenerator.default.wrap(function _callee17$(_context17) {
  28815. while (1) {
  28816. switch (_context17.prev = _context17.next) {
  28817. case 0:
  28818. _this$_cache$keys8 = this._cache.keys;
  28819. t = _this$_cache$keys8.anonymousUuidKey;
  28820. n = _this$_cache$keys8.refreshTokenKey;
  28821. s = this._cache.getStore(t);
  28822. r = this._cache.getStore(n);
  28823. _context17.next = 7;
  28824. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  28825. anonymous_uuid: s,
  28826. refresh_token: r,
  28827. ticket: e
  28828. });
  28829. case 7:
  28830. i = _context17.sent;
  28831. if (!i.refresh_token) {
  28832. _context17.next = 16;
  28833. break;
  28834. }
  28835. this._clearAnonymousUUID();
  28836. this.setRefreshToken(i.refresh_token);
  28837. _context17.next = 13;
  28838. return this._request.refreshAccessToken();
  28839. case 13:
  28840. De(je, {
  28841. env: this.config.env
  28842. });
  28843. De(Ke, {
  28844. loginType: $e.CUSTOM,
  28845. persistence: "local"
  28846. });
  28847. return _context17.abrupt("return", {
  28848. credential: {
  28849. refreshToken: i.refresh_token
  28850. }
  28851. });
  28852. case 16:
  28853. throw new ne({
  28854. message: "匿名转化失败"
  28855. });
  28856. case 17:
  28857. case "end":
  28858. return _context17.stop();
  28859. }
  28860. }
  28861. }, _callee17, this);
  28862. }));
  28863. function linkAndRetrieveDataWithTicket(_x10) {
  28864. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  28865. }
  28866. return linkAndRetrieveDataWithTicket;
  28867. }()
  28868. }, {
  28869. key: "_setAnonymousUUID",
  28870. value: function _setAnonymousUUID(e) {
  28871. var _this$_cache$keys9 = this._cache.keys,
  28872. t = _this$_cache$keys9.anonymousUuidKey,
  28873. n = _this$_cache$keys9.loginTypeKey;
  28874. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  28875. }
  28876. }, {
  28877. key: "_clearAnonymousUUID",
  28878. value: function _clearAnonymousUUID() {
  28879. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  28880. }
  28881. }]);
  28882. return et;
  28883. }(Qe);
  28884. var tt = /*#__PURE__*/function (_Qe2) {
  28885. (0, _inherits2.default)(tt, _Qe2);
  28886. var _super5 = _createSuper(tt);
  28887. function tt() {
  28888. (0, _classCallCheck2.default)(this, tt);
  28889. return _super5.apply(this, arguments);
  28890. }
  28891. (0, _createClass2.default)(tt, [{
  28892. key: "signIn",
  28893. value: function () {
  28894. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  28895. var t, n;
  28896. return _regenerator.default.wrap(function _callee18$(_context18) {
  28897. while (1) {
  28898. switch (_context18.prev = _context18.next) {
  28899. case 0:
  28900. if (!("string" != typeof e)) {
  28901. _context18.next = 2;
  28902. break;
  28903. }
  28904. throw new ne({
  28905. code: "PARAM_ERROR",
  28906. message: "ticket must be a string"
  28907. });
  28908. case 2:
  28909. t = this._cache.keys.refreshTokenKey;
  28910. _context18.next = 5;
  28911. return this._request.send("auth.signInWithTicket", {
  28912. ticket: e,
  28913. refresh_token: this._cache.getStore(t) || ""
  28914. });
  28915. case 5:
  28916. n = _context18.sent;
  28917. if (!n.refresh_token) {
  28918. _context18.next = 15;
  28919. break;
  28920. }
  28921. this.setRefreshToken(n.refresh_token);
  28922. _context18.next = 10;
  28923. return this._request.refreshAccessToken();
  28924. case 10:
  28925. De(qe);
  28926. De(Ke, {
  28927. env: this.config.env,
  28928. loginType: $e.CUSTOM,
  28929. persistence: this.config.persistence
  28930. });
  28931. _context18.next = 14;
  28932. return this.refreshUserInfo();
  28933. case 14:
  28934. return _context18.abrupt("return", new Ze(this.config.env));
  28935. case 15:
  28936. throw new ne({
  28937. message: "自定义登录失败"
  28938. });
  28939. case 16:
  28940. case "end":
  28941. return _context18.stop();
  28942. }
  28943. }
  28944. }, _callee18, this);
  28945. }));
  28946. function signIn(_x11) {
  28947. return _signIn2.apply(this, arguments);
  28948. }
  28949. return signIn;
  28950. }()
  28951. }]);
  28952. return tt;
  28953. }(Qe);
  28954. var nt = /*#__PURE__*/function (_Qe3) {
  28955. (0, _inherits2.default)(nt, _Qe3);
  28956. var _super6 = _createSuper(nt);
  28957. function nt() {
  28958. (0, _classCallCheck2.default)(this, nt);
  28959. return _super6.apply(this, arguments);
  28960. }
  28961. (0, _createClass2.default)(nt, [{
  28962. key: "signIn",
  28963. value: function () {
  28964. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  28965. var n, s, r, i, o;
  28966. return _regenerator.default.wrap(function _callee19$(_context19) {
  28967. while (1) {
  28968. switch (_context19.prev = _context19.next) {
  28969. case 0:
  28970. if (!("string" != typeof e)) {
  28971. _context19.next = 2;
  28972. break;
  28973. }
  28974. throw new ne({
  28975. code: "PARAM_ERROR",
  28976. message: "email must be a string"
  28977. });
  28978. case 2:
  28979. n = this._cache.keys.refreshTokenKey;
  28980. _context19.next = 5;
  28981. return this._request.send("auth.signIn", {
  28982. loginType: "EMAIL",
  28983. email: e,
  28984. password: t,
  28985. refresh_token: this._cache.getStore(n) || ""
  28986. });
  28987. case 5:
  28988. s = _context19.sent;
  28989. r = s.refresh_token;
  28990. i = s.access_token;
  28991. o = s.access_token_expire;
  28992. if (!r) {
  28993. _context19.next = 22;
  28994. break;
  28995. }
  28996. this.setRefreshToken(r);
  28997. if (!(i && o)) {
  28998. _context19.next = 15;
  28999. break;
  29000. }
  29001. this.setAccessToken(i, o);
  29002. _context19.next = 17;
  29003. break;
  29004. case 15:
  29005. _context19.next = 17;
  29006. return this._request.refreshAccessToken();
  29007. case 17:
  29008. _context19.next = 19;
  29009. return this.refreshUserInfo();
  29010. case 19:
  29011. De(qe);
  29012. De(Ke, {
  29013. env: this.config.env,
  29014. loginType: $e.EMAIL,
  29015. persistence: this.config.persistence
  29016. });
  29017. return _context19.abrupt("return", new Ze(this.config.env));
  29018. case 22:
  29019. throw s.code ? new ne({
  29020. code: s.code,
  29021. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29022. }) : new ne({
  29023. message: "邮箱登录失败"
  29024. });
  29025. case 23:
  29026. case "end":
  29027. return _context19.stop();
  29028. }
  29029. }
  29030. }, _callee19, this);
  29031. }));
  29032. function signIn(_x12, _x13) {
  29033. return _signIn3.apply(this, arguments);
  29034. }
  29035. return signIn;
  29036. }()
  29037. }, {
  29038. key: "activate",
  29039. value: function () {
  29040. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  29041. return _regenerator.default.wrap(function _callee20$(_context20) {
  29042. while (1) {
  29043. switch (_context20.prev = _context20.next) {
  29044. case 0:
  29045. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  29046. token: e
  29047. }));
  29048. case 1:
  29049. case "end":
  29050. return _context20.stop();
  29051. }
  29052. }
  29053. }, _callee20, this);
  29054. }));
  29055. function activate(_x14) {
  29056. return _activate.apply(this, arguments);
  29057. }
  29058. return activate;
  29059. }()
  29060. }, {
  29061. key: "resetPasswordWithToken",
  29062. value: function () {
  29063. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  29064. return _regenerator.default.wrap(function _callee21$(_context21) {
  29065. while (1) {
  29066. switch (_context21.prev = _context21.next) {
  29067. case 0:
  29068. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  29069. token: e,
  29070. newPassword: t
  29071. }));
  29072. case 1:
  29073. case "end":
  29074. return _context21.stop();
  29075. }
  29076. }
  29077. }, _callee21, this);
  29078. }));
  29079. function resetPasswordWithToken(_x15, _x16) {
  29080. return _resetPasswordWithToken.apply(this, arguments);
  29081. }
  29082. return resetPasswordWithToken;
  29083. }()
  29084. }]);
  29085. return nt;
  29086. }(Qe);
  29087. var st = /*#__PURE__*/function (_Qe4) {
  29088. (0, _inherits2.default)(st, _Qe4);
  29089. var _super7 = _createSuper(st);
  29090. function st() {
  29091. (0, _classCallCheck2.default)(this, st);
  29092. return _super7.apply(this, arguments);
  29093. }
  29094. (0, _createClass2.default)(st, [{
  29095. key: "signIn",
  29096. value: function () {
  29097. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  29098. var n, s, r, i, o;
  29099. return _regenerator.default.wrap(function _callee22$(_context22) {
  29100. while (1) {
  29101. switch (_context22.prev = _context22.next) {
  29102. case 0:
  29103. if (!("string" != typeof e)) {
  29104. _context22.next = 2;
  29105. break;
  29106. }
  29107. throw new ne({
  29108. code: "PARAM_ERROR",
  29109. message: "username must be a string"
  29110. });
  29111. case 2:
  29112. "string" != typeof t && (t = "", console.warn("password is empty"));
  29113. n = this._cache.keys.refreshTokenKey;
  29114. _context22.next = 6;
  29115. return this._request.send("auth.signIn", {
  29116. loginType: $e.USERNAME,
  29117. username: e,
  29118. password: t,
  29119. refresh_token: this._cache.getStore(n) || ""
  29120. });
  29121. case 6:
  29122. s = _context22.sent;
  29123. r = s.refresh_token;
  29124. i = s.access_token_expire;
  29125. o = s.access_token;
  29126. if (!r) {
  29127. _context22.next = 23;
  29128. break;
  29129. }
  29130. this.setRefreshToken(r);
  29131. if (!(o && i)) {
  29132. _context22.next = 16;
  29133. break;
  29134. }
  29135. this.setAccessToken(o, i);
  29136. _context22.next = 18;
  29137. break;
  29138. case 16:
  29139. _context22.next = 18;
  29140. return this._request.refreshAccessToken();
  29141. case 18:
  29142. _context22.next = 20;
  29143. return this.refreshUserInfo();
  29144. case 20:
  29145. De(qe);
  29146. De(Ke, {
  29147. env: this.config.env,
  29148. loginType: $e.USERNAME,
  29149. persistence: this.config.persistence
  29150. });
  29151. return _context22.abrupt("return", new Ze(this.config.env));
  29152. case 23:
  29153. throw s.code ? new ne({
  29154. code: s.code,
  29155. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29156. }) : new ne({
  29157. message: "用户名密码登录失败"
  29158. });
  29159. case 24:
  29160. case "end":
  29161. return _context22.stop();
  29162. }
  29163. }
  29164. }, _callee22, this);
  29165. }));
  29166. function signIn(_x17, _x18) {
  29167. return _signIn4.apply(this, arguments);
  29168. }
  29169. return signIn;
  29170. }()
  29171. }]);
  29172. return st;
  29173. }(Qe);
  29174. var rt = /*#__PURE__*/function () {
  29175. function rt(e) {
  29176. (0, _classCallCheck2.default)(this, rt);
  29177. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Ne(Ke, this._onLoginTypeChanged);
  29178. }
  29179. (0, _createClass2.default)(rt, [{
  29180. key: "currentUser",
  29181. get: function get() {
  29182. var e = this.hasLoginState();
  29183. return e && e.user || null;
  29184. }
  29185. }, {
  29186. key: "loginType",
  29187. get: function get() {
  29188. return this._cache.getStore(this._cache.keys.loginTypeKey);
  29189. }
  29190. }, {
  29191. key: "anonymousAuthProvider",
  29192. value: function anonymousAuthProvider() {
  29193. return new et(this.config);
  29194. }
  29195. }, {
  29196. key: "customAuthProvider",
  29197. value: function customAuthProvider() {
  29198. return new tt(this.config);
  29199. }
  29200. }, {
  29201. key: "emailAuthProvider",
  29202. value: function emailAuthProvider() {
  29203. return new nt(this.config);
  29204. }
  29205. }, {
  29206. key: "usernameAuthProvider",
  29207. value: function usernameAuthProvider() {
  29208. return new st(this.config);
  29209. }
  29210. }, {
  29211. key: "signInAnonymously",
  29212. value: function () {
  29213. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  29214. return _regenerator.default.wrap(function _callee23$(_context23) {
  29215. while (1) {
  29216. switch (_context23.prev = _context23.next) {
  29217. case 0:
  29218. return _context23.abrupt("return", new et(this.config).signIn());
  29219. case 1:
  29220. case "end":
  29221. return _context23.stop();
  29222. }
  29223. }
  29224. }, _callee23, this);
  29225. }));
  29226. function signInAnonymously() {
  29227. return _signInAnonymously.apply(this, arguments);
  29228. }
  29229. return signInAnonymously;
  29230. }()
  29231. }, {
  29232. key: "signInWithEmailAndPassword",
  29233. value: function () {
  29234. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  29235. return _regenerator.default.wrap(function _callee24$(_context24) {
  29236. while (1) {
  29237. switch (_context24.prev = _context24.next) {
  29238. case 0:
  29239. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  29240. case 1:
  29241. case "end":
  29242. return _context24.stop();
  29243. }
  29244. }
  29245. }, _callee24, this);
  29246. }));
  29247. function signInWithEmailAndPassword(_x19, _x20) {
  29248. return _signInWithEmailAndPassword.apply(this, arguments);
  29249. }
  29250. return signInWithEmailAndPassword;
  29251. }()
  29252. }, {
  29253. key: "signInWithUsernameAndPassword",
  29254. value: function signInWithUsernameAndPassword(e, t) {
  29255. return new st(this.config).signIn(e, t);
  29256. }
  29257. }, {
  29258. key: "linkAndRetrieveDataWithTicket",
  29259. value: function () {
  29260. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  29261. return _regenerator.default.wrap(function _callee25$(_context25) {
  29262. while (1) {
  29263. switch (_context25.prev = _context25.next) {
  29264. case 0:
  29265. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  29266. _context25.next = 3;
  29267. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  29268. case 3:
  29269. return _context25.abrupt("return", _context25.sent);
  29270. case 4:
  29271. case "end":
  29272. return _context25.stop();
  29273. }
  29274. }
  29275. }, _callee25, this);
  29276. }));
  29277. function linkAndRetrieveDataWithTicket(_x21) {
  29278. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  29279. }
  29280. return linkAndRetrieveDataWithTicket;
  29281. }()
  29282. }, {
  29283. key: "signOut",
  29284. value: function () {
  29285. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  29286. var _this$_cache$keys10, e, t, n, s, r;
  29287. return _regenerator.default.wrap(function _callee26$(_context26) {
  29288. while (1) {
  29289. switch (_context26.prev = _context26.next) {
  29290. case 0:
  29291. if (!(this.loginType === $e.ANONYMOUS)) {
  29292. _context26.next = 2;
  29293. break;
  29294. }
  29295. throw new ne({
  29296. message: "匿名用户不支持登出操作"
  29297. });
  29298. case 2:
  29299. _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);
  29300. if (s) {
  29301. _context26.next = 5;
  29302. break;
  29303. }
  29304. return _context26.abrupt("return");
  29305. case 5:
  29306. _context26.next = 7;
  29307. return this._request.send("auth.logout", {
  29308. refresh_token: s
  29309. });
  29310. case 7:
  29311. r = _context26.sent;
  29312. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  29313. env: this.config.env,
  29314. loginType: $e.NULL,
  29315. persistence: this.config.persistence
  29316. }), r));
  29317. case 9:
  29318. case "end":
  29319. return _context26.stop();
  29320. }
  29321. }
  29322. }, _callee26, this);
  29323. }));
  29324. function signOut() {
  29325. return _signOut.apply(this, arguments);
  29326. }
  29327. return signOut;
  29328. }()
  29329. }, {
  29330. key: "signUpWithEmailAndPassword",
  29331. value: function () {
  29332. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  29333. return _regenerator.default.wrap(function _callee27$(_context27) {
  29334. while (1) {
  29335. switch (_context27.prev = _context27.next) {
  29336. case 0:
  29337. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  29338. email: e,
  29339. password: t
  29340. }));
  29341. case 1:
  29342. case "end":
  29343. return _context27.stop();
  29344. }
  29345. }
  29346. }, _callee27, this);
  29347. }));
  29348. function signUpWithEmailAndPassword(_x22, _x23) {
  29349. return _signUpWithEmailAndPassword.apply(this, arguments);
  29350. }
  29351. return signUpWithEmailAndPassword;
  29352. }()
  29353. }, {
  29354. key: "sendPasswordResetEmail",
  29355. value: function () {
  29356. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  29357. return _regenerator.default.wrap(function _callee28$(_context28) {
  29358. while (1) {
  29359. switch (_context28.prev = _context28.next) {
  29360. case 0:
  29361. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  29362. email: e
  29363. }));
  29364. case 1:
  29365. case "end":
  29366. return _context28.stop();
  29367. }
  29368. }
  29369. }, _callee28, this);
  29370. }));
  29371. function sendPasswordResetEmail(_x24) {
  29372. return _sendPasswordResetEmail.apply(this, arguments);
  29373. }
  29374. return sendPasswordResetEmail;
  29375. }()
  29376. }, {
  29377. key: "onLoginStateChanged",
  29378. value: function onLoginStateChanged(e) {
  29379. var _this9 = this;
  29380. Ne(qe, function () {
  29381. var t = _this9.hasLoginState();
  29382. e.call(_this9, t);
  29383. });
  29384. var t = this.hasLoginState();
  29385. e.call(this, t);
  29386. }
  29387. }, {
  29388. key: "onLoginStateExpired",
  29389. value: function onLoginStateExpired(e) {
  29390. Ne(Me, e.bind(this));
  29391. }
  29392. }, {
  29393. key: "onAccessTokenRefreshed",
  29394. value: function onAccessTokenRefreshed(e) {
  29395. Ne(Be, e.bind(this));
  29396. }
  29397. }, {
  29398. key: "onAnonymousConverted",
  29399. value: function onAnonymousConverted(e) {
  29400. Ne(je, e.bind(this));
  29401. }
  29402. }, {
  29403. key: "onLoginTypeChanged",
  29404. value: function onLoginTypeChanged(e) {
  29405. var _this10 = this;
  29406. Ne(Ke, function () {
  29407. var t = _this10.hasLoginState();
  29408. e.call(_this10, t);
  29409. });
  29410. }
  29411. }, {
  29412. key: "getAccessToken",
  29413. value: function () {
  29414. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  29415. return _regenerator.default.wrap(function _callee29$(_context29) {
  29416. while (1) {
  29417. switch (_context29.prev = _context29.next) {
  29418. case 0:
  29419. _context29.next = 2;
  29420. return this._request.getAccessToken();
  29421. case 2:
  29422. _context29.t0 = _context29.sent.accessToken;
  29423. _context29.t1 = this.config.env;
  29424. return _context29.abrupt("return", {
  29425. accessToken: _context29.t0,
  29426. env: _context29.t1
  29427. });
  29428. case 5:
  29429. case "end":
  29430. return _context29.stop();
  29431. }
  29432. }
  29433. }, _callee29, this);
  29434. }));
  29435. function getAccessToken() {
  29436. return _getAccessToken2.apply(this, arguments);
  29437. }
  29438. return getAccessToken;
  29439. }()
  29440. }, {
  29441. key: "hasLoginState",
  29442. value: function hasLoginState() {
  29443. var e = this._cache.keys.refreshTokenKey;
  29444. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  29445. }
  29446. }, {
  29447. key: "isUsernameRegistered",
  29448. value: function () {
  29449. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  29450. var _yield$this$_request$5, t;
  29451. return _regenerator.default.wrap(function _callee30$(_context30) {
  29452. while (1) {
  29453. switch (_context30.prev = _context30.next) {
  29454. case 0:
  29455. if (!("string" != typeof e)) {
  29456. _context30.next = 2;
  29457. break;
  29458. }
  29459. throw new ne({
  29460. code: "PARAM_ERROR",
  29461. message: "username must be a string"
  29462. });
  29463. case 2:
  29464. _context30.next = 4;
  29465. return this._request.send("auth.isUsernameRegistered", {
  29466. username: e
  29467. });
  29468. case 4:
  29469. _yield$this$_request$5 = _context30.sent;
  29470. t = _yield$this$_request$5.data;
  29471. return _context30.abrupt("return", t && t.isRegistered);
  29472. case 7:
  29473. case "end":
  29474. return _context30.stop();
  29475. }
  29476. }
  29477. }, _callee30, this);
  29478. }));
  29479. function isUsernameRegistered(_x25) {
  29480. return _isUsernameRegistered.apply(this, arguments);
  29481. }
  29482. return isUsernameRegistered;
  29483. }()
  29484. }, {
  29485. key: "getLoginState",
  29486. value: function getLoginState() {
  29487. return Promise.resolve(this.hasLoginState());
  29488. }
  29489. }, {
  29490. key: "signInWithTicket",
  29491. value: function () {
  29492. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  29493. return _regenerator.default.wrap(function _callee31$(_context31) {
  29494. while (1) {
  29495. switch (_context31.prev = _context31.next) {
  29496. case 0:
  29497. return _context31.abrupt("return", new tt(this.config).signIn(e));
  29498. case 1:
  29499. case "end":
  29500. return _context31.stop();
  29501. }
  29502. }
  29503. }, _callee31, this);
  29504. }));
  29505. function signInWithTicket(_x26) {
  29506. return _signInWithTicket.apply(this, arguments);
  29507. }
  29508. return signInWithTicket;
  29509. }()
  29510. }, {
  29511. key: "shouldRefreshAccessToken",
  29512. value: function shouldRefreshAccessToken(e) {
  29513. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  29514. }
  29515. }, {
  29516. key: "getUserInfo",
  29517. value: function getUserInfo() {
  29518. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  29519. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  29520. requestId: e.seqId
  29521. });
  29522. });
  29523. }
  29524. }, {
  29525. key: "getAuthHeader",
  29526. value: function getAuthHeader() {
  29527. var _this$_cache$keys11 = this._cache.keys,
  29528. e = _this$_cache$keys11.refreshTokenKey,
  29529. t = _this$_cache$keys11.accessTokenKey,
  29530. n = this._cache.getStore(e);
  29531. return {
  29532. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  29533. };
  29534. }
  29535. }, {
  29536. key: "_onAnonymousConverted",
  29537. value: function _onAnonymousConverted(e) {
  29538. var t = e.data.env;
  29539. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  29540. }
  29541. }, {
  29542. key: "_onLoginTypeChanged",
  29543. value: function _onLoginTypeChanged(e) {
  29544. var _e$data = e.data,
  29545. t = _e$data.loginType,
  29546. n = _e$data.persistence,
  29547. s = _e$data.env;
  29548. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  29549. }
  29550. }]);
  29551. return rt;
  29552. }();
  29553. var it = function it(e, t) {
  29554. t = t || we();
  29555. var n = Ye(this.config.env),
  29556. s = e.cloudPath,
  29557. r = e.filePath,
  29558. i = e.onUploadProgress,
  29559. _e$fileType = e.fileType,
  29560. o = _e$fileType === void 0 ? "image" : _e$fileType;
  29561. return n.send("storage.getUploadMetadata", {
  29562. path: s
  29563. }).then(function (e) {
  29564. var _e$data2 = e.data,
  29565. a = _e$data2.url,
  29566. c = _e$data2.authorization,
  29567. u = _e$data2.token,
  29568. h = _e$data2.fileId,
  29569. l = _e$data2.cosFileId,
  29570. d = e.requestId,
  29571. p = {
  29572. key: s,
  29573. signature: c,
  29574. "x-cos-meta-fileid": l,
  29575. success_action_status: "201",
  29576. "x-cos-security-token": u
  29577. };
  29578. n.upload({
  29579. url: a,
  29580. data: p,
  29581. file: r,
  29582. name: s,
  29583. fileType: o,
  29584. onUploadProgress: i
  29585. }).then(function (e) {
  29586. 201 === e.statusCode ? t(null, {
  29587. fileID: h,
  29588. requestId: d
  29589. }) : t(new ne({
  29590. code: "STORAGE_REQUEST_FAIL",
  29591. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  29592. }));
  29593. }).catch(function (e) {
  29594. t(e);
  29595. });
  29596. }).catch(function (e) {
  29597. t(e);
  29598. }), t.promise;
  29599. },
  29600. ot = function ot(e, t) {
  29601. t = t || we();
  29602. var n = Ye(this.config.env),
  29603. s = e.cloudPath;
  29604. return n.send("storage.getUploadMetadata", {
  29605. path: s
  29606. }).then(function (e) {
  29607. t(null, e);
  29608. }).catch(function (e) {
  29609. t(e);
  29610. }), t.promise;
  29611. },
  29612. at = function at(_ref7, t) {
  29613. var e = _ref7.fileList;
  29614. if (t = t || we(), !e || !Array.isArray(e)) return {
  29615. code: "INVALID_PARAM",
  29616. message: "fileList必须是非空的数组"
  29617. };
  29618. var _iterator3 = _createForOfIteratorHelper(e),
  29619. _step3;
  29620. try {
  29621. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  29622. var _t8 = _step3.value;
  29623. if (!_t8 || "string" != typeof _t8) return {
  29624. code: "INVALID_PARAM",
  29625. message: "fileList的元素必须是非空的字符串"
  29626. };
  29627. }
  29628. } catch (err) {
  29629. _iterator3.e(err);
  29630. } finally {
  29631. _iterator3.f();
  29632. }
  29633. var n = {
  29634. fileid_list: e
  29635. };
  29636. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  29637. e.code ? t(null, e) : t(null, {
  29638. fileList: e.data.delete_list,
  29639. requestId: e.requestId
  29640. });
  29641. }).catch(function (e) {
  29642. t(e);
  29643. }), t.promise;
  29644. },
  29645. ct = function ct(_ref8, t) {
  29646. var e = _ref8.fileList;
  29647. t = t || we(), e && Array.isArray(e) || t(null, {
  29648. code: "INVALID_PARAM",
  29649. message: "fileList必须是非空的数组"
  29650. });
  29651. var n = [];
  29652. var _iterator4 = _createForOfIteratorHelper(e),
  29653. _step4;
  29654. try {
  29655. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  29656. var _s9 = _step4.value;
  29657. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  29658. code: "INVALID_PARAM",
  29659. message: "fileList的元素必须是包含fileID和maxAge的对象"
  29660. }), n.push({
  29661. fileid: _s9.fileID,
  29662. max_age: _s9.maxAge
  29663. })) : "string" == typeof _s9 ? n.push({
  29664. fileid: _s9
  29665. }) : t(null, {
  29666. code: "INVALID_PARAM",
  29667. message: "fileList的元素必须是字符串"
  29668. });
  29669. }
  29670. } catch (err) {
  29671. _iterator4.e(err);
  29672. } finally {
  29673. _iterator4.f();
  29674. }
  29675. var s = {
  29676. file_list: n
  29677. };
  29678. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  29679. e.code ? t(null, e) : t(null, {
  29680. fileList: e.data.download_list,
  29681. requestId: e.requestId
  29682. });
  29683. }).catch(function (e) {
  29684. t(e);
  29685. }), t.promise;
  29686. },
  29687. ut = /*#__PURE__*/function () {
  29688. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  29689. var e, n, s, r;
  29690. return _regenerator.default.wrap(function _callee32$(_context32) {
  29691. while (1) {
  29692. switch (_context32.prev = _context32.next) {
  29693. case 0:
  29694. e = _ref9.fileID;
  29695. _context32.next = 3;
  29696. return ct.call(this, {
  29697. fileList: [{
  29698. fileID: e,
  29699. maxAge: 600
  29700. }]
  29701. });
  29702. case 3:
  29703. n = _context32.sent.fileList[0];
  29704. if (!("SUCCESS" !== n.code)) {
  29705. _context32.next = 6;
  29706. break;
  29707. }
  29708. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  29709. e(n);
  29710. }));
  29711. case 6:
  29712. s = Ye(this.config.env);
  29713. r = n.download_url;
  29714. if (!(r = encodeURI(r), !t)) {
  29715. _context32.next = 10;
  29716. break;
  29717. }
  29718. return _context32.abrupt("return", s.download({
  29719. url: r
  29720. }));
  29721. case 10:
  29722. _context32.t0 = t;
  29723. _context32.next = 13;
  29724. return s.download({
  29725. url: r
  29726. });
  29727. case 13:
  29728. _context32.t1 = _context32.sent;
  29729. (0, _context32.t0)(_context32.t1);
  29730. case 15:
  29731. case "end":
  29732. return _context32.stop();
  29733. }
  29734. }
  29735. }, _callee32, this);
  29736. }));
  29737. return function ut(_x27, _x28) {
  29738. return _ref10.apply(this, arguments);
  29739. };
  29740. }(),
  29741. ht = function ht(_ref11, i) {
  29742. var e = _ref11.name,
  29743. t = _ref11.data,
  29744. n = _ref11.query,
  29745. s = _ref11.parse,
  29746. r = _ref11.search;
  29747. var o = i || we();
  29748. var a;
  29749. try {
  29750. a = t ? JSON.stringify(t) : "";
  29751. } catch (e) {
  29752. return Promise.reject(e);
  29753. }
  29754. if (!e) return Promise.reject(new ne({
  29755. code: "PARAM_ERROR",
  29756. message: "函数名不能为空"
  29757. }));
  29758. var c = {
  29759. inQuery: n,
  29760. parse: s,
  29761. search: r,
  29762. function_name: e,
  29763. request_data: a
  29764. };
  29765. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  29766. if (e.code) o(null, e);else {
  29767. var _t9 = e.data.response_data;
  29768. if (s) o(null, {
  29769. result: _t9,
  29770. requestId: e.requestId
  29771. });else try {
  29772. _t9 = JSON.parse(e.data.response_data), o(null, {
  29773. result: _t9,
  29774. requestId: e.requestId
  29775. });
  29776. } catch (e) {
  29777. o(new ne({
  29778. message: "response data must be json"
  29779. }));
  29780. }
  29781. }
  29782. return o.promise;
  29783. }).catch(function (e) {
  29784. o(e);
  29785. }), o.promise;
  29786. },
  29787. lt = {
  29788. timeout: 15e3,
  29789. persistence: "session"
  29790. },
  29791. dt = {};
  29792. var pt = /*#__PURE__*/function () {
  29793. function pt(e) {
  29794. (0, _classCallCheck2.default)(this, pt);
  29795. this.config = e || this.config, this.authObj = void 0;
  29796. }
  29797. (0, _createClass2.default)(pt, [{
  29798. key: "init",
  29799. value: function init(e) {
  29800. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  29801. timeout: e.timeout || 5e3,
  29802. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  29803. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  29804. case this.config.timeout > 6e5:
  29805. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  29806. break;
  29807. case this.config.timeout < 100:
  29808. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  29809. }
  29810. return new pt(this.config);
  29811. }
  29812. }, {
  29813. key: "auth",
  29814. value: function auth() {
  29815. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29816. e = _ref12.persistence;
  29817. if (this.authObj) return this.authObj;
  29818. var t = e || ke.adapter.primaryStorage || lt.persistence;
  29819. var n;
  29820. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  29821. var t = e.env;
  29822. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  29823. persistence: "local"
  29824. }));
  29825. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  29826. }
  29827. }, {
  29828. key: "on",
  29829. value: function on(e, t) {
  29830. return Ne.apply(this, [e, t]);
  29831. }
  29832. }, {
  29833. key: "off",
  29834. value: function off(e, t) {
  29835. return Fe.apply(this, [e, t]);
  29836. }
  29837. }, {
  29838. key: "callFunction",
  29839. value: function callFunction(e, t) {
  29840. return ht.apply(this, [e, t]);
  29841. }
  29842. }, {
  29843. key: "deleteFile",
  29844. value: function deleteFile(e, t) {
  29845. return at.apply(this, [e, t]);
  29846. }
  29847. }, {
  29848. key: "getTempFileURL",
  29849. value: function getTempFileURL(e, t) {
  29850. return ct.apply(this, [e, t]);
  29851. }
  29852. }, {
  29853. key: "downloadFile",
  29854. value: function downloadFile(e, t) {
  29855. return ut.apply(this, [e, t]);
  29856. }
  29857. }, {
  29858. key: "uploadFile",
  29859. value: function uploadFile(e, t) {
  29860. return it.apply(this, [e, t]);
  29861. }
  29862. }, {
  29863. key: "getUploadMetadata",
  29864. value: function getUploadMetadata(e, t) {
  29865. return ot.apply(this, [e, t]);
  29866. }
  29867. }, {
  29868. key: "registerExtension",
  29869. value: function registerExtension(e) {
  29870. dt[e.name] = e;
  29871. }
  29872. }, {
  29873. key: "invokeExtension",
  29874. value: function () {
  29875. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  29876. var n;
  29877. return _regenerator.default.wrap(function _callee33$(_context33) {
  29878. while (1) {
  29879. switch (_context33.prev = _context33.next) {
  29880. case 0:
  29881. n = dt[e];
  29882. if (n) {
  29883. _context33.next = 3;
  29884. break;
  29885. }
  29886. throw new ne({
  29887. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  29888. });
  29889. case 3:
  29890. _context33.next = 5;
  29891. return n.invoke(t, this);
  29892. case 5:
  29893. return _context33.abrupt("return", _context33.sent);
  29894. case 6:
  29895. case "end":
  29896. return _context33.stop();
  29897. }
  29898. }
  29899. }, _callee33, this);
  29900. }));
  29901. function invokeExtension(_x29, _x30) {
  29902. return _invokeExtension.apply(this, arguments);
  29903. }
  29904. return invokeExtension;
  29905. }()
  29906. }, {
  29907. key: "useAdapters",
  29908. value: function useAdapters(e) {
  29909. var _ref13 = be(e) || {},
  29910. t = _ref13.adapter,
  29911. n = _ref13.runtime;
  29912. t && (ke.adapter = t), n && (ke.runtime = n);
  29913. }
  29914. }]);
  29915. return pt;
  29916. }();
  29917. var ft = new pt();
  29918. function gt(e, t, n) {
  29919. void 0 === n && (n = {});
  29920. var s = /\?/.test(t),
  29921. r = "";
  29922. for (var i in n) {
  29923. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  29924. }
  29925. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  29926. }
  29927. var mt = /*#__PURE__*/function () {
  29928. function mt() {
  29929. (0, _classCallCheck2.default)(this, mt);
  29930. }
  29931. (0, _createClass2.default)(mt, [{
  29932. key: "post",
  29933. value: function post(e) {
  29934. var t = e.url,
  29935. n = e.data,
  29936. s = e.headers;
  29937. return new Promise(function (e, r) {
  29938. se.request({
  29939. url: gt("https:", t),
  29940. data: n,
  29941. method: "POST",
  29942. header: s,
  29943. success: function success(t) {
  29944. e(t);
  29945. },
  29946. fail: function fail(e) {
  29947. r(e);
  29948. }
  29949. });
  29950. });
  29951. }
  29952. }, {
  29953. key: "upload",
  29954. value: function upload(e) {
  29955. return new Promise(function (t, n) {
  29956. var s = e.url,
  29957. r = e.file,
  29958. i = e.data,
  29959. o = e.headers,
  29960. a = e.fileType,
  29961. c = se.uploadFile({
  29962. url: gt("https:", s),
  29963. name: "file",
  29964. formData: Object.assign({}, i),
  29965. filePath: r,
  29966. fileType: a,
  29967. header: o,
  29968. success: function success(e) {
  29969. var n = {
  29970. statusCode: e.statusCode,
  29971. data: e.data || {}
  29972. };
  29973. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  29974. },
  29975. fail: function fail(e) {
  29976. n(new Error(e.errMsg || "uploadFile:fail"));
  29977. }
  29978. });
  29979. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  29980. e.onUploadProgress({
  29981. loaded: t.totalBytesSent,
  29982. total: t.totalBytesExpectedToSend
  29983. });
  29984. });
  29985. });
  29986. }
  29987. }]);
  29988. return mt;
  29989. }();
  29990. var yt = {
  29991. setItem: function setItem(e, t) {
  29992. se.setStorageSync(e, t);
  29993. },
  29994. getItem: function getItem(e) {
  29995. return se.getStorageSync(e);
  29996. },
  29997. removeItem: function removeItem(e) {
  29998. se.removeStorageSync(e);
  29999. },
  30000. clear: function clear() {
  30001. se.clearStorageSync();
  30002. }
  30003. };
  30004. var _t = {
  30005. genAdapter: function genAdapter() {
  30006. return {
  30007. root: {},
  30008. reqClass: mt,
  30009. localStorage: yt,
  30010. primaryStorage: "local"
  30011. };
  30012. },
  30013. isMatch: function isMatch() {
  30014. return !0;
  30015. },
  30016. runtime: "uni_app"
  30017. };
  30018. ft.useAdapters(_t);
  30019. var wt = ft,
  30020. vt = wt.init;
  30021. wt.init = function (e) {
  30022. e.env = e.spaceId;
  30023. var t = vt.call(this, e);
  30024. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  30025. var n = t.auth;
  30026. return t.auth = function (e) {
  30027. var t = n.call(this, e);
  30028. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  30029. var n;
  30030. t[e] = (n = t[e], function (e) {
  30031. e = e || {};
  30032. var _te = te(e),
  30033. t = _te.success,
  30034. s = _te.fail,
  30035. r = _te.complete;
  30036. if (!(t || s || r)) return n.call(this, e);
  30037. n.call(this, e).then(function (e) {
  30038. t && t(e), r && r(e);
  30039. }, function (e) {
  30040. s && s(e), r && r(e);
  30041. });
  30042. }).bind(t);
  30043. }), t;
  30044. }, t.customAuth = t.auth, t;
  30045. };
  30046. var It = wt;
  30047. var St = /*#__PURE__*/function (_fe) {
  30048. (0, _inherits2.default)(St, _fe);
  30049. var _super8 = _createSuper(St);
  30050. function St() {
  30051. (0, _classCallCheck2.default)(this, St);
  30052. return _super8.apply(this, arguments);
  30053. }
  30054. (0, _createClass2.default)(St, [{
  30055. key: "getAccessToken",
  30056. value: function getAccessToken() {
  30057. var _this11 = this;
  30058. return new Promise(function (e, t) {
  30059. var n = "Anonymous_Access_token";
  30060. _this11.setAccessToken(n), e(n);
  30061. });
  30062. }
  30063. }, {
  30064. key: "setupRequest",
  30065. value: function setupRequest(e, t) {
  30066. var n = Object.assign({}, e, {
  30067. spaceId: this.config.spaceId,
  30068. timestamp: Date.now()
  30069. }),
  30070. s = {
  30071. "Content-Type": "application/json"
  30072. };
  30073. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  30074. var r = he();
  30075. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  30076. var _re = re(),
  30077. i = _re.token;
  30078. return s["x-client-token"] = i, {
  30079. url: this.config.requestUrl,
  30080. method: "POST",
  30081. data: n,
  30082. dataType: "json",
  30083. header: JSON.parse(JSON.stringify(s))
  30084. };
  30085. }
  30086. }, {
  30087. key: "uploadFileToOSS",
  30088. value: function uploadFileToOSS(_ref14) {
  30089. var _this12 = this;
  30090. var e = _ref14.url,
  30091. t = _ref14.formData,
  30092. n = _ref14.name,
  30093. s = _ref14.filePath,
  30094. r = _ref14.fileType,
  30095. i = _ref14.onUploadProgress;
  30096. return new Promise(function (o, a) {
  30097. var c = _this12.adapter.uploadFile({
  30098. url: e,
  30099. formData: t,
  30100. name: n,
  30101. filePath: s,
  30102. fileType: r,
  30103. success: function success(e) {
  30104. e && e.statusCode < 400 ? o(e) : a(new ne({
  30105. code: "UPLOAD_FAILED",
  30106. message: "文件上传失败"
  30107. }));
  30108. },
  30109. fail: function fail(e) {
  30110. a(new ne({
  30111. code: e.code || "UPLOAD_FAILED",
  30112. message: e.message || e.errMsg || "文件上传失败"
  30113. }));
  30114. }
  30115. });
  30116. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  30117. i({
  30118. loaded: e.totalBytesSent,
  30119. total: e.totalBytesExpectedToSend
  30120. });
  30121. });
  30122. });
  30123. }
  30124. }, {
  30125. key: "uploadFile",
  30126. value: function uploadFile(_ref15) {
  30127. var _this13 = this;
  30128. var e = _ref15.filePath,
  30129. t = _ref15.cloudPath,
  30130. _ref15$fileType = _ref15.fileType,
  30131. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  30132. s = _ref15.onUploadProgress;
  30133. if (!t) throw new ne({
  30134. code: "CLOUDPATH_REQUIRED",
  30135. message: "cloudPath不可为空"
  30136. });
  30137. var r;
  30138. return this.getOSSUploadOptionsFromPath({
  30139. cloudPath: t
  30140. }).then(function (t) {
  30141. var _t$result = t.result,
  30142. i = _t$result.url,
  30143. o = _t$result.formData,
  30144. a = _t$result.name;
  30145. r = t.result.fileUrl;
  30146. var c = {
  30147. url: i,
  30148. formData: o,
  30149. name: a,
  30150. filePath: e,
  30151. fileType: n
  30152. };
  30153. return _this13.uploadFileToOSS(Object.assign({}, c, {
  30154. onUploadProgress: s
  30155. }));
  30156. }).then(function () {
  30157. return _this13.reportOSSUpload({
  30158. cloudPath: t
  30159. });
  30160. }).then(function (t) {
  30161. return new Promise(function (n, s) {
  30162. t.success ? n({
  30163. success: !0,
  30164. filePath: e,
  30165. fileID: r
  30166. }) : s(new ne({
  30167. code: "UPLOAD_FAILED",
  30168. message: "文件上传失败"
  30169. }));
  30170. });
  30171. });
  30172. }
  30173. }, {
  30174. key: "deleteFile",
  30175. value: function deleteFile(_ref16) {
  30176. var e = _ref16.fileList;
  30177. var t = {
  30178. method: "serverless.file.resource.delete",
  30179. params: JSON.stringify({
  30180. fileList: e
  30181. })
  30182. };
  30183. return this.request(this.setupRequest(t)).then(function (e) {
  30184. if (e.success) return e.result;
  30185. throw new ne({
  30186. code: "DELETE_FILE_FAILED",
  30187. message: "删除文件失败"
  30188. });
  30189. });
  30190. }
  30191. }, {
  30192. key: "getTempFileURL",
  30193. value: function getTempFileURL() {
  30194. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30195. e = _ref17.fileList;
  30196. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  30197. code: "INVALID_PARAM",
  30198. message: "fileList的元素必须是非空的字符串"
  30199. });
  30200. var t = {
  30201. method: "serverless.file.resource.getTempFileURL",
  30202. params: JSON.stringify({
  30203. fileList: e
  30204. })
  30205. };
  30206. return this.request(this.setupRequest(t)).then(function (e) {
  30207. if (e.success) return {
  30208. fileList: e.result.fileList.map(function (e) {
  30209. return {
  30210. fileID: e.fileID,
  30211. tempFileURL: e.tempFileURL
  30212. };
  30213. })
  30214. };
  30215. throw new ne({
  30216. code: "GET_TEMP_FILE_URL_FAILED",
  30217. message: "获取临时文件链接失败"
  30218. });
  30219. });
  30220. }
  30221. }]);
  30222. return St;
  30223. }(fe);
  30224. var bt = {
  30225. init: function init(e) {
  30226. var t = new St(e),
  30227. n = {
  30228. signInAnonymously: function signInAnonymously() {
  30229. return t.authorize();
  30230. },
  30231. getLoginState: function getLoginState() {
  30232. return Promise.resolve(!1);
  30233. }
  30234. };
  30235. return t.auth = function () {
  30236. return n;
  30237. }, t.customAuth = t.auth, t;
  30238. }
  30239. };
  30240. function kt(_ref18) {
  30241. var e = _ref18.data;
  30242. var t;
  30243. t = he();
  30244. var n = JSON.parse(JSON.stringify(e || {}));
  30245. if (Object.assign(n, {
  30246. clientInfo: t
  30247. }), !n.uniIdToken) {
  30248. var _re2 = re(),
  30249. _e19 = _re2.token;
  30250. _e19 && (n.uniIdToken = _e19);
  30251. }
  30252. return n;
  30253. }
  30254. function Ct() {
  30255. return _Ct.apply(this, arguments);
  30256. }
  30257. function _Ct() {
  30258. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  30259. var _this26 = this;
  30260. var _ref60,
  30261. e,
  30262. t,
  30263. _this$__dev__,
  30264. n,
  30265. s,
  30266. r,
  30267. i,
  30268. o,
  30269. a,
  30270. _args6 = arguments;
  30271. return _regenerator.default.wrap(function _callee54$(_context54) {
  30272. while (1) {
  30273. switch (_context54.prev = _context54.next) {
  30274. case 0:
  30275. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  30276. _context54.next = 3;
  30277. return this.__dev__.initLocalNetwork();
  30278. case 3:
  30279. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  30280. aliyun: "aliyun",
  30281. tencent: "tcb"
  30282. }[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);
  30283. return _context54.abrupt("return", new Promise(function (t, n) {
  30284. se.request({
  30285. method: "POST",
  30286. url: o,
  30287. data: {
  30288. name: e,
  30289. platform: P,
  30290. provider: r,
  30291. spaceId: i
  30292. },
  30293. timeout: 3e3,
  30294. success: function success(e) {
  30295. t(e);
  30296. },
  30297. fail: function fail() {
  30298. t({
  30299. data: {
  30300. code: "NETWORK_ERROR",
  30301. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  30302. }
  30303. });
  30304. }
  30305. });
  30306. }).then(function () {
  30307. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30308. e = _ref61.data;
  30309. var _ref62 = e || {},
  30310. t = _ref62.code,
  30311. n = _ref62.message;
  30312. return {
  30313. code: 0 === t ? 0 : t || "SYS_ERR",
  30314. message: n || "SYS_ERR"
  30315. };
  30316. }).then(function (_ref63) {
  30317. var n = _ref63.code,
  30318. s = _ref63.message;
  30319. if (0 !== n) {
  30320. switch (n) {
  30321. case "MODULE_ENCRYPTED":
  30322. 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"));
  30323. break;
  30324. case "FUNCTION_ENCRYPTED":
  30325. 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"));
  30326. break;
  30327. case "ACTION_ENCRYPTED":
  30328. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  30329. break;
  30330. case "NETWORK_ERROR":
  30331. {
  30332. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  30333. throw console.error(_e31), new Error(_e31);
  30334. }
  30335. case "SWITCH_TO_CLOUD":
  30336. break;
  30337. default:
  30338. {
  30339. var _e32 = "\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");
  30340. throw console.error(_e32), new Error(_e32);
  30341. }
  30342. }
  30343. return _this26._callCloudFunction({
  30344. name: e,
  30345. data: t
  30346. });
  30347. }
  30348. return new Promise(function (e, n) {
  30349. var s = kt.call(_this26, {
  30350. data: t
  30351. });
  30352. se.request({
  30353. method: "POST",
  30354. url: a,
  30355. data: {
  30356. provider: r,
  30357. platform: P,
  30358. param: s
  30359. },
  30360. success: function success() {
  30361. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30362. t = _ref64.statusCode,
  30363. s = _ref64.data;
  30364. return !t || t >= 400 ? n(new ne({
  30365. code: s.code || "SYS_ERR",
  30366. message: s.message || "request:fail"
  30367. })) : e({
  30368. result: s
  30369. });
  30370. },
  30371. fail: function fail(e) {
  30372. n(new ne({
  30373. code: e.code || e.errCode || "SYS_ERR",
  30374. message: e.message || e.errMsg || "request:fail"
  30375. }));
  30376. }
  30377. });
  30378. });
  30379. }));
  30380. case 5:
  30381. case "end":
  30382. return _context54.stop();
  30383. }
  30384. }
  30385. }, _callee54, this);
  30386. }));
  30387. return _Ct.apply(this, arguments);
  30388. }
  30389. var Tt = [{
  30390. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  30391. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  30392. mode: "append"
  30393. }];
  30394. var Pt = /[\\^$.*+?()[\]{}|]/g,
  30395. At = RegExp(Pt.source);
  30396. function Et(e, t, n) {
  30397. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  30398. var s;
  30399. }
  30400. var Ot = "none",
  30401. xt = "request",
  30402. Rt = "response",
  30403. Ut = "both";
  30404. var Lt = /*#__PURE__*/function () {
  30405. function Lt() {
  30406. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30407. e = _ref19.secretType,
  30408. t = _ref19.uniCloudIns;
  30409. (0, _classCallCheck2.default)(this, Lt);
  30410. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  30411. var _this$uniCloudIns$con = this.uniCloudIns.config,
  30412. n = _this$uniCloudIns$con.provider,
  30413. s = _this$uniCloudIns$con.spaceId;
  30414. var r;
  30415. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  30416. }
  30417. (0, _createClass2.default)(Lt, [{
  30418. key: "getSystemInfo",
  30419. value: function getSystemInfo() {
  30420. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  30421. }
  30422. }, {
  30423. key: "appId",
  30424. get: function get() {
  30425. return this.getSystemInfo().appId;
  30426. }
  30427. }, {
  30428. key: "deviceId",
  30429. get: function get() {
  30430. return this.getSystemInfo().deviceId;
  30431. }
  30432. }, {
  30433. key: "encryptData",
  30434. value: function () {
  30435. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  30436. return _regenerator.default.wrap(function _callee34$(_context34) {
  30437. while (1) {
  30438. switch (_context34.prev = _context34.next) {
  30439. case 0:
  30440. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  30441. case 1:
  30442. case "end":
  30443. return _context34.stop();
  30444. }
  30445. }
  30446. }, _callee34, this);
  30447. }));
  30448. function encryptData(_x31) {
  30449. return _encryptData.apply(this, arguments);
  30450. }
  30451. return encryptData;
  30452. }()
  30453. }, {
  30454. key: "decryptResult",
  30455. value: function () {
  30456. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  30457. var _ref20, t, n;
  30458. return _regenerator.default.wrap(function _callee35$(_context35) {
  30459. while (1) {
  30460. switch (_context35.prev = _context35.next) {
  30461. case 0:
  30462. if (!(this.secretType === Ot)) {
  30463. _context35.next = 2;
  30464. break;
  30465. }
  30466. return _context35.abrupt("return", e);
  30467. case 2:
  30468. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  30469. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  30470. case 4:
  30471. case "end":
  30472. return _context35.stop();
  30473. }
  30474. }
  30475. }, _callee35, this);
  30476. }));
  30477. function decryptResult(_x32) {
  30478. return _decryptResult.apply(this, arguments);
  30479. }
  30480. return decryptResult;
  30481. }()
  30482. }, {
  30483. key: "wrapVerifyClientCallFunction",
  30484. value: function wrapVerifyClientCallFunction(e) {
  30485. var t = this;
  30486. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  30487. var _ref22,
  30488. n,
  30489. _ref22$data,
  30490. s,
  30491. r,
  30492. _args36 = arguments;
  30493. return _regenerator.default.wrap(function _callee36$(_context36) {
  30494. while (1) {
  30495. switch (_context36.prev = _context36.next) {
  30496. case 0:
  30497. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  30498. _context36.next = 3;
  30499. return t.prepare();
  30500. case 3:
  30501. _context36.next = 5;
  30502. return t.platformGetSignOption();
  30503. case 5:
  30504. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  30505. _context36.next = 8;
  30506. return e({
  30507. name: n,
  30508. data: s
  30509. });
  30510. case 8:
  30511. r = _context36.sent;
  30512. _context36.t0 = t.isClientKeyNotFound(r);
  30513. if (!_context36.t0) {
  30514. _context36.next = 19;
  30515. break;
  30516. }
  30517. _context36.next = 13;
  30518. return t.prepare({
  30519. forceUpdate: !0
  30520. });
  30521. case 13:
  30522. _context36.next = 15;
  30523. return t.platformGetSignOption();
  30524. case 15:
  30525. s._uniCloudOptions = _context36.sent;
  30526. _context36.next = 18;
  30527. return e({
  30528. name: n,
  30529. data: s
  30530. });
  30531. case 18:
  30532. r = _context36.sent;
  30533. case 19:
  30534. return _context36.abrupt("return", r);
  30535. case 20:
  30536. case "end":
  30537. return _context36.stop();
  30538. }
  30539. }
  30540. }, _callee36);
  30541. }));
  30542. }
  30543. }, {
  30544. key: "wrapEncryptDataCallFunction",
  30545. value: function wrapEncryptDataCallFunction(e) {
  30546. var t = this;
  30547. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  30548. var _ref24,
  30549. n,
  30550. _ref24$data,
  30551. s,
  30552. r,
  30553. i,
  30554. _r3,
  30555. _args37 = arguments;
  30556. return _regenerator.default.wrap(function _callee37$(_context37) {
  30557. while (1) {
  30558. switch (_context37.prev = _context37.next) {
  30559. case 0:
  30560. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  30561. _context37.next = 3;
  30562. return t.prepare();
  30563. case 3:
  30564. _context37.next = 5;
  30565. return t.encryptData(s);
  30566. case 5:
  30567. r = _context37.sent;
  30568. _context37.next = 8;
  30569. return e({
  30570. name: n,
  30571. data: r
  30572. });
  30573. case 8:
  30574. i = _context37.sent;
  30575. if (!t.isClientKeyNotFound(i)) {
  30576. _context37.next = 21;
  30577. break;
  30578. }
  30579. _context37.next = 12;
  30580. return t.prepare({
  30581. forceUpdate: !0
  30582. });
  30583. case 12:
  30584. _context37.next = 14;
  30585. return t.encryptData(s);
  30586. case 14:
  30587. _r3 = _context37.sent;
  30588. _context37.next = 17;
  30589. return t.platformGetSignOption();
  30590. case 17:
  30591. s._uniCloudOptions = _context37.sent;
  30592. _context37.next = 20;
  30593. return e({
  30594. name: n,
  30595. data: _r3
  30596. });
  30597. case 20:
  30598. i = _context37.sent;
  30599. case 21:
  30600. _context37.next = 23;
  30601. return t.decryptResult(i.result);
  30602. case 23:
  30603. i.result = _context37.sent;
  30604. return _context37.abrupt("return", i);
  30605. case 25:
  30606. case "end":
  30607. return _context37.stop();
  30608. }
  30609. }
  30610. }, _callee37);
  30611. }));
  30612. }
  30613. }]);
  30614. return Lt;
  30615. }();
  30616. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  30617. function Nt(e) {
  30618. return parseInt(e) === e;
  30619. }
  30620. function Dt(e) {
  30621. if (!Nt(e.length)) return !1;
  30622. for (var t = 0; t < e.length; t++) {
  30623. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  30624. }
  30625. return !0;
  30626. }
  30627. function Ft(e, t) {
  30628. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  30629. if (Array.isArray(e)) {
  30630. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  30631. return new Uint8Array(e);
  30632. }
  30633. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  30634. throw new Error("unsupported array-like object");
  30635. }
  30636. function qt(e) {
  30637. return new Uint8Array(e);
  30638. }
  30639. function Mt(e, t, n, s, r) {
  30640. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  30641. }
  30642. var Kt,
  30643. jt = {
  30644. toBytes: function toBytes(e) {
  30645. var t = [],
  30646. n = 0;
  30647. for (e = encodeURI(e); n < e.length;) {
  30648. var s = e.charCodeAt(n++);
  30649. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  30650. }
  30651. return Ft(t);
  30652. },
  30653. fromBytes: function fromBytes(e) {
  30654. for (var t = [], n = 0; n < e.length;) {
  30655. var s = e[n];
  30656. 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);
  30657. }
  30658. return t.join("");
  30659. }
  30660. },
  30661. Bt = (Kt = "0123456789abcdef", {
  30662. toBytes: function toBytes(e) {
  30663. for (var t = [], n = 0; n < e.length; n += 2) {
  30664. t.push(parseInt(e.substr(n, 2), 16));
  30665. }
  30666. return t;
  30667. },
  30668. fromBytes: function fromBytes(e) {
  30669. for (var t = [], n = 0; n < e.length; n++) {
  30670. var s = e[n];
  30671. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  30672. }
  30673. return t.join("");
  30674. }
  30675. }),
  30676. $t = {
  30677. 16: 10,
  30678. 24: 12,
  30679. 32: 14
  30680. },
  30681. Wt = [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],
  30682. zt = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22],
  30683. Jt = [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],
  30684. Ht = [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],
  30685. Gt = [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],
  30686. Vt = [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],
  30687. 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],
  30688. Qt = [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],
  30689. Xt = [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],
  30690. Zt = [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],
  30691. en = [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],
  30692. tn = [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],
  30693. nn = [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],
  30694. sn = [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],
  30695. rn = [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];
  30696. function on(e) {
  30697. for (var t = [], n = 0; n < e.length; n += 4) {
  30698. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  30699. }
  30700. return t;
  30701. }
  30702. var an = /*#__PURE__*/function () {
  30703. function an(e) {
  30704. (0, _classCallCheck2.default)(this, an);
  30705. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  30706. Object.defineProperty(this, "key", {
  30707. value: Ft(e, !0)
  30708. }), this._prepare();
  30709. }
  30710. (0, _createClass2.default)(an, [{
  30711. key: "_prepare",
  30712. value: function _prepare() {
  30713. var e = $t[this.key.length];
  30714. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  30715. this._Ke = [], this._Kd = [];
  30716. for (var t = 0; t <= e; t++) {
  30717. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  30718. }
  30719. var n,
  30720. s = 4 * (e + 1),
  30721. r = this.key.length / 4,
  30722. i = on(this.key);
  30723. for (t = 0; t < r; t++) {
  30724. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  30725. }
  30726. for (var o, a = 0, c = r; c < s;) {
  30727. if (o = i[r - 1], i[0] ^= zt[o >> 16 & 255] << 24 ^ zt[o >> 8 & 255] << 16 ^ zt[255 & o] << 8 ^ zt[o >> 24 & 255] ^ Wt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  30728. i[t] ^= i[t - 1];
  30729. } else {
  30730. for (t = 1; t < r / 2; t++) {
  30731. i[t] ^= i[t - 1];
  30732. }
  30733. o = i[r / 2 - 1], i[r / 2] ^= zt[255 & o] ^ zt[o >> 8 & 255] << 8 ^ zt[o >> 16 & 255] << 16 ^ zt[o >> 24 & 255] << 24;
  30734. for (t = r / 2 + 1; t < r; t++) {
  30735. i[t] ^= i[t - 1];
  30736. }
  30737. }
  30738. for (t = 0; t < r && c < s;) {
  30739. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  30740. }
  30741. }
  30742. for (var u = 1; u < e; u++) {
  30743. for (var h = 0; h < 4; h++) {
  30744. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  30745. }
  30746. }
  30747. }
  30748. }, {
  30749. key: "encrypt",
  30750. value: function encrypt(e) {
  30751. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  30752. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30753. s[r] ^= this._Ke[0][r];
  30754. }
  30755. for (var i = 1; i < t; i++) {
  30756. for (r = 0; r < 4; r++) {
  30757. n[r] = Ht[s[r] >> 24 & 255] ^ Gt[s[(r + 1) % 4] >> 16 & 255] ^ Vt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  30758. }
  30759. s = n.slice();
  30760. }
  30761. var o,
  30762. a = qt(16);
  30763. for (r = 0; r < 4; r++) {
  30764. o = this._Ke[t][r], a[4 * r] = 255 & (zt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (zt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (zt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (zt[255 & s[(r + 3) % 4]] ^ o);
  30765. }
  30766. return a;
  30767. }
  30768. }, {
  30769. key: "decrypt",
  30770. value: function decrypt(e) {
  30771. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  30772. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30773. s[r] ^= this._Kd[0][r];
  30774. }
  30775. for (var i = 1; i < t; i++) {
  30776. for (r = 0; r < 4; r++) {
  30777. n[r] = Qt[s[r] >> 24 & 255] ^ Xt[s[(r + 3) % 4] >> 16 & 255] ^ Zt[s[(r + 2) % 4] >> 8 & 255] ^ en[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  30778. }
  30779. s = n.slice();
  30780. }
  30781. var o,
  30782. a = qt(16);
  30783. for (r = 0; r < 4; r++) {
  30784. o = this._Kd[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 3) % 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 + 1) % 4]] ^ o);
  30785. }
  30786. return a;
  30787. }
  30788. }]);
  30789. return an;
  30790. }();
  30791. var cn = /*#__PURE__*/function () {
  30792. function cn(e) {
  30793. (0, _classCallCheck2.default)(this, cn);
  30794. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  30795. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  30796. }
  30797. (0, _createClass2.default)(cn, [{
  30798. key: "encrypt",
  30799. value: function encrypt(e) {
  30800. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30801. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30802. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  30803. }
  30804. return t;
  30805. }
  30806. }, {
  30807. key: "decrypt",
  30808. value: function decrypt(e) {
  30809. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30810. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30811. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  30812. }
  30813. return t;
  30814. }
  30815. }]);
  30816. return cn;
  30817. }();
  30818. var un = /*#__PURE__*/function () {
  30819. function un(e, t) {
  30820. (0, _classCallCheck2.default)(this, un);
  30821. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  30822. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  30823. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30824. } else t = qt(16);
  30825. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  30826. }
  30827. (0, _createClass2.default)(un, [{
  30828. key: "encrypt",
  30829. value: function encrypt(e) {
  30830. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30831. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30832. Mt(e, n, 0, s, s + 16);
  30833. for (var r = 0; r < 16; r++) {
  30834. n[r] ^= this._lastCipherblock[r];
  30835. }
  30836. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  30837. }
  30838. return t;
  30839. }
  30840. }, {
  30841. key: "decrypt",
  30842. value: function decrypt(e) {
  30843. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30844. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30845. Mt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  30846. for (var r = 0; r < 16; r++) {
  30847. t[s + r] = n[r] ^ this._lastCipherblock[r];
  30848. }
  30849. Mt(e, this._lastCipherblock, 0, s, s + 16);
  30850. }
  30851. return t;
  30852. }
  30853. }]);
  30854. return un;
  30855. }();
  30856. var hn = /*#__PURE__*/function () {
  30857. function hn(e, t, n) {
  30858. (0, _classCallCheck2.default)(this, hn);
  30859. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  30860. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  30861. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  30862. } else t = qt(16);
  30863. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  30864. }
  30865. (0, _createClass2.default)(hn, [{
  30866. key: "encrypt",
  30867. value: function encrypt(e) {
  30868. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  30869. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30870. t = this._aes.encrypt(this._shiftRegister);
  30871. for (var r = 0; r < this.segmentSize; r++) {
  30872. n[s + r] ^= t[r];
  30873. }
  30874. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30875. }
  30876. return n;
  30877. }
  30878. }, {
  30879. key: "decrypt",
  30880. value: function decrypt(e) {
  30881. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  30882. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30883. t = this._aes.encrypt(this._shiftRegister);
  30884. for (var r = 0; r < this.segmentSize; r++) {
  30885. n[s + r] ^= t[r];
  30886. }
  30887. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30888. }
  30889. return n;
  30890. }
  30891. }]);
  30892. return hn;
  30893. }();
  30894. var ln = /*#__PURE__*/function () {
  30895. function ln(e, t) {
  30896. (0, _classCallCheck2.default)(this, ln);
  30897. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  30898. if (this.description = "Output Feedback", this.name = "ofb", t) {
  30899. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30900. } else t = qt(16);
  30901. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  30902. }
  30903. (0, _createClass2.default)(ln, [{
  30904. key: "encrypt",
  30905. value: function encrypt(e) {
  30906. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30907. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  30908. }
  30909. return t;
  30910. }
  30911. }, {
  30912. key: "decrypt",
  30913. value: function decrypt(e) {
  30914. return this.encrypt(e);
  30915. }
  30916. }]);
  30917. return ln;
  30918. }();
  30919. var dn = /*#__PURE__*/function () {
  30920. function dn(e) {
  30921. (0, _classCallCheck2.default)(this, dn);
  30922. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  30923. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  30924. }
  30925. (0, _createClass2.default)(dn, [{
  30926. key: "setValue",
  30927. value: function setValue(e) {
  30928. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  30929. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  30930. for (var t = 15; t >= 0; --t) {
  30931. this._counter[t] = e % 256, e = parseInt(e / 256);
  30932. }
  30933. }
  30934. }, {
  30935. key: "setBytes",
  30936. value: function setBytes(e) {
  30937. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  30938. this._counter = e;
  30939. }
  30940. }, {
  30941. key: "increment",
  30942. value: function increment() {
  30943. for (var e = 15; e >= 0; e--) {
  30944. if (255 !== this._counter[e]) {
  30945. this._counter[e]++;
  30946. break;
  30947. }
  30948. this._counter[e] = 0;
  30949. }
  30950. }
  30951. }]);
  30952. return dn;
  30953. }();
  30954. var pn = /*#__PURE__*/function () {
  30955. function pn(e, t) {
  30956. (0, _classCallCheck2.default)(this, pn);
  30957. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  30958. this.description = "Counter", this.name = "ctr", t instanceof dn || (t = new dn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new an(e);
  30959. }
  30960. (0, _createClass2.default)(pn, [{
  30961. key: "encrypt",
  30962. value: function encrypt(e) {
  30963. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30964. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  30965. }
  30966. return t;
  30967. }
  30968. }, {
  30969. key: "decrypt",
  30970. value: function decrypt(e) {
  30971. return this.encrypt(e);
  30972. }
  30973. }]);
  30974. return pn;
  30975. }();
  30976. var fn = {
  30977. AES: an,
  30978. Counter: dn,
  30979. ModeOfOperation: {
  30980. ecb: cn,
  30981. cbc: un,
  30982. cfb: hn,
  30983. ofb: ln,
  30984. ctr: pn
  30985. },
  30986. utils: {
  30987. hex: Bt,
  30988. utf8: jt
  30989. },
  30990. padding: {
  30991. pkcs7: {
  30992. pad: function pad(e) {
  30993. var t = 16 - (e = Ft(e, !0)).length % 16,
  30994. n = qt(e.length + t);
  30995. Mt(e, n);
  30996. for (var s = e.length; s < n.length; s++) {
  30997. n[s] = t;
  30998. }
  30999. return n;
  31000. },
  31001. strip: function strip(e) {
  31002. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  31003. var t = e[e.length - 1];
  31004. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  31005. for (var n = e.length - t, s = 0; s < t; s++) {
  31006. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  31007. }
  31008. var r = qt(n);
  31009. return Mt(e, r, 0, 0, n), r;
  31010. }
  31011. }
  31012. },
  31013. _arrayTest: {
  31014. coerceArray: Ft,
  31015. createArray: qt,
  31016. copyArray: Mt
  31017. }
  31018. };
  31019. function gn(e, t, n) {
  31020. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31021. r = fn.utils.utf8.toBytes(n),
  31022. i = fn.utils.utf8.toBytes(e),
  31023. o = new fn.ModeOfOperation.cbc(s, r),
  31024. a = fn.padding.pkcs7.pad(i),
  31025. c = o.encrypt(a);
  31026. return uni.arrayBufferToBase64(c);
  31027. }
  31028. var mn = {
  31029. code: 2e4,
  31030. message: "System error"
  31031. },
  31032. yn = {
  31033. code: 20101,
  31034. message: "Invalid client"
  31035. },
  31036. _n = {
  31037. code: 20102,
  31038. message: "Get encrypt key failed"
  31039. },
  31040. wn = {
  31041. 10001: "Secure network is not supported on current playground or unimpsdk",
  31042. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  31043. 10009: "Encrypt payload failed",
  31044. 10010: "Decrypt response failed"
  31045. };
  31046. function vn(e) {
  31047. var _ref25 = e || {},
  31048. t = _ref25.errSubject,
  31049. n = _ref25.subject,
  31050. s = _ref25.errCode,
  31051. r = _ref25.errMsg,
  31052. i = _ref25.code,
  31053. o = _ref25.message,
  31054. a = _ref25.cause;
  31055. return new ne({
  31056. subject: t || n || "uni-secure-network",
  31057. code: s || i || mn.code,
  31058. message: r || o,
  31059. cause: a
  31060. });
  31061. }
  31062. var In,
  31063. Sn,
  31064. bn = null;
  31065. var kn = /*#__PURE__*/function (_Lt) {
  31066. (0, _inherits2.default)(kn, _Lt);
  31067. var _super9 = _createSuper(kn);
  31068. function kn(e) {
  31069. var _this14;
  31070. (0, _classCallCheck2.default)(this, kn);
  31071. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  31072. return _this14;
  31073. }
  31074. (0, _createClass2.default)(kn, [{
  31075. key: "isLogin",
  31076. value: function isLogin() {
  31077. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  31078. }
  31079. }, {
  31080. key: "prepare",
  31081. value: function () {
  31082. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  31083. return _regenerator.default.wrap(function _callee38$(_context38) {
  31084. while (1) {
  31085. switch (_context38.prev = _context38.next) {
  31086. case 0:
  31087. if (this.isLogin()) {
  31088. _context38.next = 7;
  31089. break;
  31090. }
  31091. if (this.scopedGlobalCache.initPromise) {
  31092. _context38.next = 3;
  31093. break;
  31094. }
  31095. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  31096. case 3:
  31097. _context38.next = 5;
  31098. return this.scopedGlobalCache.initPromise;
  31099. case 5:
  31100. if (this.isLogin()) {
  31101. _context38.next = 7;
  31102. break;
  31103. }
  31104. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  31105. case 7:
  31106. case "end":
  31107. return _context38.stop();
  31108. }
  31109. }
  31110. }, _callee38, this);
  31111. }));
  31112. function prepare() {
  31113. return _prepare2.apply(this, arguments);
  31114. }
  31115. return prepare;
  31116. }()
  31117. }, {
  31118. key: "getUserEncryptKey",
  31119. value: function () {
  31120. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  31121. var _this15 = this;
  31122. var e;
  31123. return _regenerator.default.wrap(function _callee39$(_context39) {
  31124. while (1) {
  31125. switch (_context39.prev = _context39.next) {
  31126. case 0:
  31127. if (!this.userEncryptKey) {
  31128. _context39.next = 2;
  31129. break;
  31130. }
  31131. return _context39.abrupt("return", this.userEncryptKey);
  31132. case 2:
  31133. if (!(bn && bn.expireTime)) {
  31134. _context39.next = 6;
  31135. break;
  31136. }
  31137. e = Date.now();
  31138. if (!(bn.expireTime - e > 0)) {
  31139. _context39.next = 6;
  31140. break;
  31141. }
  31142. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  31143. case 6:
  31144. return _context39.abrupt("return", new Promise(function (e, t) {
  31145. uni.getUserCryptoManager().getLatestUserKey({
  31146. success: function success(t) {
  31147. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  31148. },
  31149. fail: function fail(e) {
  31150. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  31151. cause: e
  31152. })));
  31153. }
  31154. });
  31155. }));
  31156. case 7:
  31157. case "end":
  31158. return _context39.stop();
  31159. }
  31160. }
  31161. }, _callee39, this);
  31162. }));
  31163. function getUserEncryptKey() {
  31164. return _getUserEncryptKey.apply(this, arguments);
  31165. }
  31166. return getUserEncryptKey;
  31167. }()
  31168. }, {
  31169. key: "getWxAppId",
  31170. value: function getWxAppId() {
  31171. return wx.getAccountInfoSync().miniProgram.appId;
  31172. }
  31173. }, {
  31174. key: "platformGetSignOption",
  31175. value: function () {
  31176. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  31177. var _yield$this$getUserEn, e, t, n;
  31178. return _regenerator.default.wrap(function _callee40$(_context40) {
  31179. while (1) {
  31180. switch (_context40.prev = _context40.next) {
  31181. case 0:
  31182. _context40.next = 2;
  31183. return this.getUserEncryptKey();
  31184. case 2:
  31185. _yield$this$getUserEn = _context40.sent;
  31186. e = _yield$this$getUserEn.encryptKey;
  31187. t = _yield$this$getUserEn.iv;
  31188. n = _yield$this$getUserEn.version;
  31189. return _context40.abrupt("return", {
  31190. verifyClientSign: gn(JSON.stringify({
  31191. data: JSON.stringify({}),
  31192. appId: this.appId,
  31193. deviceId: this.deviceId,
  31194. wxAppId: this.getWxAppId(),
  31195. simulator: "devtools" === ce().platform,
  31196. timestamp: Date.now()
  31197. }), e, t),
  31198. encryptKeyId: n,
  31199. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31200. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31201. });
  31202. case 7:
  31203. case "end":
  31204. return _context40.stop();
  31205. }
  31206. }
  31207. }, _callee40, this);
  31208. }));
  31209. function platformGetSignOption() {
  31210. return _platformGetSignOption.apply(this, arguments);
  31211. }
  31212. return platformGetSignOption;
  31213. }()
  31214. }, {
  31215. key: "platformEncryptData",
  31216. value: function () {
  31217. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  31218. var _yield$this$getUserEn2, t, n, s, r;
  31219. return _regenerator.default.wrap(function _callee41$(_context41) {
  31220. while (1) {
  31221. switch (_context41.prev = _context41.next) {
  31222. case 0:
  31223. _context41.next = 2;
  31224. return this.getUserEncryptKey();
  31225. case 2:
  31226. _yield$this$getUserEn2 = _context41.sent;
  31227. t = _yield$this$getUserEn2.encryptKey;
  31228. n = _yield$this$getUserEn2.iv;
  31229. s = _yield$this$getUserEn2.version;
  31230. r = {
  31231. secretType: this.secretType,
  31232. encryptKeyId: s,
  31233. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31234. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31235. };
  31236. return _context41.abrupt("return", this.secretType === Rt ? {
  31237. content: e,
  31238. _uniCloudOptions: r
  31239. } : {
  31240. content: gn(JSON.stringify({
  31241. data: JSON.stringify(e),
  31242. appId: this.appId,
  31243. deviceId: this.deviceId,
  31244. wxAppId: this.getWxAppId(),
  31245. simulator: "devtools" === ce().platform,
  31246. timestamp: Date.now()
  31247. }), t, n),
  31248. _uniCloudOptions: r
  31249. });
  31250. case 8:
  31251. case "end":
  31252. return _context41.stop();
  31253. }
  31254. }
  31255. }, _callee41, this);
  31256. }));
  31257. function platformEncryptData(_x33) {
  31258. return _platformEncryptData.apply(this, arguments);
  31259. }
  31260. return platformEncryptData;
  31261. }()
  31262. }, {
  31263. key: "platformDecryptResult",
  31264. value: function () {
  31265. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  31266. var t, _yield$this$getUserEn3, n, s;
  31267. return _regenerator.default.wrap(function _callee42$(_context42) {
  31268. while (1) {
  31269. switch (_context42.prev = _context42.next) {
  31270. case 0:
  31271. t = e.content;
  31272. _context42.next = 3;
  31273. return this.getUserEncryptKey();
  31274. case 3:
  31275. _yield$this$getUserEn3 = _context42.sent;
  31276. n = _yield$this$getUserEn3.encryptKey;
  31277. s = _yield$this$getUserEn3.iv;
  31278. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  31279. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  31280. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31281. i = fn.utils.utf8.toBytes(n),
  31282. o = new fn.ModeOfOperation.cbc(r, i),
  31283. a = fn.padding.pkcs7.strip(o.decrypt(s));
  31284. return fn.utils.utf8.fromBytes(a);
  31285. }(t, n, s)));
  31286. case 7:
  31287. case "end":
  31288. return _context42.stop();
  31289. }
  31290. }
  31291. }, _callee42, this);
  31292. }));
  31293. function platformDecryptResult(_x34) {
  31294. return _platformDecryptResult.apply(this, arguments);
  31295. }
  31296. return platformDecryptResult;
  31297. }()
  31298. }, {
  31299. key: "isClientKeyNotFound",
  31300. value: function isClientKeyNotFound() {
  31301. return !1;
  31302. }
  31303. }]);
  31304. return kn;
  31305. }(Lt);
  31306. function Cn(e) {
  31307. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  31308. n = {};
  31309. var _loop = function _loop(_s10) {
  31310. var r = t[_s10];
  31311. n[r] = function () {
  31312. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  31313. t[_key] = arguments[_key];
  31314. }
  31315. return new Promise(function (n, s) {
  31316. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  31317. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31318. e = _ref26.type,
  31319. t = _ref26.data,
  31320. r = _ref26.errCode,
  31321. i = _ref26.errMsg,
  31322. o = _ref26.errSubject,
  31323. a = _ref26.message;
  31324. "success" === e ? n(t) : s(vn({
  31325. errCode: r,
  31326. errMsg: wn[r] || i || a,
  31327. errSubject: o
  31328. }));
  31329. }])) : s(vn({
  31330. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  31331. }));
  31332. });
  31333. };
  31334. };
  31335. for (var _s10 = 0; _s10 < t.length; _s10++) {
  31336. _loop(_s10);
  31337. }
  31338. return n;
  31339. }
  31340. var Tn = /*#__PURE__*/function (_Lt2) {
  31341. (0, _inherits2.default)(Tn, _Lt2);
  31342. var _super10 = _createSuper(Tn);
  31343. function Tn(e) {
  31344. var _this16;
  31345. (0, _classCallCheck2.default)(this, Tn);
  31346. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  31347. return _this16;
  31348. }
  31349. (0, _createClass2.default)(Tn, [{
  31350. key: "hasClientKey",
  31351. value: function () {
  31352. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  31353. return _regenerator.default.wrap(function _callee43$(_context43) {
  31354. while (1) {
  31355. switch (_context43.prev = _context43.next) {
  31356. case 0:
  31357. _context43.next = 2;
  31358. return this.appUtils.hasClientKey({
  31359. provider: this.provider,
  31360. spaceId: this.spaceId
  31361. });
  31362. case 2:
  31363. this._hasClientKey = _context43.sent;
  31364. return _context43.abrupt("return", this._hasClientKey);
  31365. case 4:
  31366. case "end":
  31367. return _context43.stop();
  31368. }
  31369. }
  31370. }, _callee43, this);
  31371. }));
  31372. function hasClientKey() {
  31373. return _hasClientKey.apply(this, arguments);
  31374. }
  31375. return hasClientKey;
  31376. }()
  31377. }, {
  31378. key: "getAppClientKey",
  31379. value: function () {
  31380. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  31381. var _yield$this$appUtils$, e, t, n, s, r;
  31382. return _regenerator.default.wrap(function _callee44$(_context44) {
  31383. while (1) {
  31384. switch (_context44.prev = _context44.next) {
  31385. case 0:
  31386. _context44.next = 2;
  31387. return this.appUtils.encryptGetClientKeyPayload({
  31388. data: JSON.stringify({})
  31389. });
  31390. case 2:
  31391. _yield$this$appUtils$ = _context44.sent;
  31392. e = _yield$this$appUtils$.data;
  31393. t = _yield$this$appUtils$.key;
  31394. _context44.next = 7;
  31395. return this.uniCloudIns.callFunction({
  31396. name: "DCloud-clientDB",
  31397. data: {
  31398. redirectTo: "encryption",
  31399. action: "getAppClientKey",
  31400. data: e,
  31401. key: t
  31402. }
  31403. });
  31404. case 7:
  31405. _context44.t0 = _context44.sent.result;
  31406. if (_context44.t0) {
  31407. _context44.next = 10;
  31408. break;
  31409. }
  31410. _context44.t0 = {};
  31411. case 10:
  31412. n = _context44.t0;
  31413. if (!(0 !== n.errCode)) {
  31414. _context44.next = 13;
  31415. break;
  31416. }
  31417. throw function (e) {
  31418. return new ne({
  31419. subject: e.errSubject || "uni-secure-network",
  31420. code: e.errCode || e.code || mn.code,
  31421. message: e.errMsg || e.message
  31422. });
  31423. }(n);
  31424. case 13:
  31425. s = n.clientKey, r = n.key;
  31426. _context44.next = 16;
  31427. return this.appUtils.setClientKey({
  31428. provider: this.provider,
  31429. spaceId: this.spaceId,
  31430. clientKey: s,
  31431. key: r
  31432. });
  31433. case 16:
  31434. case "end":
  31435. return _context44.stop();
  31436. }
  31437. }
  31438. }, _callee44, this);
  31439. }));
  31440. function getAppClientKey() {
  31441. return _getAppClientKey.apply(this, arguments);
  31442. }
  31443. return getAppClientKey;
  31444. }()
  31445. }, {
  31446. key: "ensureClientKey",
  31447. value: function () {
  31448. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  31449. var _this17 = this;
  31450. var _ref27,
  31451. _ref27$forceUpdate,
  31452. e,
  31453. _args45 = arguments;
  31454. return _regenerator.default.wrap(function _callee45$(_context45) {
  31455. while (1) {
  31456. switch (_context45.prev = _context45.next) {
  31457. case 0:
  31458. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  31459. _context45.t1 = !0;
  31460. _context45.next = 4;
  31461. return this.hasClientKey();
  31462. case 4:
  31463. _context45.t2 = _context45.sent;
  31464. _context45.t0 = _context45.t1 !== _context45.t2;
  31465. if (_context45.t0) {
  31466. _context45.next = 8;
  31467. break;
  31468. }
  31469. _context45.t0 = e;
  31470. case 8:
  31471. if (!_context45.t0) {
  31472. _context45.next = 10;
  31473. break;
  31474. }
  31475. 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) {
  31476. _this17.scopedGlobalCache.initStatus = p;
  31477. }).catch(function (e) {
  31478. throw _this17.scopedGlobalCache.initStatus = f, e;
  31479. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  31480. case 10:
  31481. case "end":
  31482. return _context45.stop();
  31483. }
  31484. }
  31485. }, _callee45, this);
  31486. }));
  31487. function ensureClientKey() {
  31488. return _ensureClientKey.apply(this, arguments);
  31489. }
  31490. return ensureClientKey;
  31491. }()
  31492. }, {
  31493. key: "prepare",
  31494. value: function () {
  31495. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  31496. var _ref28,
  31497. _ref28$forceUpdate,
  31498. e,
  31499. _args46 = arguments;
  31500. return _regenerator.default.wrap(function _callee46$(_context46) {
  31501. while (1) {
  31502. switch (_context46.prev = _context46.next) {
  31503. case 0:
  31504. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  31505. _context46.next = 3;
  31506. return this.ensureClientKey({
  31507. forceUpdate: e
  31508. });
  31509. case 3:
  31510. case "end":
  31511. return _context46.stop();
  31512. }
  31513. }
  31514. }, _callee46, this);
  31515. }));
  31516. function prepare() {
  31517. return _prepare3.apply(this, arguments);
  31518. }
  31519. return prepare;
  31520. }()
  31521. }, {
  31522. key: "platformGetSignOption",
  31523. value: function () {
  31524. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  31525. var _yield$this$appUtils$2, e, t;
  31526. return _regenerator.default.wrap(function _callee47$(_context47) {
  31527. while (1) {
  31528. switch (_context47.prev = _context47.next) {
  31529. case 0:
  31530. _context47.next = 2;
  31531. return this.appUtils.encrypt({
  31532. provider: this.provider,
  31533. spaceId: this.spaceId,
  31534. data: JSON.stringify({})
  31535. });
  31536. case 2:
  31537. _yield$this$appUtils$2 = _context47.sent;
  31538. e = _yield$this$appUtils$2.data;
  31539. t = _yield$this$appUtils$2.key;
  31540. return _context47.abrupt("return", {
  31541. verifyClientSign: e,
  31542. encryptKeyId: t
  31543. });
  31544. case 6:
  31545. case "end":
  31546. return _context47.stop();
  31547. }
  31548. }
  31549. }, _callee47, this);
  31550. }));
  31551. function platformGetSignOption() {
  31552. return _platformGetSignOption2.apply(this, arguments);
  31553. }
  31554. return platformGetSignOption;
  31555. }()
  31556. }, {
  31557. key: "platformEncryptData",
  31558. value: function () {
  31559. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  31560. var _yield$this$appUtils$3, t, n, s;
  31561. return _regenerator.default.wrap(function _callee48$(_context48) {
  31562. while (1) {
  31563. switch (_context48.prev = _context48.next) {
  31564. case 0:
  31565. _context48.next = 2;
  31566. return this.appUtils.encrypt({
  31567. provider: this.provider,
  31568. spaceId: this.spaceId,
  31569. data: JSON.stringify(e)
  31570. });
  31571. case 2:
  31572. _yield$this$appUtils$3 = _context48.sent;
  31573. t = _yield$this$appUtils$3.data;
  31574. n = _yield$this$appUtils$3.key;
  31575. s = {
  31576. secretType: this.secretType,
  31577. encryptKeyId: n
  31578. };
  31579. return _context48.abrupt("return", this.secretType === Rt ? {
  31580. content: e,
  31581. _uniCloudOptions: s
  31582. } : {
  31583. content: t,
  31584. _uniCloudOptions: s
  31585. });
  31586. case 7:
  31587. case "end":
  31588. return _context48.stop();
  31589. }
  31590. }
  31591. }, _callee48, this);
  31592. }));
  31593. function platformEncryptData(_x35) {
  31594. return _platformEncryptData2.apply(this, arguments);
  31595. }
  31596. return platformEncryptData;
  31597. }()
  31598. }, {
  31599. key: "platformDecryptResult",
  31600. value: function () {
  31601. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  31602. var t, _e$_uniCloudOptions, n, s, r;
  31603. return _regenerator.default.wrap(function _callee49$(_context49) {
  31604. while (1) {
  31605. switch (_context49.prev = _context49.next) {
  31606. case 0:
  31607. t = e.content;
  31608. _e$_uniCloudOptions = e._uniCloudOptions;
  31609. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  31610. s = n.encryptKeyId;
  31611. _context49.next = 6;
  31612. return this.appUtils.decrypt({
  31613. provider: this.provider,
  31614. spaceId: this.spaceId,
  31615. data: t,
  31616. key: s
  31617. });
  31618. case 6:
  31619. r = _context49.sent;
  31620. return _context49.abrupt("return", JSON.parse(r.data));
  31621. case 8:
  31622. case "end":
  31623. return _context49.stop();
  31624. }
  31625. }
  31626. }, _callee49, this);
  31627. }));
  31628. function platformDecryptResult(_x36) {
  31629. return _platformDecryptResult2.apply(this, arguments);
  31630. }
  31631. return platformDecryptResult;
  31632. }()
  31633. }, {
  31634. key: "isClientKeyNotFound",
  31635. value: function isClientKeyNotFound() {
  31636. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31637. var t = e.result || {};
  31638. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  31639. }
  31640. }]);
  31641. return Tn;
  31642. }(Lt);
  31643. function Pn() {
  31644. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31645. e = _ref29.secretType;
  31646. return e === xt || e === Rt || e === Ut;
  31647. }
  31648. function An() {
  31649. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31650. e = _ref30.name,
  31651. _ref30$data = _ref30.data,
  31652. t = _ref30$data === void 0 ? {} : _ref30$data;
  31653. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  31654. }
  31655. function En() {
  31656. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31657. e = _ref31.provider,
  31658. t = _ref31.spaceId,
  31659. n = _ref31.functionName;
  31660. var _ce = ce(),
  31661. s = _ce.appId,
  31662. r = _ce.uniPlatform,
  31663. i = _ce.osName;
  31664. var o = r;
  31665. "app" === r && (o = i);
  31666. var a = function () {
  31667. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31668. e = _ref32.provider,
  31669. t = _ref32.spaceId;
  31670. var n = T;
  31671. if (!n) return {};
  31672. e = function (e) {
  31673. return "tencent" === e ? "tcb" : e;
  31674. }(e);
  31675. var s = n.find(function (n) {
  31676. return n.provider === e && n.spaceId === t;
  31677. });
  31678. return s && s.config;
  31679. }({
  31680. provider: e,
  31681. spaceId: t
  31682. });
  31683. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  31684. var c = a.accessControl.function || {},
  31685. u = Object.keys(c);
  31686. if (0 === u.length) return !0;
  31687. var h = function (e, t) {
  31688. var n, s, r;
  31689. for (var _i2 = 0; _i2 < e.length; _i2++) {
  31690. var _o2 = e[_i2];
  31691. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  31692. return e.trim();
  31693. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  31694. }
  31695. return n || s || r;
  31696. }(u, n);
  31697. if (!h) return !1;
  31698. if ((c[h] || []).find(function () {
  31699. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31700. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  31701. })) return !0;
  31702. 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")), vn(yn);
  31703. }
  31704. function On(_ref33) {
  31705. var e = _ref33.functionName,
  31706. t = _ref33.result,
  31707. n = _ref33.logPvd;
  31708. if (b && this.__dev__.debugLog && t && t.requestId) {
  31709. var _s11 = JSON.stringify({
  31710. spaceId: this.config.spaceId,
  31711. functionName: e,
  31712. requestId: t.requestId
  31713. });
  31714. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  31715. }
  31716. }
  31717. function xn(e) {
  31718. var t = e.callFunction,
  31719. n = function n(_n7) {
  31720. var _this18 = this;
  31721. var s = _n7.name;
  31722. _n7.data = kt.call(e, {
  31723. data: _n7.data
  31724. });
  31725. var r = {
  31726. aliyun: "aliyun",
  31727. tencent: "tcb",
  31728. tcb: "tcb"
  31729. }[this.config.provider],
  31730. i = Pn(_n7),
  31731. o = An(_n7),
  31732. a = i || o;
  31733. return t.call(this, _n7).then(function (e) {
  31734. return e.errCode = 0, !a && On.call(_this18, {
  31735. functionName: s,
  31736. result: e,
  31737. logPvd: r
  31738. }), Promise.resolve(e);
  31739. }, function (e) {
  31740. return !a && On.call(_this18, {
  31741. functionName: s,
  31742. result: e,
  31743. logPvd: r
  31744. }), e && e.message && (e.message = function () {
  31745. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31746. _ref34$message = _ref34.message,
  31747. e = _ref34$message === void 0 ? "" : _ref34$message,
  31748. _ref34$extraInfo = _ref34.extraInfo,
  31749. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  31750. _ref34$formatter = _ref34.formatter,
  31751. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  31752. for (var _s12 = 0; _s12 < n.length; _s12++) {
  31753. var _n$_s = n[_s12],
  31754. _r4 = _n$_s.rule,
  31755. _i3 = _n$_s.content,
  31756. _o3 = _n$_s.mode,
  31757. _a = e.match(_r4);
  31758. if (!_a) continue;
  31759. var _c = _i3;
  31760. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  31761. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  31762. }
  31763. for (var _e21 in t) {
  31764. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  31765. }
  31766. return "replace" === _o3 ? _c : e + _c;
  31767. }
  31768. return e;
  31769. }({
  31770. message: "[".concat(_n7.name, "]: ").concat(e.message),
  31771. formatter: Tt,
  31772. extraInfo: {
  31773. functionName: s
  31774. }
  31775. })), Promise.reject(e);
  31776. });
  31777. };
  31778. e.callFunction = function (t) {
  31779. var _e$config = e.config,
  31780. s = _e$config.provider,
  31781. r = _e$config.spaceId,
  31782. i = t.name;
  31783. var o, a;
  31784. if (t.data = t.data || {}, b && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && E ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), An(t)) a = n.call(e, t);else if (function (_ref35) {
  31785. var e = _ref35.name,
  31786. _ref35$data = _ref35.data,
  31787. t = _ref35$data === void 0 ? {} : _ref35$data;
  31788. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  31789. }(t)) a = o.call(e, t);else if (Pn(t)) {
  31790. a = new Sn({
  31791. secretType: t.secretType,
  31792. uniCloudIns: e
  31793. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  31794. } else if (En({
  31795. provider: s,
  31796. spaceId: r,
  31797. functionName: i
  31798. })) {
  31799. a = new Sn({
  31800. secretType: t.secretType,
  31801. uniCloudIns: e
  31802. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  31803. } else a = o(t);
  31804. return Object.defineProperty(a, "result", {
  31805. get: function get() {
  31806. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  31807. }
  31808. }), a;
  31809. };
  31810. }
  31811. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  31812. function _class2() {
  31813. (0, _classCallCheck2.default)(this, _class2);
  31814. throw vn({
  31815. message: "Platform ".concat(P, " is not supported by secure network")
  31816. });
  31817. }
  31818. return (0, _createClass2.default)(_class2);
  31819. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  31820. function _class3() {
  31821. (0, _classCallCheck2.default)(this, _class3);
  31822. throw vn({
  31823. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  31824. });
  31825. }
  31826. return (0, _createClass2.default)(_class3);
  31827. }();
  31828. var Rn = Symbol("CLIENT_DB_INTERNAL");
  31829. function Un(e, t) {
  31830. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  31831. get: function get(e, n, s) {
  31832. if ("_uniClient" === n) return null;
  31833. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  31834. if (n in e || "string" != typeof n) {
  31835. var _t10 = e[n];
  31836. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  31837. }
  31838. return t.get(e, n, s);
  31839. }
  31840. });
  31841. }
  31842. function Ln(e) {
  31843. return {
  31844. on: function on(t, n) {
  31845. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  31846. },
  31847. off: function off(t, n) {
  31848. e[t] = e[t] || [];
  31849. var s = e[t].indexOf(n);
  31850. -1 !== s && e[t].splice(s, 1);
  31851. }
  31852. };
  31853. }
  31854. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  31855. function Dn(e, t) {
  31856. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  31857. }
  31858. function Fn(e) {
  31859. switch (g(e)) {
  31860. case "array":
  31861. return e.map(function (e) {
  31862. return Fn(e);
  31863. });
  31864. case "object":
  31865. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  31866. e[t] = Fn(e[t]);
  31867. }), e;
  31868. case "regexp":
  31869. return {
  31870. $regexp: {
  31871. source: e.source,
  31872. flags: e.flags
  31873. }
  31874. };
  31875. case "date":
  31876. return {
  31877. $date: e.toISOString()
  31878. };
  31879. default:
  31880. return e;
  31881. }
  31882. }
  31883. function qn(e) {
  31884. return e && e.content && e.content.$method;
  31885. }
  31886. var Mn = /*#__PURE__*/function () {
  31887. function Mn(e, t, n) {
  31888. (0, _classCallCheck2.default)(this, Mn);
  31889. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  31890. }
  31891. (0, _createClass2.default)(Mn, [{
  31892. key: "toJSON",
  31893. value: function toJSON() {
  31894. var e = this;
  31895. var t = [e.content];
  31896. for (; e.prevStage;) {
  31897. e = e.prevStage, t.push(e.content);
  31898. }
  31899. return {
  31900. $db: t.reverse().map(function (e) {
  31901. return {
  31902. $method: e.$method,
  31903. $param: Fn(e.$param)
  31904. };
  31905. })
  31906. };
  31907. }
  31908. }, {
  31909. key: "toString",
  31910. value: function toString() {
  31911. return JSON.stringify(this.toJSON());
  31912. }
  31913. }, {
  31914. key: "getAction",
  31915. value: function getAction() {
  31916. var e = this.toJSON().$db.find(function (e) {
  31917. return "action" === e.$method;
  31918. });
  31919. return e && e.$param && e.$param[0];
  31920. }
  31921. }, {
  31922. key: "getCommand",
  31923. value: function getCommand() {
  31924. return {
  31925. $db: this.toJSON().$db.filter(function (e) {
  31926. return "action" !== e.$method;
  31927. })
  31928. };
  31929. }
  31930. }, {
  31931. key: "isAggregate",
  31932. get: function get() {
  31933. var e = this;
  31934. for (; e;) {
  31935. var t = qn(e),
  31936. _n8 = qn(e.prevStage);
  31937. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  31938. e = e.prevStage;
  31939. }
  31940. return !1;
  31941. }
  31942. }, {
  31943. key: "isCommand",
  31944. get: function get() {
  31945. var e = this;
  31946. for (; e;) {
  31947. if ("command" === qn(e)) return !0;
  31948. e = e.prevStage;
  31949. }
  31950. return !1;
  31951. }
  31952. }, {
  31953. key: "isAggregateCommand",
  31954. get: function get() {
  31955. var e = this;
  31956. for (; e;) {
  31957. var t = qn(e),
  31958. _n9 = qn(e.prevStage);
  31959. if ("aggregate" === t && "command" === _n9) return !0;
  31960. e = e.prevStage;
  31961. }
  31962. return !1;
  31963. }
  31964. }, {
  31965. key: "getNextStageFn",
  31966. value: function getNextStageFn(e) {
  31967. var t = this;
  31968. return function () {
  31969. return Kn({
  31970. $method: e,
  31971. $param: Fn(Array.from(arguments))
  31972. }, t, t._database);
  31973. };
  31974. }
  31975. }, {
  31976. key: "count",
  31977. get: function get() {
  31978. return this.isAggregate ? this.getNextStageFn("count") : function () {
  31979. return this._send("count", Array.from(arguments));
  31980. };
  31981. }
  31982. }, {
  31983. key: "remove",
  31984. get: function get() {
  31985. return this.isCommand ? this.getNextStageFn("remove") : function () {
  31986. return this._send("remove", Array.from(arguments));
  31987. };
  31988. }
  31989. }, {
  31990. key: "get",
  31991. value: function get() {
  31992. return this._send("get", Array.from(arguments));
  31993. }
  31994. }, {
  31995. key: "add",
  31996. get: function get() {
  31997. return this.isCommand ? this.getNextStageFn("add") : function () {
  31998. return this._send("add", Array.from(arguments));
  31999. };
  32000. }
  32001. }, {
  32002. key: "update",
  32003. value: function update() {
  32004. return this._send("update", Array.from(arguments));
  32005. }
  32006. }, {
  32007. key: "end",
  32008. value: function end() {
  32009. return this._send("end", Array.from(arguments));
  32010. }
  32011. }, {
  32012. key: "set",
  32013. get: function get() {
  32014. return this.isCommand ? this.getNextStageFn("set") : function () {
  32015. throw new Error("JQL禁止使用set方法");
  32016. };
  32017. }
  32018. }, {
  32019. key: "_send",
  32020. value: function _send(e, t) {
  32021. var n = this.getAction(),
  32022. s = this.getCommand();
  32023. if (s.$db.push({
  32024. $method: e,
  32025. $param: Fn(t)
  32026. }), b) {
  32027. var _e22 = s.$db.find(function (e) {
  32028. return "collection" === e.$method;
  32029. }),
  32030. _t11 = _e22 && _e22.$param;
  32031. _t11 && 1 === _t11.length && "string" == typeof _e22.$param[0] && _e22.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  32032. }
  32033. return this._database._callCloudFunction({
  32034. action: n,
  32035. command: s
  32036. });
  32037. }
  32038. }]);
  32039. return Mn;
  32040. }();
  32041. function Kn(e, t, n) {
  32042. return Un(new Mn(e, t, n), {
  32043. get: function get(e, t) {
  32044. var s = "db";
  32045. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  32046. $method: t
  32047. }, e, n) : function () {
  32048. return Kn({
  32049. $method: t,
  32050. $param: Fn(Array.from(arguments))
  32051. }, e, n);
  32052. };
  32053. }
  32054. });
  32055. }
  32056. function jn(_ref36) {
  32057. var e = _ref36.path,
  32058. t = _ref36.method;
  32059. return /*#__PURE__*/function () {
  32060. function _class4() {
  32061. (0, _classCallCheck2.default)(this, _class4);
  32062. this.param = Array.from(arguments);
  32063. }
  32064. (0, _createClass2.default)(_class4, [{
  32065. key: "toJSON",
  32066. value: function toJSON() {
  32067. return {
  32068. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  32069. return {
  32070. $method: e
  32071. };
  32072. })), [{
  32073. $method: t,
  32074. $param: this.param
  32075. }])
  32076. };
  32077. }
  32078. }, {
  32079. key: "toString",
  32080. value: function toString() {
  32081. return JSON.stringify(this.toJSON());
  32082. }
  32083. }]);
  32084. return _class4;
  32085. }();
  32086. }
  32087. function Bn(e) {
  32088. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32089. return Un(new e(t), {
  32090. get: function get(e, t) {
  32091. return Dn("db", t) ? Kn({
  32092. $method: t
  32093. }, null, e) : function () {
  32094. return Kn({
  32095. $method: t,
  32096. $param: Fn(Array.from(arguments))
  32097. }, null, e);
  32098. };
  32099. }
  32100. });
  32101. }
  32102. var $n = /*#__PURE__*/function (_ref37) {
  32103. (0, _inherits2.default)($n, _ref37);
  32104. var _super11 = _createSuper($n);
  32105. function $n() {
  32106. (0, _classCallCheck2.default)(this, $n);
  32107. return _super11.apply(this, arguments);
  32108. }
  32109. (0, _createClass2.default)($n, [{
  32110. key: "_parseResult",
  32111. value: function _parseResult(e) {
  32112. return this._isJQL ? e.result : e;
  32113. }
  32114. }, {
  32115. key: "_callCloudFunction",
  32116. value: function _callCloudFunction(_ref38) {
  32117. var _this19 = this;
  32118. var e = _ref38.action,
  32119. t = _ref38.command,
  32120. n = _ref38.multiCommand,
  32121. s = _ref38.queryList;
  32122. function r(e, t) {
  32123. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  32124. var _r5 = s[_n10];
  32125. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  32126. }
  32127. }
  32128. var i = this,
  32129. o = this._isJQL ? "databaseForJQL" : "database";
  32130. function a(e) {
  32131. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  32132. return q(M(o, "complete"), e);
  32133. }).then(function () {
  32134. return r(null, e), Q(B, {
  32135. type: z,
  32136. content: e
  32137. }), Promise.reject(e);
  32138. });
  32139. }
  32140. var c = q(M(o, "invoke")),
  32141. u = this._uniClient;
  32142. return c.then(function () {
  32143. return u.callFunction({
  32144. name: "DCloud-clientDB",
  32145. type: l,
  32146. data: {
  32147. action: e,
  32148. command: t,
  32149. multiCommand: n
  32150. }
  32151. });
  32152. }).then(function (e) {
  32153. var _e$result = e.result,
  32154. t = _e$result.code,
  32155. n = _e$result.message,
  32156. s = _e$result.token,
  32157. c = _e$result.tokenExpired,
  32158. _e$result$systemInfo = _e$result.systemInfo,
  32159. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  32160. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  32161. var _u$_e = u[_e23],
  32162. _t12 = _u$_e.level,
  32163. _n11 = _u$_e.message,
  32164. _s13 = _u$_e.detail,
  32165. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  32166. var _i4 = "[System Info]" + _n11;
  32167. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  32168. }
  32169. if (t) {
  32170. return a(new ne({
  32171. code: t,
  32172. message: n,
  32173. requestId: e.requestId
  32174. }));
  32175. }
  32176. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  32177. token: s,
  32178. tokenExpired: c
  32179. }), _this19._callbackAuth("refreshToken", [{
  32180. token: s,
  32181. tokenExpired: c
  32182. }]), _this19._callback("refreshToken", [{
  32183. token: s,
  32184. tokenExpired: c
  32185. }]), Q(W, {
  32186. token: s,
  32187. tokenExpired: c
  32188. }));
  32189. var h = [{
  32190. prop: "affectedDocs",
  32191. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  32192. }, {
  32193. prop: "code",
  32194. tips: "code不再推荐使用,请使用errCode替代"
  32195. }, {
  32196. prop: "message",
  32197. tips: "message不再推荐使用,请使用errMsg替代"
  32198. }];
  32199. var _loop2 = function _loop2(_t13) {
  32200. var _h$_t = h[_t13],
  32201. n = _h$_t.prop,
  32202. s = _h$_t.tips;
  32203. if (n in e.result) {
  32204. var _t14 = e.result[n];
  32205. Object.defineProperty(e.result, n, {
  32206. get: function get() {
  32207. return console.warn(s), _t14;
  32208. }
  32209. });
  32210. }
  32211. };
  32212. for (var _t13 = 0; _t13 < h.length; _t13++) {
  32213. _loop2(_t13);
  32214. }
  32215. return function (e) {
  32216. return q(M(o, "success"), e).then(function () {
  32217. return q(M(o, "complete"), e);
  32218. }).then(function () {
  32219. r(e, null);
  32220. var t = i._parseResult(e);
  32221. return Q(B, {
  32222. type: z,
  32223. content: t
  32224. }), Promise.resolve(t);
  32225. });
  32226. }(e);
  32227. }, function (e) {
  32228. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  32229. return a(new ne({
  32230. code: e.code || "SYSTEM_ERROR",
  32231. message: e.message,
  32232. requestId: e.requestId
  32233. }));
  32234. });
  32235. }
  32236. }]);
  32237. return $n;
  32238. }( /*#__PURE__*/function () {
  32239. function _class5() {
  32240. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32241. _ref39$uniClient = _ref39.uniClient,
  32242. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  32243. _ref39$isJQL = _ref39.isJQL,
  32244. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  32245. (0, _classCallCheck2.default)(this, _class5);
  32246. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = U("_globalUniCloudDatabaseCallback")), t || (this.auth = Ln(this._authCallBacks)), this._isJQL = t, Object.assign(this, Ln(this._dbCallBacks)), this.env = Un({}, {
  32247. get: function get(e, t) {
  32248. return {
  32249. $env: t
  32250. };
  32251. }
  32252. }), this.Geo = Un({}, {
  32253. get: function get(e, t) {
  32254. return jn({
  32255. path: ["Geo"],
  32256. method: t
  32257. });
  32258. }
  32259. }), this.serverDate = jn({
  32260. path: [],
  32261. method: "serverDate"
  32262. }), this.RegExp = jn({
  32263. path: [],
  32264. method: "RegExp"
  32265. });
  32266. }
  32267. (0, _createClass2.default)(_class5, [{
  32268. key: "getCloudEnv",
  32269. value: function getCloudEnv(e) {
  32270. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  32271. return {
  32272. $env: e.replace("$cloudEnv_", "")
  32273. };
  32274. }
  32275. }, {
  32276. key: "_callback",
  32277. value: function _callback(e, t) {
  32278. var n = this._dbCallBacks;
  32279. n[e] && n[e].forEach(function (e) {
  32280. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32281. });
  32282. }
  32283. }, {
  32284. key: "_callbackAuth",
  32285. value: function _callbackAuth(e, t) {
  32286. var n = this._authCallBacks;
  32287. n[e] && n[e].forEach(function (e) {
  32288. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32289. });
  32290. }
  32291. }, {
  32292. key: "multiSend",
  32293. value: function multiSend() {
  32294. var e = Array.from(arguments),
  32295. t = e.map(function (e) {
  32296. var t = e.getAction(),
  32297. n = e.getCommand();
  32298. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  32299. return {
  32300. action: t,
  32301. command: n
  32302. };
  32303. });
  32304. return this._callCloudFunction({
  32305. multiCommand: t,
  32306. queryList: e
  32307. });
  32308. }
  32309. }]);
  32310. return _class5;
  32311. }());
  32312. var Wn = "token无效,跳转登录页面",
  32313. zn = "token过期,跳转登录页面",
  32314. Jn = {
  32315. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  32316. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  32317. TOKEN_INVALID: Wn,
  32318. TOKEN_INVALID_WRONG_TOKEN: Wn,
  32319. TOKEN_INVALID_ANONYMOUS_USER: Wn
  32320. },
  32321. Hn = {
  32322. "uni-id-token-expired": zn,
  32323. "uni-id-check-token-failed": Wn,
  32324. "uni-id-token-not-exist": Wn,
  32325. "uni-id-check-device-feature-failed": Wn
  32326. };
  32327. function Gn(e, t) {
  32328. var n = "";
  32329. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  32330. }
  32331. function Vn() {
  32332. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32333. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  32334. var n = [],
  32335. s = [];
  32336. return e.forEach(function (e) {
  32337. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  32338. }), {
  32339. needLoginPage: n,
  32340. notNeedLoginPage: s
  32341. };
  32342. }
  32343. function Yn(e) {
  32344. return e.split("?")[0].replace(/^\//, "");
  32345. }
  32346. function Qn() {
  32347. return function (e) {
  32348. var t = e && e.$page && e.$page.fullPath || "";
  32349. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  32350. }(function () {
  32351. var e = getCurrentPages();
  32352. return e[e.length - 1];
  32353. }());
  32354. }
  32355. function Xn() {
  32356. return Yn(Qn());
  32357. }
  32358. function Zn() {
  32359. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  32360. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32361. if (!e) return !1;
  32362. if (!(t && t.list && t.list.length)) return !1;
  32363. var n = t.list,
  32364. s = Yn(e);
  32365. return n.some(function (e) {
  32366. return e.pagePath === s;
  32367. });
  32368. }
  32369. var es = !!_pages.default.uniIdRouter;
  32370. var _ref40 = function () {
  32371. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  32372. _ref21$pages = _ref21.pages,
  32373. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  32374. _ref21$subPackages = _ref21.subPackages,
  32375. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  32376. _ref21$uniIdRouter = _ref21.uniIdRouter,
  32377. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  32378. _ref21$tabBar = _ref21.tabBar,
  32379. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  32380. var i = s.loginPage,
  32381. _s$needLogin = s.needLogin,
  32382. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  32383. _s$resToLogin = s.resToLogin,
  32384. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  32385. _Vn = Vn(e),
  32386. c = _Vn.needLoginPage,
  32387. u = _Vn.notNeedLoginPage,
  32388. _ref23 = function () {
  32389. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32390. var t = [],
  32391. n = [];
  32392. return e.forEach(function (e) {
  32393. var s = e.root,
  32394. _e$pages = e.pages,
  32395. r = _e$pages === void 0 ? [] : _e$pages,
  32396. _Vn2 = Vn(r, s),
  32397. i = _Vn2.needLoginPage,
  32398. o = _Vn2.notNeedLoginPage;
  32399. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  32400. }), {
  32401. needLoginPage: t,
  32402. notNeedLoginPage: n
  32403. };
  32404. }(n),
  32405. h = _ref23.needLoginPage,
  32406. l = _ref23.notNeedLoginPage;
  32407. return {
  32408. loginPage: i,
  32409. routerNeedLogin: o,
  32410. resToLogin: a,
  32411. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  32412. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  32413. loginPageInTabBar: Zn(i, r)
  32414. };
  32415. }(),
  32416. ts = _ref40.loginPage,
  32417. ns = _ref40.routerNeedLogin,
  32418. ss = _ref40.resToLogin,
  32419. rs = _ref40.needLoginPage,
  32420. is = _ref40.notNeedLoginPage,
  32421. os = _ref40.loginPageInTabBar;
  32422. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  32423. function as(e) {
  32424. var t = Xn();
  32425. if ("/" === e.charAt(0)) return e;
  32426. var _e$split = e.split("?"),
  32427. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  32428. n = _e$split2[0],
  32429. s = _e$split2[1],
  32430. r = n.replace(/^\//, "").split("/"),
  32431. i = t.split("/");
  32432. i.pop();
  32433. for (var _e24 = 0; _e24 < r.length; _e24++) {
  32434. var _t15 = r[_e24];
  32435. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  32436. }
  32437. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  32438. }
  32439. function cs(e) {
  32440. var t = Yn(as(e));
  32441. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  32442. return function (e, t) {
  32443. return new RegExp(t).test(e);
  32444. }(e, t);
  32445. }));
  32446. }
  32447. function us(_ref41) {
  32448. var e = _ref41.redirect;
  32449. var t = Yn(e),
  32450. n = Yn(ts);
  32451. return Xn() !== n && t !== n;
  32452. }
  32453. function hs() {
  32454. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32455. e = _ref42.api,
  32456. t = _ref42.redirect;
  32457. if (!t || !us({
  32458. redirect: t
  32459. })) return;
  32460. var n = function (e, t) {
  32461. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  32462. }(ts, t);
  32463. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  32464. var s = {
  32465. navigateTo: uni.navigateTo,
  32466. redirectTo: uni.redirectTo,
  32467. switchTab: uni.switchTab,
  32468. reLaunch: uni.reLaunch
  32469. };
  32470. setTimeout(function () {
  32471. s[e]({
  32472. url: n
  32473. });
  32474. });
  32475. }
  32476. function ls() {
  32477. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32478. e = _ref43.url;
  32479. var t = {
  32480. abortLoginPageJump: !1,
  32481. autoToLoginPage: !1
  32482. },
  32483. n = function () {
  32484. var _re3 = re(),
  32485. e = _re3.token,
  32486. t = _re3.tokenExpired;
  32487. var n;
  32488. if (e) {
  32489. if (t < Date.now()) {
  32490. var _e25 = "uni-id-token-expired";
  32491. n = {
  32492. errCode: _e25,
  32493. errMsg: Hn[_e25]
  32494. };
  32495. }
  32496. } else {
  32497. var _e26 = "uni-id-check-token-failed";
  32498. n = {
  32499. errCode: _e26,
  32500. errMsg: Hn[_e26]
  32501. };
  32502. }
  32503. return n;
  32504. }();
  32505. if (cs(e) && n) {
  32506. n.uniIdRedirectUrl = e;
  32507. if (G($).length > 0) return setTimeout(function () {
  32508. Q($, n);
  32509. }, 0), t.abortLoginPageJump = !0, t;
  32510. t.autoToLoginPage = !0;
  32511. }
  32512. return t;
  32513. }
  32514. function ds() {
  32515. !function () {
  32516. var e = Qn(),
  32517. _ls = ls({
  32518. url: e
  32519. }),
  32520. t = _ls.abortLoginPageJump,
  32521. n = _ls.autoToLoginPage;
  32522. t || n && hs({
  32523. api: "redirectTo",
  32524. redirect: e
  32525. });
  32526. }();
  32527. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  32528. var _loop3 = function _loop3(_t16) {
  32529. var n = e[_t16];
  32530. uni.addInterceptor(n, {
  32531. invoke: function invoke(e) {
  32532. var _ls2 = ls({
  32533. url: e.url
  32534. }),
  32535. t = _ls2.abortLoginPageJump,
  32536. s = _ls2.autoToLoginPage;
  32537. return t ? e : s ? (hs({
  32538. api: n,
  32539. redirect: as(e.url)
  32540. }), !1) : e;
  32541. }
  32542. });
  32543. };
  32544. for (var _t16 = 0; _t16 < e.length; _t16++) {
  32545. _loop3(_t16);
  32546. }
  32547. }
  32548. function ps() {
  32549. this.onResponse(function (e) {
  32550. var t = e.type,
  32551. n = e.content;
  32552. var s = !1;
  32553. switch (t) {
  32554. case "cloudobject":
  32555. s = function (e) {
  32556. if ("object" != (0, _typeof2.default)(e)) return !1;
  32557. var _ref44 = e || {},
  32558. t = _ref44.errCode;
  32559. return t in Hn;
  32560. }(n);
  32561. break;
  32562. case "clientdb":
  32563. s = function (e) {
  32564. if ("object" != (0, _typeof2.default)(e)) return !1;
  32565. var _ref45 = e || {},
  32566. t = _ref45.errCode;
  32567. return t in Jn;
  32568. }(n);
  32569. }
  32570. s && function () {
  32571. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32572. var t = G($);
  32573. ee().then(function () {
  32574. var n = Qn();
  32575. if (n && us({
  32576. redirect: n
  32577. })) return t.length > 0 ? Q($, Object.assign({
  32578. uniIdRedirectUrl: n
  32579. }, e)) : void (ts && hs({
  32580. api: "navigateTo",
  32581. redirect: n
  32582. }));
  32583. });
  32584. }(n);
  32585. });
  32586. }
  32587. function fs(e) {
  32588. !function (e) {
  32589. e.onResponse = function (e) {
  32590. V(B, e);
  32591. }, e.offResponse = function (e) {
  32592. Y(B, e);
  32593. };
  32594. }(e), function (e) {
  32595. e.onNeedLogin = function (e) {
  32596. V($, e);
  32597. }, e.offNeedLogin = function (e) {
  32598. Y($, e);
  32599. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  32600. ds.call(e);
  32601. }), ss && ps.call(e)));
  32602. }(e), function (e) {
  32603. e.onRefreshToken = function (e) {
  32604. V(W, e);
  32605. }, e.offRefreshToken = function (e) {
  32606. Y(W, e);
  32607. };
  32608. }(e);
  32609. }
  32610. var gs;
  32611. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  32612. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  32613. function _s() {
  32614. var e = re().token || "",
  32615. t = e.split(".");
  32616. if (!e || 3 !== t.length) return {
  32617. uid: null,
  32618. role: [],
  32619. permission: [],
  32620. tokenExpired: 0
  32621. };
  32622. var n;
  32623. try {
  32624. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  32625. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  32626. }).join(""))));
  32627. } catch (e) {
  32628. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  32629. }
  32630. var s;
  32631. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  32632. }
  32633. gs = "function" != typeof atob ? function (e) {
  32634. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !ys.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  32635. var t;
  32636. e += "==".slice(2 - (3 & e.length));
  32637. for (var n, s, r = "", i = 0; i < e.length;) {
  32638. t = ms.indexOf(e.charAt(i++)) << 18 | ms.indexOf(e.charAt(i++)) << 12 | (n = ms.indexOf(e.charAt(i++))) << 6 | (s = ms.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);
  32639. }
  32640. return r;
  32641. } : atob;
  32642. var ws = s(function (e, t) {
  32643. Object.defineProperty(t, "__esModule", {
  32644. value: !0
  32645. });
  32646. var n = "chooseAndUploadFile:ok",
  32647. s = "chooseAndUploadFile:fail";
  32648. function r(e, t) {
  32649. return e.tempFiles.forEach(function (e, n) {
  32650. 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("."));
  32651. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  32652. return e.path;
  32653. })), e;
  32654. }
  32655. function i(e, t, _ref46) {
  32656. var s = _ref46.onChooseFile,
  32657. r = _ref46.onUploadProgress;
  32658. return t.then(function (e) {
  32659. if (s) {
  32660. var _t17 = s(e);
  32661. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  32662. return void 0 === t ? e : t;
  32663. });
  32664. }
  32665. return e;
  32666. }).then(function (t) {
  32667. return !1 === t ? {
  32668. errMsg: n,
  32669. tempFilePaths: [],
  32670. tempFiles: []
  32671. } : function (e, t) {
  32672. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  32673. var r = arguments.length > 3 ? arguments[3] : undefined;
  32674. (t = Object.assign({}, t)).errMsg = n;
  32675. var i = t.tempFiles,
  32676. o = i.length;
  32677. var a = 0;
  32678. return new Promise(function (n) {
  32679. for (; a < s;) {
  32680. c();
  32681. }
  32682. function c() {
  32683. var s = a++;
  32684. if (s >= o) return void (!i.find(function (e) {
  32685. return !e.url && !e.errMsg;
  32686. }) && n(t));
  32687. var u = i[s];
  32688. e.uploadFile({
  32689. filePath: u.path,
  32690. cloudPath: u.cloudPath,
  32691. fileType: u.fileType,
  32692. onUploadProgress: function onUploadProgress(e) {
  32693. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  32694. }
  32695. }).then(function (e) {
  32696. u.url = e.fileID, s < o && c();
  32697. }).catch(function (e) {
  32698. u.errMsg = e.errMsg || e.message, s < o && c();
  32699. });
  32700. }
  32701. });
  32702. }(e, t, 5, r);
  32703. });
  32704. }
  32705. t.initChooseAndUploadFile = function (e) {
  32706. return function () {
  32707. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  32708. type: "all"
  32709. };
  32710. return "image" === t.type ? i(e, function (e) {
  32711. var t = e.count,
  32712. n = e.sizeType,
  32713. _e$sourceType = e.sourceType,
  32714. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  32715. o = e.extension;
  32716. return new Promise(function (e, a) {
  32717. uni.chooseImage({
  32718. count: t,
  32719. sizeType: n,
  32720. sourceType: i,
  32721. extension: o,
  32722. success: function success(t) {
  32723. e(r(t, "image"));
  32724. },
  32725. fail: function fail(e) {
  32726. a({
  32727. errMsg: e.errMsg.replace("chooseImage:fail", s)
  32728. });
  32729. }
  32730. });
  32731. });
  32732. }(t), t) : "video" === t.type ? i(e, function (e) {
  32733. var t = e.camera,
  32734. n = e.compressed,
  32735. i = e.maxDuration,
  32736. _e$sourceType2 = e.sourceType,
  32737. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  32738. a = e.extension;
  32739. return new Promise(function (e, c) {
  32740. uni.chooseVideo({
  32741. camera: t,
  32742. compressed: n,
  32743. maxDuration: i,
  32744. sourceType: o,
  32745. extension: a,
  32746. success: function success(t) {
  32747. var n = t.tempFilePath,
  32748. s = t.duration,
  32749. i = t.size,
  32750. o = t.height,
  32751. a = t.width;
  32752. e(r({
  32753. errMsg: "chooseVideo:ok",
  32754. tempFilePaths: [n],
  32755. tempFiles: [{
  32756. name: t.tempFile && t.tempFile.name || "",
  32757. path: n,
  32758. size: i,
  32759. type: t.tempFile && t.tempFile.type || "",
  32760. width: a,
  32761. height: o,
  32762. duration: s,
  32763. fileType: "video",
  32764. cloudPath: ""
  32765. }]
  32766. }, "video"));
  32767. },
  32768. fail: function fail(e) {
  32769. c({
  32770. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  32771. });
  32772. }
  32773. });
  32774. });
  32775. }(t), t) : i(e, function (e) {
  32776. var t = e.count,
  32777. n = e.extension;
  32778. return new Promise(function (e, i) {
  32779. var o = uni.chooseFile;
  32780. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  32781. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  32782. });
  32783. o({
  32784. type: "all",
  32785. count: t,
  32786. extension: n,
  32787. success: function success(t) {
  32788. e(r(t));
  32789. },
  32790. fail: function fail(e) {
  32791. i({
  32792. errMsg: e.errMsg.replace("chooseFile:fail", s)
  32793. });
  32794. }
  32795. });
  32796. });
  32797. }(t), t);
  32798. };
  32799. };
  32800. }),
  32801. vs = n(ws);
  32802. var Is = "manual";
  32803. function Ss(e) {
  32804. return {
  32805. props: {
  32806. localdata: {
  32807. type: Array,
  32808. default: function _default() {
  32809. return [];
  32810. }
  32811. },
  32812. options: {
  32813. type: [Object, Array],
  32814. default: function _default() {
  32815. return {};
  32816. }
  32817. },
  32818. spaceInfo: {
  32819. type: Object,
  32820. default: function _default() {
  32821. return {};
  32822. }
  32823. },
  32824. collection: {
  32825. type: [String, Array],
  32826. default: ""
  32827. },
  32828. action: {
  32829. type: String,
  32830. default: ""
  32831. },
  32832. field: {
  32833. type: String,
  32834. default: ""
  32835. },
  32836. orderby: {
  32837. type: String,
  32838. default: ""
  32839. },
  32840. where: {
  32841. type: [String, Object],
  32842. default: ""
  32843. },
  32844. pageData: {
  32845. type: String,
  32846. default: "add"
  32847. },
  32848. pageCurrent: {
  32849. type: Number,
  32850. default: 1
  32851. },
  32852. pageSize: {
  32853. type: Number,
  32854. default: 20
  32855. },
  32856. getcount: {
  32857. type: [Boolean, String],
  32858. default: !1
  32859. },
  32860. gettree: {
  32861. type: [Boolean, String],
  32862. default: !1
  32863. },
  32864. gettreepath: {
  32865. type: [Boolean, String],
  32866. default: !1
  32867. },
  32868. startwith: {
  32869. type: String,
  32870. default: ""
  32871. },
  32872. limitlevel: {
  32873. type: Number,
  32874. default: 10
  32875. },
  32876. groupby: {
  32877. type: String,
  32878. default: ""
  32879. },
  32880. groupField: {
  32881. type: String,
  32882. default: ""
  32883. },
  32884. distinct: {
  32885. type: [Boolean, String],
  32886. default: !1
  32887. },
  32888. foreignKey: {
  32889. type: String,
  32890. default: ""
  32891. },
  32892. loadtime: {
  32893. type: String,
  32894. default: "auto"
  32895. },
  32896. manual: {
  32897. type: Boolean,
  32898. default: !1
  32899. }
  32900. },
  32901. data: function data() {
  32902. return {
  32903. mixinDatacomLoading: !1,
  32904. mixinDatacomHasMore: !1,
  32905. mixinDatacomResData: [],
  32906. mixinDatacomErrorMessage: "",
  32907. mixinDatacomPage: {}
  32908. };
  32909. },
  32910. created: function created() {
  32911. var _this20 = this;
  32912. this.mixinDatacomPage = {
  32913. current: this.pageCurrent,
  32914. size: this.pageSize,
  32915. count: 0
  32916. }, this.$watch(function () {
  32917. var e = [];
  32918. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  32919. e.push(_this20[t]);
  32920. }), e;
  32921. }, function (e, t) {
  32922. if (_this20.loadtime === Is) return;
  32923. var n = !1;
  32924. var s = [];
  32925. for (var _r7 = 2; _r7 < e.length; _r7++) {
  32926. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  32927. }
  32928. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  32929. });
  32930. },
  32931. methods: {
  32932. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  32933. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  32934. var _this21 = this;
  32935. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32936. _ref47$getone = _ref47.getone,
  32937. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  32938. t = _ref47.success,
  32939. n = _ref47.fail;
  32940. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  32941. _this21.mixinDatacomLoading = !1;
  32942. var _n$result = n.result,
  32943. s = _n$result.data,
  32944. r = _n$result.count;
  32945. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  32946. var i = e ? s.length ? s[0] : void 0 : s;
  32947. _this21.mixinDatacomResData = i, t && t(i);
  32948. }).catch(function (e) {
  32949. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  32950. }));
  32951. },
  32952. mixinDatacomGet: function mixinDatacomGet() {
  32953. var _n12;
  32954. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32955. var n = e.database(this.spaceInfo);
  32956. var s = t.action || this.action;
  32957. s && (n = n.action(s));
  32958. var r = t.collection || this.collection;
  32959. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  32960. var i = t.where || this.where;
  32961. i && Object.keys(i).length && (n = n.where(i));
  32962. var o = t.field || this.field;
  32963. o && (n = n.field(o));
  32964. var a = t.foreignKey || this.foreignKey;
  32965. a && (n = n.foreignKey(a));
  32966. var c = t.groupby || this.groupby;
  32967. c && (n = n.groupBy(c));
  32968. var u = t.groupField || this.groupField;
  32969. u && (n = n.groupField(u));
  32970. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  32971. var h = t.orderby || this.orderby;
  32972. h && (n = n.orderBy(h));
  32973. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  32974. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  32975. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  32976. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  32977. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  32978. m = {
  32979. getCount: p
  32980. },
  32981. y = {
  32982. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  32983. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  32984. };
  32985. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  32986. }
  32987. }
  32988. };
  32989. }
  32990. function bs(e) {
  32991. return function (t) {
  32992. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32993. n = function (e) {
  32994. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32995. 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;
  32996. }({
  32997. customUI: !1,
  32998. loadingOptions: {
  32999. title: "加载中...",
  33000. mask: !0
  33001. },
  33002. errorOptions: {
  33003. type: "modal",
  33004. retry: !1
  33005. }
  33006. }, n);
  33007. var _n13 = n,
  33008. s = _n13.customUI,
  33009. r = _n13.loadingOptions,
  33010. i = _n13.errorOptions,
  33011. o = _n13.parseSystemError,
  33012. a = !s;
  33013. return new Proxy({}, {
  33014. get: function get(s, c) {
  33015. return function () {
  33016. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33017. e = _ref48.fn,
  33018. t = _ref48.interceptorName,
  33019. n = _ref48.getCallbackArgs;
  33020. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  33021. var _len2,
  33022. s,
  33023. _key2,
  33024. r,
  33025. i,
  33026. o,
  33027. _args = arguments;
  33028. return _regenerator.default.wrap(function _callee50$(_context50) {
  33029. while (1) {
  33030. switch (_context50.prev = _context50.next) {
  33031. case 0:
  33032. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  33033. s[_key2] = _args[_key2];
  33034. }
  33035. r = n ? n({
  33036. params: s
  33037. }) : {};
  33038. _context50.prev = 2;
  33039. _context50.next = 5;
  33040. return q(M(t, "invoke"), _objectSpread({}, r));
  33041. case 5:
  33042. _context50.next = 7;
  33043. return e.apply(void 0, s);
  33044. case 7:
  33045. i = _context50.sent;
  33046. _context50.next = 10;
  33047. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  33048. result: i
  33049. }));
  33050. case 10:
  33051. return _context50.abrupt("return", i);
  33052. case 13:
  33053. _context50.prev = 13;
  33054. _context50.t0 = _context50["catch"](2);
  33055. o = _context50.t0;
  33056. _context50.next = 18;
  33057. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  33058. error: o
  33059. }));
  33060. case 18:
  33061. throw o;
  33062. case 19:
  33063. _context50.prev = 19;
  33064. _context50.next = 22;
  33065. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  33066. error: o
  33067. }) : _objectSpread(_objectSpread({}, r), {}, {
  33068. result: i
  33069. }));
  33070. case 22:
  33071. return _context50.finish(19);
  33072. case 23:
  33073. case "end":
  33074. return _context50.stop();
  33075. }
  33076. }
  33077. }, _callee50, null, [[2, 13, 19, 23]]);
  33078. }));
  33079. }({
  33080. fn: function () {
  33081. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  33082. var l,
  33083. _len3,
  33084. u,
  33085. _key3,
  33086. d,
  33087. p,
  33088. _ref50,
  33089. f,
  33090. g,
  33091. m,
  33092. y,
  33093. _e27,
  33094. _yield,
  33095. _t18,
  33096. _n14,
  33097. _args4 = arguments;
  33098. return _regenerator.default.wrap(function _callee52$(_context52) {
  33099. while (1) {
  33100. switch (_context52.prev = _context52.next) {
  33101. case 0:
  33102. a && uni.showLoading({
  33103. title: r.title,
  33104. mask: r.mask
  33105. });
  33106. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  33107. u[_key3] = _args4[_key3];
  33108. }
  33109. d = {
  33110. name: t,
  33111. type: h,
  33112. data: {
  33113. method: c,
  33114. params: u
  33115. }
  33116. };
  33117. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  33118. var n = t.data.method,
  33119. s = e.secretMethods || {},
  33120. r = s[n] || s["*"];
  33121. r && (t.secretType = r);
  33122. }(n, d);
  33123. p = !1;
  33124. _context52.prev = 5;
  33125. _context52.next = 8;
  33126. return e.callFunction(d);
  33127. case 8:
  33128. l = _context52.sent;
  33129. _context52.next = 14;
  33130. break;
  33131. case 11:
  33132. _context52.prev = 11;
  33133. _context52.t0 = _context52["catch"](5);
  33134. p = !0, l = {
  33135. result: new ne(_context52.t0)
  33136. };
  33137. case 14:
  33138. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  33139. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  33140. _context52.next = 39;
  33141. break;
  33142. }
  33143. _e27 = m;
  33144. if (!(p && o)) {
  33145. _context52.next = 24;
  33146. break;
  33147. }
  33148. _context52.next = 20;
  33149. return o({
  33150. objectName: t,
  33151. methodName: c,
  33152. params: u,
  33153. errSubject: f,
  33154. errCode: g,
  33155. errMsg: m
  33156. });
  33157. case 20:
  33158. _context52.t1 = _context52.sent.errMsg;
  33159. if (_context52.t1) {
  33160. _context52.next = 23;
  33161. break;
  33162. }
  33163. _context52.t1 = m;
  33164. case 23:
  33165. _e27 = _context52.t1;
  33166. case 24:
  33167. if (!a) {
  33168. _context52.next = 37;
  33169. break;
  33170. }
  33171. if (!("toast" === i.type)) {
  33172. _context52.next = 29;
  33173. break;
  33174. }
  33175. uni.showToast({
  33176. title: _e27,
  33177. icon: "none"
  33178. });
  33179. _context52.next = 37;
  33180. break;
  33181. case 29:
  33182. if (!("modal" !== i.type)) {
  33183. _context52.next = 31;
  33184. break;
  33185. }
  33186. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  33187. case 31:
  33188. _context52.next = 33;
  33189. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  33190. var _ref52,
  33191. e,
  33192. t,
  33193. n,
  33194. s,
  33195. r,
  33196. _args2 = arguments;
  33197. return _regenerator.default.wrap(function _callee51$(_context51) {
  33198. while (1) {
  33199. switch (_context51.prev = _context51.next) {
  33200. case 0:
  33201. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  33202. return _context51.abrupt("return", new Promise(function (i, o) {
  33203. uni.showModal({
  33204. title: e,
  33205. content: t,
  33206. showCancel: n,
  33207. cancelText: s,
  33208. confirmText: r,
  33209. success: function success(e) {
  33210. i(e);
  33211. },
  33212. fail: function fail() {
  33213. i({
  33214. confirm: !1,
  33215. cancel: !0
  33216. });
  33217. }
  33218. });
  33219. }));
  33220. case 2:
  33221. case "end":
  33222. return _context51.stop();
  33223. }
  33224. }
  33225. }, _callee51);
  33226. }))({
  33227. title: "提示",
  33228. content: _e27,
  33229. showCancel: i.retry,
  33230. cancelText: "取消",
  33231. confirmText: i.retry ? "重试" : "确定"
  33232. });
  33233. case 33:
  33234. _yield = _context52.sent;
  33235. _t18 = _yield.confirm;
  33236. if (!(i.retry && _t18)) {
  33237. _context52.next = 37;
  33238. break;
  33239. }
  33240. return _context52.abrupt("return", s.apply(void 0, u));
  33241. case 37:
  33242. _n14 = new ne({
  33243. subject: f,
  33244. code: g,
  33245. message: m,
  33246. requestId: l.requestId
  33247. });
  33248. throw _n14.detail = l.result, Q(B, {
  33249. type: H,
  33250. content: _n14
  33251. }), _n14;
  33252. case 39:
  33253. return _context52.abrupt("return", (Q(B, {
  33254. type: H,
  33255. content: l.result
  33256. }), l.result));
  33257. case 40:
  33258. case "end":
  33259. return _context52.stop();
  33260. }
  33261. }
  33262. }, _callee52, null, [[5, 11]]);
  33263. }));
  33264. function s() {
  33265. return _s14.apply(this, arguments);
  33266. }
  33267. return s;
  33268. }(),
  33269. interceptorName: "callObject",
  33270. getCallbackArgs: function getCallbackArgs() {
  33271. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33272. e = _ref53.params;
  33273. return {
  33274. objectName: t,
  33275. methodName: c,
  33276. params: e
  33277. };
  33278. }
  33279. });
  33280. }
  33281. });
  33282. };
  33283. }
  33284. function ks(e) {
  33285. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  33286. }
  33287. function Cs() {
  33288. return _Cs.apply(this, arguments);
  33289. }
  33290. function _Cs() {
  33291. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  33292. var _ref65,
  33293. e,
  33294. _ref65$callLoginByWei,
  33295. t,
  33296. n,
  33297. s,
  33298. r,
  33299. _args7 = arguments;
  33300. return _regenerator.default.wrap(function _callee55$(_context55) {
  33301. while (1) {
  33302. switch (_context55.prev = _context55.next) {
  33303. case 0:
  33304. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  33305. n = ks(this);
  33306. if (!("mp-weixin" !== P)) {
  33307. _context55.next = 4;
  33308. break;
  33309. }
  33310. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  33311. case 4:
  33312. if (!(e && t)) {
  33313. _context55.next = 6;
  33314. break;
  33315. }
  33316. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  33317. case 6:
  33318. if (!e) {
  33319. _context55.next = 8;
  33320. break;
  33321. }
  33322. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  33323. case 8:
  33324. _context55.next = 10;
  33325. return new Promise(function (e, t) {
  33326. uni.login({
  33327. success: function success(t) {
  33328. e(t.code);
  33329. },
  33330. fail: function fail(e) {
  33331. t(new Error(e.errMsg));
  33332. }
  33333. });
  33334. });
  33335. case 10:
  33336. s = _context55.sent;
  33337. r = this.importObject("uni-id-co", {
  33338. customUI: !0
  33339. });
  33340. _context55.next = 14;
  33341. return r.secureNetworkHandshakeByWeixin({
  33342. code: s,
  33343. callLoginByWeixin: t
  33344. });
  33345. case 14:
  33346. n.mpWeixinCode = s;
  33347. return _context55.abrupt("return", {
  33348. code: s
  33349. });
  33350. case 16:
  33351. case "end":
  33352. return _context55.stop();
  33353. }
  33354. }
  33355. }, _callee55, this);
  33356. }));
  33357. return _Cs.apply(this, arguments);
  33358. }
  33359. function Ts(_x37) {
  33360. return _Ts.apply(this, arguments);
  33361. }
  33362. function _Ts() {
  33363. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  33364. var t;
  33365. return _regenerator.default.wrap(function _callee56$(_context56) {
  33366. while (1) {
  33367. switch (_context56.prev = _context56.next) {
  33368. case 0:
  33369. t = ks(this);
  33370. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  33371. case 2:
  33372. case "end":
  33373. return _context56.stop();
  33374. }
  33375. }
  33376. }, _callee56, this);
  33377. }));
  33378. return _Ts.apply(this, arguments);
  33379. }
  33380. function Ps(e) {
  33381. return function () {
  33382. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33383. t = _ref54.openid,
  33384. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  33385. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  33386. return Ts.call(e, {
  33387. openid: t,
  33388. callLoginByWeixin: n
  33389. });
  33390. };
  33391. }
  33392. function As(e) {
  33393. var t = {
  33394. getSystemInfo: uni.getSystemInfo,
  33395. getPushClientId: uni.getPushClientId
  33396. };
  33397. return function (n) {
  33398. return new Promise(function (s, r) {
  33399. t[e](_objectSpread(_objectSpread({}, n), {}, {
  33400. success: function success(e) {
  33401. s(e);
  33402. },
  33403. fail: function fail(e) {
  33404. r(e);
  33405. }
  33406. }));
  33407. });
  33408. };
  33409. }
  33410. var Es = /*#__PURE__*/function (_ref55) {
  33411. (0, _inherits2.default)(Es, _ref55);
  33412. var _super12 = _createSuper(Es);
  33413. function Es() {
  33414. var _this22;
  33415. (0, _classCallCheck2.default)(this, Es);
  33416. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  33417. return _this22;
  33418. }
  33419. (0, _createClass2.default)(Es, [{
  33420. key: "init",
  33421. value: function init() {
  33422. var _this23 = this;
  33423. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  33424. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  33425. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  33426. _ref57$ = _ref57[0];
  33427. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  33428. var e = _ref57$.appId,
  33429. _ref57$2 = _ref57[1];
  33430. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  33431. var t = _ref57$2.cid;
  33432. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  33433. if (!t) throw new Error("Invalid push client id");
  33434. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  33435. }, function (e) {
  33436. throw _this23.emit("error", e), _this23.close(), e;
  33437. });
  33438. }
  33439. }, {
  33440. key: "open",
  33441. value: function () {
  33442. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  33443. return _regenerator.default.wrap(function _callee53$(_context53) {
  33444. while (1) {
  33445. switch (_context53.prev = _context53.next) {
  33446. case 0:
  33447. return _context53.abrupt("return", this.init());
  33448. case 1:
  33449. case "end":
  33450. return _context53.stop();
  33451. }
  33452. }
  33453. }, _callee53, this);
  33454. }));
  33455. function open() {
  33456. return _open.apply(this, arguments);
  33457. }
  33458. return open;
  33459. }()
  33460. }, {
  33461. key: "_isUniCloudSSE",
  33462. value: function _isUniCloudSSE(e) {
  33463. if ("receive" !== e.type) return !1;
  33464. var t = e && e.data && e.data.payload;
  33465. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  33466. }
  33467. }, {
  33468. key: "_receivePushMessage",
  33469. value: function _receivePushMessage(e) {
  33470. if (!this._isUniCloudSSE(e)) return;
  33471. var t = e && e.data && e.data.payload,
  33472. n = t.action,
  33473. s = t.messageId,
  33474. r = t.message;
  33475. this._payloadQueue.push({
  33476. action: n,
  33477. messageId: s,
  33478. message: r
  33479. }), this._consumMessage();
  33480. }
  33481. }, {
  33482. key: "_consumMessage",
  33483. value: function _consumMessage() {
  33484. var _this24 = this;
  33485. for (;;) {
  33486. var _e28 = this._payloadQueue.find(function (e) {
  33487. return e.messageId === _this24._currentMessageId + 1;
  33488. });
  33489. if (!_e28) break;
  33490. this._currentMessageId++, this._parseMessagePayload(_e28);
  33491. }
  33492. }
  33493. }, {
  33494. key: "_parseMessagePayload",
  33495. value: function _parseMessagePayload(e) {
  33496. var t = e.action,
  33497. n = e.messageId,
  33498. s = e.message;
  33499. "end" === t ? this._end({
  33500. messageId: n,
  33501. message: s
  33502. }) : "message" === t && this._appendMessage({
  33503. messageId: n,
  33504. message: s
  33505. });
  33506. }
  33507. }, {
  33508. key: "_appendMessage",
  33509. value: function _appendMessage() {
  33510. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33511. e = _ref58.messageId,
  33512. t = _ref58.message;
  33513. this.emit("message", t);
  33514. }
  33515. }, {
  33516. key: "_end",
  33517. value: function _end() {
  33518. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33519. e = _ref59.messageId,
  33520. t = _ref59.message;
  33521. this.emit("end", t), this.close();
  33522. }
  33523. }, {
  33524. key: "_initMessageListener",
  33525. value: function _initMessageListener() {
  33526. uni.onPushMessage(this._uniPushMessageCallback);
  33527. }
  33528. }, {
  33529. key: "_destroy",
  33530. value: function _destroy() {
  33531. uni.offPushMessage(this._uniPushMessageCallback);
  33532. }
  33533. }, {
  33534. key: "toJSON",
  33535. value: function toJSON() {
  33536. return {
  33537. appId: this._appId,
  33538. pushClientId: this._pushClientId,
  33539. seqId: this._seqId
  33540. };
  33541. }
  33542. }, {
  33543. key: "close",
  33544. value: function close() {
  33545. this._destroy(), this.emit("close");
  33546. }
  33547. }]);
  33548. return Es;
  33549. }( /*#__PURE__*/function () {
  33550. function _class6() {
  33551. (0, _classCallCheck2.default)(this, _class6);
  33552. this._callback = {};
  33553. }
  33554. (0, _createClass2.default)(_class6, [{
  33555. key: "addListener",
  33556. value: function addListener(e, t) {
  33557. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  33558. }
  33559. }, {
  33560. key: "on",
  33561. value: function on(e, t) {
  33562. return this.addListener(e, t);
  33563. }
  33564. }, {
  33565. key: "removeListener",
  33566. value: function removeListener(e, t) {
  33567. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  33568. var n = this._callback[e];
  33569. if (!n) return;
  33570. var s = function (e, t) {
  33571. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  33572. if (e[_n15] === t) return _n15;
  33573. }
  33574. return -1;
  33575. }(n, t);
  33576. n.splice(s, 1);
  33577. }
  33578. }, {
  33579. key: "off",
  33580. value: function off(e, t) {
  33581. return this.removeListener(e, t);
  33582. }
  33583. }, {
  33584. key: "removeAllListener",
  33585. value: function removeAllListener(e) {
  33586. delete this._callback[e];
  33587. }
  33588. }, {
  33589. key: "emit",
  33590. value: function emit(e) {
  33591. var n = this._callback[e];
  33592. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  33593. t[_key4 - 1] = arguments[_key4];
  33594. }
  33595. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  33596. n[_e29].apply(n, t);
  33597. }
  33598. }
  33599. }]);
  33600. return _class6;
  33601. }());
  33602. function Os(_x38, _x39) {
  33603. return _Os.apply(this, arguments);
  33604. }
  33605. function _Os() {
  33606. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  33607. var n, _e33, s;
  33608. return _regenerator.default.wrap(function _callee57$(_context57) {
  33609. while (1) {
  33610. switch (_context57.prev = _context57.next) {
  33611. case 0:
  33612. n = "http://".concat(e, ":").concat(t, "/system/ping");
  33613. _context57.prev = 1;
  33614. _context57.next = 4;
  33615. return s = {
  33616. url: n,
  33617. timeout: 500
  33618. }, new Promise(function (e, t) {
  33619. se.request(_objectSpread(_objectSpread({}, s), {}, {
  33620. success: function success(t) {
  33621. e(t);
  33622. },
  33623. fail: function fail(e) {
  33624. t(e);
  33625. }
  33626. }));
  33627. });
  33628. case 4:
  33629. _e33 = _context57.sent;
  33630. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  33631. case 8:
  33632. _context57.prev = 8;
  33633. _context57.t0 = _context57["catch"](1);
  33634. return _context57.abrupt("return", !1);
  33635. case 11:
  33636. case "end":
  33637. return _context57.stop();
  33638. }
  33639. }
  33640. }, _callee57, null, [[1, 8]]);
  33641. }));
  33642. return _Os.apply(this, arguments);
  33643. }
  33644. function xs(_x40) {
  33645. return _xs.apply(this, arguments);
  33646. }
  33647. function _xs() {
  33648. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  33649. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  33650. return _regenerator.default.wrap(function _callee59$(_context59) {
  33651. while (1) {
  33652. switch (_context59.prev = _context59.next) {
  33653. case 0:
  33654. if (b) {
  33655. _context59.next = 2;
  33656. break;
  33657. }
  33658. return _context59.abrupt("return", Promise.resolve());
  33659. case 2:
  33660. if ("app" === P) {
  33661. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  33662. "ios" === _e34 && function (e) {
  33663. if (!e || "string" != typeof e) return 0;
  33664. var t = e.match(/^(\d+)./);
  33665. return t && t[1] ? parseInt(t[1]) : 0;
  33666. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  33667. }
  33668. t = e.__dev__;
  33669. if (t.debugInfo) {
  33670. _context59.next = 6;
  33671. break;
  33672. }
  33673. return _context59.abrupt("return");
  33674. case 6:
  33675. _t$debugInfo = t.debugInfo;
  33676. n = _t$debugInfo.address;
  33677. s = _t$debugInfo.servePort;
  33678. _context59.next = 11;
  33679. return function () {
  33680. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  33681. var n, _s15, _r8;
  33682. return _regenerator.default.wrap(function _callee58$(_context58) {
  33683. while (1) {
  33684. switch (_context58.prev = _context58.next) {
  33685. case 0:
  33686. _s15 = 0;
  33687. case 1:
  33688. if (!(_s15 < e.length)) {
  33689. _context58.next = 11;
  33690. break;
  33691. }
  33692. _r8 = e[_s15];
  33693. _context58.next = 5;
  33694. return Os(_r8, t);
  33695. case 5:
  33696. if (!_context58.sent) {
  33697. _context58.next = 8;
  33698. break;
  33699. }
  33700. n = _r8;
  33701. return _context58.abrupt("break", 11);
  33702. case 8:
  33703. _s15++;
  33704. _context58.next = 1;
  33705. break;
  33706. case 11:
  33707. return _context58.abrupt("return", {
  33708. address: n,
  33709. port: t
  33710. });
  33711. case 12:
  33712. case "end":
  33713. return _context58.stop();
  33714. }
  33715. }
  33716. }, _callee58);
  33717. }));
  33718. return function (_x41, _x42) {
  33719. return _ref66.apply(this, arguments);
  33720. };
  33721. }()(n, s);
  33722. case 11:
  33723. _yield2 = _context59.sent;
  33724. r = _yield2.address;
  33725. if (!r) {
  33726. _context59.next = 15;
  33727. break;
  33728. }
  33729. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  33730. case 15:
  33731. i = console["app" === P ? "error" : "warn"];
  33732. o = "";
  33733. if (!("remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, o = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", "web" === P && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === P.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  33734. _context59.next = 19;
  33735. break;
  33736. }
  33737. throw new Error(o);
  33738. case 19:
  33739. i(o);
  33740. case 20:
  33741. case "end":
  33742. return _context59.stop();
  33743. }
  33744. }
  33745. }, _callee59);
  33746. }));
  33747. return _xs.apply(this, arguments);
  33748. }
  33749. function Rs(e) {
  33750. e._initPromiseHub || (e._initPromiseHub = new I({
  33751. createPromise: function createPromise() {
  33752. var t = Promise.resolve();
  33753. var n;
  33754. n = 1, t = new Promise(function (e) {
  33755. setTimeout(function () {
  33756. e();
  33757. }, n);
  33758. });
  33759. var s = e.auth();
  33760. return t.then(function () {
  33761. return s.getLoginState();
  33762. }).then(function (e) {
  33763. return e ? Promise.resolve() : s.signInAnonymously();
  33764. });
  33765. }
  33766. }));
  33767. }
  33768. var Us = {
  33769. tcb: It,
  33770. tencent: It,
  33771. aliyun: ge,
  33772. private: bt
  33773. };
  33774. var Ls = new ( /*#__PURE__*/function () {
  33775. function _class7() {
  33776. (0, _classCallCheck2.default)(this, _class7);
  33777. }
  33778. (0, _createClass2.default)(_class7, [{
  33779. key: "init",
  33780. value: function init(e) {
  33781. var t = {};
  33782. var n = Us[e.provider];
  33783. if (!n) throw new Error("未提供正确的provider参数");
  33784. t = n.init(e), b && function (e) {
  33785. if (!b) return;
  33786. var t = {};
  33787. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  33788. var n = A;
  33789. n && !n.code && (t.debugInfo = n);
  33790. var s = new I({
  33791. createPromise: function createPromise() {
  33792. return xs(e);
  33793. }
  33794. });
  33795. t.initLocalNetwork = function () {
  33796. return s.exec();
  33797. };
  33798. }(t), Rs(t), xn(t), function (e) {
  33799. var t = e.uploadFile;
  33800. e.uploadFile = function (e) {
  33801. return t.call(this, e);
  33802. };
  33803. }(t), function (e) {
  33804. e.database = function (t) {
  33805. if (t && Object.keys(t).length > 0) return e.init(t).database();
  33806. if (this._database) return this._database;
  33807. var n = Bn($n, {
  33808. uniClient: e
  33809. });
  33810. return this._database = n, n;
  33811. }, e.databaseForJQL = function (t) {
  33812. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  33813. if (this._databaseForJQL) return this._databaseForJQL;
  33814. var n = Bn($n, {
  33815. uniClient: e,
  33816. isJQL: !0
  33817. });
  33818. return this._databaseForJQL = n, n;
  33819. };
  33820. }(t), function (e) {
  33821. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  33822. get mixinDatacom() {
  33823. return Ss(e);
  33824. }
  33825. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  33826. }(t);
  33827. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  33828. if (!t[e]) return;
  33829. var n = t[e];
  33830. t[e] = function () {
  33831. return n.apply(t, Array.from(arguments));
  33832. }, t[e] = function (e, t) {
  33833. return function (n) {
  33834. var _this25 = this;
  33835. var s = !1;
  33836. if ("callFunction" === t) {
  33837. var _e30 = n && n.type || u;
  33838. s = _e30 !== u;
  33839. }
  33840. var r = "callFunction" === t && !s,
  33841. i = this._initPromiseHub.exec();
  33842. n = n || {};
  33843. var _te2 = te(n),
  33844. o = _te2.success,
  33845. a = _te2.fail,
  33846. c = _te2.complete,
  33847. h = i.then(function () {
  33848. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  33849. }).then(function () {
  33850. return e.call(_this25, n);
  33851. }).then(function (e) {
  33852. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  33853. return q(M(t, "complete"), e);
  33854. }).then(function () {
  33855. return r && Q(B, {
  33856. type: J,
  33857. content: e
  33858. }), Promise.resolve(e);
  33859. });
  33860. }, function (e) {
  33861. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  33862. return q(M(t, "complete"), e);
  33863. }).then(function () {
  33864. return Q(B, {
  33865. type: J,
  33866. content: e
  33867. }), Promise.reject(e);
  33868. });
  33869. });
  33870. if (!(o || a || c)) return h;
  33871. h.then(function (e) {
  33872. o && o(e), c && c(e), r && Q(B, {
  33873. type: J,
  33874. content: e
  33875. });
  33876. }, function (e) {
  33877. a && a(e), c && c(e), r && Q(B, {
  33878. type: J,
  33879. content: e
  33880. });
  33881. });
  33882. };
  33883. }(t[e], e).bind(t);
  33884. }), t.init = this.init, t;
  33885. }
  33886. }]);
  33887. return _class7;
  33888. }())();
  33889. (function () {
  33890. var e = E;
  33891. var t = {};
  33892. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  33893. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  33894. var _n16;
  33895. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  33896. Ls[e] = function () {
  33897. return console.error(_n16), Promise.reject(new ne({
  33898. code: "SYS_ERR",
  33899. message: _n16
  33900. }));
  33901. };
  33902. });
  33903. }
  33904. Object.assign(Ls, {
  33905. get mixinDatacom() {
  33906. return Ss(Ls);
  33907. }
  33908. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  33909. })();
  33910. var Ns = Ls;
  33911. exports.default = Ns;
  33912. /* 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"]))
  33913. /***/ }),
  33914. /***/ 495:
  33915. /*!**********************************************************************!*\
  33916. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  33917. \**********************************************************************/
  33918. /*! no static exports found */
  33919. /***/ (function(module, exports) {
  33920. function _assertThisInitialized(self) {
  33921. if (self === void 0) {
  33922. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  33923. }
  33924. return self;
  33925. }
  33926. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33927. /***/ }),
  33928. /***/ 496:
  33929. /*!*********************************************************!*\
  33930. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  33931. \*********************************************************/
  33932. /*! no static exports found */
  33933. /***/ (function(module, exports, __webpack_require__) {
  33934. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33935. function _inherits(subClass, superClass) {
  33936. if (typeof superClass !== "function" && superClass !== null) {
  33937. throw new TypeError("Super expression must either be null or a function");
  33938. }
  33939. subClass.prototype = Object.create(superClass && superClass.prototype, {
  33940. constructor: {
  33941. value: subClass,
  33942. writable: true,
  33943. configurable: true
  33944. }
  33945. });
  33946. Object.defineProperty(subClass, "prototype", {
  33947. writable: false
  33948. });
  33949. if (superClass) setPrototypeOf(subClass, superClass);
  33950. }
  33951. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33952. /***/ }),
  33953. /***/ 497:
  33954. /*!**************************************************************************!*\
  33955. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  33956. \**************************************************************************/
  33957. /*! no static exports found */
  33958. /***/ (function(module, exports, __webpack_require__) {
  33959. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  33960. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 495);
  33961. function _possibleConstructorReturn(self, call) {
  33962. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  33963. return call;
  33964. } else if (call !== void 0) {
  33965. throw new TypeError("Derived constructors may only return object or undefined");
  33966. }
  33967. return assertThisInitialized(self);
  33968. }
  33969. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33970. /***/ }),
  33971. /***/ 498:
  33972. /*!***************************************************************!*\
  33973. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  33974. \***************************************************************/
  33975. /*! no static exports found */
  33976. /***/ (function(module, exports) {
  33977. function _getPrototypeOf(o) {
  33978. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  33979. return o.__proto__ || Object.getPrototypeOf(o);
  33980. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33981. return _getPrototypeOf(o);
  33982. }
  33983. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33984. /***/ }),
  33985. /***/ 499:
  33986. /*!****************************************************************!*\
  33987. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  33988. \****************************************************************/
  33989. /*! no static exports found */
  33990. /***/ (function(module, exports, __webpack_require__) {
  33991. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 498);
  33992. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33993. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 500);
  33994. var construct = __webpack_require__(/*! ./construct.js */ 15);
  33995. function _wrapNativeSuper(Class) {
  33996. var _cache = typeof Map === "function" ? new Map() : undefined;
  33997. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  33998. if (Class === null || !isNativeFunction(Class)) return Class;
  33999. if (typeof Class !== "function") {
  34000. throw new TypeError("Super expression must either be null or a function");
  34001. }
  34002. if (typeof _cache !== "undefined") {
  34003. if (_cache.has(Class)) return _cache.get(Class);
  34004. _cache.set(Class, Wrapper);
  34005. }
  34006. function Wrapper() {
  34007. return construct(Class, arguments, getPrototypeOf(this).constructor);
  34008. }
  34009. Wrapper.prototype = Object.create(Class.prototype, {
  34010. constructor: {
  34011. value: Wrapper,
  34012. enumerable: false,
  34013. writable: true,
  34014. configurable: true
  34015. }
  34016. });
  34017. return setPrototypeOf(Wrapper, Class);
  34018. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34019. return _wrapNativeSuper(Class);
  34020. }
  34021. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34022. /***/ }),
  34023. /***/ 5:
  34024. /*!**************************************************************!*\
  34025. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  34026. \**************************************************************/
  34027. /*! no static exports found */
  34028. /***/ (function(module, exports, __webpack_require__) {
  34029. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  34030. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  34031. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  34032. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  34033. function _slicedToArray(arr, i) {
  34034. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  34035. }
  34036. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34037. /***/ }),
  34038. /***/ 50:
  34039. /*!************************************************************************************************!*\
  34040. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  34041. \************************************************************************************************/
  34042. /*! no static exports found */
  34043. /***/ (function(module, exports, __webpack_require__) {
  34044. // TODO(Babel 8): Remove this file.
  34045. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  34046. module.exports = runtime;
  34047. /***/ }),
  34048. /***/ 500:
  34049. /*!*****************************************************************!*\
  34050. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  34051. \*****************************************************************/
  34052. /*! no static exports found */
  34053. /***/ (function(module, exports) {
  34054. function _isNativeFunction(fn) {
  34055. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  34056. }
  34057. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34058. /***/ }),
  34059. /***/ 501:
  34060. /*!**************************************************************************!*\
  34061. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"origin-pages-json"} ***!
  34062. \**************************************************************************/
  34063. /*! no static exports found */
  34064. /***/ (function(module, exports, __webpack_require__) {
  34065. "use strict";
  34066. Object.defineProperty(exports, "__esModule", {
  34067. value: true
  34068. });
  34069. exports.default = void 0;
  34070. var _default = {
  34071. "easycom": {
  34072. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  34073. },
  34074. "pages": [{
  34075. "path": "pages/login/login",
  34076. "style": {
  34077. "navigationStyle": "custom"
  34078. }
  34079. }, {
  34080. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  34081. "style": {
  34082. "navigationBarTitleText": "",
  34083. "enablePullDownRefresh": false
  34084. }
  34085. }, {
  34086. "path": "pages/index/index",
  34087. "style": {
  34088. "navigationStyle": "custom"
  34089. }
  34090. }, {
  34091. "path": "pages/noLogin/uploadProject",
  34092. "style": {
  34093. "navigationStyle": "custom"
  34094. }
  34095. }, {
  34096. "path": "pages/noLogin/typeList",
  34097. "style": {
  34098. "navigationStyle": "custom"
  34099. }
  34100. }, {
  34101. "path": "pages/noLogin/communitylist",
  34102. "style": {
  34103. "navigationBarTitleText": "",
  34104. "enablePullDownRefresh": false
  34105. }
  34106. }, {
  34107. "path": "pages/noLogin/buildinglist",
  34108. "style": {
  34109. "navigationStyle": "custom"
  34110. }
  34111. }, {
  34112. "path": "pages/noLogin/unitlist",
  34113. "style": {
  34114. "navigationStyle": "custom"
  34115. }
  34116. }, {
  34117. "path": "pages/historyConstruction/historyDetail",
  34118. "style": {
  34119. "navigationStyle": "custom"
  34120. }
  34121. }, {
  34122. "path": "pages/noLogin/listProject",
  34123. "style": {
  34124. "navigationBarTitleText": "历史记录",
  34125. "enablePullDownRefresh": true
  34126. }
  34127. }, {
  34128. "path": "pages/historyConstruction/updateInfo",
  34129. "style": {
  34130. "navigationBarTitleText": "修改"
  34131. }
  34132. }, {
  34133. "path": "pages/noLogin/cityProject",
  34134. "style": {
  34135. "navigationStyle": "custom"
  34136. }
  34137. }, {
  34138. "path": "pages/noLogin/data",
  34139. "style": {
  34140. "navigationStyle": "custom"
  34141. }
  34142. }, {
  34143. "path": "pages/noLogin/list",
  34144. "style": {
  34145. "navigationBarTitleText": "列表",
  34146. "enablePullDownRefresh": true
  34147. }
  34148. }, {
  34149. "path": "pages/notice/noticeDetail",
  34150. "style": {
  34151. "navigationStyle": "custom"
  34152. }
  34153. }, {
  34154. "path": "pages/notice/noticeList",
  34155. "style": {
  34156. "navigationBarTitleText": "公告列表",
  34157. "enablePullDownRefresh": true
  34158. }
  34159. }, {
  34160. "path": "pages/cityConstrution/cityConstrution",
  34161. "style": {
  34162. "navigationStyle": "custom"
  34163. }
  34164. }, {
  34165. "path": "pages/historyConstruction/historyConstruction",
  34166. "style": {
  34167. "navigationStyle": "custom"
  34168. }
  34169. }, {
  34170. "path": "pages/service/service",
  34171. "style": {
  34172. "navigationStyle": "custom"
  34173. }
  34174. }, {
  34175. "path": "pages/aboutme/aboutme",
  34176. "style": {
  34177. "navigationStyle": "custom"
  34178. }
  34179. }, {
  34180. "path": "pages/chart/chart",
  34181. "style": {
  34182. "navigationStyle": "custom"
  34183. }
  34184. }, {
  34185. "path": "pages/chart/chartAll",
  34186. "style": {
  34187. "navigationStyle": "custom"
  34188. }
  34189. }, {
  34190. "path": "pages/chart/chartDetail",
  34191. "style": {
  34192. "navigationStyle": "custom"
  34193. }
  34194. }, {
  34195. "path": "pages/chart/newchartDetail",
  34196. "style": {
  34197. "navigationStyle": "custom"
  34198. }
  34199. }, {
  34200. "path": "pages/chart/chartList",
  34201. "style": {
  34202. "navigationBarTitleText": "工程管理"
  34203. }
  34204. }, {
  34205. "path": "pages/chart/details",
  34206. "style": {
  34207. "navigationBarTitleText": "详情"
  34208. }
  34209. }, {
  34210. "path": "pages/noLogin/repair",
  34211. "style": {
  34212. "navigationStyle": "custom"
  34213. }
  34214. }, {
  34215. "path": "pages/noLogin/My",
  34216. "style": {
  34217. "navigationStyle": "custom"
  34218. }
  34219. }, {
  34220. "path": "pages/noLogin/Myphoto",
  34221. "style": {
  34222. "navigationStyle": "custom"
  34223. }
  34224. }, {
  34225. "path": "pages/noLogin/home/home",
  34226. "style": {
  34227. "navigationBarTitleText": "",
  34228. "enablePullDownRefresh": false
  34229. }
  34230. }, {
  34231. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  34232. "style": {
  34233. "navigationBarTitleText": "",
  34234. "enablePullDownRefresh": false
  34235. }
  34236. }, {
  34237. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  34238. "style": {
  34239. "navigationBarTitleText": "",
  34240. "enablePullDownRefresh": false
  34241. }
  34242. }, {
  34243. "path": "pages/noLogin/WarningPileList",
  34244. "style": {
  34245. "navigationBarTitleText": "",
  34246. "enablePullDownRefresh": false
  34247. }
  34248. }, {
  34249. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  34250. "style": {
  34251. "navigationBarTitleText": "",
  34252. "enablePullDownRefresh": false
  34253. }
  34254. }],
  34255. "globalStyle": {
  34256. "navigationBarTextStyle": "black",
  34257. "navigationBarTitleText": "长春贞达市政施工管理平台",
  34258. "navigationBarBackgroundColor": "#F8F8F8",
  34259. "backgroundColor": "#F8F8F8"
  34260. },
  34261. "tabBar": {
  34262. "list": [{
  34263. "pagePath": "pages/index/index",
  34264. "text": "首页",
  34265. "iconPath": "static/icon/home.png",
  34266. "selectedIconPath": "static/icon/home-on.png"
  34267. }, {
  34268. "pagePath": "pages/noLogin/typeList",
  34269. "text": "工作",
  34270. "iconPath": "static/icon/work.png",
  34271. "selectedIconPath": "static/icon/work-on.png"
  34272. }]
  34273. },
  34274. "condition": {
  34275. "current": 0,
  34276. "list": [{
  34277. "name": "",
  34278. "path": "",
  34279. "query": ""
  34280. }]
  34281. }
  34282. };
  34283. exports.default = _default;
  34284. /***/ }),
  34285. /***/ 502:
  34286. /*!*************************************************************!*\
  34287. !*** E:/Desktop/zd_wechatApp(1)/pages.json?{"type":"stat"} ***!
  34288. \*************************************************************/
  34289. /*! no static exports found */
  34290. /***/ (function(module, exports, __webpack_require__) {
  34291. "use strict";
  34292. Object.defineProperty(exports, "__esModule", {
  34293. value: true
  34294. });
  34295. exports.default = void 0;
  34296. var _default = {
  34297. "appid": "__UNI__5FB7046"
  34298. };
  34299. exports.default = _default;
  34300. /***/ }),
  34301. /***/ 503:
  34302. /*!*******************************************************************************************!*\
  34303. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  34304. \*******************************************************************************************/
  34305. /*! no static exports found */
  34306. /***/ (function(module, exports, __webpack_require__) {
  34307. "use strict";
  34308. /* WEBPACK VAR INJECTION */(function(module) {/*
  34309. * uCharts®
  34310. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  34311. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  34312. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  34313. * 复制使用请保留本段注释,感谢支持开源!
  34314. *
  34315. * uCharts®官方网站
  34316. * https://www.uCharts.cn
  34317. *
  34318. * 开源地址:
  34319. * https://gitee.com/uCharts/uCharts
  34320. *
  34321. * uni-app插件市场地址:
  34322. * http://ext.dcloud.net.cn/plugin?id=271
  34323. *
  34324. */
  34325. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  34326. Object.defineProperty(exports, "__esModule", {
  34327. value: true
  34328. });
  34329. exports.default = void 0;
  34330. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  34331. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  34332. var config = {
  34333. version: 'v2.3.6-20211201',
  34334. yAxisWidth: 15,
  34335. yAxisSplit: 5,
  34336. xAxisHeight: 22,
  34337. xAxisLineHeight: 22,
  34338. legendHeight: 15,
  34339. yAxisTitleWidth: 15,
  34340. padding: [10, 10, 10, 10],
  34341. pixelRatio: 1,
  34342. rotate: false,
  34343. columePadding: 3,
  34344. fontSize: 13,
  34345. fontColor: '#666666',
  34346. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  34347. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  34348. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  34349. pieChartLinePadding: 15,
  34350. pieChartTextPadding: 5,
  34351. xAxisTextPadding: 3,
  34352. titleColor: '#333333',
  34353. titleFontSize: 20,
  34354. subtitleColor: '#999999',
  34355. subtitleFontSize: 15,
  34356. toolTipPadding: 3,
  34357. toolTipBackground: '#000000',
  34358. toolTipOpacity: 0.7,
  34359. toolTipLineHeight: 20,
  34360. radarLabelTextMargin: 13,
  34361. gaugeLabelTextMargin: 13
  34362. };
  34363. var assign = function assign(target) {
  34364. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  34365. varArgs[_key2 - 1] = arguments[_key2];
  34366. }
  34367. if (target == null) {
  34368. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  34369. }
  34370. if (!varArgs || varArgs.length <= 0) {
  34371. return target;
  34372. }
  34373. // 深度合并对象
  34374. function deepAssign(obj1, obj2) {
  34375. for (var key in obj2) {
  34376. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  34377. }
  34378. return obj1;
  34379. }
  34380. varArgs.forEach(function (val) {
  34381. target = deepAssign(target, val);
  34382. });
  34383. return target;
  34384. };
  34385. var util = {
  34386. toFixed: function toFixed(num, limit) {
  34387. limit = limit || 2;
  34388. if (this.isFloat(num)) {
  34389. num = num.toFixed(limit);
  34390. }
  34391. return num;
  34392. },
  34393. isFloat: function isFloat(num) {
  34394. return num % 1 !== 0;
  34395. },
  34396. approximatelyEqual: function approximatelyEqual(num1, num2) {
  34397. return Math.abs(num1 - num2) < 1e-10;
  34398. },
  34399. isSameSign: function isSameSign(num1, num2) {
  34400. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  34401. },
  34402. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  34403. return this.isSameSign(p1.x, p2.x);
  34404. },
  34405. isCollision: function isCollision(obj1, obj2) {
  34406. obj1.end = {};
  34407. obj1.end.x = obj1.start.x + obj1.width;
  34408. obj1.end.y = obj1.start.y - obj1.height;
  34409. obj2.end = {};
  34410. obj2.end.x = obj2.start.x + obj2.width;
  34411. obj2.end.y = obj2.start.y - obj2.height;
  34412. var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
  34413. return !flag;
  34414. }
  34415. };
  34416. //兼容H5点击事件
  34417. function getH5Offset(e) {
  34418. e.mp = {
  34419. changedTouches: []
  34420. };
  34421. e.mp.changedTouches.push({
  34422. x: e.offsetX,
  34423. y: e.offsetY
  34424. });
  34425. return e;
  34426. }
  34427. // 经纬度转墨卡托
  34428. function lonlat2mercator(longitude, latitude) {
  34429. var mercator = Array(2);
  34430. var x = longitude * 20037508.34 / 180;
  34431. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  34432. y = y * 20037508.34 / 180;
  34433. mercator[0] = x;
  34434. mercator[1] = y;
  34435. return mercator;
  34436. }
  34437. // 墨卡托转经纬度
  34438. function mercator2lonlat(longitude, latitude) {
  34439. var lonlat = Array(2);
  34440. var x = longitude / 20037508.34 * 180;
  34441. var y = latitude / 20037508.34 * 180;
  34442. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  34443. lonlat[0] = x;
  34444. lonlat[1] = y;
  34445. return lonlat;
  34446. }
  34447. // hex 转 rgba
  34448. function hexToRgb(hexValue, opc) {
  34449. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  34450. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  34451. return r + r + g + g + b + b;
  34452. });
  34453. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  34454. var r = parseInt(rgb[1], 16);
  34455. var g = parseInt(rgb[2], 16);
  34456. var b = parseInt(rgb[3], 16);
  34457. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  34458. }
  34459. function findRange(num, type, limit) {
  34460. if (isNaN(num)) {
  34461. throw new Error('[uCharts] series数据需为Number格式');
  34462. }
  34463. limit = limit || 10;
  34464. type = type ? type : 'upper';
  34465. var multiple = 1;
  34466. while (limit < 1) {
  34467. limit *= 10;
  34468. multiple *= 10;
  34469. }
  34470. if (type === 'upper') {
  34471. num = Math.ceil(num * multiple);
  34472. } else {
  34473. num = Math.floor(num * multiple);
  34474. }
  34475. while (num % limit !== 0) {
  34476. if (type === 'upper') {
  34477. num++;
  34478. } else {
  34479. num--;
  34480. }
  34481. }
  34482. return num / multiple;
  34483. }
  34484. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  34485. var seriesTemp = [];
  34486. for (var k = 0; k < dayArr.length; k++) {
  34487. var seriesItem = {
  34488. data: [],
  34489. name: nameArr[k],
  34490. color: colorArr[k]
  34491. };
  34492. for (var i = 0, len = kdata.length; i < len; i++) {
  34493. if (i < dayArr[k]) {
  34494. seriesItem.data.push(null);
  34495. continue;
  34496. }
  34497. var sum = 0;
  34498. for (var j = 0; j < dayArr[k]; j++) {
  34499. sum += kdata[i - j][1];
  34500. }
  34501. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  34502. }
  34503. seriesTemp.push(seriesItem);
  34504. }
  34505. return seriesTemp;
  34506. }
  34507. function calValidDistance(self, distance, chartData, config, opts) {
  34508. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  34509. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  34510. var validDistance = distance;
  34511. if (distance >= 0) {
  34512. validDistance = 0;
  34513. self.uevent.trigger('scrollLeft');
  34514. self.scrollOption.position = 'left';
  34515. opts.xAxis.scrollPosition = 'left';
  34516. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  34517. validDistance = dataChartAreaWidth - dataChartWidth;
  34518. self.uevent.trigger('scrollRight');
  34519. self.scrollOption.position = 'right';
  34520. opts.xAxis.scrollPosition = 'right';
  34521. } else {
  34522. self.scrollOption.position = distance;
  34523. opts.xAxis.scrollPosition = distance;
  34524. }
  34525. return validDistance;
  34526. }
  34527. function isInAngleRange(angle, startAngle, endAngle) {
  34528. function adjust(angle) {
  34529. while (angle < 0) {
  34530. angle += 2 * Math.PI;
  34531. }
  34532. while (angle > 2 * Math.PI) {
  34533. angle -= 2 * Math.PI;
  34534. }
  34535. return angle;
  34536. }
  34537. angle = adjust(angle);
  34538. startAngle = adjust(startAngle);
  34539. endAngle = adjust(endAngle);
  34540. if (startAngle > endAngle) {
  34541. endAngle += 2 * Math.PI;
  34542. if (angle < startAngle) {
  34543. angle += 2 * Math.PI;
  34544. }
  34545. }
  34546. return angle >= startAngle && angle <= endAngle;
  34547. }
  34548. function calRotateTranslate(x, y, h) {
  34549. var xv = x;
  34550. var yv = h - y;
  34551. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  34552. transX *= -1;
  34553. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  34554. return {
  34555. transX: transX,
  34556. transY: transY
  34557. };
  34558. }
  34559. function createCurveControlPoints(points, i) {
  34560. function isNotMiddlePoint(points, i) {
  34561. if (points[i - 1] && points[i + 1]) {
  34562. return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[i + 1].y);
  34563. } else {
  34564. return false;
  34565. }
  34566. }
  34567. function isNotMiddlePointX(points, i) {
  34568. if (points[i - 1] && points[i + 1]) {
  34569. return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x, points[i + 1].x);
  34570. } else {
  34571. return false;
  34572. }
  34573. }
  34574. var a = 0.2;
  34575. var b = 0.2;
  34576. var pAx = null;
  34577. var pAy = null;
  34578. var pBx = null;
  34579. var pBy = null;
  34580. if (i < 1) {
  34581. pAx = points[0].x + (points[1].x - points[0].x) * a;
  34582. pAy = points[0].y + (points[1].y - points[0].y) * a;
  34583. } else {
  34584. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  34585. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  34586. }
  34587. if (i > points.length - 3) {
  34588. var last = points.length - 1;
  34589. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  34590. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  34591. } else {
  34592. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  34593. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  34594. }
  34595. if (isNotMiddlePoint(points, i + 1)) {
  34596. pBy = points[i + 1].y;
  34597. }
  34598. if (isNotMiddlePoint(points, i)) {
  34599. pAy = points[i].y;
  34600. }
  34601. if (isNotMiddlePointX(points, i + 1)) {
  34602. pBx = points[i + 1].x;
  34603. }
  34604. if (isNotMiddlePointX(points, i)) {
  34605. pAx = points[i].x;
  34606. }
  34607. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  34608. pAy = points[i].y;
  34609. }
  34610. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  34611. pBy = points[i + 1].y;
  34612. }
  34613. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  34614. pAx = points[i].x;
  34615. }
  34616. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  34617. pBx = points[i + 1].x;
  34618. }
  34619. return {
  34620. ctrA: {
  34621. x: pAx,
  34622. y: pAy
  34623. },
  34624. ctrB: {
  34625. x: pBx,
  34626. y: pBy
  34627. }
  34628. };
  34629. }
  34630. function convertCoordinateOrigin(x, y, center) {
  34631. return {
  34632. x: center.x + x,
  34633. y: center.y - y
  34634. };
  34635. }
  34636. function avoidCollision(obj, target) {
  34637. if (target) {
  34638. // is collision test
  34639. while (util.isCollision(obj, target)) {
  34640. if (obj.start.x > 0) {
  34641. obj.start.y--;
  34642. } else if (obj.start.x < 0) {
  34643. obj.start.y++;
  34644. } else {
  34645. if (obj.start.y > 0) {
  34646. obj.start.y++;
  34647. } else {
  34648. obj.start.y--;
  34649. }
  34650. }
  34651. }
  34652. }
  34653. return obj;
  34654. }
  34655. function fixPieSeries(series, opts, config) {
  34656. var pieSeriesArr = [];
  34657. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  34658. opts._pieSeries_ = series;
  34659. var oldseries = series[0].data;
  34660. for (var i = 0; i < oldseries.length; i++) {
  34661. oldseries[i].formatter = series[0].formatter;
  34662. oldseries[i].data = oldseries[i].value;
  34663. pieSeriesArr.push(oldseries[i]);
  34664. }
  34665. opts.series = pieSeriesArr;
  34666. } else {
  34667. pieSeriesArr = series;
  34668. }
  34669. return pieSeriesArr;
  34670. }
  34671. function fillSeries(series, opts, config) {
  34672. var index = 0;
  34673. for (var i = 0; i < series.length; i++) {
  34674. var item = series[i];
  34675. if (!item.color) {
  34676. item.color = config.color[index];
  34677. index = (index + 1) % config.color.length;
  34678. }
  34679. if (!item.linearIndex) {
  34680. item.linearIndex = i;
  34681. }
  34682. if (!item.index) {
  34683. item.index = 0;
  34684. }
  34685. if (!item.type) {
  34686. item.type = opts.type;
  34687. }
  34688. if (typeof item.show == "undefined") {
  34689. item.show = true;
  34690. }
  34691. if (!item.type) {
  34692. item.type = opts.type;
  34693. }
  34694. if (!item.pointShape) {
  34695. item.pointShape = "circle";
  34696. }
  34697. if (!item.legendShape) {
  34698. switch (item.type) {
  34699. case 'line':
  34700. item.legendShape = "line";
  34701. break;
  34702. case 'column':
  34703. item.legendShape = "rect";
  34704. break;
  34705. case 'area':
  34706. item.legendShape = "triangle";
  34707. break;
  34708. case 'bar':
  34709. item.legendShape = "rect";
  34710. break;
  34711. default:
  34712. item.legendShape = "circle";
  34713. }
  34714. }
  34715. }
  34716. return series;
  34717. }
  34718. function fillCustomColor(linearType, customColor, series, config) {
  34719. var newcolor = customColor || [];
  34720. if (linearType == 'custom' && newcolor.length == 0) {
  34721. newcolor = config.linearColor;
  34722. }
  34723. if (linearType == 'custom' && newcolor.length < series.length) {
  34724. var chazhi = series.length - newcolor.length;
  34725. for (var i = 0; i < chazhi; i++) {
  34726. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  34727. }
  34728. }
  34729. return newcolor;
  34730. }
  34731. function getDataRange(minData, maxData) {
  34732. var limit = 0;
  34733. var range = maxData - minData;
  34734. if (range >= 10000) {
  34735. limit = 1000;
  34736. } else if (range >= 1000) {
  34737. limit = 100;
  34738. } else if (range >= 100) {
  34739. limit = 10;
  34740. } else if (range >= 10) {
  34741. limit = 5;
  34742. } else if (range >= 1) {
  34743. limit = 1;
  34744. } else if (range >= 0.1) {
  34745. limit = 0.1;
  34746. } else if (range >= 0.01) {
  34747. limit = 0.01;
  34748. } else if (range >= 0.001) {
  34749. limit = 0.001;
  34750. } else if (range >= 0.0001) {
  34751. limit = 0.0001;
  34752. } else if (range >= 0.00001) {
  34753. limit = 0.00001;
  34754. } else {
  34755. limit = 0.000001;
  34756. }
  34757. return {
  34758. minRange: findRange(minData, 'lower', limit),
  34759. maxRange: findRange(maxData, 'upper', limit)
  34760. };
  34761. }
  34762. function measureText(text, fontSize, context) {
  34763. var width = 0;
  34764. text = String(text);
  34765. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  34766. context.setFontSize(fontSize);
  34767. return context.measureText(text).width;
  34768. } else {
  34769. var text = text.split('');
  34770. for (var i = 0; i < text.length; i++) {
  34771. var item = text[i];
  34772. if (/[a-zA-Z]/.test(item)) {
  34773. width += 7;
  34774. } else if (/[0-9]/.test(item)) {
  34775. width += 5.5;
  34776. } else if (/\./.test(item)) {
  34777. width += 2.7;
  34778. } else if (/-/.test(item)) {
  34779. width += 3.25;
  34780. } else if (/:/.test(item)) {
  34781. width += 2.5;
  34782. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  34783. width += 10;
  34784. } else if (/\(|\)/.test(item)) {
  34785. width += 3.73;
  34786. } else if (/\s/.test(item)) {
  34787. width += 2.5;
  34788. } else if (/%/.test(item)) {
  34789. width += 8;
  34790. } else {
  34791. width += 10;
  34792. }
  34793. }
  34794. return width * fontSize / 10;
  34795. }
  34796. }
  34797. function dataCombine(series) {
  34798. return series.reduce(function (a, b) {
  34799. return (a.data ? a.data : a).concat(b.data);
  34800. }, []);
  34801. }
  34802. function dataCombineStack(series, len) {
  34803. var sum = new Array(len);
  34804. for (var j = 0; j < sum.length; j++) {
  34805. sum[j] = 0;
  34806. }
  34807. for (var i = 0; i < series.length; i++) {
  34808. for (var j = 0; j < sum.length; j++) {
  34809. sum[j] += series[i].data[j];
  34810. }
  34811. }
  34812. return series.reduce(function (a, b) {
  34813. return (a.data ? a.data : a).concat(b.data).concat(sum);
  34814. }, []);
  34815. }
  34816. function getTouches(touches, opts, e) {
  34817. var x, y;
  34818. if (touches.clientX) {
  34819. if (opts.rotate) {
  34820. y = opts.height - touches.clientX * opts.pix;
  34821. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34822. } else {
  34823. x = touches.clientX * opts.pix;
  34824. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34825. }
  34826. } else {
  34827. if (opts.rotate) {
  34828. y = opts.height - touches.x * opts.pix;
  34829. x = touches.y * opts.pix;
  34830. } else {
  34831. x = touches.x * opts.pix;
  34832. y = touches.y * opts.pix;
  34833. }
  34834. }
  34835. return {
  34836. x: x,
  34837. y: y
  34838. };
  34839. }
  34840. function getSeriesDataItem(series, index, group) {
  34841. var data = [];
  34842. var newSeries = [];
  34843. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  34844. if (indexIsArr) {
  34845. var tempSeries = filterSeries(series);
  34846. for (var i = 0; i < group.length; i++) {
  34847. newSeries.push(tempSeries[group[i]]);
  34848. }
  34849. } else {
  34850. newSeries = series;
  34851. }
  34852. ;
  34853. for (var _i = 0; _i < newSeries.length; _i++) {
  34854. var item = newSeries[_i];
  34855. var tmpindex = -1;
  34856. if (indexIsArr) {
  34857. tmpindex = index[_i];
  34858. } else {
  34859. tmpindex = index;
  34860. }
  34861. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  34862. var seriesItem = {};
  34863. seriesItem.color = item.color;
  34864. seriesItem.type = item.type;
  34865. seriesItem.style = item.style;
  34866. seriesItem.pointShape = item.pointShape;
  34867. seriesItem.disableLegend = item.disableLegend;
  34868. seriesItem.name = item.name;
  34869. seriesItem.show = item.show;
  34870. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  34871. data.push(seriesItem);
  34872. }
  34873. }
  34874. return data;
  34875. }
  34876. function getMaxTextListLength(list, fontSize, context) {
  34877. var lengthList = list.map(function (item) {
  34878. return measureText(item, fontSize, context);
  34879. });
  34880. return Math.max.apply(null, lengthList);
  34881. }
  34882. function getRadarCoordinateSeries(length) {
  34883. var eachAngle = 2 * Math.PI / length;
  34884. var CoordinateSeries = [];
  34885. for (var i = 0; i < length; i++) {
  34886. CoordinateSeries.push(eachAngle * i);
  34887. }
  34888. return CoordinateSeries.map(function (item) {
  34889. return -1 * item + Math.PI / 2;
  34890. });
  34891. }
  34892. function getToolTipData(seriesData, opts, index, group, categories) {
  34893. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  34894. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  34895. var points = {};
  34896. if (group.length > 0) {
  34897. var filterPoints = [];
  34898. for (var i = 0; i < group.length; i++) {
  34899. filterPoints.push(calPoints[group[i]]);
  34900. }
  34901. points = filterPoints[0][index[0]];
  34902. } else {
  34903. points = calPoints[0][index];
  34904. }
  34905. ;
  34906. var textList = seriesData.map(function (item) {
  34907. var titleText = null;
  34908. if (opts.categories && opts.categories.length > 0) {
  34909. titleText = categories[index];
  34910. }
  34911. ;
  34912. return {
  34913. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  34914. color: item.color
  34915. };
  34916. });
  34917. var offset = {
  34918. x: Math.round(points.x),
  34919. y: Math.round(points.y)
  34920. };
  34921. return {
  34922. textList: textList,
  34923. offset: offset
  34924. };
  34925. }
  34926. function getMixToolTipData(seriesData, opts, index, categories) {
  34927. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  34928. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  34929. var textList = seriesData.map(function (item) {
  34930. return {
  34931. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  34932. color: item.color,
  34933. disableLegend: item.disableLegend ? true : false
  34934. };
  34935. });
  34936. textList = textList.filter(function (item) {
  34937. if (item.disableLegend !== true) {
  34938. return item;
  34939. }
  34940. });
  34941. var offset = {
  34942. x: Math.round(points),
  34943. y: 0
  34944. };
  34945. return {
  34946. textList: textList,
  34947. offset: offset
  34948. };
  34949. }
  34950. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  34951. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  34952. var calPoints = opts.chartData.calPoints;
  34953. var upColor = extra.color.upFill;
  34954. var downColor = extra.color.downFill;
  34955. //颜色顺序为开盘,收盘,最低,最高
  34956. var color = [upColor, upColor, downColor, upColor];
  34957. var textList = [];
  34958. seriesData.map(function (item) {
  34959. if (index == 0) {
  34960. if (item.data[1] - item.data[0] < 0) {
  34961. color[1] = downColor;
  34962. } else {
  34963. color[1] = upColor;
  34964. }
  34965. } else {
  34966. if (item.data[0] < series[index - 1][1]) {
  34967. color[0] = downColor;
  34968. }
  34969. if (item.data[1] < item.data[0]) {
  34970. color[1] = downColor;
  34971. }
  34972. if (item.data[2] > series[index - 1][1]) {
  34973. color[2] = upColor;
  34974. }
  34975. if (item.data[3] < series[index - 1][1]) {
  34976. color[3] = downColor;
  34977. }
  34978. }
  34979. var text1 = {
  34980. text: '开盘:' + item.data[0],
  34981. color: color[0]
  34982. };
  34983. var text2 = {
  34984. text: '收盘:' + item.data[1],
  34985. color: color[1]
  34986. };
  34987. var text3 = {
  34988. text: '最低:' + item.data[2],
  34989. color: color[2]
  34990. };
  34991. var text4 = {
  34992. text: '最高:' + item.data[3],
  34993. color: color[3]
  34994. };
  34995. textList.push(text1, text2, text3, text4);
  34996. });
  34997. var validCalPoints = [];
  34998. var offset = {
  34999. x: 0,
  35000. y: 0
  35001. };
  35002. for (var i = 0; i < calPoints.length; i++) {
  35003. var points = calPoints[i];
  35004. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  35005. validCalPoints.push(points[index]);
  35006. }
  35007. }
  35008. offset.x = Math.round(validCalPoints[0][0].x);
  35009. return {
  35010. textList: textList,
  35011. offset: offset
  35012. };
  35013. }
  35014. function filterSeries(series) {
  35015. var tempSeries = [];
  35016. for (var i = 0; i < series.length; i++) {
  35017. if (series[i].show == true) {
  35018. tempSeries.push(series[i]);
  35019. }
  35020. }
  35021. return tempSeries;
  35022. }
  35023. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  35024. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35025. var current = {
  35026. index: -1,
  35027. group: []
  35028. };
  35029. var spacing = opts.chartData.eachSpacing / 2;
  35030. var xAxisPoints = [];
  35031. if (calPoints && calPoints.length > 0) {
  35032. if (!opts.categories) {
  35033. spacing = 0;
  35034. } else {
  35035. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  35036. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  35037. }
  35038. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  35039. xAxisPoints = opts.chartData.xAxisPoints;
  35040. }
  35041. }
  35042. if (isInExactChartArea(currentPoints, opts, config)) {
  35043. if (!opts.categories) {
  35044. var timePoints = Array(calPoints.length);
  35045. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  35046. timePoints[_i2] = Array(calPoints[_i2].length);
  35047. for (var j = 0; j < calPoints[_i2].length; j++) {
  35048. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  35049. }
  35050. }
  35051. ;
  35052. var pointValue = Array(timePoints.length);
  35053. var pointIndex = Array(timePoints.length);
  35054. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  35055. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  35056. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  35057. }
  35058. var minValue = Math.min.apply(null, pointValue);
  35059. current.index = [];
  35060. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  35061. if (pointValue[_i4] == minValue) {
  35062. current.group.push(_i4);
  35063. current.index.push(pointIndex[_i4]);
  35064. }
  35065. }
  35066. ;
  35067. } else {
  35068. xAxisPoints.forEach(function (item, index) {
  35069. if (currentPoints.x + offset + spacing > item) {
  35070. current.index = index;
  35071. }
  35072. });
  35073. }
  35074. }
  35075. }
  35076. return current;
  35077. }
  35078. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  35079. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35080. var current = {
  35081. index: -1,
  35082. group: []
  35083. };
  35084. var spacing = opts.chartData.eachSpacing / 2;
  35085. var yAxisPoints = opts.chartData.yAxisPoints;
  35086. if (calPoints && calPoints.length > 0) {
  35087. if (isInExactChartArea(currentPoints, opts, config)) {
  35088. yAxisPoints.forEach(function (item, index) {
  35089. if (currentPoints.y + offset + spacing > item) {
  35090. current.index = index;
  35091. }
  35092. });
  35093. }
  35094. }
  35095. return current;
  35096. }
  35097. function findLegendIndex(currentPoints, legendData, opts) {
  35098. var currentIndex = -1;
  35099. var gap = 0;
  35100. if (isInExactLegendArea(currentPoints, legendData.area)) {
  35101. var points = legendData.points;
  35102. var index = -1;
  35103. for (var i = 0, len = points.length; i < len; i++) {
  35104. var item = points[i];
  35105. for (var j = 0; j < item.length; j++) {
  35106. index += 1;
  35107. var area = item[j]['area'];
  35108. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  35109. currentIndex = index;
  35110. break;
  35111. }
  35112. }
  35113. }
  35114. return currentIndex;
  35115. }
  35116. return currentIndex;
  35117. }
  35118. function isInExactLegendArea(currentPoints, area) {
  35119. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  35120. }
  35121. function isInExactChartArea(currentPoints, opts, config) {
  35122. return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
  35123. }
  35124. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  35125. var eachAngleArea = 2 * Math.PI / count;
  35126. var currentIndex = -1;
  35127. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  35128. var fixAngle = function fixAngle(angle) {
  35129. if (angle < 0) {
  35130. angle += 2 * Math.PI;
  35131. }
  35132. if (angle > 2 * Math.PI) {
  35133. angle -= 2 * Math.PI;
  35134. }
  35135. return angle;
  35136. };
  35137. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  35138. angle = -1 * angle;
  35139. if (angle < 0) {
  35140. angle += 2 * Math.PI;
  35141. }
  35142. var angleList = radarData.angleList.map(function (item) {
  35143. item = fixAngle(-1 * item);
  35144. return item;
  35145. });
  35146. angleList.forEach(function (item, index) {
  35147. var rangeStart = fixAngle(item - eachAngleArea / 2);
  35148. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  35149. if (rangeEnd < rangeStart) {
  35150. rangeEnd += 2 * Math.PI;
  35151. }
  35152. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  35153. currentIndex = index;
  35154. }
  35155. });
  35156. }
  35157. return currentIndex;
  35158. }
  35159. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  35160. var currentIndex = -1;
  35161. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  35162. var item = funnelData.series[i];
  35163. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  35164. currentIndex = i;
  35165. break;
  35166. }
  35167. }
  35168. return currentIndex;
  35169. }
  35170. function findWordChartCurrentIndex(currentPoints, wordData) {
  35171. var currentIndex = -1;
  35172. for (var i = 0, len = wordData.length; i < len; i++) {
  35173. var item = wordData[i];
  35174. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  35175. currentIndex = i;
  35176. break;
  35177. }
  35178. }
  35179. return currentIndex;
  35180. }
  35181. function findMapChartCurrentIndex(currentPoints, opts) {
  35182. var currentIndex = -1;
  35183. var cData = opts.chartData.mapData;
  35184. var data = opts.series;
  35185. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  35186. var poi = [tmp.x, tmp.y];
  35187. for (var i = 0, len = data.length; i < len; i++) {
  35188. var item = data[i].geometry.coordinates;
  35189. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  35190. currentIndex = i;
  35191. break;
  35192. }
  35193. }
  35194. return currentIndex;
  35195. }
  35196. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  35197. var currentIndex = -1;
  35198. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  35199. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35200. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35201. angle = -angle;
  35202. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  35203. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  35204. }
  35205. for (var i = 0, len = series.length; i < len; i++) {
  35206. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  35207. currentIndex = i;
  35208. break;
  35209. }
  35210. }
  35211. }
  35212. return currentIndex;
  35213. }
  35214. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  35215. var currentIndex = -1;
  35216. var series = getPieDataPoints(pieData.series);
  35217. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35218. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35219. angle = -angle;
  35220. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  35221. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  35222. }
  35223. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  35224. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  35225. }
  35226. for (var i = 0, len = series.length; i < len; i++) {
  35227. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  35228. currentIndex = i;
  35229. break;
  35230. }
  35231. }
  35232. }
  35233. return currentIndex;
  35234. }
  35235. function isInExactPieChartArea(currentPoints, center, radius) {
  35236. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  35237. }
  35238. function splitPoints(points, eachSeries) {
  35239. var newPoints = [];
  35240. var items = [];
  35241. points.forEach(function (item, index) {
  35242. if (eachSeries.connectNulls) {
  35243. if (item !== null) {
  35244. items.push(item);
  35245. }
  35246. } else {
  35247. if (item !== null) {
  35248. items.push(item);
  35249. } else {
  35250. if (items.length) {
  35251. newPoints.push(items);
  35252. }
  35253. items = [];
  35254. }
  35255. }
  35256. });
  35257. if (items.length) {
  35258. newPoints.push(items);
  35259. }
  35260. return newPoints;
  35261. }
  35262. function calLegendData(series, opts, config, chartData, context) {
  35263. var legendData = {
  35264. area: {
  35265. start: {
  35266. x: 0,
  35267. y: 0
  35268. },
  35269. end: {
  35270. x: 0,
  35271. y: 0
  35272. },
  35273. width: 0,
  35274. height: 0,
  35275. wholeWidth: 0,
  35276. wholeHeight: 0
  35277. },
  35278. points: [],
  35279. widthArr: [],
  35280. heightArr: []
  35281. };
  35282. if (opts.legend.show === false) {
  35283. chartData.legendData = legendData;
  35284. return legendData;
  35285. }
  35286. var padding = opts.legend.padding * opts.pix;
  35287. var margin = opts.legend.margin * opts.pix;
  35288. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  35289. var shapeWidth = 15 * opts.pix;
  35290. var shapeRight = 5 * opts.pix;
  35291. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  35292. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  35293. var legendList = [];
  35294. var widthCount = 0;
  35295. var widthCountArr = [];
  35296. var currentRow = [];
  35297. for (var i = 0; i < series.length; i++) {
  35298. var item = series[i];
  35299. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35300. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  35301. legendList.push(currentRow);
  35302. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35303. widthCount = itemWidth;
  35304. currentRow = [item];
  35305. } else {
  35306. widthCount += itemWidth;
  35307. currentRow.push(item);
  35308. }
  35309. }
  35310. if (currentRow.length) {
  35311. legendList.push(currentRow);
  35312. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35313. legendData.widthArr = widthCountArr;
  35314. var legendWidth = Math.max.apply(null, widthCountArr);
  35315. switch (opts.legend.float) {
  35316. case 'left':
  35317. legendData.area.start.x = opts.area[3];
  35318. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  35319. break;
  35320. case 'right':
  35321. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  35322. legendData.area.end.x = opts.width - opts.area[1];
  35323. break;
  35324. default:
  35325. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  35326. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  35327. }
  35328. legendData.area.width = legendWidth + 2 * padding;
  35329. legendData.area.wholeWidth = legendWidth + 2 * padding;
  35330. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  35331. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  35332. legendData.points = legendList;
  35333. }
  35334. } else {
  35335. var len = series.length;
  35336. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  35337. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  35338. legendData.area.height = maxLength * lineHeight + padding * 2;
  35339. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  35340. switch (opts.legend.float) {
  35341. case 'top':
  35342. legendData.area.start.y = opts.area[0] + margin;
  35343. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35344. break;
  35345. case 'bottom':
  35346. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  35347. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35348. break;
  35349. default:
  35350. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  35351. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  35352. }
  35353. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  35354. var _currentRow = [];
  35355. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  35356. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  35357. _currentRow.push(temp);
  35358. }
  35359. legendData.points = _currentRow;
  35360. if (_currentRow.length) {
  35361. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  35362. var _item = _currentRow[_i6];
  35363. var maxWidth = 0;
  35364. for (var j = 0; j < _item.length; j++) {
  35365. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35366. if (_itemWidth > maxWidth) {
  35367. maxWidth = _itemWidth;
  35368. }
  35369. }
  35370. legendData.widthArr.push(maxWidth);
  35371. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  35372. }
  35373. var _legendWidth = 0;
  35374. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  35375. _legendWidth += legendData.widthArr[_i7];
  35376. }
  35377. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  35378. legendData.area.wholeWidth = legendData.area.width + padding;
  35379. }
  35380. }
  35381. switch (opts.legend.position) {
  35382. case 'top':
  35383. legendData.area.start.y = opts.area[0] + margin;
  35384. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35385. break;
  35386. case 'bottom':
  35387. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  35388. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35389. break;
  35390. case 'left':
  35391. legendData.area.start.x = opts.area[3];
  35392. legendData.area.end.x = opts.area[3] + legendData.area.width;
  35393. break;
  35394. case 'right':
  35395. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  35396. legendData.area.end.x = opts.width - opts.area[1];
  35397. break;
  35398. }
  35399. chartData.legendData = legendData;
  35400. return legendData;
  35401. }
  35402. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  35403. var result = {
  35404. angle: 0,
  35405. xAxisHeight: config.xAxisHeight
  35406. };
  35407. var categoriesTextLenth = categories.map(function (item) {
  35408. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35409. });
  35410. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  35411. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35412. result.angle = 45 * Math.PI / 180;
  35413. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35414. }
  35415. return result;
  35416. }
  35417. function getXAxisTextList(series, opts, config, stack) {
  35418. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  35419. var data;
  35420. if (stack == 'stack') {
  35421. data = dataCombineStack(series, opts.categories.length);
  35422. } else {
  35423. data = dataCombine(series);
  35424. }
  35425. var sorted = [];
  35426. // remove null from data
  35427. data = data.filter(function (item) {
  35428. //return item !== null;
  35429. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35430. if (item.constructor.toString().indexOf('Array') > -1) {
  35431. return item !== null;
  35432. } else {
  35433. return item.value !== null;
  35434. }
  35435. } else {
  35436. return item !== null;
  35437. }
  35438. });
  35439. data.map(function (item) {
  35440. if ((0, _typeof2.default)(item) === 'object') {
  35441. if (item.constructor.toString().indexOf('Array') > -1) {
  35442. if (opts.type == 'candle') {
  35443. item.map(function (subitem) {
  35444. sorted.push(subitem);
  35445. });
  35446. } else {
  35447. sorted.push(item[0]);
  35448. }
  35449. } else {
  35450. sorted.push(item.value);
  35451. }
  35452. } else {
  35453. sorted.push(item);
  35454. }
  35455. });
  35456. var minData = 0;
  35457. var maxData = 0;
  35458. if (sorted.length > 0) {
  35459. minData = Math.min.apply(this, sorted);
  35460. maxData = Math.max.apply(this, sorted);
  35461. }
  35462. //为了兼容v1.9.0之前的项目
  35463. if (index > -1) {
  35464. if (typeof opts.xAxis.data[index].min === 'number') {
  35465. minData = Math.min(opts.xAxis.data[index].min, minData);
  35466. }
  35467. if (typeof opts.xAxis.data[index].max === 'number') {
  35468. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  35469. }
  35470. } else {
  35471. if (typeof opts.xAxis.min === 'number') {
  35472. minData = Math.min(opts.xAxis.min, minData);
  35473. }
  35474. if (typeof opts.xAxis.max === 'number') {
  35475. maxData = Math.max(opts.xAxis.max, maxData);
  35476. }
  35477. }
  35478. if (minData === maxData) {
  35479. var rangeSpan = maxData || 10;
  35480. maxData += rangeSpan;
  35481. }
  35482. //var dataRange = getDataRange(minData, maxData);
  35483. var minRange = minData;
  35484. var maxRange = maxData;
  35485. var range = [];
  35486. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  35487. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  35488. range.push(minRange + eachRange * i);
  35489. }
  35490. return range;
  35491. }
  35492. function calXAxisData(series, opts, config, context) {
  35493. //堆叠图重算Y轴
  35494. var columnstyle = assign({}, {
  35495. type: ""
  35496. }, opts.extra.bar);
  35497. var result = {
  35498. angle: 0,
  35499. xAxisHeight: config.xAxisHeight
  35500. };
  35501. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  35502. result.rangesFormat = result.ranges.map(function (item) {
  35503. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  35504. item = util.toFixed(item, 2);
  35505. return item;
  35506. });
  35507. var xAxisScaleValues = result.ranges.map(function (item) {
  35508. // 如果刻度值是浮点数,则保留两位小数
  35509. item = util.toFixed(item, 2);
  35510. // 若有自定义格式则调用自定义的格式化函数
  35511. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  35512. return item;
  35513. });
  35514. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  35515. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  35516. var eachSpacing = result.eachSpacing;
  35517. var textLength = xAxisScaleValues.map(function (item) {
  35518. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35519. });
  35520. // get max length of categories text
  35521. var maxTextLength = Math.max.apply(this, textLength);
  35522. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  35523. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35524. result.angle = 45 * Math.PI / 180;
  35525. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35526. }
  35527. if (opts.xAxis.disabled === true) {
  35528. result.xAxisHeight = 0;
  35529. }
  35530. return result;
  35531. }
  35532. function getRadarDataPoints(angleList, center, radius, series, opts) {
  35533. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  35534. var radarOption = opts.extra.radar || {};
  35535. radarOption.max = radarOption.max || 0;
  35536. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  35537. var data = [];
  35538. var _loop2 = function _loop2(i) {
  35539. var each = series[i];
  35540. var listItem = {};
  35541. listItem.color = each.color;
  35542. listItem.legendShape = each.legendShape;
  35543. listItem.pointShape = each.pointShape;
  35544. listItem.data = [];
  35545. each.data.forEach(function (item, index) {
  35546. var tmp = {};
  35547. tmp.angle = angleList[index];
  35548. tmp.proportion = item / maxData;
  35549. tmp.value = item;
  35550. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  35551. listItem.data.push(tmp);
  35552. });
  35553. data.push(listItem);
  35554. };
  35555. for (var i = 0; i < series.length; i++) {
  35556. _loop2(i);
  35557. }
  35558. return data;
  35559. }
  35560. function getPieDataPoints(series, radius) {
  35561. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35562. var count = 0;
  35563. var _start_ = 0;
  35564. for (var i = 0; i < series.length; i++) {
  35565. var item = series[i];
  35566. item.data = item.data === null ? 0 : item.data;
  35567. count += item.data;
  35568. }
  35569. for (var _i8 = 0; _i8 < series.length; _i8++) {
  35570. var _item2 = series[_i8];
  35571. _item2.data = _item2.data === null ? 0 : _item2.data;
  35572. if (count === 0) {
  35573. _item2._proportion_ = 1 / series.length * process;
  35574. } else {
  35575. _item2._proportion_ = _item2.data / count * process;
  35576. }
  35577. _item2._radius_ = radius;
  35578. }
  35579. for (var _i9 = 0; _i9 < series.length; _i9++) {
  35580. var _item3 = series[_i9];
  35581. _item3._start_ = _start_;
  35582. _start_ += 2 * _item3._proportion_ * Math.PI;
  35583. }
  35584. return series;
  35585. }
  35586. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  35587. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35588. series = series.sort(function (a, b) {
  35589. return parseInt(b.data) - parseInt(a.data);
  35590. });
  35591. for (var i = 0; i < series.length; i++) {
  35592. if (type == 'funnel') {
  35593. series[i].radius = series[i].data / series[0].data * radius * process;
  35594. } else {
  35595. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  35596. }
  35597. series[i]._proportion_ = series[i].data / series[0].data;
  35598. }
  35599. if (type !== 'pyramid') {
  35600. series.reverse();
  35601. }
  35602. return series;
  35603. }
  35604. function getRoseDataPoints(series, type, minRadius, radius) {
  35605. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35606. var count = 0;
  35607. var _start_ = 0;
  35608. var dataArr = [];
  35609. for (var i = 0; i < series.length; i++) {
  35610. var item = series[i];
  35611. item.data = item.data === null ? 0 : item.data;
  35612. count += item.data;
  35613. dataArr.push(item.data);
  35614. }
  35615. var minData = Math.min.apply(null, dataArr);
  35616. var maxData = Math.max.apply(null, dataArr);
  35617. var radiusLength = radius - minRadius;
  35618. for (var _i10 = 0; _i10 < series.length; _i10++) {
  35619. var _item4 = series[_i10];
  35620. _item4.data = _item4.data === null ? 0 : _item4.data;
  35621. if (count === 0) {
  35622. _item4._proportion_ = 1 / series.length * process;
  35623. _item4._rose_proportion_ = 1 / series.length * process;
  35624. } else {
  35625. _item4._proportion_ = _item4.data / count * process;
  35626. if (type == 'area') {
  35627. _item4._rose_proportion_ = 1 / series.length * process;
  35628. } else {
  35629. _item4._rose_proportion_ = _item4.data / count * process;
  35630. }
  35631. }
  35632. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  35633. }
  35634. for (var _i11 = 0; _i11 < series.length; _i11++) {
  35635. var _item5 = series[_i11];
  35636. _item5._start_ = _start_;
  35637. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  35638. }
  35639. return series;
  35640. }
  35641. function getArcbarDataPoints(series, arcbarOption) {
  35642. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35643. if (process == 1) {
  35644. process = 0.999999;
  35645. }
  35646. for (var i = 0; i < series.length; i++) {
  35647. var item = series[i];
  35648. item.data = item.data === null ? 0 : item.data;
  35649. var totalAngle = void 0;
  35650. if (arcbarOption.type == 'circle') {
  35651. totalAngle = 2;
  35652. } else {
  35653. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  35654. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  35655. } else {
  35656. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  35657. }
  35658. }
  35659. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  35660. if (item._proportion_ >= 2) {
  35661. item._proportion_ = item._proportion_ % 2;
  35662. }
  35663. }
  35664. return series;
  35665. }
  35666. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  35667. var totalAngle = startAngle - endAngle + 1;
  35668. var tempStartAngle = startAngle;
  35669. for (var i = 0; i < categories.length; i++) {
  35670. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  35671. categories[i]._startAngle_ = tempStartAngle;
  35672. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  35673. if (categories[i]._endAngle_ >= 2) {
  35674. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  35675. }
  35676. tempStartAngle = categories[i]._endAngle_;
  35677. }
  35678. return categories;
  35679. }
  35680. function getGaugeDataPoints(series, categories, gaugeOption) {
  35681. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  35682. for (var i = 0; i < series.length; i++) {
  35683. var item = series[i];
  35684. item.data = item.data === null ? 0 : item.data;
  35685. if (gaugeOption.pointer.color == 'auto') {
  35686. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  35687. if (item.data <= categories[_i12].value) {
  35688. item.color = categories[_i12].color;
  35689. break;
  35690. }
  35691. }
  35692. } else {
  35693. item.color = gaugeOption.pointer.color;
  35694. }
  35695. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  35696. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  35697. item._oldAngle_ = gaugeOption.oldAngle;
  35698. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  35699. item._oldAngle_ += 2;
  35700. }
  35701. if (item.data >= gaugeOption.oldData) {
  35702. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  35703. } else {
  35704. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  35705. }
  35706. if (item._proportion_ >= 2) {
  35707. item._proportion_ = item._proportion_ % 2;
  35708. }
  35709. }
  35710. return series;
  35711. }
  35712. function getPieTextMaxLength(series, config, context, opts) {
  35713. series = getPieDataPoints(series);
  35714. var maxLength = 0;
  35715. for (var i = 0; i < series.length; i++) {
  35716. var item = series[i];
  35717. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  35718. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  35719. }
  35720. return maxLength;
  35721. }
  35722. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  35723. return points.map(function (item) {
  35724. if (item === null) {
  35725. return null;
  35726. }
  35727. var seriesGap = 0;
  35728. var categoryGap = 0;
  35729. if (opts.type == 'mix') {
  35730. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  35731. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  35732. } else {
  35733. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  35734. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35735. }
  35736. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35737. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35738. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35739. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  35740. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  35741. }
  35742. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35743. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35744. }
  35745. if (item.width <= 0) {
  35746. item.width = 1;
  35747. }
  35748. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35749. return item;
  35750. });
  35751. }
  35752. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  35753. return points.map(function (item) {
  35754. if (item === null) {
  35755. return null;
  35756. }
  35757. var seriesGap = 0;
  35758. var categoryGap = 0;
  35759. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  35760. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35761. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35762. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35763. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35764. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35765. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35766. }
  35767. if (item.width <= 0) {
  35768. item.width = 1;
  35769. }
  35770. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35771. return item;
  35772. });
  35773. }
  35774. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  35775. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35776. return points.map(function (item) {
  35777. if (item === null) {
  35778. return null;
  35779. }
  35780. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35781. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35782. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35783. }
  35784. if (index > 0) {
  35785. item.width -= 2 * border;
  35786. }
  35787. return item;
  35788. });
  35789. }
  35790. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35791. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35792. return points.map(function (item, indexn) {
  35793. if (item === null) {
  35794. return null;
  35795. }
  35796. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35797. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35798. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35799. }
  35800. if (item.width <= 0) {
  35801. item.width = 1;
  35802. }
  35803. return item;
  35804. });
  35805. }
  35806. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35807. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35808. return points.map(function (item, indexn) {
  35809. if (item === null) {
  35810. return null;
  35811. }
  35812. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35813. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35814. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35815. }
  35816. if (item.width <= 0) {
  35817. item.width = 1;
  35818. }
  35819. return item;
  35820. });
  35821. }
  35822. function getXAxisPoints(categories, opts, config) {
  35823. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  35824. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  35825. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  35826. dataCount -= 1;
  35827. }
  35828. var eachSpacing = spacingValid / dataCount;
  35829. var xAxisPoints = [];
  35830. var startX = opts.area[3];
  35831. var endX = opts.width - opts.area[1];
  35832. categories.forEach(function (item, index) {
  35833. xAxisPoints.push(startX + index * eachSpacing);
  35834. });
  35835. if (opts.xAxis.boundaryGap !== 'justify') {
  35836. if (opts.enableScroll === true) {
  35837. xAxisPoints.push(startX + categories.length * eachSpacing);
  35838. } else {
  35839. xAxisPoints.push(endX);
  35840. }
  35841. }
  35842. return {
  35843. xAxisPoints: xAxisPoints,
  35844. startX: startX,
  35845. endX: endX,
  35846. eachSpacing: eachSpacing
  35847. };
  35848. }
  35849. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35850. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35851. var points = [];
  35852. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35853. data.forEach(function (item, index) {
  35854. if (item === null) {
  35855. points.push(null);
  35856. } else {
  35857. var cPoints = [];
  35858. item.forEach(function (items, indexs) {
  35859. var point = {};
  35860. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35861. var value = items.value || items;
  35862. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35863. height *= process;
  35864. point.y = opts.height - Math.round(height) - opts.area[2];
  35865. cPoints.push(point);
  35866. });
  35867. points.push(cPoints);
  35868. }
  35869. });
  35870. return points;
  35871. }
  35872. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35873. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35874. var boundaryGap = 'center';
  35875. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  35876. boundaryGap = opts.xAxis.boundaryGap;
  35877. }
  35878. var points = [];
  35879. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35880. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35881. data.forEach(function (item, index) {
  35882. if (item === null) {
  35883. points.push(null);
  35884. } else {
  35885. var point = {};
  35886. point.color = item.color;
  35887. point.x = xAxisPoints[index];
  35888. var value = item;
  35889. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35890. if (item.constructor.toString().indexOf('Array') > -1) {
  35891. var xranges, xminRange, xmaxRange;
  35892. xranges = [].concat(opts.chartData.xAxisData.ranges);
  35893. xminRange = xranges.shift();
  35894. xmaxRange = xranges.pop();
  35895. value = item[1];
  35896. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  35897. if (opts.type == 'bubble') {
  35898. point.r = item[2];
  35899. point.t = item[3];
  35900. }
  35901. } else {
  35902. value = item.value;
  35903. }
  35904. }
  35905. if (boundaryGap == 'center') {
  35906. point.x += eachSpacing / 2;
  35907. }
  35908. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35909. height *= process;
  35910. point.y = opts.height - height - opts.area[2];
  35911. points.push(point);
  35912. }
  35913. });
  35914. return points;
  35915. }
  35916. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  35917. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35918. var points = [];
  35919. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35920. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35921. data.forEach(function (item, index) {
  35922. if (item === null) {
  35923. points.push(null);
  35924. } else {
  35925. var point = {};
  35926. point.color = item.color;
  35927. point.y = yAxisPoints[index];
  35928. var value = item;
  35929. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35930. value = item.value;
  35931. }
  35932. var height = validWidth * (value - minRange) / (maxRange - minRange);
  35933. height *= process;
  35934. point.height = height;
  35935. point.value = value;
  35936. point.x = height + opts.area[3];
  35937. points.push(point);
  35938. }
  35939. });
  35940. return points;
  35941. }
  35942. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35943. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35944. var points = [];
  35945. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35946. data.forEach(function (item, index) {
  35947. if (item === null) {
  35948. points.push(null);
  35949. } else {
  35950. var point = {};
  35951. point.color = item.color;
  35952. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35953. if (seriesIndex > 0) {
  35954. var value = 0;
  35955. for (var i = 0; i <= seriesIndex; i++) {
  35956. value += stackSeries[i].data[index];
  35957. }
  35958. var value0 = value - item;
  35959. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35960. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35961. } else {
  35962. var value = item;
  35963. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35964. var height0 = 0;
  35965. }
  35966. var heightc = height0;
  35967. height *= process;
  35968. heightc *= process;
  35969. point.y = opts.height - Math.round(height) - opts.area[2];
  35970. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  35971. points.push(point);
  35972. }
  35973. });
  35974. return points;
  35975. }
  35976. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35977. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35978. var points = [];
  35979. var validHeight = opts.width - opts.area[1] - opts.area[3];
  35980. data.forEach(function (item, index) {
  35981. if (item === null) {
  35982. points.push(null);
  35983. } else {
  35984. var point = {};
  35985. point.color = item.color;
  35986. point.y = yAxisPoints[index];
  35987. if (seriesIndex > 0) {
  35988. var value = 0;
  35989. for (var i = 0; i <= seriesIndex; i++) {
  35990. value += stackSeries[i].data[index];
  35991. }
  35992. var value0 = value - item;
  35993. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35994. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35995. } else {
  35996. var value = item;
  35997. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35998. var height0 = 0;
  35999. }
  36000. var heightc = height0;
  36001. height *= process;
  36002. heightc *= process;
  36003. point.height = height - heightc;
  36004. point.x = opts.area[3] + height;
  36005. point.x0 = opts.area[3] + heightc;
  36006. points.push(point);
  36007. }
  36008. });
  36009. return points;
  36010. }
  36011. function getYAxisTextList(series, opts, config, stack, yData) {
  36012. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  36013. var data;
  36014. if (stack == 'stack') {
  36015. data = dataCombineStack(series, opts.categories.length);
  36016. } else {
  36017. data = dataCombine(series);
  36018. }
  36019. var sorted = [];
  36020. // remove null from data
  36021. data = data.filter(function (item) {
  36022. //return item !== null;
  36023. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36024. if (item.constructor.toString().indexOf('Array') > -1) {
  36025. return item !== null;
  36026. } else {
  36027. return item.value !== null;
  36028. }
  36029. } else {
  36030. return item !== null;
  36031. }
  36032. });
  36033. data.map(function (item) {
  36034. if ((0, _typeof2.default)(item) === 'object') {
  36035. if (item.constructor.toString().indexOf('Array') > -1) {
  36036. if (opts.type == 'candle') {
  36037. item.map(function (subitem) {
  36038. sorted.push(subitem);
  36039. });
  36040. } else {
  36041. sorted.push(item[1]);
  36042. }
  36043. } else {
  36044. sorted.push(item.value);
  36045. }
  36046. } else {
  36047. sorted.push(item);
  36048. }
  36049. });
  36050. var minData = yData.min || 0;
  36051. var maxData = yData.max || 0;
  36052. if (sorted.length > 0) {
  36053. minData = Math.min.apply(this, sorted);
  36054. maxData = Math.max.apply(this, sorted);
  36055. }
  36056. //为了兼容v1.9.0之前的项目
  36057. // if (index > -1) {
  36058. // if (typeof opts.yAxis.data[index].min === 'number') {
  36059. // minData = Math.min(opts.yAxis.data[index].min, minData);
  36060. // }
  36061. // if (typeof opts.yAxis.data[index].max === 'number') {
  36062. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  36063. // }
  36064. // } else {
  36065. // if (typeof opts.yAxis.min === 'number') {
  36066. // minData = Math.min(opts.yAxis.min, minData);
  36067. // }
  36068. // if (typeof opts.yAxis.max === 'number') {
  36069. // maxData = Math.max(opts.yAxis.max, maxData);
  36070. // }
  36071. // }
  36072. if (minData === maxData) {
  36073. var rangeSpan = maxData || 10;
  36074. maxData += rangeSpan;
  36075. }
  36076. var dataRange = getDataRange(minData, maxData);
  36077. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  36078. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  36079. var range = [];
  36080. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  36081. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  36082. range.push(minRange + eachRange * i);
  36083. }
  36084. return range.reverse();
  36085. }
  36086. function calYAxisData(series, opts, config, context) {
  36087. //堆叠图重算Y轴
  36088. var columnstyle = assign({}, {
  36089. type: ""
  36090. }, opts.extra.column);
  36091. //如果是多Y轴,重新计算
  36092. var YLength = opts.yAxis.data.length;
  36093. var newSeries = new Array(YLength);
  36094. if (YLength > 0) {
  36095. for (var i = 0; i < YLength; i++) {
  36096. newSeries[i] = [];
  36097. for (var j = 0; j < series.length; j++) {
  36098. if (series[j].index == i) {
  36099. newSeries[i].push(series[j]);
  36100. }
  36101. }
  36102. }
  36103. var rangesArr = new Array(YLength);
  36104. var rangesFormatArr = new Array(YLength);
  36105. var yAxisWidthArr = new Array(YLength);
  36106. var _loop3 = function _loop3(_i13) {
  36107. var yData = opts.yAxis.data[_i13];
  36108. //如果总开关不显示,强制每个Y轴为不显示
  36109. if (opts.yAxis.disabled == true) {
  36110. yData.disabled = true;
  36111. }
  36112. if (yData.type === 'categories') {
  36113. if (!yData.formatter) {
  36114. yData.formatter = function (val) {
  36115. return val + (yData.unit || '');
  36116. };
  36117. }
  36118. yData.categories = yData.categories || opts.categories;
  36119. rangesArr[_i13] = yData.categories;
  36120. } else {
  36121. if (!yData.formatter) {
  36122. yData.formatter = function (val) {
  36123. return val.toFixed(yData.tofix) + (yData.unit || '');
  36124. };
  36125. }
  36126. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  36127. }
  36128. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  36129. yAxisWidthArr[_i13] = {
  36130. position: yData.position ? yData.position : 'left',
  36131. width: 0
  36132. };
  36133. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  36134. items = yData.formatter(items);
  36135. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  36136. return items;
  36137. });
  36138. var calibration = yData.calibration ? 4 * opts.pix : 0;
  36139. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  36140. if (yData.disabled === true) {
  36141. yAxisWidthArr[_i13].width = 0;
  36142. }
  36143. };
  36144. for (var _i13 = 0; _i13 < YLength; _i13++) {
  36145. _loop3(_i13);
  36146. }
  36147. } else {
  36148. var rangesArr = new Array(1);
  36149. var rangesFormatArr = new Array(1);
  36150. var yAxisWidthArr = new Array(1);
  36151. if (opts.type === 'bar') {
  36152. rangesArr[0] = opts.categories;
  36153. if (!opts.yAxis.formatter) {
  36154. opts.yAxis.formatter = function (val) {
  36155. return val + (opts.yAxis.unit || '');
  36156. };
  36157. }
  36158. } else {
  36159. if (!opts.yAxis.formatter) {
  36160. opts.yAxis.formatter = function (val) {
  36161. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  36162. };
  36163. }
  36164. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  36165. }
  36166. yAxisWidthArr[0] = {
  36167. position: 'left',
  36168. width: 0
  36169. };
  36170. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  36171. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  36172. item = opts.yAxis.formatter(item);
  36173. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  36174. return item;
  36175. });
  36176. yAxisWidthArr[0].width += 3 * opts.pix;
  36177. if (opts.yAxis.disabled === true) {
  36178. yAxisWidthArr[0] = {
  36179. position: 'left',
  36180. width: 0
  36181. };
  36182. opts.yAxis.data[0] = {
  36183. disabled: true
  36184. };
  36185. } else {
  36186. opts.yAxis.data[0] = {
  36187. disabled: false,
  36188. position: 'left',
  36189. max: opts.yAxis.max,
  36190. min: opts.yAxis.min,
  36191. formatter: opts.yAxis.formatter
  36192. };
  36193. if (opts.type === 'bar') {
  36194. opts.yAxis.data[0].categories = opts.categories;
  36195. opts.yAxis.data[0].type = 'categories';
  36196. }
  36197. }
  36198. }
  36199. return {
  36200. rangesFormat: rangesFormatArr,
  36201. ranges: rangesArr,
  36202. yAxisWidth: yAxisWidthArr
  36203. };
  36204. }
  36205. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  36206. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  36207. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36208. var minAxis = opts.area[0];
  36209. var items = [];
  36210. for (var i = 0; i < ranges.length; i++) {
  36211. var maxVal = ranges[i].shift();
  36212. var minVal = ranges[i].pop();
  36213. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  36214. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  36215. items.push(String(item));
  36216. }
  36217. return items;
  36218. }
  36219. function calMarkLineData(points, opts) {
  36220. var minRange, maxRange;
  36221. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36222. for (var i = 0; i < points.length; i++) {
  36223. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  36224. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  36225. minRange = range.pop();
  36226. maxRange = range.shift();
  36227. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  36228. points[i].y = opts.height - Math.round(height) - opts.area[2];
  36229. }
  36230. return points;
  36231. }
  36232. function contextRotate(context, opts) {
  36233. if (opts.rotateLock !== true) {
  36234. context.translate(opts.height, 0);
  36235. context.rotate(90 * Math.PI / 180);
  36236. } else if (opts._rotate_ !== true) {
  36237. context.translate(opts.height, 0);
  36238. context.rotate(90 * Math.PI / 180);
  36239. opts._rotate_ = true;
  36240. }
  36241. }
  36242. function drawPointShape(points, color, shape, context, opts) {
  36243. context.beginPath();
  36244. if (opts.dataPointShapeType == 'hollow') {
  36245. context.setStrokeStyle(color);
  36246. context.setFillStyle(opts.background);
  36247. context.setLineWidth(2 * opts.pix);
  36248. } else {
  36249. context.setStrokeStyle("#ffffff");
  36250. context.setFillStyle(color);
  36251. context.setLineWidth(1 * opts.pix);
  36252. }
  36253. if (shape === 'diamond') {
  36254. points.forEach(function (item, index) {
  36255. if (item !== null) {
  36256. context.moveTo(item.x, item.y - 4.5);
  36257. context.lineTo(item.x - 4.5, item.y);
  36258. context.lineTo(item.x, item.y + 4.5);
  36259. context.lineTo(item.x + 4.5, item.y);
  36260. context.lineTo(item.x, item.y - 4.5);
  36261. }
  36262. });
  36263. } else if (shape === 'circle') {
  36264. points.forEach(function (item, index) {
  36265. if (item !== null) {
  36266. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  36267. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  36268. }
  36269. });
  36270. } else if (shape === 'square') {
  36271. points.forEach(function (item, index) {
  36272. if (item !== null) {
  36273. context.moveTo(item.x - 3.5, item.y - 3.5);
  36274. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  36275. }
  36276. });
  36277. } else if (shape === 'triangle') {
  36278. points.forEach(function (item, index) {
  36279. if (item !== null) {
  36280. context.moveTo(item.x, item.y - 4.5);
  36281. context.lineTo(item.x - 4.5, item.y + 4.5);
  36282. context.lineTo(item.x + 4.5, item.y + 4.5);
  36283. context.lineTo(item.x, item.y - 4.5);
  36284. }
  36285. });
  36286. } else if (shape === 'triangle') {
  36287. return;
  36288. }
  36289. context.closePath();
  36290. context.fill();
  36291. context.stroke();
  36292. }
  36293. function drawRingTitle(opts, config, context, center) {
  36294. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  36295. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  36296. var title = opts.title.name || '';
  36297. var subtitle = opts.subtitle.name || '';
  36298. var titleFontColor = opts.title.color || opts.fontColor;
  36299. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  36300. var titleHeight = title ? titlefontSize : 0;
  36301. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  36302. var margin = 5;
  36303. if (subtitle) {
  36304. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  36305. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  36306. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  36307. if (title) {
  36308. startY += (titleHeight * opts.pix + margin) / 2;
  36309. }
  36310. context.beginPath();
  36311. context.setFontSize(subtitlefontSize * opts.pix);
  36312. context.setFillStyle(subtitleFontColor);
  36313. context.fillText(subtitle, startX, startY);
  36314. context.closePath();
  36315. context.stroke();
  36316. }
  36317. if (title) {
  36318. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  36319. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  36320. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  36321. if (subtitle) {
  36322. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  36323. }
  36324. context.beginPath();
  36325. context.setFontSize(titlefontSize * opts.pix);
  36326. context.setFillStyle(titleFontColor);
  36327. context.fillText(title, _startX, _startY);
  36328. context.closePath();
  36329. context.stroke();
  36330. }
  36331. }
  36332. function drawPointText(points, series, config, context, opts) {
  36333. // 绘制数据文案
  36334. var data = series.data;
  36335. var textOffset = series.textOffset ? series.textOffset : 0;
  36336. points.forEach(function (item, index) {
  36337. if (item !== null) {
  36338. context.beginPath();
  36339. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36340. context.setFontSize(fontSize);
  36341. context.setFillStyle(series.textColor || opts.fontColor);
  36342. var value = data[index];
  36343. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36344. if (data[index].constructor.toString().indexOf('Array') > -1) {
  36345. value = data[index][1];
  36346. } else {
  36347. value = data[index].value;
  36348. }
  36349. }
  36350. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36351. context.setTextAlign('center');
  36352. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  36353. context.closePath();
  36354. context.stroke();
  36355. context.setTextAlign('left');
  36356. }
  36357. });
  36358. }
  36359. function drawBarPointText(points, series, config, context, opts) {
  36360. // 绘制数据文案
  36361. var data = series.data;
  36362. var textOffset = series.textOffset ? series.textOffset : 0;
  36363. points.forEach(function (item, index) {
  36364. if (item !== null) {
  36365. context.beginPath();
  36366. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36367. context.setFontSize(fontSize);
  36368. context.setFillStyle(series.textColor || opts.fontColor);
  36369. var value = data[index];
  36370. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36371. value = data[index].value;
  36372. }
  36373. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36374. context.setTextAlign('left');
  36375. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  36376. context.closePath();
  36377. context.stroke();
  36378. }
  36379. });
  36380. }
  36381. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  36382. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  36383. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  36384. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  36385. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  36386. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  36387. var nowAngle = gaugeOption.startAngle;
  36388. var nowNumber = gaugeOption.startNumber;
  36389. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  36390. var pos = {
  36391. x: radius * Math.cos(nowAngle * Math.PI),
  36392. y: radius * Math.sin(nowAngle * Math.PI)
  36393. };
  36394. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  36395. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  36396. pos.y += centerPosition.y;
  36397. var startX = pos.x;
  36398. var startY = pos.y;
  36399. context.beginPath();
  36400. context.setFontSize(config.fontSize);
  36401. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  36402. context.fillText(labelText, startX, startY + config.fontSize / 2);
  36403. context.closePath();
  36404. context.stroke();
  36405. nowAngle += splitAngle;
  36406. if (nowAngle >= 2) {
  36407. nowAngle = nowAngle % 2;
  36408. }
  36409. nowNumber += splitNumber;
  36410. }
  36411. }
  36412. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  36413. var radarOption = opts.extra.radar || {};
  36414. radius += config.radarLabelTextMargin * opts.pix;
  36415. angleList.forEach(function (angle, index) {
  36416. var pos = {
  36417. x: radius * Math.cos(angle),
  36418. y: radius * Math.sin(angle)
  36419. };
  36420. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  36421. var startX = posRelativeCanvas.x;
  36422. var startY = posRelativeCanvas.y;
  36423. if (util.approximatelyEqual(pos.x, 0)) {
  36424. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  36425. } else if (pos.x < 0) {
  36426. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  36427. }
  36428. context.beginPath();
  36429. context.setFontSize(config.fontSize);
  36430. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  36431. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  36432. context.closePath();
  36433. context.stroke();
  36434. });
  36435. }
  36436. function drawPieText(series, opts, config, context, radius, center) {
  36437. var lineRadius = config.pieChartLinePadding;
  36438. var textObjectCollection = [];
  36439. var lastTextObject = null;
  36440. var seriesConvert = series.map(function (item, index, series) {
  36441. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  36442. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  36443. if (item._rose_proportion_) {
  36444. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  36445. }
  36446. var color = item.color;
  36447. var radius = item._radius_;
  36448. return {
  36449. arc: arc,
  36450. text: text,
  36451. color: color,
  36452. radius: radius,
  36453. textColor: item.textColor,
  36454. textSize: item.textSize
  36455. };
  36456. });
  36457. for (var i = 0; i < seriesConvert.length; i++) {
  36458. var item = seriesConvert[i];
  36459. // line end
  36460. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  36461. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  36462. // line start
  36463. var orginX2 = Math.cos(item.arc) * item.radius;
  36464. var orginY2 = Math.sin(item.arc) * item.radius;
  36465. // text start
  36466. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  36467. var orginY3 = orginY1;
  36468. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  36469. var startY = orginY3;
  36470. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  36471. x: orginX3
  36472. })) {
  36473. if (orginX3 > 0) {
  36474. startY = Math.min(orginY3, lastTextObject.start.y);
  36475. } else if (orginX1 < 0) {
  36476. startY = Math.max(orginY3, lastTextObject.start.y);
  36477. } else {
  36478. if (orginY3 > 0) {
  36479. startY = Math.max(orginY3, lastTextObject.start.y);
  36480. } else {
  36481. startY = Math.min(orginY3, lastTextObject.start.y);
  36482. }
  36483. }
  36484. }
  36485. if (orginX3 < 0) {
  36486. orginX3 -= textWidth;
  36487. }
  36488. var textObject = {
  36489. lineStart: {
  36490. x: orginX2,
  36491. y: orginY2
  36492. },
  36493. lineEnd: {
  36494. x: orginX1,
  36495. y: orginY1
  36496. },
  36497. start: {
  36498. x: orginX3,
  36499. y: startY
  36500. },
  36501. width: textWidth,
  36502. height: config.fontSize,
  36503. text: item.text,
  36504. color: item.color,
  36505. textColor: item.textColor,
  36506. textSize: item.textSize
  36507. };
  36508. lastTextObject = avoidCollision(textObject, lastTextObject);
  36509. textObjectCollection.push(lastTextObject);
  36510. }
  36511. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  36512. var _item6 = textObjectCollection[_i14];
  36513. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  36514. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  36515. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  36516. context.setLineWidth(1 * opts.pix);
  36517. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36518. context.beginPath();
  36519. context.setStrokeStyle(_item6.color);
  36520. context.setFillStyle(_item6.color);
  36521. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36522. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  36523. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  36524. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  36525. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36526. context.stroke();
  36527. context.closePath();
  36528. context.beginPath();
  36529. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  36530. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  36531. context.closePath();
  36532. context.fill();
  36533. context.beginPath();
  36534. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36535. context.setFillStyle(_item6.textColor || opts.fontColor);
  36536. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  36537. context.closePath();
  36538. context.stroke();
  36539. context.closePath();
  36540. }
  36541. }
  36542. function drawToolTipSplitLine(offsetX, opts, config, context) {
  36543. var toolTipOption = opts.extra.tooltip || {};
  36544. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  36545. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  36546. var startY = opts.area[0];
  36547. var endY = opts.height - opts.area[2];
  36548. if (toolTipOption.gridType == 'dash') {
  36549. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36550. }
  36551. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36552. context.setLineWidth(1 * opts.pix);
  36553. context.beginPath();
  36554. context.moveTo(offsetX, startY);
  36555. context.lineTo(offsetX, endY);
  36556. context.stroke();
  36557. context.setLineDash([]);
  36558. if (toolTipOption.xAxisLabel) {
  36559. var labelText = opts.categories[opts.tooltip.index];
  36560. context.setFontSize(config.fontSize);
  36561. var textWidth = measureText(labelText, config.fontSize, context);
  36562. var textX = offsetX - 0.5 * textWidth;
  36563. var textY = endY;
  36564. context.beginPath();
  36565. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36566. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36567. context.setLineWidth(1 * opts.pix);
  36568. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  36569. context.closePath();
  36570. context.stroke();
  36571. context.fill();
  36572. context.beginPath();
  36573. context.setFontSize(config.fontSize);
  36574. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36575. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  36576. context.closePath();
  36577. context.stroke();
  36578. }
  36579. }
  36580. function drawMarkLine(opts, config, context) {
  36581. var markLineOption = assign({}, {
  36582. type: 'solid',
  36583. dashLength: 4,
  36584. data: []
  36585. }, opts.extra.markLine);
  36586. var startX = opts.area[3];
  36587. var endX = opts.width - opts.area[1];
  36588. var points = calMarkLineData(markLineOption.data, opts);
  36589. for (var i = 0; i < points.length; i++) {
  36590. var item = assign({}, {
  36591. lineColor: '#DE4A42',
  36592. showLabel: false,
  36593. labelFontColor: '#666666',
  36594. labelBgColor: '#DFE8FF',
  36595. labelBgOpacity: 0.8,
  36596. yAxisIndex: 0
  36597. }, points[i]);
  36598. if (markLineOption.type == 'dash') {
  36599. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  36600. }
  36601. context.setStrokeStyle(item.lineColor);
  36602. context.setLineWidth(1 * opts.pix);
  36603. context.beginPath();
  36604. context.moveTo(startX, item.y);
  36605. context.lineTo(endX, item.y);
  36606. context.stroke();
  36607. context.setLineDash([]);
  36608. if (item.showLabel) {
  36609. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  36610. context.setFontSize(config.fontSize);
  36611. var textWidth = measureText(labelText, config.fontSize, context);
  36612. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  36613. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  36614. var bgEndX = opts.area[3];
  36615. var bgWidth = bgEndX - bgStartX;
  36616. var textX = bgEndX - config.toolTipPadding;
  36617. var textY = item.y;
  36618. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  36619. context.setStrokeStyle(item.labelBgColor);
  36620. context.setLineWidth(1 * opts.pix);
  36621. context.beginPath();
  36622. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36623. context.closePath();
  36624. context.stroke();
  36625. context.fill();
  36626. context.setFontSize(config.fontSize);
  36627. context.setTextAlign('right');
  36628. context.setFillStyle(item.labelFontColor);
  36629. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  36630. context.stroke();
  36631. context.setTextAlign('left');
  36632. }
  36633. }
  36634. }
  36635. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  36636. var toolTipOption = assign({}, {
  36637. gridType: 'solid',
  36638. dashLength: 4
  36639. }, opts.extra.tooltip);
  36640. var startX = opts.area[3];
  36641. var endX = opts.width - opts.area[1];
  36642. if (toolTipOption.gridType == 'dash') {
  36643. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36644. }
  36645. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36646. context.setLineWidth(1 * opts.pix);
  36647. context.beginPath();
  36648. context.moveTo(startX, opts.tooltip.offset.y);
  36649. context.lineTo(endX, opts.tooltip.offset.y);
  36650. context.stroke();
  36651. context.setLineDash([]);
  36652. if (toolTipOption.yAxisLabel) {
  36653. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  36654. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  36655. var tStartLeft = opts.area[3];
  36656. var tStartRight = opts.width - opts.area[1];
  36657. for (var i = 0; i < labelText.length; i++) {
  36658. context.setFontSize(config.fontSize);
  36659. var textWidth = measureText(labelText[i], config.fontSize, context);
  36660. var bgStartX = void 0,
  36661. bgEndX = void 0,
  36662. bgWidth = void 0;
  36663. if (widthArr[i].position == 'left') {
  36664. bgStartX = tStartLeft - widthArr[i].width;
  36665. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  36666. } else {
  36667. bgStartX = tStartRight;
  36668. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  36669. }
  36670. bgWidth = bgEndX - bgStartX;
  36671. var textX = bgStartX + (bgWidth - textWidth) / 2;
  36672. var textY = opts.tooltip.offset.y;
  36673. context.beginPath();
  36674. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36675. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36676. context.setLineWidth(1 * opts.pix);
  36677. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36678. context.closePath();
  36679. context.stroke();
  36680. context.fill();
  36681. context.beginPath();
  36682. context.setFontSize(config.fontSize);
  36683. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36684. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  36685. context.closePath();
  36686. context.stroke();
  36687. if (widthArr[i].position == 'left') {
  36688. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  36689. } else {
  36690. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  36691. }
  36692. }
  36693. }
  36694. }
  36695. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36696. var toolTipOption = assign({}, {
  36697. activeBgColor: '#000000',
  36698. activeBgOpacity: 0.08
  36699. }, opts.extra.column);
  36700. var startY = opts.area[0];
  36701. var endY = opts.height - opts.area[2];
  36702. context.beginPath();
  36703. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36704. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  36705. context.closePath();
  36706. context.fill();
  36707. context.setFillStyle("#FFFFFF");
  36708. }
  36709. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36710. var toolTipOption = assign({}, {
  36711. activeBgColor: '#000000',
  36712. activeBgOpacity: 0.08
  36713. }, opts.extra.bar);
  36714. var startX = opts.area[3];
  36715. var endX = opts.width - opts.area[1];
  36716. context.beginPath();
  36717. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36718. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  36719. context.closePath();
  36720. context.fill();
  36721. context.setFillStyle("#FFFFFF");
  36722. }
  36723. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  36724. var toolTipOption = assign({}, {
  36725. showBox: true,
  36726. showArrow: true,
  36727. showCategory: false,
  36728. bgColor: '#000000',
  36729. bgOpacity: 0.7,
  36730. borderColor: '#000000',
  36731. borderWidth: 0,
  36732. borderRadius: 0,
  36733. borderOpacity: 0.7,
  36734. fontColor: '#FFFFFF',
  36735. splitLine: true
  36736. }, opts.extra.tooltip);
  36737. if (toolTipOption.showCategory == true && opts.categories) {
  36738. textList.unshift({
  36739. text: opts.categories[opts.tooltip.index],
  36740. color: null
  36741. });
  36742. }
  36743. var legendWidth = 4 * opts.pix;
  36744. var legendMarginRight = 5 * opts.pix;
  36745. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  36746. var isOverRightBorder = false;
  36747. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  36748. if (toolTipOption.splitLine == true) {
  36749. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  36750. }
  36751. }
  36752. offset = assign({
  36753. x: 0,
  36754. y: 0
  36755. }, offset);
  36756. offset.y -= 8 * opts.pix;
  36757. var textWidth = textList.map(function (item) {
  36758. return measureText(item.text, config.fontSize, context);
  36759. });
  36760. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  36761. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  36762. if (toolTipOption.showBox == false) {
  36763. return;
  36764. }
  36765. // if beyond the right border
  36766. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  36767. isOverRightBorder = true;
  36768. }
  36769. if (toolTipHeight + offset.y > opts.height) {
  36770. offset.y = opts.height - toolTipHeight;
  36771. }
  36772. // draw background rect
  36773. context.beginPath();
  36774. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  36775. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  36776. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  36777. var radius = toolTipOption.borderRadius;
  36778. if (isOverRightBorder) {
  36779. if (toolTipOption.showArrow) {
  36780. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36781. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36782. }
  36783. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36784. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36785. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36786. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36787. if (toolTipOption.showArrow) {
  36788. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36789. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36790. }
  36791. } else {
  36792. if (toolTipOption.showArrow) {
  36793. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36794. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36795. }
  36796. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36797. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36798. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36799. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36800. if (toolTipOption.showArrow) {
  36801. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36802. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36803. }
  36804. }
  36805. context.closePath();
  36806. context.fill();
  36807. if (toolTipOption.borderWidth > 0) {
  36808. context.stroke();
  36809. }
  36810. // draw legend
  36811. textList.forEach(function (item, index) {
  36812. if (item.color !== null) {
  36813. context.beginPath();
  36814. context.setFillStyle(item.color);
  36815. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  36816. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  36817. if (isOverRightBorder) {
  36818. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  36819. }
  36820. context.fillRect(startX, startY, legendWidth, config.fontSize);
  36821. context.closePath();
  36822. }
  36823. });
  36824. // draw text list
  36825. textList.forEach(function (item, index) {
  36826. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  36827. if (isOverRightBorder) {
  36828. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  36829. }
  36830. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  36831. context.beginPath();
  36832. context.setFontSize(config.fontSize);
  36833. context.setFillStyle(toolTipOption.fontColor);
  36834. context.fillText(item.text, startX, startY + config.fontSize);
  36835. context.closePath();
  36836. context.stroke();
  36837. });
  36838. }
  36839. function drawColumnDataPoints(series, opts, config, context) {
  36840. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36841. var xAxisData = opts.chartData.xAxisData,
  36842. xAxisPoints = xAxisData.xAxisPoints,
  36843. eachSpacing = xAxisData.eachSpacing;
  36844. var columnOption = assign({}, {
  36845. type: 'group',
  36846. width: eachSpacing / 2,
  36847. meterBorder: 4,
  36848. meterFillColor: '#FFFFFF',
  36849. barBorderCircle: false,
  36850. barBorderRadius: [],
  36851. seriesGap: 2,
  36852. linearType: 'none',
  36853. linearOpacity: 1,
  36854. customColor: [],
  36855. colorStop: 0
  36856. }, opts.extra.column);
  36857. var calPoints = [];
  36858. context.save();
  36859. var leftNum = -2;
  36860. var rightNum = xAxisPoints.length + 2;
  36861. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36862. context.translate(opts._scrollDistance_, 0);
  36863. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36864. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36865. }
  36866. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36867. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  36868. }
  36869. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36870. series.forEach(function (eachSeries, seriesIndex) {
  36871. var ranges, minRange, maxRange;
  36872. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36873. minRange = ranges.pop();
  36874. maxRange = ranges.shift();
  36875. var data = eachSeries.data;
  36876. switch (columnOption.type) {
  36877. case 'group':
  36878. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36879. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36880. calPoints.push(tooltipPoints);
  36881. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36882. for (var i = 0; i < points.length; i++) {
  36883. var item = points[i];
  36884. //fix issues/I27B1N yyoinge & Joeshu
  36885. if (item !== null && i > leftNum && i < rightNum) {
  36886. var startX = item.x - item.width / 2;
  36887. var height = opts.height - item.y - opts.area[2];
  36888. context.beginPath();
  36889. var fillColor = item.color || eachSeries.color;
  36890. var strokeColor = item.color || eachSeries.color;
  36891. if (columnOption.linearType !== 'none') {
  36892. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  36893. //透明渐变
  36894. if (columnOption.linearType == 'opacity') {
  36895. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36896. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36897. } else {
  36898. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36899. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36900. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36901. }
  36902. fillColor = grd;
  36903. }
  36904. // 圆角边框
  36905. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36906. var left = startX;
  36907. var top = item.y;
  36908. var width = item.width;
  36909. var _height = opts.height - opts.area[2] - item.y;
  36910. if (columnOption.barBorderCircle) {
  36911. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36912. }
  36913. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36914. r0 = _columnOption$barBord[0],
  36915. r1 = _columnOption$barBord[1],
  36916. r2 = _columnOption$barBord[2],
  36917. r3 = _columnOption$barBord[3];
  36918. var minRadius = Math.min(width / 2, _height / 2);
  36919. r0 = r0 > minRadius ? minRadius : r0;
  36920. r1 = r1 > minRadius ? minRadius : r1;
  36921. r2 = r2 > minRadius ? minRadius : r2;
  36922. r3 = r3 > minRadius ? minRadius : r3;
  36923. r0 = r0 < 0 ? 0 : r0;
  36924. r1 = r1 < 0 ? 0 : r1;
  36925. r2 = r2 < 0 ? 0 : r2;
  36926. r3 = r3 < 0 ? 0 : r3;
  36927. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  36928. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  36929. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  36930. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  36931. } else {
  36932. context.moveTo(startX, item.y);
  36933. context.lineTo(startX + item.width - 2, item.y);
  36934. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  36935. context.lineTo(startX, opts.height - opts.area[2]);
  36936. context.lineTo(startX, item.y);
  36937. context.setLineWidth(1);
  36938. context.setStrokeStyle(strokeColor);
  36939. }
  36940. context.setFillStyle(fillColor);
  36941. context.closePath();
  36942. //context.stroke();
  36943. context.fill();
  36944. }
  36945. }
  36946. ;
  36947. break;
  36948. case 'stack':
  36949. // 绘制堆叠数据图
  36950. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36951. calPoints.push(points);
  36952. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36953. for (var _i15 = 0; _i15 < points.length; _i15++) {
  36954. var _item7 = points[_i15];
  36955. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  36956. context.beginPath();
  36957. var fillColor = _item7.color || eachSeries.color;
  36958. var startX = _item7.x - _item7.width / 2 + 1;
  36959. var height = opts.height - _item7.y - opts.area[2];
  36960. var height0 = opts.height - _item7.y0 - opts.area[2];
  36961. if (seriesIndex > 0) {
  36962. height -= height0;
  36963. }
  36964. context.setFillStyle(fillColor);
  36965. context.moveTo(startX, _item7.y);
  36966. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  36967. context.closePath();
  36968. context.fill();
  36969. }
  36970. }
  36971. ;
  36972. break;
  36973. case 'meter':
  36974. // 绘制温度计数据图
  36975. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36976. calPoints.push(points);
  36977. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  36978. if (seriesIndex == 0) {
  36979. for (var _i16 = 0; _i16 < points.length; _i16++) {
  36980. var _item8 = points[_i16];
  36981. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  36982. //画背景颜色
  36983. context.beginPath();
  36984. context.setFillStyle(columnOption.meterFillColor);
  36985. var startX = _item8.x - _item8.width / 2;
  36986. var height = opts.height - _item8.y - opts.area[2];
  36987. if (columnOption.barBorderCircle) {
  36988. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  36989. if (barBorderRadius > height) {
  36990. barBorderRadius = height;
  36991. }
  36992. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  36993. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  36994. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  36995. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  36996. context.lineTo(startX, opts.height - opts.area[2]);
  36997. context.fill();
  36998. } else {
  36999. context.moveTo(startX, _item8.y);
  37000. context.fillRect(startX, _item8.y, _item8.width, height);
  37001. context.closePath();
  37002. context.fill();
  37003. }
  37004. //画边框线
  37005. if (columnOption.meterBorder > 0) {
  37006. context.beginPath();
  37007. context.setStrokeStyle(eachSeries.color);
  37008. context.setLineWidth(columnOption.meterBorder * opts.pix);
  37009. if (columnOption.barBorderCircle) {
  37010. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  37011. if (barBorderRadius > height) {
  37012. barBorderRadius = height;
  37013. }
  37014. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37015. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  37016. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  37017. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37018. } else {
  37019. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  37020. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37021. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37022. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  37023. }
  37024. context.stroke();
  37025. }
  37026. }
  37027. }
  37028. ;
  37029. } else {
  37030. for (var _i17 = 0; _i17 < points.length; _i17++) {
  37031. var _item9 = points[_i17];
  37032. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  37033. context.beginPath();
  37034. context.setFillStyle(_item9.color || eachSeries.color);
  37035. var startX = _item9.x - _item9.width / 2;
  37036. var height = opts.height - _item9.y - opts.area[2];
  37037. if (columnOption.barBorderCircle) {
  37038. var barBorderRadius = _item9.width / 2;
  37039. if (barBorderRadius > height) {
  37040. barBorderRadius = height;
  37041. }
  37042. context.moveTo(startX, opts.height - opts.area[2]);
  37043. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  37044. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  37045. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  37046. context.lineTo(startX, opts.height - opts.area[2]);
  37047. context.fill();
  37048. } else {
  37049. context.moveTo(startX, _item9.y);
  37050. context.fillRect(startX, _item9.y, _item9.width, height);
  37051. context.closePath();
  37052. context.fill();
  37053. }
  37054. }
  37055. }
  37056. ;
  37057. }
  37058. break;
  37059. }
  37060. });
  37061. if (opts.dataLabel !== false && process === 1) {
  37062. series.forEach(function (eachSeries, seriesIndex) {
  37063. var ranges, minRange, maxRange;
  37064. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37065. minRange = ranges.pop();
  37066. maxRange = ranges.shift();
  37067. var data = eachSeries.data;
  37068. switch (columnOption.type) {
  37069. case 'group':
  37070. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37071. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37072. drawPointText(points, eachSeries, config, context, opts);
  37073. break;
  37074. case 'stack':
  37075. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37076. drawPointText(points, eachSeries, config, context, opts);
  37077. break;
  37078. case 'meter':
  37079. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37080. drawPointText(points, eachSeries, config, context, opts);
  37081. break;
  37082. }
  37083. });
  37084. }
  37085. context.restore();
  37086. return {
  37087. xAxisPoints: xAxisPoints,
  37088. calPoints: calPoints,
  37089. eachSpacing: eachSpacing
  37090. };
  37091. }
  37092. function drawBarDataPoints(series, opts, config, context) {
  37093. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37094. var yAxisPoints = [];
  37095. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  37096. for (var i = 0; i < opts.categories.length; i++) {
  37097. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  37098. }
  37099. var columnOption = assign({}, {
  37100. type: 'group',
  37101. width: eachSpacing / 2,
  37102. meterBorder: 4,
  37103. meterFillColor: '#FFFFFF',
  37104. barBorderCircle: false,
  37105. barBorderRadius: [],
  37106. seriesGap: 2,
  37107. linearType: 'none',
  37108. linearOpacity: 1,
  37109. customColor: [],
  37110. colorStop: 0
  37111. }, opts.extra.bar);
  37112. var calPoints = [];
  37113. context.save();
  37114. var leftNum = -2;
  37115. var rightNum = yAxisPoints.length + 2;
  37116. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  37117. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  37118. }
  37119. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37120. series.forEach(function (eachSeries, seriesIndex) {
  37121. var ranges, minRange, maxRange;
  37122. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37123. maxRange = ranges.pop();
  37124. minRange = ranges.shift();
  37125. var data = eachSeries.data;
  37126. switch (columnOption.type) {
  37127. case 'group':
  37128. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37129. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37130. calPoints.push(tooltipPoints);
  37131. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37132. for (var _i18 = 0; _i18 < points.length; _i18++) {
  37133. var item = points[_i18];
  37134. //fix issues/I27B1N yyoinge & Joeshu
  37135. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  37136. //var startX = item.x - item.width / 2;
  37137. var startX = opts.area[3];
  37138. var startY = item.y - item.width / 2;
  37139. var height = item.height;
  37140. context.beginPath();
  37141. var fillColor = item.color || eachSeries.color;
  37142. var strokeColor = item.color || eachSeries.color;
  37143. if (columnOption.linearType !== 'none') {
  37144. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  37145. //透明渐变
  37146. if (columnOption.linearType == 'opacity') {
  37147. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37148. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37149. } else {
  37150. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37151. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37152. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37153. }
  37154. fillColor = grd;
  37155. }
  37156. // 圆角边框
  37157. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  37158. var left = startX;
  37159. var width = item.width;
  37160. var top = item.y - item.width / 2;
  37161. var _height2 = item.heigh;
  37162. if (columnOption.barBorderCircle) {
  37163. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37164. }
  37165. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37166. r0 = _columnOption$barBord2[0],
  37167. r1 = _columnOption$barBord2[1],
  37168. r2 = _columnOption$barBord2[2],
  37169. r3 = _columnOption$barBord2[3];
  37170. var minRadius = Math.min(width / 2, _height2 / 2);
  37171. r0 = r0 > minRadius ? minRadius : r0;
  37172. r1 = r1 > minRadius ? minRadius : r1;
  37173. r2 = r2 > minRadius ? minRadius : r2;
  37174. r3 = r3 > minRadius ? minRadius : r3;
  37175. r0 = r0 < 0 ? 0 : r0;
  37176. r1 = r1 < 0 ? 0 : r1;
  37177. r2 = r2 < 0 ? 0 : r2;
  37178. r3 = r3 < 0 ? 0 : r3;
  37179. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  37180. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  37181. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  37182. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  37183. } else {
  37184. context.moveTo(startX, startY);
  37185. context.lineTo(item.x, startY);
  37186. context.lineTo(item.x, startY + item.width - 2);
  37187. context.lineTo(startX, startY + item.width - 2);
  37188. context.lineTo(startX, startY);
  37189. context.setLineWidth(1);
  37190. context.setStrokeStyle(strokeColor);
  37191. }
  37192. context.setFillStyle(fillColor);
  37193. context.closePath();
  37194. //context.stroke();
  37195. context.fill();
  37196. }
  37197. }
  37198. ;
  37199. break;
  37200. case 'stack':
  37201. // 绘制堆叠数据图
  37202. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37203. calPoints.push(points);
  37204. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  37205. for (var _i19 = 0; _i19 < points.length; _i19++) {
  37206. var _item10 = points[_i19];
  37207. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  37208. context.beginPath();
  37209. var fillColor = _item10.color || eachSeries.color;
  37210. var startX = _item10.x0;
  37211. context.setFillStyle(fillColor);
  37212. context.moveTo(startX, _item10.y - _item10.width / 2);
  37213. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  37214. context.closePath();
  37215. context.fill();
  37216. }
  37217. }
  37218. ;
  37219. break;
  37220. }
  37221. });
  37222. if (opts.dataLabel !== false && process === 1) {
  37223. series.forEach(function (eachSeries, seriesIndex) {
  37224. var ranges, minRange, maxRange;
  37225. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37226. maxRange = ranges.pop();
  37227. minRange = ranges.shift();
  37228. var data = eachSeries.data;
  37229. switch (columnOption.type) {
  37230. case 'group':
  37231. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37232. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37233. drawBarPointText(points, eachSeries, config, context, opts);
  37234. break;
  37235. case 'stack':
  37236. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37237. drawBarPointText(points, eachSeries, config, context, opts);
  37238. break;
  37239. }
  37240. });
  37241. }
  37242. return {
  37243. yAxisPoints: yAxisPoints,
  37244. calPoints: calPoints,
  37245. eachSpacing: eachSpacing
  37246. };
  37247. }
  37248. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  37249. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37250. var candleOption = assign({}, {
  37251. color: {},
  37252. average: {}
  37253. }, opts.extra.candle);
  37254. candleOption.color = assign({}, {
  37255. upLine: '#f04864',
  37256. upFill: '#f04864',
  37257. downLine: '#2fc25b',
  37258. downFill: '#2fc25b'
  37259. }, candleOption.color);
  37260. candleOption.average = assign({}, {
  37261. show: false,
  37262. name: [],
  37263. day: [],
  37264. color: config.color
  37265. }, candleOption.average);
  37266. opts.extra.candle = candleOption;
  37267. var xAxisData = opts.chartData.xAxisData,
  37268. xAxisPoints = xAxisData.xAxisPoints,
  37269. eachSpacing = xAxisData.eachSpacing;
  37270. var calPoints = [];
  37271. context.save();
  37272. var leftNum = -2;
  37273. var rightNum = xAxisPoints.length + 2;
  37274. var leftSpace = 0;
  37275. var rightSpace = opts.width + eachSpacing;
  37276. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37277. context.translate(opts._scrollDistance_, 0);
  37278. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37279. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37280. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37281. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37282. }
  37283. //画均线
  37284. if (candleOption.average.show || seriesMA) {
  37285. //Merge pull request !12 from 邱贵翔
  37286. seriesMA.forEach(function (eachSeries, seriesIndex) {
  37287. var ranges, minRange, maxRange;
  37288. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37289. minRange = ranges.pop();
  37290. maxRange = ranges.shift();
  37291. var data = eachSeries.data;
  37292. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37293. var splitPointList = splitPoints(points, eachSeries);
  37294. for (var i = 0; i < splitPointList.length; i++) {
  37295. var _points = splitPointList[i];
  37296. context.beginPath();
  37297. context.setStrokeStyle(eachSeries.color);
  37298. context.setLineWidth(1);
  37299. if (_points.length === 1) {
  37300. context.moveTo(_points[0].x, _points[0].y);
  37301. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  37302. } else {
  37303. context.moveTo(_points[0].x, _points[0].y);
  37304. var startPoint = 0;
  37305. for (var j = 0; j < _points.length; j++) {
  37306. var item = _points[j];
  37307. if (startPoint == 0 && item.x > leftSpace) {
  37308. context.moveTo(item.x, item.y);
  37309. startPoint = 1;
  37310. }
  37311. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37312. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  37313. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37314. }
  37315. }
  37316. context.moveTo(_points[0].x, _points[0].y);
  37317. }
  37318. context.closePath();
  37319. context.stroke();
  37320. }
  37321. });
  37322. }
  37323. //画K线
  37324. series.forEach(function (eachSeries, seriesIndex) {
  37325. var ranges, minRange, maxRange;
  37326. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37327. minRange = ranges.pop();
  37328. maxRange = ranges.shift();
  37329. var data = eachSeries.data;
  37330. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37331. calPoints.push(points);
  37332. var splitPointList = splitPoints(points, eachSeries);
  37333. for (var i = 0; i < splitPointList[0].length; i++) {
  37334. if (i > leftNum && i < rightNum) {
  37335. var item = splitPointList[0][i];
  37336. context.beginPath();
  37337. //如果上涨
  37338. if (data[i][1] - data[i][0] > 0) {
  37339. context.setStrokeStyle(candleOption.color.upLine);
  37340. context.setFillStyle(candleOption.color.upFill);
  37341. context.setLineWidth(1 * opts.pix);
  37342. context.moveTo(item[3].x, item[3].y); //顶点
  37343. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37344. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37345. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37346. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37347. context.lineTo(item[2].x, item[2].y); //底点
  37348. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37349. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37350. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37351. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37352. context.moveTo(item[3].x, item[3].y); //顶点
  37353. } else {
  37354. context.setStrokeStyle(candleOption.color.downLine);
  37355. context.setFillStyle(candleOption.color.downFill);
  37356. context.setLineWidth(1 * opts.pix);
  37357. context.moveTo(item[3].x, item[3].y); //顶点
  37358. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37359. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37360. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37361. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37362. context.lineTo(item[2].x, item[2].y); //底点
  37363. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37364. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37365. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37366. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37367. context.moveTo(item[3].x, item[3].y); //顶点
  37368. }
  37369. context.closePath();
  37370. context.fill();
  37371. context.stroke();
  37372. }
  37373. }
  37374. });
  37375. context.restore();
  37376. return {
  37377. xAxisPoints: xAxisPoints,
  37378. calPoints: calPoints,
  37379. eachSpacing: eachSpacing
  37380. };
  37381. }
  37382. function drawAreaDataPoints(series, opts, config, context) {
  37383. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37384. var areaOption = assign({}, {
  37385. type: 'straight',
  37386. opacity: 0.2,
  37387. addLine: false,
  37388. width: 2,
  37389. gradient: false
  37390. }, opts.extra.area);
  37391. var xAxisData = opts.chartData.xAxisData,
  37392. xAxisPoints = xAxisData.xAxisPoints,
  37393. eachSpacing = xAxisData.eachSpacing;
  37394. var endY = opts.height - opts.area[2];
  37395. var calPoints = [];
  37396. context.save();
  37397. var leftSpace = 0;
  37398. var rightSpace = opts.width + eachSpacing;
  37399. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37400. context.translate(opts._scrollDistance_, 0);
  37401. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37402. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37403. }
  37404. series.forEach(function (eachSeries, seriesIndex) {
  37405. var ranges, minRange, maxRange;
  37406. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37407. minRange = ranges.pop();
  37408. maxRange = ranges.shift();
  37409. var data = eachSeries.data;
  37410. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37411. calPoints.push(points);
  37412. var splitPointList = splitPoints(points, eachSeries);
  37413. for (var i = 0; i < splitPointList.length; i++) {
  37414. var _points2 = splitPointList[i];
  37415. // 绘制区域数
  37416. context.beginPath();
  37417. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37418. if (areaOption.gradient) {
  37419. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  37420. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  37421. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  37422. context.setFillStyle(gradient);
  37423. } else {
  37424. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37425. }
  37426. context.setLineWidth(areaOption.width * opts.pix);
  37427. if (_points2.length > 1) {
  37428. var firstPoint = _points2[0];
  37429. var lastPoint = _points2[_points2.length - 1];
  37430. context.moveTo(firstPoint.x, firstPoint.y);
  37431. var startPoint = 0;
  37432. if (areaOption.type === 'curve') {
  37433. for (var j = 0; j < _points2.length; j++) {
  37434. var item = _points2[j];
  37435. if (startPoint == 0 && item.x > leftSpace) {
  37436. context.moveTo(item.x, item.y);
  37437. startPoint = 1;
  37438. }
  37439. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37440. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  37441. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37442. }
  37443. }
  37444. ;
  37445. }
  37446. if (areaOption.type === 'straight') {
  37447. for (var _j = 0; _j < _points2.length; _j++) {
  37448. var _item11 = _points2[_j];
  37449. if (startPoint == 0 && _item11.x > leftSpace) {
  37450. context.moveTo(_item11.x, _item11.y);
  37451. startPoint = 1;
  37452. }
  37453. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  37454. context.lineTo(_item11.x, _item11.y);
  37455. }
  37456. }
  37457. ;
  37458. }
  37459. if (areaOption.type === 'step') {
  37460. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  37461. var _item12 = _points2[_j2];
  37462. if (startPoint == 0 && _item12.x > leftSpace) {
  37463. context.moveTo(_item12.x, _item12.y);
  37464. startPoint = 1;
  37465. }
  37466. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  37467. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  37468. context.lineTo(_item12.x, _item12.y);
  37469. }
  37470. }
  37471. ;
  37472. }
  37473. context.lineTo(lastPoint.x, endY);
  37474. context.lineTo(firstPoint.x, endY);
  37475. context.lineTo(firstPoint.x, firstPoint.y);
  37476. } else {
  37477. var _item13 = _points2[0];
  37478. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37479. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  37480. context.lineTo(_item13.x + eachSpacing / 2, endY);
  37481. context.lineTo(_item13.x - eachSpacing / 2, endY);
  37482. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37483. }
  37484. context.closePath();
  37485. context.fill();
  37486. //画连线
  37487. if (areaOption.addLine) {
  37488. if (eachSeries.lineType == 'dash') {
  37489. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37490. dashLength *= opts.pix;
  37491. context.setLineDash([dashLength, dashLength]);
  37492. }
  37493. context.beginPath();
  37494. context.setStrokeStyle(eachSeries.color);
  37495. context.setLineWidth(areaOption.width * opts.pix);
  37496. if (_points2.length === 1) {
  37497. context.moveTo(_points2[0].x, _points2[0].y);
  37498. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  37499. } else {
  37500. context.moveTo(_points2[0].x, _points2[0].y);
  37501. var _startPoint = 0;
  37502. if (areaOption.type === 'curve') {
  37503. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  37504. var _item14 = _points2[_j3];
  37505. if (_startPoint == 0 && _item14.x > leftSpace) {
  37506. context.moveTo(_item14.x, _item14.y);
  37507. _startPoint = 1;
  37508. }
  37509. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  37510. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  37511. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  37512. }
  37513. }
  37514. ;
  37515. }
  37516. if (areaOption.type === 'straight') {
  37517. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  37518. var _item15 = _points2[_j4];
  37519. if (_startPoint == 0 && _item15.x > leftSpace) {
  37520. context.moveTo(_item15.x, _item15.y);
  37521. _startPoint = 1;
  37522. }
  37523. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  37524. context.lineTo(_item15.x, _item15.y);
  37525. }
  37526. }
  37527. ;
  37528. }
  37529. if (areaOption.type === 'step') {
  37530. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  37531. var _item16 = _points2[_j5];
  37532. if (_startPoint == 0 && _item16.x > leftSpace) {
  37533. context.moveTo(_item16.x, _item16.y);
  37534. _startPoint = 1;
  37535. }
  37536. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  37537. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  37538. context.lineTo(_item16.x, _item16.y);
  37539. }
  37540. }
  37541. ;
  37542. }
  37543. context.moveTo(_points2[0].x, _points2[0].y);
  37544. }
  37545. context.stroke();
  37546. context.setLineDash([]);
  37547. }
  37548. }
  37549. //画点
  37550. if (opts.dataPointShape !== false) {
  37551. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37552. }
  37553. });
  37554. if (opts.dataLabel !== false && process === 1) {
  37555. series.forEach(function (eachSeries, seriesIndex) {
  37556. var ranges, minRange, maxRange;
  37557. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37558. minRange = ranges.pop();
  37559. maxRange = ranges.shift();
  37560. var data = eachSeries.data;
  37561. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37562. drawPointText(points, eachSeries, config, context, opts);
  37563. });
  37564. }
  37565. context.restore();
  37566. return {
  37567. xAxisPoints: xAxisPoints,
  37568. calPoints: calPoints,
  37569. eachSpacing: eachSpacing
  37570. };
  37571. }
  37572. function drawScatterDataPoints(series, opts, config, context) {
  37573. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37574. var scatterOption = assign({}, {
  37575. type: 'circle'
  37576. }, opts.extra.scatter);
  37577. var xAxisData = opts.chartData.xAxisData,
  37578. xAxisPoints = xAxisData.xAxisPoints,
  37579. eachSpacing = xAxisData.eachSpacing;
  37580. var calPoints = [];
  37581. context.save();
  37582. var leftSpace = 0;
  37583. var rightSpace = opts.width + eachSpacing;
  37584. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37585. context.translate(opts._scrollDistance_, 0);
  37586. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37587. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37588. }
  37589. series.forEach(function (eachSeries, seriesIndex) {
  37590. var ranges, minRange, maxRange;
  37591. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37592. minRange = ranges.pop();
  37593. maxRange = ranges.shift();
  37594. var data = eachSeries.data;
  37595. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37596. context.beginPath();
  37597. context.setStrokeStyle(eachSeries.color);
  37598. context.setFillStyle(eachSeries.color);
  37599. context.setLineWidth(1 * opts.pix);
  37600. var shape = eachSeries.pointShape;
  37601. if (shape === 'diamond') {
  37602. points.forEach(function (item, index) {
  37603. if (item !== null) {
  37604. context.moveTo(item.x, item.y - 4.5);
  37605. context.lineTo(item.x - 4.5, item.y);
  37606. context.lineTo(item.x, item.y + 4.5);
  37607. context.lineTo(item.x + 4.5, item.y);
  37608. context.lineTo(item.x, item.y - 4.5);
  37609. }
  37610. });
  37611. } else if (shape === 'circle') {
  37612. points.forEach(function (item, index) {
  37613. if (item !== null) {
  37614. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37615. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37616. }
  37617. });
  37618. } else if (shape === 'square') {
  37619. points.forEach(function (item, index) {
  37620. if (item !== null) {
  37621. context.moveTo(item.x - 3.5, item.y - 3.5);
  37622. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37623. }
  37624. });
  37625. } else if (shape === 'triangle') {
  37626. points.forEach(function (item, index) {
  37627. if (item !== null) {
  37628. context.moveTo(item.x, item.y - 4.5);
  37629. context.lineTo(item.x - 4.5, item.y + 4.5);
  37630. context.lineTo(item.x + 4.5, item.y + 4.5);
  37631. context.lineTo(item.x, item.y - 4.5);
  37632. }
  37633. });
  37634. } else if (shape === 'triangle') {
  37635. return;
  37636. }
  37637. context.closePath();
  37638. context.fill();
  37639. context.stroke();
  37640. });
  37641. if (opts.dataLabel !== false && process === 1) {
  37642. series.forEach(function (eachSeries, seriesIndex) {
  37643. var ranges, minRange, maxRange;
  37644. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37645. minRange = ranges.pop();
  37646. maxRange = ranges.shift();
  37647. var data = eachSeries.data;
  37648. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37649. drawPointText(points, eachSeries, config, context, opts);
  37650. });
  37651. }
  37652. context.restore();
  37653. return {
  37654. xAxisPoints: xAxisPoints,
  37655. calPoints: calPoints,
  37656. eachSpacing: eachSpacing
  37657. };
  37658. }
  37659. function drawBubbleDataPoints(series, opts, config, context) {
  37660. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37661. var bubbleOption = assign({}, {
  37662. opacity: 1,
  37663. border: 2
  37664. }, opts.extra.bubble);
  37665. var xAxisData = opts.chartData.xAxisData,
  37666. xAxisPoints = xAxisData.xAxisPoints,
  37667. eachSpacing = xAxisData.eachSpacing;
  37668. var calPoints = [];
  37669. context.save();
  37670. var leftSpace = 0;
  37671. var rightSpace = opts.width + eachSpacing;
  37672. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37673. context.translate(opts._scrollDistance_, 0);
  37674. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37675. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37676. }
  37677. series.forEach(function (eachSeries, seriesIndex) {
  37678. var ranges, minRange, maxRange;
  37679. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37680. minRange = ranges.pop();
  37681. maxRange = ranges.shift();
  37682. var data = eachSeries.data;
  37683. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37684. context.beginPath();
  37685. context.setStrokeStyle(eachSeries.color);
  37686. context.setLineWidth(bubbleOption.border * opts.pix);
  37687. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  37688. points.forEach(function (item, index) {
  37689. context.moveTo(item.x + item.r, item.y);
  37690. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  37691. });
  37692. context.closePath();
  37693. context.fill();
  37694. context.stroke();
  37695. if (opts.dataLabel !== false && process === 1) {
  37696. points.forEach(function (item, index) {
  37697. context.beginPath();
  37698. var fontSize = series.textSize * opts.pix || config.fontSize;
  37699. context.setFontSize(fontSize);
  37700. context.setFillStyle(series.textColor || "#FFFFFF");
  37701. context.setTextAlign('center');
  37702. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  37703. context.closePath();
  37704. context.stroke();
  37705. context.setTextAlign('left');
  37706. });
  37707. }
  37708. });
  37709. context.restore();
  37710. return {
  37711. xAxisPoints: xAxisPoints,
  37712. calPoints: calPoints,
  37713. eachSpacing: eachSpacing
  37714. };
  37715. }
  37716. function drawLineDataPoints(series, opts, config, context) {
  37717. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37718. var lineOption = assign({}, {
  37719. type: 'straight',
  37720. width: 2
  37721. }, opts.extra.line);
  37722. lineOption.width *= opts.pix;
  37723. var xAxisData = opts.chartData.xAxisData,
  37724. xAxisPoints = xAxisData.xAxisPoints,
  37725. eachSpacing = xAxisData.eachSpacing;
  37726. var calPoints = [];
  37727. context.save();
  37728. var leftSpace = 0;
  37729. var rightSpace = opts.width + eachSpacing;
  37730. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37731. context.translate(opts._scrollDistance_, 0);
  37732. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37733. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37734. }
  37735. series.forEach(function (eachSeries, seriesIndex) {
  37736. var ranges, minRange, maxRange;
  37737. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37738. minRange = ranges.pop();
  37739. maxRange = ranges.shift();
  37740. var data = eachSeries.data;
  37741. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37742. calPoints.push(points);
  37743. var splitPointList = splitPoints(points, eachSeries);
  37744. if (eachSeries.lineType == 'dash') {
  37745. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37746. dashLength *= opts.pix;
  37747. context.setLineDash([dashLength, dashLength]);
  37748. }
  37749. context.beginPath();
  37750. context.setStrokeStyle(eachSeries.color);
  37751. context.setLineWidth(lineOption.width);
  37752. splitPointList.forEach(function (points, index) {
  37753. if (points.length === 1) {
  37754. context.moveTo(points[0].x, points[0].y);
  37755. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37756. } else {
  37757. context.moveTo(points[0].x, points[0].y);
  37758. var startPoint = 0;
  37759. if (lineOption.type === 'curve') {
  37760. for (var j = 0; j < points.length; j++) {
  37761. var item = points[j];
  37762. if (startPoint == 0 && item.x > leftSpace) {
  37763. context.moveTo(item.x, item.y);
  37764. startPoint = 1;
  37765. }
  37766. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37767. var ctrlPoint = createCurveControlPoints(points, j - 1);
  37768. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37769. }
  37770. }
  37771. ;
  37772. }
  37773. if (lineOption.type === 'straight') {
  37774. for (var _j6 = 0; _j6 < points.length; _j6++) {
  37775. var _item17 = points[_j6];
  37776. if (startPoint == 0 && _item17.x > leftSpace) {
  37777. context.moveTo(_item17.x, _item17.y);
  37778. startPoint = 1;
  37779. }
  37780. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  37781. context.lineTo(_item17.x, _item17.y);
  37782. }
  37783. }
  37784. ;
  37785. }
  37786. if (lineOption.type === 'step') {
  37787. for (var _j7 = 0; _j7 < points.length; _j7++) {
  37788. var _item18 = points[_j7];
  37789. if (startPoint == 0 && _item18.x > leftSpace) {
  37790. context.moveTo(_item18.x, _item18.y);
  37791. startPoint = 1;
  37792. }
  37793. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  37794. context.lineTo(_item18.x, points[_j7 - 1].y);
  37795. context.lineTo(_item18.x, _item18.y);
  37796. }
  37797. }
  37798. ;
  37799. }
  37800. context.moveTo(points[0].x, points[0].y);
  37801. }
  37802. });
  37803. context.stroke();
  37804. context.setLineDash([]);
  37805. if (opts.dataPointShape !== false) {
  37806. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37807. }
  37808. });
  37809. if (opts.dataLabel !== false && process === 1) {
  37810. series.forEach(function (eachSeries, seriesIndex) {
  37811. var ranges, minRange, maxRange;
  37812. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37813. minRange = ranges.pop();
  37814. maxRange = ranges.shift();
  37815. var data = eachSeries.data;
  37816. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37817. drawPointText(points, eachSeries, config, context, opts);
  37818. });
  37819. }
  37820. context.restore();
  37821. return {
  37822. xAxisPoints: xAxisPoints,
  37823. calPoints: calPoints,
  37824. eachSpacing: eachSpacing
  37825. };
  37826. }
  37827. function drawMixDataPoints(series, opts, config, context) {
  37828. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37829. var columnOption = assign({}, {
  37830. width: eachSpacing / 2,
  37831. barBorderCircle: false,
  37832. barBorderRadius: [],
  37833. seriesGap: 2,
  37834. linearType: 'none',
  37835. linearOpacity: 1,
  37836. customColor: [],
  37837. colorStop: 0
  37838. }, opts.extra.mix.column);
  37839. var xAxisData = opts.chartData.xAxisData,
  37840. xAxisPoints = xAxisData.xAxisPoints,
  37841. eachSpacing = xAxisData.eachSpacing;
  37842. var endY = opts.height - opts.area[2];
  37843. var calPoints = [];
  37844. var columnIndex = 0;
  37845. var columnLength = 0;
  37846. series.forEach(function (eachSeries, seriesIndex) {
  37847. if (eachSeries.type == 'column') {
  37848. columnLength += 1;
  37849. }
  37850. });
  37851. context.save();
  37852. var leftNum = -2;
  37853. var rightNum = xAxisPoints.length + 2;
  37854. var leftSpace = 0;
  37855. var rightSpace = opts.width + eachSpacing;
  37856. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37857. context.translate(opts._scrollDistance_, 0);
  37858. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37859. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37860. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37861. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37862. }
  37863. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37864. series.forEach(function (eachSeries, seriesIndex) {
  37865. var ranges, minRange, maxRange;
  37866. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37867. minRange = ranges.pop();
  37868. maxRange = ranges.shift();
  37869. var data = eachSeries.data;
  37870. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37871. calPoints.push(points);
  37872. // 绘制柱状数据图
  37873. if (eachSeries.type == 'column') {
  37874. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37875. for (var i = 0; i < points.length; i++) {
  37876. var item = points[i];
  37877. if (item !== null && i > leftNum && i < rightNum) {
  37878. var startX = item.x - item.width / 2;
  37879. var height = opts.height - item.y - opts.area[2];
  37880. context.beginPath();
  37881. var fillColor = item.color || eachSeries.color;
  37882. var strokeColor = item.color || eachSeries.color;
  37883. if (columnOption.linearType !== 'none') {
  37884. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  37885. //透明渐变
  37886. if (columnOption.linearType == 'opacity') {
  37887. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37888. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37889. } else {
  37890. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37891. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37892. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37893. }
  37894. fillColor = grd;
  37895. }
  37896. // 圆角边框
  37897. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  37898. var left = startX;
  37899. var top = item.y;
  37900. var width = item.width;
  37901. var _height3 = opts.height - opts.area[2] - item.y;
  37902. if (columnOption.barBorderCircle) {
  37903. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37904. }
  37905. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37906. r0 = _columnOption$barBord3[0],
  37907. r1 = _columnOption$barBord3[1],
  37908. r2 = _columnOption$barBord3[2],
  37909. r3 = _columnOption$barBord3[3];
  37910. var minRadius = Math.min(width / 2, _height3 / 2);
  37911. r0 = r0 > minRadius ? minRadius : r0;
  37912. r1 = r1 > minRadius ? minRadius : r1;
  37913. r2 = r2 > minRadius ? minRadius : r2;
  37914. r3 = r3 > minRadius ? minRadius : r3;
  37915. r0 = r0 < 0 ? 0 : r0;
  37916. r1 = r1 < 0 ? 0 : r1;
  37917. r2 = r2 < 0 ? 0 : r2;
  37918. r3 = r3 < 0 ? 0 : r3;
  37919. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  37920. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  37921. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  37922. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  37923. } else {
  37924. context.moveTo(startX, item.y);
  37925. context.lineTo(startX + item.width - 2, item.y);
  37926. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  37927. context.lineTo(startX, opts.height - opts.area[2]);
  37928. context.lineTo(startX, item.y);
  37929. context.setLineWidth(1);
  37930. context.setStrokeStyle(strokeColor);
  37931. }
  37932. context.setFillStyle(fillColor);
  37933. context.closePath();
  37934. context.fill();
  37935. }
  37936. }
  37937. columnIndex += 1;
  37938. }
  37939. //绘制区域图数据
  37940. if (eachSeries.type == 'area') {
  37941. var _splitPointList = splitPoints(points, eachSeries);
  37942. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  37943. var _points3 = _splitPointList[_i20];
  37944. // 绘制区域数据
  37945. context.beginPath();
  37946. context.setStrokeStyle(eachSeries.color);
  37947. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  37948. context.setLineWidth(2 * opts.pix);
  37949. if (_points3.length > 1) {
  37950. var firstPoint = _points3[0];
  37951. var lastPoint = _points3[_points3.length - 1];
  37952. context.moveTo(firstPoint.x, firstPoint.y);
  37953. var startPoint = 0;
  37954. if (eachSeries.style === 'curve') {
  37955. for (var j = 0; j < _points3.length; j++) {
  37956. var _item19 = _points3[j];
  37957. if (startPoint == 0 && _item19.x > leftSpace) {
  37958. context.moveTo(_item19.x, _item19.y);
  37959. startPoint = 1;
  37960. }
  37961. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  37962. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  37963. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  37964. }
  37965. }
  37966. ;
  37967. } else {
  37968. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  37969. var _item20 = _points3[_j8];
  37970. if (startPoint == 0 && _item20.x > leftSpace) {
  37971. context.moveTo(_item20.x, _item20.y);
  37972. startPoint = 1;
  37973. }
  37974. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  37975. context.lineTo(_item20.x, _item20.y);
  37976. }
  37977. }
  37978. ;
  37979. }
  37980. context.lineTo(lastPoint.x, endY);
  37981. context.lineTo(firstPoint.x, endY);
  37982. context.lineTo(firstPoint.x, firstPoint.y);
  37983. } else {
  37984. var _item21 = _points3[0];
  37985. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37986. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  37987. context.lineTo(_item21.x + eachSpacing / 2, endY);
  37988. context.lineTo(_item21.x - eachSpacing / 2, endY);
  37989. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37990. }
  37991. context.closePath();
  37992. context.fill();
  37993. }
  37994. }
  37995. // 绘制折线数据图
  37996. if (eachSeries.type == 'line') {
  37997. var splitPointList = splitPoints(points, eachSeries);
  37998. splitPointList.forEach(function (points, index) {
  37999. if (eachSeries.lineType == 'dash') {
  38000. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  38001. dashLength *= opts.pix;
  38002. context.setLineDash([dashLength, dashLength]);
  38003. }
  38004. context.beginPath();
  38005. context.setStrokeStyle(eachSeries.color);
  38006. context.setLineWidth(2 * opts.pix);
  38007. if (points.length === 1) {
  38008. context.moveTo(points[0].x, points[0].y);
  38009. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  38010. } else {
  38011. context.moveTo(points[0].x, points[0].y);
  38012. var _startPoint2 = 0;
  38013. if (eachSeries.style == 'curve') {
  38014. for (var _j9 = 0; _j9 < points.length; _j9++) {
  38015. var _item22 = points[_j9];
  38016. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  38017. context.moveTo(_item22.x, _item22.y);
  38018. _startPoint2 = 1;
  38019. }
  38020. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  38021. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  38022. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  38023. }
  38024. }
  38025. } else {
  38026. for (var _j10 = 0; _j10 < points.length; _j10++) {
  38027. var _item23 = points[_j10];
  38028. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  38029. context.moveTo(_item23.x, _item23.y);
  38030. _startPoint2 = 1;
  38031. }
  38032. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  38033. context.lineTo(_item23.x, _item23.y);
  38034. }
  38035. }
  38036. }
  38037. context.moveTo(points[0].x, points[0].y);
  38038. }
  38039. context.stroke();
  38040. context.setLineDash([]);
  38041. });
  38042. }
  38043. // 绘制点数据图
  38044. if (eachSeries.type == 'point') {
  38045. eachSeries.addPoint = true;
  38046. }
  38047. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  38048. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38049. }
  38050. });
  38051. if (opts.dataLabel !== false && process === 1) {
  38052. var columnIndex = 0;
  38053. series.forEach(function (eachSeries, seriesIndex) {
  38054. var ranges, minRange, maxRange;
  38055. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38056. minRange = ranges.pop();
  38057. maxRange = ranges.shift();
  38058. var data = eachSeries.data;
  38059. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38060. if (eachSeries.type !== 'column') {
  38061. drawPointText(points, eachSeries, config, context, opts);
  38062. } else {
  38063. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  38064. drawPointText(points, eachSeries, config, context, opts);
  38065. columnIndex += 1;
  38066. }
  38067. });
  38068. }
  38069. context.restore();
  38070. return {
  38071. xAxisPoints: xAxisPoints,
  38072. calPoints: calPoints,
  38073. eachSpacing: eachSpacing
  38074. };
  38075. }
  38076. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  38077. var toolTipOption = opts.extra.tooltip || {};
  38078. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  38079. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  38080. }
  38081. context.save();
  38082. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38083. context.translate(opts._scrollDistance_, 0);
  38084. }
  38085. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38086. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  38087. }
  38088. context.restore();
  38089. }
  38090. function drawXAxis(categories, opts, config, context) {
  38091. var xAxisData = opts.chartData.xAxisData,
  38092. xAxisPoints = xAxisData.xAxisPoints,
  38093. startX = xAxisData.startX,
  38094. endX = xAxisData.endX,
  38095. eachSpacing = xAxisData.eachSpacing;
  38096. var boundaryGap = 'center';
  38097. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  38098. boundaryGap = opts.xAxis.boundaryGap;
  38099. }
  38100. var startY = opts.height - opts.area[2];
  38101. var endY = opts.area[0];
  38102. //绘制滚动条
  38103. if (opts.enableScroll && opts.xAxis.scrollShow) {
  38104. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  38105. var scrollScreenWidth = endX - startX;
  38106. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  38107. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  38108. var scrollLeft = 0;
  38109. if (opts._scrollDistance_) {
  38110. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  38111. }
  38112. context.beginPath();
  38113. context.setLineCap('round');
  38114. context.setLineWidth(6 * opts.pix);
  38115. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  38116. context.moveTo(startX, scrollY);
  38117. context.lineTo(endX, scrollY);
  38118. context.stroke();
  38119. context.closePath();
  38120. context.beginPath();
  38121. context.setLineCap('round');
  38122. context.setLineWidth(6 * opts.pix);
  38123. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  38124. context.moveTo(startX + scrollLeft, scrollY);
  38125. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  38126. context.stroke();
  38127. context.closePath();
  38128. context.setLineCap('butt');
  38129. }
  38130. context.save();
  38131. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38132. context.translate(opts._scrollDistance_, 0);
  38133. }
  38134. //绘制X轴刻度线
  38135. if (opts.xAxis.calibration === true) {
  38136. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38137. context.setLineCap('butt');
  38138. context.setLineWidth(1 * opts.pix);
  38139. xAxisPoints.forEach(function (item, index) {
  38140. if (index > 0) {
  38141. context.beginPath();
  38142. context.moveTo(item - eachSpacing / 2, startY);
  38143. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  38144. context.closePath();
  38145. context.stroke();
  38146. }
  38147. });
  38148. }
  38149. //绘制X轴网格
  38150. if (opts.xAxis.disableGrid !== true) {
  38151. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38152. context.setLineCap('butt');
  38153. context.setLineWidth(1 * opts.pix);
  38154. if (opts.xAxis.gridType == 'dash') {
  38155. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  38156. }
  38157. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  38158. xAxisPoints.forEach(function (item, index) {
  38159. if (index % opts.xAxis.gridEval == 0) {
  38160. context.beginPath();
  38161. context.moveTo(item, startY);
  38162. context.lineTo(item, endY);
  38163. context.stroke();
  38164. }
  38165. });
  38166. context.setLineDash([]);
  38167. }
  38168. //绘制X轴文案
  38169. if (opts.xAxis.disabled !== true) {
  38170. // 对X轴列表做抽稀处理
  38171. //默认全部显示X轴标签
  38172. var maxXAxisListLength = categories.length;
  38173. //如果设置了X轴单屏数量
  38174. if (opts.xAxis.labelCount) {
  38175. //如果设置X轴密度
  38176. if (opts.xAxis.itemCount) {
  38177. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  38178. } else {
  38179. maxXAxisListLength = opts.xAxis.labelCount;
  38180. }
  38181. maxXAxisListLength -= 1;
  38182. }
  38183. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  38184. var newCategories = [];
  38185. var cgLength = categories.length;
  38186. for (var i = 0; i < cgLength; i++) {
  38187. if (i % ratio !== 0) {
  38188. newCategories.push("");
  38189. } else {
  38190. newCategories.push(categories[i]);
  38191. }
  38192. }
  38193. newCategories[cgLength - 1] = categories[cgLength - 1];
  38194. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  38195. if (config._xAxisTextAngle_ === 0) {
  38196. newCategories.forEach(function (item, index) {
  38197. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38198. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  38199. if (boundaryGap == 'center') {
  38200. offset += eachSpacing / 2;
  38201. }
  38202. var scrollHeight = 0;
  38203. if (opts.xAxis.scrollShow) {
  38204. scrollHeight = 6 * opts.pix;
  38205. }
  38206. context.beginPath();
  38207. context.setFontSize(xAxisFontSize);
  38208. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38209. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  38210. context.closePath();
  38211. context.stroke();
  38212. });
  38213. } else {
  38214. newCategories.forEach(function (item, index) {
  38215. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38216. context.save();
  38217. context.beginPath();
  38218. context.setFontSize(xAxisFontSize);
  38219. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38220. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  38221. var offset = -textWidth;
  38222. if (boundaryGap == 'center') {
  38223. offset += eachSpacing / 2;
  38224. }
  38225. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  38226. transX = _calRotateTranslate.transX,
  38227. transY = _calRotateTranslate.transY;
  38228. context.rotate(-1 * config._xAxisTextAngle_);
  38229. context.translate(transX, transY);
  38230. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  38231. context.closePath();
  38232. context.stroke();
  38233. context.restore();
  38234. });
  38235. }
  38236. }
  38237. context.restore();
  38238. //绘制X轴轴线
  38239. if (opts.xAxis.axisLine) {
  38240. context.beginPath();
  38241. context.setStrokeStyle(opts.xAxis.axisLineColor);
  38242. context.setLineWidth(1 * opts.pix);
  38243. context.moveTo(startX, opts.height - opts.area[2]);
  38244. context.lineTo(endX, opts.height - opts.area[2]);
  38245. context.stroke();
  38246. }
  38247. }
  38248. function drawYAxisGrid(categories, opts, config, context) {
  38249. if (opts.yAxis.disableGrid === true) {
  38250. return;
  38251. }
  38252. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38253. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38254. var startX = opts.area[3];
  38255. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  38256. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  38257. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  38258. var endX = startX + TotalWidth;
  38259. var points = [];
  38260. var startY = 1;
  38261. if (opts.xAxis.axisLine === false) {
  38262. startY = 0;
  38263. }
  38264. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  38265. points.push(opts.height - opts.area[2] - eachSpacing * i);
  38266. }
  38267. context.save();
  38268. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38269. context.translate(opts._scrollDistance_, 0);
  38270. }
  38271. if (opts.yAxis.gridType == 'dash') {
  38272. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  38273. }
  38274. context.setStrokeStyle(opts.yAxis.gridColor);
  38275. context.setLineWidth(1 * opts.pix);
  38276. points.forEach(function (item, index) {
  38277. context.beginPath();
  38278. context.moveTo(startX, item);
  38279. context.lineTo(endX, item);
  38280. context.stroke();
  38281. });
  38282. context.setLineDash([]);
  38283. context.restore();
  38284. }
  38285. function drawYAxis(series, opts, config, context) {
  38286. if (opts.yAxis.disabled === true) {
  38287. return;
  38288. }
  38289. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38290. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38291. var startX = opts.area[3];
  38292. var endX = opts.width - opts.area[1];
  38293. var endY = opts.height - opts.area[2];
  38294. var fillEndY = endY + config.xAxisHeight;
  38295. if (opts.xAxis.scrollShow) {
  38296. fillEndY -= 3 * opts.pix;
  38297. }
  38298. if (opts.xAxis.rotateLabel) {
  38299. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  38300. }
  38301. // set YAxis background
  38302. context.beginPath();
  38303. context.setFillStyle(opts.background);
  38304. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  38305. context.fillRect(0, 0, startX, fillEndY);
  38306. }
  38307. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  38308. context.fillRect(endX, 0, opts.width, fillEndY);
  38309. }
  38310. context.closePath();
  38311. context.stroke();
  38312. var tStartLeft = opts.area[3];
  38313. var tStartRight = opts.width - opts.area[1];
  38314. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  38315. if (opts.yAxis.data) {
  38316. var _loop4 = function _loop4(i) {
  38317. var yData = opts.yAxis.data[i];
  38318. points = [];
  38319. if (yData.type === 'categories') {
  38320. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  38321. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  38322. }
  38323. } else {
  38324. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  38325. points.push(opts.area[0] + eachSpacing * _i22);
  38326. }
  38327. }
  38328. if (yData.disabled !== true) {
  38329. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  38330. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  38331. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  38332. var textAlign = yData.textAlign || "right";
  38333. //画Y轴刻度及文案
  38334. rangesFormat.forEach(function (item, index) {
  38335. var pos = points[index] ? points[index] : endY;
  38336. context.beginPath();
  38337. context.setFontSize(yAxisFontSize);
  38338. context.setLineWidth(1 * opts.pix);
  38339. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38340. context.setFillStyle(yData.fontColor || opts.fontColor);
  38341. var tmpstrat = 0;
  38342. var gapwidth = 4 * opts.pix;
  38343. if (yAxisWidth.position == 'left') {
  38344. //画刻度线
  38345. if (yData.calibration == true) {
  38346. context.moveTo(tStartLeft, pos);
  38347. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  38348. gapwidth += 3 * opts.pix;
  38349. }
  38350. //画文字
  38351. switch (textAlign) {
  38352. case "left":
  38353. context.setTextAlign('left');
  38354. tmpstrat = tStartLeft - yAxisWidth.width;
  38355. break;
  38356. case "right":
  38357. context.setTextAlign('right');
  38358. tmpstrat = tStartLeft - gapwidth;
  38359. break;
  38360. default:
  38361. context.setTextAlign('center');
  38362. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  38363. }
  38364. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38365. } else if (yAxisWidth.position == 'right') {
  38366. //画刻度线
  38367. if (yData.calibration == true) {
  38368. context.moveTo(tStartRight, pos);
  38369. context.lineTo(tStartRight + 3 * opts.pix, pos);
  38370. gapwidth += 3 * opts.pix;
  38371. }
  38372. switch (textAlign) {
  38373. case "left":
  38374. context.setTextAlign('left');
  38375. tmpstrat = tStartRight + gapwidth;
  38376. break;
  38377. case "right":
  38378. context.setTextAlign('right');
  38379. tmpstrat = tStartRight + yAxisWidth.width;
  38380. break;
  38381. default:
  38382. context.setTextAlign('center');
  38383. tmpstrat = tStartRight + yAxisWidth.width / 2;
  38384. }
  38385. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38386. } else if (yAxisWidth.position == 'center') {
  38387. //画刻度线
  38388. if (yData.calibration == true) {
  38389. context.moveTo(tStartCenter, pos);
  38390. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  38391. gapwidth += 3 * opts.pix;
  38392. }
  38393. //画文字
  38394. switch (textAlign) {
  38395. case "left":
  38396. context.setTextAlign('left');
  38397. tmpstrat = tStartCenter - yAxisWidth.width;
  38398. break;
  38399. case "right":
  38400. context.setTextAlign('right');
  38401. tmpstrat = tStartCenter - gapwidth;
  38402. break;
  38403. default:
  38404. context.setTextAlign('center');
  38405. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  38406. }
  38407. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38408. }
  38409. context.closePath();
  38410. context.stroke();
  38411. context.setTextAlign('left');
  38412. });
  38413. //画Y轴轴线
  38414. if (yData.axisLine !== false) {
  38415. context.beginPath();
  38416. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38417. context.setLineWidth(1 * opts.pix);
  38418. if (yAxisWidth.position == 'left') {
  38419. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  38420. context.lineTo(tStartLeft, opts.area[0]);
  38421. } else if (yAxisWidth.position == 'right') {
  38422. context.moveTo(tStartRight, opts.height - opts.area[2]);
  38423. context.lineTo(tStartRight, opts.area[0]);
  38424. } else if (yAxisWidth.position == 'center') {
  38425. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  38426. context.lineTo(tStartCenter, opts.area[0]);
  38427. }
  38428. context.stroke();
  38429. }
  38430. //画Y轴标题
  38431. if (opts.yAxis.showTitle) {
  38432. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  38433. var title = yData.title;
  38434. context.beginPath();
  38435. context.setFontSize(titleFontSize);
  38436. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  38437. if (yAxisWidth.position == 'left') {
  38438. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38439. } else if (yAxisWidth.position == 'right') {
  38440. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38441. } else if (yAxisWidth.position == 'center') {
  38442. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38443. }
  38444. context.closePath();
  38445. context.stroke();
  38446. }
  38447. if (yAxisWidth.position == 'left') {
  38448. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38449. } else {
  38450. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38451. }
  38452. }
  38453. };
  38454. for (var i = 0; i < opts.yAxis.data.length; i++) {
  38455. var points;
  38456. _loop4(i);
  38457. }
  38458. }
  38459. }
  38460. function drawLegend(series, opts, config, context, chartData) {
  38461. if (opts.legend.show === false) {
  38462. return;
  38463. }
  38464. var legendData = chartData.legendData;
  38465. var legendList = legendData.points;
  38466. var legendArea = legendData.area;
  38467. var padding = opts.legend.padding * opts.pix;
  38468. var fontSize = opts.legend.fontSize * opts.pix;
  38469. var shapeWidth = 15 * opts.pix;
  38470. var shapeRight = 5 * opts.pix;
  38471. var itemGap = opts.legend.itemGap * opts.pix;
  38472. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  38473. //画背景及边框
  38474. context.beginPath();
  38475. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  38476. context.setStrokeStyle(opts.legend.borderColor);
  38477. context.setFillStyle(opts.legend.backgroundColor);
  38478. context.moveTo(legendArea.start.x, legendArea.start.y);
  38479. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  38480. context.closePath();
  38481. context.fill();
  38482. context.stroke();
  38483. legendList.forEach(function (itemList, listIndex) {
  38484. var width = 0;
  38485. var height = 0;
  38486. width = legendData.widthArr[listIndex];
  38487. height = legendData.heightArr[listIndex];
  38488. var startX = 0;
  38489. var startY = 0;
  38490. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38491. switch (opts.legend.float) {
  38492. case 'left':
  38493. startX = legendArea.start.x + padding;
  38494. break;
  38495. case 'right':
  38496. startX = legendArea.start.x + legendArea.width - width;
  38497. break;
  38498. default:
  38499. startX = legendArea.start.x + (legendArea.width - width) / 2;
  38500. }
  38501. startY = legendArea.start.y + padding + listIndex * lineHeight;
  38502. } else {
  38503. if (listIndex == 0) {
  38504. width = 0;
  38505. } else {
  38506. width = legendData.widthArr[listIndex - 1];
  38507. }
  38508. startX = legendArea.start.x + padding + width;
  38509. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  38510. }
  38511. context.setFontSize(config.fontSize);
  38512. for (var i = 0; i < itemList.length; i++) {
  38513. var item = itemList[i];
  38514. item.area = [0, 0, 0, 0];
  38515. item.area[0] = startX;
  38516. item.area[1] = startY;
  38517. item.area[3] = startY + lineHeight;
  38518. context.beginPath();
  38519. context.setLineWidth(1 * opts.pix);
  38520. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  38521. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  38522. switch (item.legendShape) {
  38523. case 'line':
  38524. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  38525. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  38526. break;
  38527. case 'triangle':
  38528. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38529. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38530. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38531. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38532. break;
  38533. case 'diamond':
  38534. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38535. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  38536. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38537. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  38538. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38539. break;
  38540. case 'circle':
  38541. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  38542. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  38543. break;
  38544. case 'rect':
  38545. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38546. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38547. break;
  38548. case 'square':
  38549. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38550. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  38551. break;
  38552. case 'none':
  38553. break;
  38554. default:
  38555. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38556. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38557. }
  38558. context.closePath();
  38559. context.fill();
  38560. context.stroke();
  38561. startX += shapeWidth + shapeRight;
  38562. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  38563. context.beginPath();
  38564. context.setFontSize(fontSize);
  38565. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  38566. context.fillText(item.name, startX, startY + fontTrans);
  38567. context.closePath();
  38568. context.stroke();
  38569. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38570. startX += measureText(item.name, fontSize, context) + itemGap;
  38571. item.area[2] = startX;
  38572. } else {
  38573. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  38574. ;
  38575. startX -= shapeWidth + shapeRight;
  38576. startY += lineHeight;
  38577. }
  38578. }
  38579. });
  38580. }
  38581. function drawPieDataPoints(series, opts, config, context) {
  38582. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38583. var pieOption = assign({}, {
  38584. activeOpacity: 0.5,
  38585. activeRadius: 10,
  38586. offsetAngle: 0,
  38587. labelWidth: 15,
  38588. ringWidth: 30,
  38589. customRadius: 0,
  38590. border: false,
  38591. borderWidth: 2,
  38592. borderColor: '#FFFFFF',
  38593. centerColor: '#FFFFFF',
  38594. linearType: 'none',
  38595. customColor: []
  38596. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  38597. var centerPosition = {
  38598. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38599. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38600. };
  38601. if (config.pieChartLinePadding == 0) {
  38602. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  38603. }
  38604. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  38605. if (pieOption.customRadius > 0) {
  38606. radius = pieOption.customRadius * opts.pix;
  38607. }
  38608. series = getPieDataPoints(series, radius, process);
  38609. var activeRadius = pieOption.activeRadius * opts.pix;
  38610. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  38611. series = series.map(function (eachSeries) {
  38612. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  38613. return eachSeries;
  38614. });
  38615. series.forEach(function (eachSeries, seriesIndex) {
  38616. if (opts.tooltip) {
  38617. if (opts.tooltip.index == seriesIndex) {
  38618. context.beginPath();
  38619. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  38620. context.moveTo(centerPosition.x, centerPosition.y);
  38621. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38622. context.closePath();
  38623. context.fill();
  38624. }
  38625. }
  38626. context.beginPath();
  38627. context.setLineWidth(pieOption.borderWidth * opts.pix);
  38628. context.lineJoin = "round";
  38629. context.setStrokeStyle(pieOption.borderColor);
  38630. var fillcolor = eachSeries.color;
  38631. if (pieOption.linearType == 'custom') {
  38632. var grd;
  38633. if (context.createCircularGradient) {
  38634. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38635. } else {
  38636. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38637. }
  38638. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  38639. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38640. fillcolor = grd;
  38641. }
  38642. context.setFillStyle(fillcolor);
  38643. context.moveTo(centerPosition.x, centerPosition.y);
  38644. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38645. context.closePath();
  38646. context.fill();
  38647. if (pieOption.border == true) {
  38648. context.stroke();
  38649. }
  38650. });
  38651. if (opts.type === 'ring') {
  38652. var innerPieWidth = radius * 0.6;
  38653. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  38654. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  38655. }
  38656. context.beginPath();
  38657. context.setFillStyle(pieOption.centerColor);
  38658. context.moveTo(centerPosition.x, centerPosition.y);
  38659. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  38660. context.closePath();
  38661. context.fill();
  38662. }
  38663. if (opts.dataLabel !== false && process === 1) {
  38664. var valid = false;
  38665. for (var i = 0, len = series.length; i < len; i++) {
  38666. if (series[i].data > 0) {
  38667. valid = true;
  38668. break;
  38669. }
  38670. }
  38671. if (valid) {
  38672. drawPieText(series, opts, config, context, radius, centerPosition);
  38673. }
  38674. }
  38675. if (process === 1 && opts.type === 'ring') {
  38676. drawRingTitle(opts, config, context, centerPosition);
  38677. }
  38678. return {
  38679. center: centerPosition,
  38680. radius: radius,
  38681. series: series
  38682. };
  38683. }
  38684. function drawRoseDataPoints(series, opts, config, context) {
  38685. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38686. var roseOption = assign({}, {
  38687. type: 'area',
  38688. activeOpacity: 0.5,
  38689. activeRadius: 10,
  38690. offsetAngle: 0,
  38691. labelWidth: 15,
  38692. border: false,
  38693. borderWidth: 2,
  38694. borderColor: '#FFFFFF',
  38695. linearType: 'none',
  38696. customColor: []
  38697. }, opts.extra.rose);
  38698. if (config.pieChartLinePadding == 0) {
  38699. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  38700. }
  38701. var centerPosition = {
  38702. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38703. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38704. };
  38705. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  38706. var minRadius = roseOption.minRadius || radius * 0.5;
  38707. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  38708. var activeRadius = roseOption.activeRadius * opts.pix;
  38709. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  38710. series = series.map(function (eachSeries) {
  38711. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  38712. return eachSeries;
  38713. });
  38714. series.forEach(function (eachSeries, seriesIndex) {
  38715. if (opts.tooltip) {
  38716. if (opts.tooltip.index == seriesIndex) {
  38717. context.beginPath();
  38718. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  38719. context.moveTo(centerPosition.x, centerPosition.y);
  38720. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38721. context.closePath();
  38722. context.fill();
  38723. }
  38724. }
  38725. context.beginPath();
  38726. context.setLineWidth(roseOption.borderWidth * opts.pix);
  38727. context.lineJoin = "round";
  38728. context.setStrokeStyle(roseOption.borderColor);
  38729. var fillcolor = eachSeries.color;
  38730. if (roseOption.linearType == 'custom') {
  38731. var grd;
  38732. if (context.createCircularGradient) {
  38733. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38734. } else {
  38735. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38736. }
  38737. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  38738. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38739. fillcolor = grd;
  38740. }
  38741. context.setFillStyle(fillcolor);
  38742. context.moveTo(centerPosition.x, centerPosition.y);
  38743. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38744. context.closePath();
  38745. context.fill();
  38746. if (roseOption.border == true) {
  38747. context.stroke();
  38748. }
  38749. });
  38750. if (opts.dataLabel !== false && process === 1) {
  38751. var valid = false;
  38752. for (var i = 0, len = series.length; i < len; i++) {
  38753. if (series[i].data > 0) {
  38754. valid = true;
  38755. break;
  38756. }
  38757. }
  38758. if (valid) {
  38759. drawPieText(series, opts, config, context, radius, centerPosition);
  38760. }
  38761. }
  38762. return {
  38763. center: centerPosition,
  38764. radius: radius,
  38765. series: series
  38766. };
  38767. }
  38768. function drawArcbarDataPoints(series, opts, config, context) {
  38769. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38770. var arcbarOption = assign({}, {
  38771. startAngle: 0.75,
  38772. endAngle: 0.25,
  38773. type: 'default',
  38774. width: 12,
  38775. gap: 2,
  38776. linearType: 'none',
  38777. customColor: []
  38778. }, opts.extra.arcbar);
  38779. series = getArcbarDataPoints(series, arcbarOption, process);
  38780. var centerPosition;
  38781. if (arcbarOption.centerX || arcbarOption.centerY) {
  38782. centerPosition = {
  38783. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  38784. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  38785. };
  38786. } else {
  38787. centerPosition = {
  38788. x: opts.width / 2,
  38789. y: opts.height / 2
  38790. };
  38791. }
  38792. var radius;
  38793. if (arcbarOption.radius) {
  38794. radius = arcbarOption.radius;
  38795. } else {
  38796. radius = Math.min(centerPosition.x, centerPosition.y);
  38797. radius -= 5 * opts.pix;
  38798. radius -= arcbarOption.width / 2;
  38799. }
  38800. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  38801. for (var i = 0; i < series.length; i++) {
  38802. var eachSeries = series[i];
  38803. //背景颜色
  38804. context.setLineWidth(arcbarOption.width * opts.pix);
  38805. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  38806. context.setLineCap('round');
  38807. context.beginPath();
  38808. if (arcbarOption.type == 'default') {
  38809. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
  38810. } else {
  38811. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  38812. }
  38813. context.stroke();
  38814. //进度条
  38815. var fillColor = eachSeries.color;
  38816. if (arcbarOption.linearType == 'custom') {
  38817. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  38818. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  38819. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  38820. fillColor = grd;
  38821. }
  38822. context.setLineWidth(arcbarOption.width * opts.pix);
  38823. context.setStrokeStyle(fillColor);
  38824. context.setLineCap('round');
  38825. context.beginPath();
  38826. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
  38827. context.stroke();
  38828. }
  38829. drawRingTitle(opts, config, context, centerPosition);
  38830. return {
  38831. center: centerPosition,
  38832. radius: radius,
  38833. series: series
  38834. };
  38835. }
  38836. function drawGaugeDataPoints(categories, series, opts, config, context) {
  38837. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38838. var gaugeOption = assign({}, {
  38839. type: 'default',
  38840. startAngle: 0.75,
  38841. endAngle: 0.25,
  38842. width: 15,
  38843. labelOffset: 13,
  38844. splitLine: {
  38845. fixRadius: 0,
  38846. splitNumber: 10,
  38847. width: 15,
  38848. color: '#FFFFFF',
  38849. childNumber: 5,
  38850. childWidth: 5
  38851. },
  38852. pointer: {
  38853. width: 15,
  38854. color: 'auto'
  38855. }
  38856. }, opts.extra.gauge);
  38857. if (gaugeOption.oldAngle == undefined) {
  38858. gaugeOption.oldAngle = gaugeOption.startAngle;
  38859. }
  38860. if (gaugeOption.oldData == undefined) {
  38861. gaugeOption.oldData = 0;
  38862. }
  38863. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  38864. var centerPosition = {
  38865. x: opts.width / 2,
  38866. y: opts.height / 2
  38867. };
  38868. var radius = Math.min(centerPosition.x, centerPosition.y);
  38869. radius -= 5 * opts.pix;
  38870. radius -= gaugeOption.width / 2;
  38871. var innerRadius = radius - gaugeOption.width;
  38872. var totalAngle = 0;
  38873. //判断仪表盘的样式:default百度样式,progress新样式
  38874. if (gaugeOption.type == 'progress') {
  38875. //## 第一步画中心圆形背景和进度条背景
  38876. //中心圆形背景
  38877. var pieRadius = radius - gaugeOption.width * 3;
  38878. context.beginPath();
  38879. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  38880. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  38881. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  38882. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38883. context.setFillStyle(gradient);
  38884. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  38885. context.fill();
  38886. //画进度条背景
  38887. context.setLineWidth(gaugeOption.width);
  38888. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38889. context.setLineCap('round');
  38890. context.beginPath();
  38891. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  38892. context.stroke();
  38893. //## 第二步画刻度线
  38894. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38895. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38896. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38897. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38898. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38899. context.save();
  38900. context.translate(centerPosition.x, centerPosition.y);
  38901. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38902. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  38903. var proc = series[0].data * process;
  38904. for (var i = 0; i < len; i++) {
  38905. context.beginPath();
  38906. //刻度线随进度变色
  38907. if (proc > i / len) {
  38908. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  38909. } else {
  38910. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38911. }
  38912. context.setLineWidth(3 * opts.pix);
  38913. context.moveTo(startX, 0);
  38914. context.lineTo(endX, 0);
  38915. context.stroke();
  38916. context.rotate(childAngle * Math.PI);
  38917. }
  38918. context.restore();
  38919. //## 第三步画进度条
  38920. series = getArcbarDataPoints(series, gaugeOption, process);
  38921. context.setLineWidth(gaugeOption.width);
  38922. context.setStrokeStyle(series[0].color);
  38923. context.setLineCap('round');
  38924. context.beginPath();
  38925. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  38926. context.stroke();
  38927. //## 第四步画指针
  38928. var pointerRadius = radius - gaugeOption.width * 2.5;
  38929. context.save();
  38930. context.translate(centerPosition.x, centerPosition.y);
  38931. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  38932. context.beginPath();
  38933. context.setLineWidth(gaugeOption.width / 3);
  38934. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  38935. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  38936. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  38937. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  38938. context.setStrokeStyle(gradient3);
  38939. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  38940. context.stroke();
  38941. context.beginPath();
  38942. context.setLineWidth(1);
  38943. context.setStrokeStyle(series[0].color);
  38944. context.setFillStyle(series[0].color);
  38945. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38946. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  38947. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  38948. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38949. context.stroke();
  38950. context.fill();
  38951. context.restore();
  38952. //default百度样式
  38953. } else {
  38954. //画背景
  38955. context.setLineWidth(gaugeOption.width);
  38956. context.setLineCap('butt');
  38957. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  38958. var eachCategories = categories[_i23];
  38959. context.beginPath();
  38960. context.setStrokeStyle(eachCategories.color);
  38961. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  38962. context.stroke();
  38963. }
  38964. context.save();
  38965. //画刻度线
  38966. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38967. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38968. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38969. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38970. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38971. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  38972. context.translate(centerPosition.x, centerPosition.y);
  38973. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38974. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  38975. context.beginPath();
  38976. context.setStrokeStyle(gaugeOption.splitLine.color);
  38977. context.setLineWidth(2 * opts.pix);
  38978. context.moveTo(_startX2, 0);
  38979. context.lineTo(_endX, 0);
  38980. context.stroke();
  38981. context.rotate(_splitAngle * Math.PI);
  38982. }
  38983. context.restore();
  38984. context.save();
  38985. context.translate(centerPosition.x, centerPosition.y);
  38986. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38987. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  38988. context.beginPath();
  38989. context.setStrokeStyle(gaugeOption.splitLine.color);
  38990. context.setLineWidth(1 * opts.pix);
  38991. context.moveTo(_startX2, 0);
  38992. context.lineTo(childendX, 0);
  38993. context.stroke();
  38994. context.rotate(_childAngle * Math.PI);
  38995. }
  38996. context.restore();
  38997. //画指针
  38998. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  38999. for (var _i26 = 0; _i26 < series.length; _i26++) {
  39000. var eachSeries = series[_i26];
  39001. context.save();
  39002. context.translate(centerPosition.x, centerPosition.y);
  39003. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  39004. context.beginPath();
  39005. context.setFillStyle(eachSeries.color);
  39006. context.moveTo(gaugeOption.pointer.width, 0);
  39007. context.lineTo(0, -gaugeOption.pointer.width / 2);
  39008. context.lineTo(-innerRadius, 0);
  39009. context.lineTo(0, gaugeOption.pointer.width / 2);
  39010. context.lineTo(gaugeOption.pointer.width, 0);
  39011. context.closePath();
  39012. context.fill();
  39013. context.beginPath();
  39014. context.setFillStyle('#FFFFFF');
  39015. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  39016. context.fill();
  39017. context.restore();
  39018. }
  39019. if (opts.dataLabel !== false) {
  39020. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  39021. }
  39022. }
  39023. //画仪表盘标题,副标题
  39024. drawRingTitle(opts, config, context, centerPosition);
  39025. if (process === 1 && opts.type === 'gauge') {
  39026. opts.extra.gauge.oldAngle = series[0]._proportion_;
  39027. opts.extra.gauge.oldData = series[0].data;
  39028. }
  39029. return {
  39030. center: centerPosition,
  39031. radius: radius,
  39032. innerRadius: innerRadius,
  39033. categories: categories,
  39034. totalAngle: totalAngle
  39035. };
  39036. }
  39037. function drawRadarDataPoints(series, opts, config, context) {
  39038. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39039. var radarOption = assign({}, {
  39040. gridColor: '#cccccc',
  39041. gridType: 'radar',
  39042. opacity: 0.2,
  39043. gridCount: 3,
  39044. border: false,
  39045. borderWidth: 2
  39046. }, opts.extra.radar);
  39047. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  39048. var centerPosition = {
  39049. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39050. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39051. };
  39052. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  39053. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  39054. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  39055. radius -= config.radarLabelTextMargin * opts.pix;
  39056. // 画分割线
  39057. context.beginPath();
  39058. context.setLineWidth(1 * opts.pix);
  39059. context.setStrokeStyle(radarOption.gridColor);
  39060. coordinateAngle.forEach(function (angle) {
  39061. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  39062. context.moveTo(centerPosition.x, centerPosition.y);
  39063. context.lineTo(pos.x, pos.y);
  39064. });
  39065. context.stroke();
  39066. context.closePath();
  39067. // 画背景网格
  39068. var _loop = function _loop(i) {
  39069. var startPos = {};
  39070. context.beginPath();
  39071. context.setLineWidth(1 * opts.pix);
  39072. context.setStrokeStyle(radarOption.gridColor);
  39073. if (radarOption.gridType == 'radar') {
  39074. coordinateAngle.forEach(function (angle, index) {
  39075. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  39076. if (index === 0) {
  39077. startPos = pos;
  39078. context.moveTo(pos.x, pos.y);
  39079. } else {
  39080. context.lineTo(pos.x, pos.y);
  39081. }
  39082. });
  39083. context.lineTo(startPos.x, startPos.y);
  39084. } else {
  39085. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  39086. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  39087. }
  39088. context.stroke();
  39089. context.closePath();
  39090. };
  39091. for (var i = 1; i <= radarOption.gridCount; i++) {
  39092. _loop(i);
  39093. }
  39094. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  39095. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39096. // 绘制区域数据
  39097. context.beginPath();
  39098. context.setLineWidth(radarOption.borderWidth * opts.pix);
  39099. context.setStrokeStyle(eachSeries.color);
  39100. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  39101. eachSeries.data.forEach(function (item, index) {
  39102. if (index === 0) {
  39103. context.moveTo(item.position.x, item.position.y);
  39104. } else {
  39105. context.lineTo(item.position.x, item.position.y);
  39106. }
  39107. });
  39108. context.closePath();
  39109. context.fill();
  39110. if (radarOption.border === true) {
  39111. context.stroke();
  39112. }
  39113. context.closePath();
  39114. if (opts.dataPointShape !== false) {
  39115. var points = eachSeries.data.map(function (item) {
  39116. return item.position;
  39117. });
  39118. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39119. }
  39120. });
  39121. // draw label text
  39122. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  39123. // draw dataLabel
  39124. if (opts.dataLabel !== false && process === 1) {
  39125. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39126. context.beginPath();
  39127. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  39128. context.setFontSize(fontSize);
  39129. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  39130. eachSeries.data.forEach(function (item, index) {
  39131. //如果是中心点垂直的上下点位
  39132. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  39133. //如果在上面
  39134. if (item.position.y < centerPosition.y) {
  39135. context.setTextAlign('center');
  39136. context.fillText(item.value, item.position.x, item.position.y - 4);
  39137. } else {
  39138. context.setTextAlign('center');
  39139. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  39140. }
  39141. } else {
  39142. //如果在左侧
  39143. if (item.position.x < centerPosition.x) {
  39144. context.setTextAlign('right');
  39145. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  39146. } else {
  39147. context.setTextAlign('left');
  39148. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  39149. }
  39150. }
  39151. });
  39152. context.closePath();
  39153. context.stroke();
  39154. });
  39155. context.setTextAlign('left');
  39156. }
  39157. return {
  39158. center: centerPosition,
  39159. radius: radius,
  39160. angleList: coordinateAngle
  39161. };
  39162. }
  39163. function normalInt(min, max, iter) {
  39164. iter = iter == 0 ? 1 : iter;
  39165. var arr = [];
  39166. for (var i = 0; i < iter; i++) {
  39167. arr[i] = Math.random();
  39168. }
  39169. ;
  39170. return Math.floor(arr.reduce(function (i, j) {
  39171. return i + j;
  39172. }) / iter * (max - min)) + min;
  39173. }
  39174. ;
  39175. function collisionNew(area, points, width, height) {
  39176. var isIn = false;
  39177. for (var i = 0; i < points.length; i++) {
  39178. if (points[i].area) {
  39179. if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
  39180. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  39181. isIn = true;
  39182. break;
  39183. } else {
  39184. isIn = false;
  39185. }
  39186. } else {
  39187. isIn = true;
  39188. break;
  39189. }
  39190. }
  39191. }
  39192. return isIn;
  39193. }
  39194. ;
  39195. function getBoundingBox(data) {
  39196. var bounds = {},
  39197. coords;
  39198. bounds.xMin = 180;
  39199. bounds.xMax = 0;
  39200. bounds.yMin = 90;
  39201. bounds.yMax = 0;
  39202. for (var i = 0; i < data.length; i++) {
  39203. var coorda = data[i].geometry.coordinates;
  39204. for (var k = 0; k < coorda.length; k++) {
  39205. coords = coorda[k];
  39206. if (coords.length == 1) {
  39207. coords = coords[0];
  39208. }
  39209. for (var j = 0; j < coords.length; j++) {
  39210. var longitude = coords[j][0];
  39211. var latitude = coords[j][1];
  39212. var point = {
  39213. x: longitude,
  39214. y: latitude
  39215. };
  39216. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  39217. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  39218. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  39219. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  39220. }
  39221. }
  39222. }
  39223. return bounds;
  39224. }
  39225. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  39226. return {
  39227. x: (longitude - bounds.xMin) * scale + xoffset,
  39228. y: (bounds.yMax - latitude) * scale + yoffset
  39229. };
  39230. }
  39231. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  39232. return {
  39233. x: (pointX - xoffset) / scale + bounds.xMin,
  39234. y: bounds.yMax - (pointY - yoffset) / scale
  39235. };
  39236. }
  39237. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  39238. if (s_poi[1] == e_poi[1]) {
  39239. return false;
  39240. }
  39241. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  39242. return false;
  39243. }
  39244. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  39245. return false;
  39246. }
  39247. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  39248. return false;
  39249. }
  39250. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  39251. return false;
  39252. }
  39253. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  39254. return false;
  39255. }
  39256. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  39257. if (xseg < poi[0]) {
  39258. return false;
  39259. } else {
  39260. return true;
  39261. }
  39262. }
  39263. function isPoiWithinPoly(poi, poly, mercator) {
  39264. var sinsc = 0;
  39265. for (var i = 0; i < poly.length; i++) {
  39266. var epoly = poly[i][0];
  39267. if (poly.length == 1) {
  39268. epoly = poly[i][0];
  39269. }
  39270. for (var j = 0; j < epoly.length - 1; j++) {
  39271. var s_poi = epoly[j];
  39272. var e_poi = epoly[j + 1];
  39273. if (mercator) {
  39274. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  39275. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  39276. }
  39277. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  39278. sinsc += 1;
  39279. }
  39280. }
  39281. }
  39282. if (sinsc % 2 == 1) {
  39283. return true;
  39284. } else {
  39285. return false;
  39286. }
  39287. }
  39288. function drawMapDataPoints(series, opts, config, context) {
  39289. var mapOption = assign({}, {
  39290. border: true,
  39291. mercator: false,
  39292. borderWidth: 1,
  39293. borderColor: '#666666',
  39294. fillOpacity: 0.6,
  39295. activeBorderColor: '#f04864',
  39296. activeFillColor: '#facc14',
  39297. activeFillOpacity: 1
  39298. }, opts.extra.map);
  39299. var coords, point;
  39300. var data = series;
  39301. var bounds = getBoundingBox(data);
  39302. if (mapOption.mercator) {
  39303. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  39304. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  39305. bounds.xMax = max[0];
  39306. bounds.yMax = max[1];
  39307. bounds.xMin = min[0];
  39308. bounds.yMin = min[1];
  39309. }
  39310. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  39311. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  39312. var scale = xScale < yScale ? xScale : yScale;
  39313. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  39314. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  39315. for (var i = 0; i < data.length; i++) {
  39316. context.beginPath();
  39317. context.setLineWidth(mapOption.borderWidth * opts.pix);
  39318. context.setStrokeStyle(mapOption.borderColor);
  39319. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  39320. if (opts.tooltip) {
  39321. if (opts.tooltip.index == i) {
  39322. context.setStrokeStyle(mapOption.activeBorderColor);
  39323. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  39324. }
  39325. }
  39326. var coorda = data[i].geometry.coordinates;
  39327. for (var k = 0; k < coorda.length; k++) {
  39328. coords = coorda[k];
  39329. if (coords.length == 1) {
  39330. coords = coords[0];
  39331. }
  39332. for (var j = 0; j < coords.length; j++) {
  39333. var gaosi = Array(2);
  39334. if (mapOption.mercator) {
  39335. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  39336. } else {
  39337. gaosi = coords[j];
  39338. }
  39339. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  39340. if (j === 0) {
  39341. context.beginPath();
  39342. context.moveTo(point.x, point.y);
  39343. } else {
  39344. context.lineTo(point.x, point.y);
  39345. }
  39346. }
  39347. context.fill();
  39348. if (mapOption.border == true) {
  39349. context.stroke();
  39350. }
  39351. }
  39352. if (opts.dataLabel == true) {
  39353. var centerPoint = data[i].properties.centroid;
  39354. if (centerPoint) {
  39355. if (mapOption.mercator) {
  39356. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  39357. }
  39358. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  39359. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  39360. var text = data[i].properties.name;
  39361. context.beginPath();
  39362. context.setFontSize(fontSize);
  39363. context.setFillStyle(data[i].textColor || opts.fontColor);
  39364. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  39365. context.closePath();
  39366. context.stroke();
  39367. }
  39368. }
  39369. }
  39370. opts.chartData.mapData = {
  39371. bounds: bounds,
  39372. scale: scale,
  39373. xoffset: xoffset,
  39374. yoffset: yoffset,
  39375. mercator: mapOption.mercator
  39376. };
  39377. drawToolTipBridge(opts, config, context, 1);
  39378. context.draw();
  39379. }
  39380. function getWordCloudPoint(opts, type, context) {
  39381. var points = opts.series;
  39382. switch (type) {
  39383. case 'normal':
  39384. for (var i = 0; i < points.length; i++) {
  39385. var text = points[i].name;
  39386. var tHeight = points[i].textSize * opts.pix;
  39387. var tWidth = measureText(text, tHeight, context);
  39388. var x = void 0,
  39389. y = void 0;
  39390. var area = void 0;
  39391. var breaknum = 0;
  39392. while (true) {
  39393. breaknum++;
  39394. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  39395. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  39396. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  39397. var isCollision = collisionNew(area, points, opts.width, opts.height);
  39398. if (!isCollision) break;
  39399. if (breaknum == 1000) {
  39400. area = [-100, -100, -100, -100];
  39401. break;
  39402. }
  39403. }
  39404. ;
  39405. points[i].area = area;
  39406. }
  39407. break;
  39408. case 'vertical':
  39409. var Spin = function Spin() {
  39410. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  39411. if (Math.random() > 0.7) {
  39412. return true;
  39413. } else {
  39414. return false;
  39415. }
  39416. ;
  39417. };
  39418. ;
  39419. for (var _i27 = 0; _i27 < points.length; _i27++) {
  39420. var _text = points[_i27].name;
  39421. var _tHeight = points[_i27].textSize * opts.pix;
  39422. var _tWidth = measureText(_text, _tHeight, context);
  39423. var isSpin = Spin();
  39424. var _x = void 0,
  39425. _y = void 0,
  39426. _area = void 0,
  39427. areav = void 0;
  39428. var _breaknum = 0;
  39429. while (true) {
  39430. _breaknum++;
  39431. var _isCollision = void 0;
  39432. if (isSpin) {
  39433. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39434. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39435. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  39436. areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) - 5, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) + _tHeight, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) + _tWidth + 5];
  39437. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  39438. } else {
  39439. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39440. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39441. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  39442. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  39443. }
  39444. if (!_isCollision) break;
  39445. if (_breaknum == 1000) {
  39446. _area = [-1000, -1000, -1000, -1000];
  39447. break;
  39448. }
  39449. }
  39450. ;
  39451. if (isSpin) {
  39452. points[_i27].area = areav;
  39453. points[_i27].areav = _area;
  39454. } else {
  39455. points[_i27].area = _area;
  39456. }
  39457. points[_i27].rotate = isSpin;
  39458. }
  39459. ;
  39460. break;
  39461. }
  39462. return points;
  39463. }
  39464. function drawWordCloudDataPoints(series, opts, config, context) {
  39465. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39466. var wordOption = assign({}, {
  39467. type: 'normal',
  39468. autoColors: true
  39469. }, opts.extra.word);
  39470. if (!opts.chartData.wordCloudData) {
  39471. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  39472. }
  39473. context.beginPath();
  39474. context.setFillStyle(opts.background);
  39475. context.rect(0, 0, opts.width, opts.height);
  39476. context.fill();
  39477. context.save();
  39478. var points = opts.chartData.wordCloudData;
  39479. context.translate(opts.width / 2, opts.height / 2);
  39480. for (var i = 0; i < points.length; i++) {
  39481. context.save();
  39482. if (points[i].rotate) {
  39483. context.rotate(90 * Math.PI / 180);
  39484. }
  39485. var text = points[i].name;
  39486. var tHeight = points[i].textSize * opts.pix;
  39487. var tWidth = measureText(text, tHeight, context);
  39488. context.beginPath();
  39489. context.setStrokeStyle(points[i].color);
  39490. context.setFillStyle(points[i].color);
  39491. context.setFontSize(tHeight);
  39492. if (points[i].rotate) {
  39493. if (points[i].areav[0] > 0) {
  39494. if (opts.tooltip) {
  39495. if (opts.tooltip.index == i) {
  39496. context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39497. } else {
  39498. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39499. }
  39500. } else {
  39501. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  39502. }
  39503. }
  39504. } else {
  39505. if (points[i].area[0] > 0) {
  39506. if (opts.tooltip) {
  39507. if (opts.tooltip.index == i) {
  39508. context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39509. } else {
  39510. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39511. }
  39512. } else {
  39513. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  39514. }
  39515. }
  39516. }
  39517. context.stroke();
  39518. context.restore();
  39519. }
  39520. context.restore();
  39521. }
  39522. function drawFunnelDataPoints(series, opts, config, context) {
  39523. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39524. var funnelOption = assign({}, {
  39525. type: 'funnel',
  39526. activeWidth: 10,
  39527. activeOpacity: 0.3,
  39528. border: false,
  39529. borderWidth: 2,
  39530. borderColor: '#FFFFFF',
  39531. fillOpacity: 1,
  39532. labelAlign: 'right',
  39533. linearType: 'none',
  39534. customColor: []
  39535. }, opts.extra.funnel);
  39536. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  39537. var centerPosition = {
  39538. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39539. y: opts.height - opts.area[2]
  39540. };
  39541. var activeWidth = funnelOption.activeWidth * opts.pix;
  39542. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  39543. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  39544. context.save();
  39545. context.translate(centerPosition.x, centerPosition.y);
  39546. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  39547. if (funnelOption.type == 'pyramid') {
  39548. for (var i = 0; i < series.length; i++) {
  39549. if (i == series.length - 1) {
  39550. if (opts.tooltip) {
  39551. if (opts.tooltip.index == i) {
  39552. context.beginPath();
  39553. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39554. context.moveTo(-activeWidth, -eachSpacing);
  39555. context.lineTo(-series[i].radius - activeWidth, 0);
  39556. context.lineTo(series[i].radius + activeWidth, 0);
  39557. context.lineTo(activeWidth, -eachSpacing);
  39558. context.lineTo(-activeWidth, -eachSpacing);
  39559. context.closePath();
  39560. context.fill();
  39561. }
  39562. }
  39563. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39564. context.beginPath();
  39565. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39566. context.setStrokeStyle(funnelOption.borderColor);
  39567. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39568. if (funnelOption.linearType == 'custom') {
  39569. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39570. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39571. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39572. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39573. fillColor = grd;
  39574. }
  39575. context.setFillStyle(fillColor);
  39576. context.moveTo(0, -eachSpacing);
  39577. context.lineTo(-series[i].radius, 0);
  39578. context.lineTo(series[i].radius, 0);
  39579. context.lineTo(0, -eachSpacing);
  39580. context.closePath();
  39581. context.fill();
  39582. if (funnelOption.border == true) {
  39583. context.stroke();
  39584. }
  39585. } else {
  39586. if (opts.tooltip) {
  39587. if (opts.tooltip.index == i) {
  39588. context.beginPath();
  39589. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39590. context.moveTo(0, 0);
  39591. context.lineTo(-series[i].radius - activeWidth, 0);
  39592. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  39593. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  39594. context.lineTo(series[i].radius + activeWidth, 0);
  39595. context.lineTo(0, 0);
  39596. context.closePath();
  39597. context.fill();
  39598. }
  39599. }
  39600. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39601. context.beginPath();
  39602. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39603. context.setStrokeStyle(funnelOption.borderColor);
  39604. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39605. if (funnelOption.linearType == 'custom') {
  39606. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39607. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39608. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39609. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39610. fillColor = grd;
  39611. }
  39612. context.setFillStyle(fillColor);
  39613. context.moveTo(0, 0);
  39614. context.lineTo(-series[i].radius, 0);
  39615. context.lineTo(-series[i + 1].radius, -eachSpacing);
  39616. context.lineTo(series[i + 1].radius, -eachSpacing);
  39617. context.lineTo(series[i].radius, 0);
  39618. context.lineTo(0, 0);
  39619. context.closePath();
  39620. context.fill();
  39621. if (funnelOption.border == true) {
  39622. context.stroke();
  39623. }
  39624. }
  39625. context.translate(0, -eachSpacing);
  39626. }
  39627. } else {
  39628. for (var _i28 = 0; _i28 < series.length; _i28++) {
  39629. if (_i28 == 0) {
  39630. if (opts.tooltip) {
  39631. if (opts.tooltip.index == _i28) {
  39632. context.beginPath();
  39633. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39634. context.moveTo(-activeWidth, 0);
  39635. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39636. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39637. context.lineTo(activeWidth, 0);
  39638. context.lineTo(-activeWidth, 0);
  39639. context.closePath();
  39640. context.fill();
  39641. }
  39642. }
  39643. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  39644. context.beginPath();
  39645. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39646. context.setStrokeStyle(funnelOption.borderColor);
  39647. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39648. if (funnelOption.linearType == 'custom') {
  39649. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39650. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39651. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39652. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39653. fillColor = grd;
  39654. }
  39655. context.setFillStyle(fillColor);
  39656. context.moveTo(0, 0);
  39657. context.lineTo(-series[_i28].radius, -eachSpacing);
  39658. context.lineTo(series[_i28].radius, -eachSpacing);
  39659. context.lineTo(0, 0);
  39660. context.closePath();
  39661. context.fill();
  39662. if (funnelOption.border == true) {
  39663. context.stroke();
  39664. }
  39665. } else {
  39666. if (opts.tooltip) {
  39667. if (opts.tooltip.index == _i28) {
  39668. context.beginPath();
  39669. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39670. context.moveTo(0, 0);
  39671. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  39672. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39673. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39674. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  39675. context.lineTo(0, 0);
  39676. context.closePath();
  39677. context.fill();
  39678. }
  39679. }
  39680. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  39681. context.beginPath();
  39682. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39683. context.setStrokeStyle(funnelOption.borderColor);
  39684. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39685. if (funnelOption.linearType == 'custom') {
  39686. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39687. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39688. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39689. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39690. fillColor = grd;
  39691. }
  39692. context.setFillStyle(fillColor);
  39693. context.moveTo(0, 0);
  39694. context.lineTo(-series[_i28 - 1].radius, 0);
  39695. context.lineTo(-series[_i28].radius, -eachSpacing);
  39696. context.lineTo(series[_i28].radius, -eachSpacing);
  39697. context.lineTo(series[_i28 - 1].radius, 0);
  39698. context.lineTo(0, 0);
  39699. context.closePath();
  39700. context.fill();
  39701. if (funnelOption.border == true) {
  39702. context.stroke();
  39703. }
  39704. }
  39705. context.translate(0, -eachSpacing);
  39706. }
  39707. }
  39708. context.restore();
  39709. if (opts.dataLabel !== false && process === 1) {
  39710. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  39711. }
  39712. return {
  39713. center: centerPosition,
  39714. radius: radius,
  39715. series: series
  39716. };
  39717. }
  39718. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  39719. for (var i = 0; i < series.length; i++) {
  39720. var item = series[i];
  39721. var startX = void 0,
  39722. endX = void 0,
  39723. startY = void 0,
  39724. fontSize = void 0;
  39725. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  39726. if (labelAlign == 'right') {
  39727. if (opts.extra.funnel.type === 'pyramid') {
  39728. if (i == series.length - 1) {
  39729. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39730. } else {
  39731. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  39732. }
  39733. } else {
  39734. if (i == 0) {
  39735. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39736. } else {
  39737. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  39738. }
  39739. }
  39740. endX = startX + activeWidth * 2;
  39741. startY = item.funnelArea[1] + eachSpacing / 2;
  39742. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39743. context.setLineWidth(1 * opts.pix);
  39744. context.setStrokeStyle(item.color);
  39745. context.setFillStyle(item.color);
  39746. context.beginPath();
  39747. context.moveTo(startX, startY);
  39748. context.lineTo(endX, startY);
  39749. context.stroke();
  39750. context.closePath();
  39751. context.beginPath();
  39752. context.moveTo(endX, startY);
  39753. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39754. context.closePath();
  39755. context.fill();
  39756. context.beginPath();
  39757. context.setFontSize(fontSize);
  39758. context.setFillStyle(item.textColor || opts.fontColor);
  39759. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  39760. context.closePath();
  39761. context.stroke();
  39762. context.closePath();
  39763. } else {
  39764. if (opts.extra.funnel.type === 'pyramid') {
  39765. if (i == series.length - 1) {
  39766. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39767. } else {
  39768. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  39769. }
  39770. } else {
  39771. if (i == 0) {
  39772. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39773. } else {
  39774. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  39775. }
  39776. }
  39777. endX = startX - activeWidth * 2;
  39778. startY = item.funnelArea[1] + eachSpacing / 2;
  39779. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39780. context.setLineWidth(1 * opts.pix);
  39781. context.setStrokeStyle(item.color);
  39782. context.setFillStyle(item.color);
  39783. context.beginPath();
  39784. context.moveTo(startX, startY);
  39785. context.lineTo(endX, startY);
  39786. context.stroke();
  39787. context.closePath();
  39788. context.beginPath();
  39789. context.moveTo(endX, startY);
  39790. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39791. context.closePath();
  39792. context.fill();
  39793. context.beginPath();
  39794. context.setFontSize(fontSize);
  39795. context.setFillStyle(item.textColor || opts.fontColor);
  39796. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  39797. context.closePath();
  39798. context.stroke();
  39799. context.closePath();
  39800. }
  39801. }
  39802. }
  39803. function drawCanvas(opts, context) {
  39804. context.draw();
  39805. }
  39806. var Timing = {
  39807. easeIn: function easeIn(pos) {
  39808. return Math.pow(pos, 3);
  39809. },
  39810. easeOut: function easeOut(pos) {
  39811. return Math.pow(pos - 1, 3) + 1;
  39812. },
  39813. easeInOut: function easeInOut(pos) {
  39814. if ((pos /= 0.5) < 1) {
  39815. return 0.5 * Math.pow(pos, 3);
  39816. } else {
  39817. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  39818. }
  39819. },
  39820. linear: function linear(pos) {
  39821. return pos;
  39822. }
  39823. };
  39824. function Animation(opts) {
  39825. this.isStop = false;
  39826. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  39827. opts.timing = opts.timing || 'easeInOut';
  39828. var delay = 17;
  39829. function createAnimationFrame() {
  39830. if (typeof setTimeout !== 'undefined') {
  39831. return function (step, delay) {
  39832. setTimeout(function () {
  39833. var timeStamp = +new Date();
  39834. step(timeStamp);
  39835. }, delay);
  39836. };
  39837. } else if (typeof requestAnimationFrame !== 'undefined') {
  39838. return requestAnimationFrame;
  39839. } else {
  39840. return function (step) {
  39841. step(null);
  39842. };
  39843. }
  39844. }
  39845. ;
  39846. var animationFrame = createAnimationFrame();
  39847. var startTimeStamp = null;
  39848. var _step = function step(timestamp) {
  39849. if (timestamp === null || this.isStop === true) {
  39850. opts.onProcess && opts.onProcess(1);
  39851. opts.onAnimationFinish && opts.onAnimationFinish();
  39852. return;
  39853. }
  39854. if (startTimeStamp === null) {
  39855. startTimeStamp = timestamp;
  39856. }
  39857. if (timestamp - startTimeStamp < opts.duration) {
  39858. var process = (timestamp - startTimeStamp) / opts.duration;
  39859. var timingFunction = Timing[opts.timing];
  39860. process = timingFunction(process);
  39861. opts.onProcess && opts.onProcess(process);
  39862. animationFrame(_step, delay);
  39863. } else {
  39864. opts.onProcess && opts.onProcess(1);
  39865. opts.onAnimationFinish && opts.onAnimationFinish();
  39866. }
  39867. };
  39868. _step = _step.bind(this);
  39869. animationFrame(_step, delay);
  39870. }
  39871. Animation.prototype.stop = function () {
  39872. this.isStop = true;
  39873. };
  39874. function drawCharts(type, opts, config, context) {
  39875. var _this = this;
  39876. var series = opts.series;
  39877. //兼容ECharts饼图类数据格式
  39878. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  39879. series = fixPieSeries(series, opts, config);
  39880. }
  39881. var categories = opts.categories;
  39882. series = fillSeries(series, opts, config);
  39883. var duration = opts.animation ? opts.duration : 0;
  39884. _this.animationInstance && _this.animationInstance.stop();
  39885. var seriesMA = null;
  39886. if (type == 'candle') {
  39887. var average = assign({}, opts.extra.candle.average);
  39888. if (average.show) {
  39889. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  39890. seriesMA = fillSeries(seriesMA, opts, config);
  39891. opts.seriesMA = seriesMA;
  39892. } else if (opts.seriesMA) {
  39893. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  39894. } else {
  39895. seriesMA = series;
  39896. }
  39897. } else {
  39898. seriesMA = series;
  39899. }
  39900. /* 过滤掉show=false的series */
  39901. opts._series_ = series = filterSeries(series);
  39902. //重新计算图表区域
  39903. opts.area = new Array(4);
  39904. //复位绘图区域
  39905. for (var j = 0; j < 4; j++) {
  39906. opts.area[j] = opts.padding[j] * opts.pix;
  39907. }
  39908. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  39909. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  39910. legendHeight = _calLegendData.area.wholeHeight,
  39911. legendWidth = _calLegendData.area.wholeWidth;
  39912. switch (opts.legend.position) {
  39913. case 'top':
  39914. opts.area[0] += legendHeight;
  39915. break;
  39916. case 'bottom':
  39917. opts.area[2] += legendHeight;
  39918. break;
  39919. case 'left':
  39920. opts.area[3] += legendWidth;
  39921. break;
  39922. case 'right':
  39923. opts.area[1] += legendWidth;
  39924. break;
  39925. }
  39926. var _calYAxisData = {},
  39927. yAxisWidth = 0;
  39928. if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39929. _calYAxisData = calYAxisData(series, opts, config, context);
  39930. yAxisWidth = _calYAxisData.yAxisWidth;
  39931. //如果显示Y轴标题
  39932. if (opts.yAxis.showTitle) {
  39933. var maxTitleHeight = 0;
  39934. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39935. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  39936. }
  39937. opts.area[0] += maxTitleHeight;
  39938. }
  39939. var rightIndex = 0,
  39940. leftIndex = 0;
  39941. //计算主绘图区域左右位置
  39942. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  39943. if (yAxisWidth[_i29].position == 'left') {
  39944. if (leftIndex > 0) {
  39945. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39946. } else {
  39947. opts.area[3] += yAxisWidth[_i29].width;
  39948. }
  39949. leftIndex += 1;
  39950. } else if (yAxisWidth[_i29].position == 'right') {
  39951. if (rightIndex > 0) {
  39952. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39953. } else {
  39954. opts.area[1] += yAxisWidth[_i29].width;
  39955. }
  39956. rightIndex += 1;
  39957. }
  39958. }
  39959. } else {
  39960. config.yAxisWidth = yAxisWidth;
  39961. }
  39962. opts.chartData.yAxisData = _calYAxisData;
  39963. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  39964. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  39965. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39966. xAxisHeight = _calCategoriesData.xAxisHeight,
  39967. angle = _calCategoriesData.angle;
  39968. config.xAxisHeight = xAxisHeight;
  39969. config._xAxisTextAngle_ = angle;
  39970. opts.area[2] += xAxisHeight;
  39971. opts.chartData.categoriesData = _calCategoriesData;
  39972. } else {
  39973. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39974. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  39975. categories = opts.chartData.xAxisData.rangesFormat;
  39976. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39977. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  39978. _angle = _calCategoriesData2.angle;
  39979. config.xAxisHeight = _xAxisHeight;
  39980. config._xAxisTextAngle_ = _angle;
  39981. opts.area[2] += _xAxisHeight;
  39982. opts.chartData.categoriesData = _calCategoriesData2;
  39983. } else {
  39984. opts.chartData.xAxisData = {
  39985. xAxisPoints: []
  39986. };
  39987. }
  39988. }
  39989. //计算右对齐偏移距离
  39990. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  39991. var offsetLeft = 0,
  39992. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39993. startX = opts.chartData.xAxisData.startX,
  39994. endX = opts.chartData.xAxisData.endX,
  39995. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  39996. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39997. var screenWidth = endX - startX;
  39998. offsetLeft = screenWidth - totalWidth;
  39999. _this.scrollOption = {
  40000. currentOffset: offsetLeft,
  40001. startTouchX: offsetLeft,
  40002. distance: 0,
  40003. lastMoveTime: 0
  40004. };
  40005. opts._scrollDistance_ = offsetLeft;
  40006. }
  40007. if (type === 'pie' || type === 'ring' || type === 'rose') {
  40008. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  40009. }
  40010. switch (type) {
  40011. case 'word':
  40012. this.animationInstance = new Animation({
  40013. timing: opts.timing,
  40014. duration: duration,
  40015. onProcess: function onProcess(process) {
  40016. context.clearRect(0, 0, opts.width, opts.height);
  40017. if (opts.rotate) {
  40018. contextRotate(context, opts);
  40019. }
  40020. drawWordCloudDataPoints(series, opts, config, context, process);
  40021. drawCanvas(opts, context);
  40022. },
  40023. onAnimationFinish: function onAnimationFinish() {
  40024. _this.uevent.trigger('renderComplete');
  40025. }
  40026. });
  40027. break;
  40028. case 'map':
  40029. context.clearRect(0, 0, opts.width, opts.height);
  40030. drawMapDataPoints(series, opts, config, context);
  40031. break;
  40032. case 'funnel':
  40033. this.animationInstance = new Animation({
  40034. timing: opts.timing,
  40035. duration: duration,
  40036. onProcess: function onProcess(process) {
  40037. context.clearRect(0, 0, opts.width, opts.height);
  40038. if (opts.rotate) {
  40039. contextRotate(context, opts);
  40040. }
  40041. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  40042. drawLegend(opts.series, opts, config, context, opts.chartData);
  40043. drawToolTipBridge(opts, config, context, process);
  40044. drawCanvas(opts, context);
  40045. },
  40046. onAnimationFinish: function onAnimationFinish() {
  40047. _this.uevent.trigger('renderComplete');
  40048. }
  40049. });
  40050. break;
  40051. case 'line':
  40052. this.animationInstance = new Animation({
  40053. timing: opts.timing,
  40054. duration: duration,
  40055. onProcess: function onProcess(process) {
  40056. context.clearRect(0, 0, opts.width, opts.height);
  40057. if (opts.rotate) {
  40058. contextRotate(context, opts);
  40059. }
  40060. drawYAxisGrid(categories, opts, config, context);
  40061. drawXAxis(categories, opts, config, context);
  40062. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  40063. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  40064. calPoints = _drawLineDataPoints.calPoints,
  40065. eachSpacing = _drawLineDataPoints.eachSpacing;
  40066. opts.chartData.xAxisPoints = xAxisPoints;
  40067. opts.chartData.calPoints = calPoints;
  40068. opts.chartData.eachSpacing = eachSpacing;
  40069. drawYAxis(series, opts, config, context);
  40070. if (opts.enableMarkLine !== false && process === 1) {
  40071. drawMarkLine(opts, config, context);
  40072. }
  40073. drawLegend(opts.series, opts, config, context, opts.chartData);
  40074. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40075. drawCanvas(opts, context);
  40076. },
  40077. onAnimationFinish: function onAnimationFinish() {
  40078. _this.uevent.trigger('renderComplete');
  40079. }
  40080. });
  40081. break;
  40082. case 'scatter':
  40083. this.animationInstance = new Animation({
  40084. timing: opts.timing,
  40085. duration: duration,
  40086. onProcess: function onProcess(process) {
  40087. context.clearRect(0, 0, opts.width, opts.height);
  40088. if (opts.rotate) {
  40089. contextRotate(context, opts);
  40090. }
  40091. drawYAxisGrid(categories, opts, config, context);
  40092. drawXAxis(categories, opts, config, context);
  40093. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  40094. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  40095. calPoints = _drawScatterDataPoints.calPoints,
  40096. eachSpacing = _drawScatterDataPoints.eachSpacing;
  40097. opts.chartData.xAxisPoints = xAxisPoints;
  40098. opts.chartData.calPoints = calPoints;
  40099. opts.chartData.eachSpacing = eachSpacing;
  40100. drawYAxis(series, opts, config, context);
  40101. if (opts.enableMarkLine !== false && process === 1) {
  40102. drawMarkLine(opts, config, context);
  40103. }
  40104. drawLegend(opts.series, opts, config, context, opts.chartData);
  40105. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40106. drawCanvas(opts, context);
  40107. },
  40108. onAnimationFinish: function onAnimationFinish() {
  40109. _this.uevent.trigger('renderComplete');
  40110. }
  40111. });
  40112. break;
  40113. case 'bubble':
  40114. this.animationInstance = new Animation({
  40115. timing: opts.timing,
  40116. duration: duration,
  40117. onProcess: function onProcess(process) {
  40118. context.clearRect(0, 0, opts.width, opts.height);
  40119. if (opts.rotate) {
  40120. contextRotate(context, opts);
  40121. }
  40122. drawYAxisGrid(categories, opts, config, context);
  40123. drawXAxis(categories, opts, config, context);
  40124. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  40125. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  40126. calPoints = _drawBubbleDataPoints.calPoints,
  40127. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  40128. opts.chartData.xAxisPoints = xAxisPoints;
  40129. opts.chartData.calPoints = calPoints;
  40130. opts.chartData.eachSpacing = eachSpacing;
  40131. drawYAxis(series, opts, config, context);
  40132. if (opts.enableMarkLine !== false && process === 1) {
  40133. drawMarkLine(opts, config, context);
  40134. }
  40135. drawLegend(opts.series, opts, config, context, opts.chartData);
  40136. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40137. drawCanvas(opts, context);
  40138. },
  40139. onAnimationFinish: function onAnimationFinish() {
  40140. _this.uevent.trigger('renderComplete');
  40141. }
  40142. });
  40143. break;
  40144. case 'mix':
  40145. this.animationInstance = new Animation({
  40146. timing: opts.timing,
  40147. duration: duration,
  40148. onProcess: function onProcess(process) {
  40149. context.clearRect(0, 0, opts.width, opts.height);
  40150. if (opts.rotate) {
  40151. contextRotate(context, opts);
  40152. }
  40153. drawYAxisGrid(categories, opts, config, context);
  40154. drawXAxis(categories, opts, config, context);
  40155. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  40156. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  40157. calPoints = _drawMixDataPoints.calPoints,
  40158. eachSpacing = _drawMixDataPoints.eachSpacing;
  40159. opts.chartData.xAxisPoints = xAxisPoints;
  40160. opts.chartData.calPoints = calPoints;
  40161. opts.chartData.eachSpacing = eachSpacing;
  40162. drawYAxis(series, opts, config, context);
  40163. if (opts.enableMarkLine !== false && process === 1) {
  40164. drawMarkLine(opts, config, context);
  40165. }
  40166. drawLegend(opts.series, opts, config, context, opts.chartData);
  40167. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40168. drawCanvas(opts, context);
  40169. },
  40170. onAnimationFinish: function onAnimationFinish() {
  40171. _this.uevent.trigger('renderComplete');
  40172. }
  40173. });
  40174. break;
  40175. case 'column':
  40176. this.animationInstance = new Animation({
  40177. timing: opts.timing,
  40178. duration: duration,
  40179. onProcess: function onProcess(process) {
  40180. context.clearRect(0, 0, opts.width, opts.height);
  40181. if (opts.rotate) {
  40182. contextRotate(context, opts);
  40183. }
  40184. drawYAxisGrid(categories, opts, config, context);
  40185. drawXAxis(categories, opts, config, context);
  40186. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  40187. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  40188. calPoints = _drawColumnDataPoints.calPoints,
  40189. eachSpacing = _drawColumnDataPoints.eachSpacing;
  40190. opts.chartData.xAxisPoints = xAxisPoints;
  40191. opts.chartData.calPoints = calPoints;
  40192. opts.chartData.eachSpacing = eachSpacing;
  40193. drawYAxis(series, opts, config, context);
  40194. if (opts.enableMarkLine !== false && process === 1) {
  40195. drawMarkLine(opts, config, context);
  40196. }
  40197. drawLegend(opts.series, opts, config, context, opts.chartData);
  40198. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40199. drawCanvas(opts, context);
  40200. },
  40201. onAnimationFinish: function onAnimationFinish() {
  40202. _this.uevent.trigger('renderComplete');
  40203. }
  40204. });
  40205. break;
  40206. case 'bar':
  40207. this.animationInstance = new Animation({
  40208. timing: opts.timing,
  40209. duration: duration,
  40210. onProcess: function onProcess(process) {
  40211. context.clearRect(0, 0, opts.width, opts.height);
  40212. if (opts.rotate) {
  40213. contextRotate(context, opts);
  40214. }
  40215. drawXAxis(categories, opts, config, context);
  40216. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  40217. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  40218. calPoints = _drawBarDataPoints.calPoints,
  40219. eachSpacing = _drawBarDataPoints.eachSpacing;
  40220. opts.chartData.yAxisPoints = yAxisPoints;
  40221. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  40222. opts.chartData.calPoints = calPoints;
  40223. opts.chartData.eachSpacing = eachSpacing;
  40224. drawYAxis(series, opts, config, context);
  40225. if (opts.enableMarkLine !== false && process === 1) {
  40226. drawMarkLine(opts, config, context);
  40227. }
  40228. drawLegend(opts.series, opts, config, context, opts.chartData);
  40229. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  40230. drawCanvas(opts, context);
  40231. },
  40232. onAnimationFinish: function onAnimationFinish() {
  40233. _this.uevent.trigger('renderComplete');
  40234. }
  40235. });
  40236. break;
  40237. case 'area':
  40238. this.animationInstance = new Animation({
  40239. timing: opts.timing,
  40240. duration: duration,
  40241. onProcess: function onProcess(process) {
  40242. context.clearRect(0, 0, opts.width, opts.height);
  40243. if (opts.rotate) {
  40244. contextRotate(context, opts);
  40245. }
  40246. drawYAxisGrid(categories, opts, config, context);
  40247. drawXAxis(categories, opts, config, context);
  40248. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  40249. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  40250. calPoints = _drawAreaDataPoints.calPoints,
  40251. eachSpacing = _drawAreaDataPoints.eachSpacing;
  40252. opts.chartData.xAxisPoints = xAxisPoints;
  40253. opts.chartData.calPoints = calPoints;
  40254. opts.chartData.eachSpacing = eachSpacing;
  40255. drawYAxis(series, opts, config, context);
  40256. if (opts.enableMarkLine !== false && process === 1) {
  40257. drawMarkLine(opts, config, context);
  40258. }
  40259. drawLegend(opts.series, opts, config, context, opts.chartData);
  40260. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40261. drawCanvas(opts, context);
  40262. },
  40263. onAnimationFinish: function onAnimationFinish() {
  40264. _this.uevent.trigger('renderComplete');
  40265. }
  40266. });
  40267. break;
  40268. case 'ring':
  40269. case 'pie':
  40270. this.animationInstance = new Animation({
  40271. timing: opts.timing,
  40272. duration: duration,
  40273. onProcess: function onProcess(process) {
  40274. context.clearRect(0, 0, opts.width, opts.height);
  40275. if (opts.rotate) {
  40276. contextRotate(context, opts);
  40277. }
  40278. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  40279. drawLegend(opts.series, opts, config, context, opts.chartData);
  40280. drawToolTipBridge(opts, config, context, process);
  40281. drawCanvas(opts, context);
  40282. },
  40283. onAnimationFinish: function onAnimationFinish() {
  40284. _this.uevent.trigger('renderComplete');
  40285. }
  40286. });
  40287. break;
  40288. case 'rose':
  40289. this.animationInstance = new Animation({
  40290. timing: opts.timing,
  40291. duration: duration,
  40292. onProcess: function onProcess(process) {
  40293. context.clearRect(0, 0, opts.width, opts.height);
  40294. if (opts.rotate) {
  40295. contextRotate(context, opts);
  40296. }
  40297. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  40298. drawLegend(opts.series, opts, config, context, opts.chartData);
  40299. drawToolTipBridge(opts, config, context, process);
  40300. drawCanvas(opts, context);
  40301. },
  40302. onAnimationFinish: function onAnimationFinish() {
  40303. _this.uevent.trigger('renderComplete');
  40304. }
  40305. });
  40306. break;
  40307. case 'radar':
  40308. this.animationInstance = new Animation({
  40309. timing: opts.timing,
  40310. duration: duration,
  40311. onProcess: function onProcess(process) {
  40312. context.clearRect(0, 0, opts.width, opts.height);
  40313. if (opts.rotate) {
  40314. contextRotate(context, opts);
  40315. }
  40316. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  40317. drawLegend(opts.series, opts, config, context, opts.chartData);
  40318. drawToolTipBridge(opts, config, context, process);
  40319. drawCanvas(opts, context);
  40320. },
  40321. onAnimationFinish: function onAnimationFinish() {
  40322. _this.uevent.trigger('renderComplete');
  40323. }
  40324. });
  40325. break;
  40326. case 'arcbar':
  40327. this.animationInstance = new Animation({
  40328. timing: opts.timing,
  40329. duration: duration,
  40330. onProcess: function onProcess(process) {
  40331. context.clearRect(0, 0, opts.width, opts.height);
  40332. if (opts.rotate) {
  40333. contextRotate(context, opts);
  40334. }
  40335. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  40336. drawCanvas(opts, context);
  40337. },
  40338. onAnimationFinish: function onAnimationFinish() {
  40339. _this.uevent.trigger('renderComplete');
  40340. }
  40341. });
  40342. break;
  40343. case 'gauge':
  40344. this.animationInstance = new Animation({
  40345. timing: opts.timing,
  40346. duration: duration,
  40347. onProcess: function onProcess(process) {
  40348. context.clearRect(0, 0, opts.width, opts.height);
  40349. if (opts.rotate) {
  40350. contextRotate(context, opts);
  40351. }
  40352. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  40353. drawCanvas(opts, context);
  40354. },
  40355. onAnimationFinish: function onAnimationFinish() {
  40356. _this.uevent.trigger('renderComplete');
  40357. }
  40358. });
  40359. break;
  40360. case 'candle':
  40361. this.animationInstance = new Animation({
  40362. timing: opts.timing,
  40363. duration: duration,
  40364. onProcess: function onProcess(process) {
  40365. context.clearRect(0, 0, opts.width, opts.height);
  40366. if (opts.rotate) {
  40367. contextRotate(context, opts);
  40368. }
  40369. drawYAxisGrid(categories, opts, config, context);
  40370. drawXAxis(categories, opts, config, context);
  40371. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  40372. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  40373. calPoints = _drawCandleDataPoints.calPoints,
  40374. eachSpacing = _drawCandleDataPoints.eachSpacing;
  40375. opts.chartData.xAxisPoints = xAxisPoints;
  40376. opts.chartData.calPoints = calPoints;
  40377. opts.chartData.eachSpacing = eachSpacing;
  40378. drawYAxis(series, opts, config, context);
  40379. if (opts.enableMarkLine !== false && process === 1) {
  40380. drawMarkLine(opts, config, context);
  40381. }
  40382. if (seriesMA) {
  40383. drawLegend(seriesMA, opts, config, context, opts.chartData);
  40384. } else {
  40385. drawLegend(opts.series, opts, config, context, opts.chartData);
  40386. }
  40387. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40388. drawCanvas(opts, context);
  40389. },
  40390. onAnimationFinish: function onAnimationFinish() {
  40391. _this.uevent.trigger('renderComplete');
  40392. }
  40393. });
  40394. break;
  40395. }
  40396. }
  40397. function uChartsEvent() {
  40398. this.events = {};
  40399. }
  40400. uChartsEvent.prototype.addEventListener = function (type, listener) {
  40401. this.events[type] = this.events[type] || [];
  40402. this.events[type].push(listener);
  40403. };
  40404. uChartsEvent.prototype.delEventListener = function (type) {
  40405. this.events[type] = [];
  40406. };
  40407. uChartsEvent.prototype.trigger = function () {
  40408. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  40409. args[_key] = arguments[_key];
  40410. }
  40411. var type = args[0];
  40412. var params = args.slice(1);
  40413. if (!!this.events[type]) {
  40414. this.events[type].forEach(function (listener) {
  40415. try {
  40416. listener.apply(null, params);
  40417. } catch (e) {
  40418. //console.log('[uCharts] '+e);
  40419. }
  40420. });
  40421. }
  40422. };
  40423. var uCharts = function uCharts(opts) {
  40424. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  40425. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  40426. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  40427. if (opts.background == "" || opts.background == "none") {
  40428. opts.background = "#FFFFFF";
  40429. }
  40430. opts.title = assign({}, opts.title);
  40431. opts.subtitle = assign({}, opts.subtitle);
  40432. opts.duration = opts.duration ? opts.duration : 1000;
  40433. opts.yAxis = assign({}, {
  40434. data: [],
  40435. showTitle: false,
  40436. disabled: false,
  40437. disableGrid: false,
  40438. splitNumber: 5,
  40439. gridType: 'solid',
  40440. dashLength: 4 * opts.pix,
  40441. gridColor: '#cccccc',
  40442. padding: 10,
  40443. fontColor: '#666666'
  40444. }, opts.yAxis);
  40445. opts.xAxis = assign({}, {
  40446. rotateLabel: false,
  40447. disabled: false,
  40448. disableGrid: false,
  40449. splitNumber: 5,
  40450. calibration: false,
  40451. gridType: 'solid',
  40452. dashLength: 4,
  40453. scrollAlign: 'left',
  40454. boundaryGap: 'center',
  40455. axisLine: true,
  40456. axisLineColor: '#cccccc'
  40457. }, opts.xAxis);
  40458. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  40459. opts.legend = assign({}, {
  40460. show: true,
  40461. position: 'bottom',
  40462. float: 'center',
  40463. backgroundColor: 'rgba(0,0,0,0)',
  40464. borderColor: 'rgba(0,0,0,0)',
  40465. borderWidth: 0,
  40466. padding: 5,
  40467. margin: 5,
  40468. itemGap: 10,
  40469. fontSize: opts.fontSize,
  40470. lineHeight: opts.fontSize,
  40471. fontColor: opts.fontColor,
  40472. formatter: {},
  40473. hiddenColor: '#CECECE'
  40474. }, opts.legend);
  40475. opts.extra = assign({}, opts.extra);
  40476. opts.rotate = opts.rotate ? true : false;
  40477. opts.animation = opts.animation ? true : false;
  40478. opts.rotate = opts.rotate ? true : false;
  40479. opts.canvas2d = opts.canvas2d ? true : false;
  40480. var config$$1 = JSON.parse(JSON.stringify(config));
  40481. config$$1.color = opts.color ? opts.color : config$$1.color;
  40482. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  40483. if (opts.type == 'pie') {
  40484. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40485. }
  40486. if (opts.type == 'ring') {
  40487. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40488. }
  40489. if (opts.type == 'rose') {
  40490. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40491. }
  40492. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  40493. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  40494. //屏幕旋转
  40495. config$$1.rotate = opts.rotate;
  40496. if (opts.rotate) {
  40497. var tempWidth = opts.width;
  40498. var tempHeight = opts.height;
  40499. opts.width = tempHeight;
  40500. opts.height = tempWidth;
  40501. }
  40502. //适配高分屏
  40503. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  40504. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  40505. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  40506. if (opts.enableScroll && opts.xAxis.scrollShow) {
  40507. config$$1.xAxisHeight += 6 * opts.pix;
  40508. }
  40509. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  40510. config$$1.fontSize = opts.fontSize * opts.pix;
  40511. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  40512. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  40513. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  40514. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  40515. config$$1.columePadding = config.columePadding * opts.pix;
  40516. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  40517. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  40518. if (!opts.context) {
  40519. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  40520. }
  40521. this.context = opts.context;
  40522. if (!this.context.setTextAlign) {
  40523. this.context.setStrokeStyle = function (e) {
  40524. return this.strokeStyle = e;
  40525. };
  40526. this.context.setLineWidth = function (e) {
  40527. return this.lineWidth = e;
  40528. };
  40529. this.context.setLineCap = function (e) {
  40530. return this.lineCap = e;
  40531. };
  40532. this.context.setFontSize = function (e) {
  40533. return this.font = e + "px sans-serif";
  40534. };
  40535. this.context.setFillStyle = function (e) {
  40536. return this.fillStyle = e;
  40537. };
  40538. this.context.setTextAlign = function (e) {
  40539. return this.textAlign = e;
  40540. };
  40541. this.context.draw = function () {};
  40542. }
  40543. //兼容NVUEsetLineDash
  40544. if (!this.context.setLineDash) {
  40545. this.context.setLineDash = function (e) {};
  40546. }
  40547. opts.chartData = {};
  40548. this.uevent = new uChartsEvent();
  40549. this.scrollOption = {
  40550. currentOffset: 0,
  40551. startTouchX: 0,
  40552. distance: 0,
  40553. lastMoveTime: 0
  40554. };
  40555. this.opts = opts;
  40556. this.config = config$$1;
  40557. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  40558. };
  40559. uCharts.prototype.updateData = function () {
  40560. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  40561. this.opts = assign({}, this.opts, data);
  40562. this.opts.updateData = true;
  40563. var scrollPosition = data.scrollPosition || 'current';
  40564. switch (scrollPosition) {
  40565. case 'current':
  40566. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40567. break;
  40568. case 'left':
  40569. this.opts._scrollDistance_ = 0;
  40570. this.scrollOption = {
  40571. currentOffset: 0,
  40572. startTouchX: 0,
  40573. distance: 0,
  40574. lastMoveTime: 0
  40575. };
  40576. break;
  40577. case 'right':
  40578. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40579. yAxisWidth = _calYAxisData.yAxisWidth;
  40580. this.config.yAxisWidth = yAxisWidth;
  40581. var offsetLeft = 0;
  40582. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40583. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40584. startX = _getXAxisPoints0.startX,
  40585. endX = _getXAxisPoints0.endX,
  40586. eachSpacing = _getXAxisPoints0.eachSpacing;
  40587. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  40588. var screenWidth = endX - startX;
  40589. offsetLeft = screenWidth - totalWidth;
  40590. this.scrollOption = {
  40591. currentOffset: offsetLeft,
  40592. startTouchX: offsetLeft,
  40593. distance: 0,
  40594. lastMoveTime: 0
  40595. };
  40596. this.opts._scrollDistance_ = offsetLeft;
  40597. break;
  40598. }
  40599. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40600. };
  40601. uCharts.prototype.zoom = function () {
  40602. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  40603. if (this.opts.enableScroll !== true) {
  40604. console.log('[uCharts] 请启用滚动条后使用');
  40605. return;
  40606. }
  40607. //当前屏幕中间点
  40608. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  40609. this.opts.animation = false;
  40610. this.opts.xAxis.itemCount = val.itemCount;
  40611. //重新计算x轴偏移距离
  40612. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40613. yAxisWidth = _calYAxisData.yAxisWidth;
  40614. this.config.yAxisWidth = yAxisWidth;
  40615. var offsetLeft = 0;
  40616. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40617. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40618. startX = _getXAxisPoints0.startX,
  40619. endX = _getXAxisPoints0.endX,
  40620. eachSpacing = _getXAxisPoints0.eachSpacing;
  40621. var centerLeft = eachSpacing * centerPoint;
  40622. var screenWidth = endX - startX;
  40623. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  40624. offsetLeft = screenWidth / 2 - centerLeft;
  40625. if (offsetLeft > 0) {
  40626. offsetLeft = 0;
  40627. }
  40628. if (offsetLeft < MaxLeft) {
  40629. offsetLeft = MaxLeft;
  40630. }
  40631. this.scrollOption = {
  40632. currentOffset: offsetLeft,
  40633. startTouchX: offsetLeft,
  40634. distance: 0,
  40635. lastMoveTime: 0
  40636. };
  40637. this.opts._scrollDistance_ = offsetLeft;
  40638. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40639. };
  40640. uCharts.prototype.stopAnimation = function () {
  40641. this.animationInstance && this.animationInstance.stop();
  40642. };
  40643. uCharts.prototype.addEventListener = function (type, listener) {
  40644. this.uevent.addEventListener(type, listener);
  40645. };
  40646. uCharts.prototype.delEventListener = function (type) {
  40647. this.uevent.delEventListener(type);
  40648. };
  40649. uCharts.prototype.getCurrentDataIndex = function (e) {
  40650. var touches = null;
  40651. if (e.changedTouches) {
  40652. touches = e.changedTouches[0];
  40653. } else {
  40654. touches = e.mp.changedTouches[0];
  40655. }
  40656. if (touches) {
  40657. var _touches$ = getTouches(touches, this.opts, e);
  40658. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  40659. return findPieChartCurrentIndex({
  40660. x: _touches$.x,
  40661. y: _touches$.y
  40662. }, this.opts.chartData.pieData, this.opts);
  40663. } else if (this.opts.type === 'rose') {
  40664. return findRoseChartCurrentIndex({
  40665. x: _touches$.x,
  40666. y: _touches$.y
  40667. }, this.opts.chartData.pieData, this.opts);
  40668. } else if (this.opts.type === 'radar') {
  40669. return findRadarChartCurrentIndex({
  40670. x: _touches$.x,
  40671. y: _touches$.y
  40672. }, this.opts.chartData.radarData, this.opts.categories.length);
  40673. } else if (this.opts.type === 'funnel') {
  40674. return findFunnelChartCurrentIndex({
  40675. x: _touches$.x,
  40676. y: _touches$.y
  40677. }, this.opts.chartData.funnelData);
  40678. } else if (this.opts.type === 'map') {
  40679. return findMapChartCurrentIndex({
  40680. x: _touches$.x,
  40681. y: _touches$.y
  40682. }, this.opts);
  40683. } else if (this.opts.type === 'word') {
  40684. return findWordChartCurrentIndex({
  40685. x: _touches$.x,
  40686. y: _touches$.y
  40687. }, this.opts.chartData.wordCloudData);
  40688. } else if (this.opts.type === 'bar') {
  40689. return findBarChartCurrentIndex({
  40690. x: _touches$.x,
  40691. y: _touches$.y
  40692. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40693. } else {
  40694. return findCurrentIndex({
  40695. x: _touches$.x,
  40696. y: _touches$.y
  40697. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40698. }
  40699. }
  40700. return -1;
  40701. };
  40702. uCharts.prototype.getLegendDataIndex = function (e) {
  40703. var touches = null;
  40704. if (e.changedTouches) {
  40705. touches = e.changedTouches[0];
  40706. } else {
  40707. touches = e.mp.changedTouches[0];
  40708. }
  40709. if (touches) {
  40710. var _touches$ = getTouches(touches, this.opts, e);
  40711. return findLegendIndex({
  40712. x: _touches$.x,
  40713. y: _touches$.y
  40714. }, this.opts.chartData.legendData);
  40715. }
  40716. return -1;
  40717. };
  40718. uCharts.prototype.touchLegend = function (e) {
  40719. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40720. var touches = null;
  40721. if (e.changedTouches) {
  40722. touches = e.changedTouches[0];
  40723. } else {
  40724. touches = e.mp.changedTouches[0];
  40725. }
  40726. if (touches) {
  40727. var _touches$ = getTouches(touches, this.opts, e);
  40728. var index = this.getLegendDataIndex(e);
  40729. if (index >= 0) {
  40730. if (this.opts.type == 'candle') {
  40731. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  40732. } else {
  40733. this.opts.series[index].show = !this.opts.series[index].show;
  40734. }
  40735. this.opts.animation = option.animation ? true : false;
  40736. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40737. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40738. }
  40739. }
  40740. };
  40741. uCharts.prototype.showToolTip = function (e) {
  40742. var _this2 = this;
  40743. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40744. var touches = null;
  40745. if (e.changedTouches) {
  40746. touches = e.changedTouches[0];
  40747. } else {
  40748. touches = e.mp.changedTouches[0];
  40749. }
  40750. if (!touches) {
  40751. console.log("[uCharts] 未获取到event坐标信息");
  40752. }
  40753. var _touches$ = getTouches(touches, this.opts, e);
  40754. var currentOffset = this.scrollOption.currentOffset;
  40755. var opts = assign({}, this.opts, {
  40756. _scrollDistance_: currentOffset,
  40757. animation: false
  40758. });
  40759. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  40760. var current = this.getCurrentDataIndex(e);
  40761. var index = option.index == undefined ? current.index : option.index;
  40762. if (index > -1 || index.length > 0) {
  40763. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40764. if (seriesData.length !== 0) {
  40765. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40766. textList = _getToolTipData.textList,
  40767. offset = _getToolTipData.offset;
  40768. offset.y = _touches$.y;
  40769. opts.tooltip = {
  40770. textList: option.textList !== undefined ? option.textList : textList,
  40771. offset: option.offset !== undefined ? option.offset : offset,
  40772. option: option,
  40773. index: index
  40774. };
  40775. }
  40776. }
  40777. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40778. }
  40779. if (this.opts.type === 'bar') {
  40780. var current = this.getCurrentDataIndex(e);
  40781. var index = option.index == undefined ? current.index : option.index;
  40782. if (index > -1 || index.length > 0) {
  40783. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40784. if (seriesData.length !== 0) {
  40785. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40786. textList = _getToolTipData.textList,
  40787. offset = _getToolTipData.offset;
  40788. offset.x = _touches$.x;
  40789. opts.tooltip = {
  40790. textList: option.textList !== undefined ? option.textList : textList,
  40791. offset: option.offset !== undefined ? option.offset : offset,
  40792. option: option,
  40793. index: index
  40794. };
  40795. }
  40796. }
  40797. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40798. }
  40799. if (this.opts.type === 'mix') {
  40800. var current = this.getCurrentDataIndex(e);
  40801. var index = option.index == undefined ? current.index : option.index;
  40802. if (index > -1) {
  40803. var currentOffset = this.scrollOption.currentOffset;
  40804. var opts = assign({}, this.opts, {
  40805. _scrollDistance_: currentOffset,
  40806. animation: false
  40807. });
  40808. var seriesData = getSeriesDataItem(this.opts.series, index);
  40809. if (seriesData.length !== 0) {
  40810. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  40811. textList = _getMixToolTipData.textList,
  40812. offset = _getMixToolTipData.offset;
  40813. offset.y = _touches$.y;
  40814. opts.tooltip = {
  40815. textList: option.textList ? option.textList : textList,
  40816. offset: option.offset !== undefined ? option.offset : offset,
  40817. option: option,
  40818. index: index
  40819. };
  40820. }
  40821. }
  40822. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40823. }
  40824. if (this.opts.type === 'candle') {
  40825. var current = this.getCurrentDataIndex(e);
  40826. var index = option.index == undefined ? current.index : option.index;
  40827. if (index > -1) {
  40828. var currentOffset = this.scrollOption.currentOffset;
  40829. var opts = assign({}, this.opts, {
  40830. _scrollDistance_: currentOffset,
  40831. animation: false
  40832. });
  40833. var seriesData = getSeriesDataItem(this.opts.series, index);
  40834. if (seriesData.length !== 0) {
  40835. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  40836. textList = _getToolTipData.textList,
  40837. offset = _getToolTipData.offset;
  40838. offset.y = _touches$.y;
  40839. opts.tooltip = {
  40840. textList: option.textList ? option.textList : textList,
  40841. offset: option.offset !== undefined ? option.offset : offset,
  40842. option: option,
  40843. index: index
  40844. };
  40845. }
  40846. }
  40847. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40848. }
  40849. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  40850. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40851. if (index > -1) {
  40852. var opts = assign({}, this.opts, {
  40853. animation: false
  40854. });
  40855. var seriesData = assign({}, opts._series_[index]);
  40856. var textList = [{
  40857. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  40858. color: seriesData.color
  40859. }];
  40860. var offset = {
  40861. x: _touches$.x,
  40862. y: _touches$.y
  40863. };
  40864. opts.tooltip = {
  40865. textList: option.textList ? option.textList : textList,
  40866. offset: option.offset !== undefined ? option.offset : offset,
  40867. option: option,
  40868. index: index
  40869. };
  40870. }
  40871. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40872. }
  40873. if (this.opts.type === 'map') {
  40874. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40875. if (index > -1) {
  40876. var opts = assign({}, this.opts, {
  40877. animation: false
  40878. });
  40879. var seriesData = assign({}, this.opts.series[index]);
  40880. seriesData.name = seriesData.properties.name;
  40881. var textList = [{
  40882. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40883. color: seriesData.color
  40884. }];
  40885. var offset = {
  40886. x: _touches$.x,
  40887. y: _touches$.y
  40888. };
  40889. opts.tooltip = {
  40890. textList: option.textList ? option.textList : textList,
  40891. offset: option.offset !== undefined ? option.offset : offset,
  40892. option: option,
  40893. index: index
  40894. };
  40895. }
  40896. opts.updateData = false;
  40897. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40898. }
  40899. if (this.opts.type === 'word') {
  40900. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40901. if (index > -1) {
  40902. var opts = assign({}, this.opts, {
  40903. animation: false
  40904. });
  40905. var seriesData = assign({}, this.opts.series[index]);
  40906. var textList = [{
  40907. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40908. color: seriesData.color
  40909. }];
  40910. var offset = {
  40911. x: _touches$.x,
  40912. y: _touches$.y
  40913. };
  40914. opts.tooltip = {
  40915. textList: option.textList ? option.textList : textList,
  40916. offset: option.offset !== undefined ? option.offset : offset,
  40917. option: option,
  40918. index: index
  40919. };
  40920. }
  40921. opts.updateData = false;
  40922. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40923. }
  40924. if (this.opts.type === 'radar') {
  40925. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40926. if (index > -1) {
  40927. var opts = assign({}, this.opts, {
  40928. animation: false
  40929. });
  40930. var seriesData = getSeriesDataItem(this.opts.series, index);
  40931. if (seriesData.length !== 0) {
  40932. var textList = seriesData.map(function (item) {
  40933. return {
  40934. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  40935. color: item.color
  40936. };
  40937. });
  40938. var offset = {
  40939. x: _touches$.x,
  40940. y: _touches$.y
  40941. };
  40942. opts.tooltip = {
  40943. textList: option.textList ? option.textList : textList,
  40944. offset: option.offset !== undefined ? option.offset : offset,
  40945. option: option,
  40946. index: index
  40947. };
  40948. }
  40949. }
  40950. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40951. }
  40952. };
  40953. uCharts.prototype.translate = function (distance) {
  40954. this.scrollOption = {
  40955. currentOffset: distance,
  40956. startTouchX: distance,
  40957. distance: 0,
  40958. lastMoveTime: 0
  40959. };
  40960. var opts = assign({}, this.opts, {
  40961. _scrollDistance_: distance,
  40962. animation: false
  40963. });
  40964. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  40965. };
  40966. uCharts.prototype.scrollStart = function (e) {
  40967. var touches = null;
  40968. if (e.changedTouches) {
  40969. touches = e.changedTouches[0];
  40970. } else {
  40971. touches = e.mp.changedTouches[0];
  40972. }
  40973. var _touches$ = getTouches(touches, this.opts, e);
  40974. if (touches && this.opts.enableScroll === true) {
  40975. this.scrollOption.startTouchX = _touches$.x;
  40976. }
  40977. };
  40978. uCharts.prototype.scroll = function (e) {
  40979. if (this.scrollOption.lastMoveTime === 0) {
  40980. this.scrollOption.lastMoveTime = Date.now();
  40981. }
  40982. var Limit = this.opts.touchMoveLimit || 60;
  40983. var currMoveTime = Date.now();
  40984. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  40985. if (duration < Math.floor(1000 / Limit)) return;
  40986. this.scrollOption.lastMoveTime = currMoveTime;
  40987. var touches = null;
  40988. if (e.changedTouches) {
  40989. touches = e.changedTouches[0];
  40990. } else {
  40991. touches = e.mp.changedTouches[0];
  40992. }
  40993. if (touches && this.opts.enableScroll === true) {
  40994. var _touches$ = getTouches(touches, this.opts, e);
  40995. var _distance;
  40996. _distance = _touches$.x - this.scrollOption.startTouchX;
  40997. var currentOffset = this.scrollOption.currentOffset;
  40998. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  40999. this.scrollOption.distance = _distance = validDistance - currentOffset;
  41000. var opts = assign({}, this.opts, {
  41001. _scrollDistance_: currentOffset + _distance,
  41002. animation: false
  41003. });
  41004. this.opts = opts;
  41005. drawCharts.call(this, opts.type, opts, this.config, this.context);
  41006. return currentOffset + _distance;
  41007. }
  41008. };
  41009. uCharts.prototype.scrollEnd = function (e) {
  41010. if (this.opts.enableScroll === true) {
  41011. var _scrollOption = this.scrollOption,
  41012. currentOffset = _scrollOption.currentOffset,
  41013. distance = _scrollOption.distance;
  41014. this.scrollOption.currentOffset = currentOffset + distance;
  41015. this.scrollOption.distance = 0;
  41016. }
  41017. };
  41018. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  41019. module.exports = uCharts;
  41020. }
  41021. var _default = uCharts;
  41022. exports.default = _default;
  41023. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/module.js */ 40)(module)))
  41024. /***/ }),
  41025. /***/ 504:
  41026. /*!*************************************************************************************************!*\
  41027. !*** E:/Desktop/zd_wechatApp(1)/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  41028. \*************************************************************************************************/
  41029. /*! no static exports found */
  41030. /***/ (function(module, exports, __webpack_require__) {
  41031. "use strict";
  41032. Object.defineProperty(exports, "__esModule", {
  41033. value: true
  41034. });
  41035. exports.default = void 0;
  41036. /*
  41037. * uCharts®
  41038. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  41039. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  41040. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  41041. * 复制使用请保留本段注释,感谢支持开源!
  41042. *
  41043. * uCharts®官方网站
  41044. * https://www.uCharts.cn
  41045. *
  41046. * 开源地址:
  41047. * https://gitee.com/uCharts/uCharts
  41048. *
  41049. * uni-app插件市场地址:
  41050. * http://ext.dcloud.net.cn/plugin?id=271
  41051. *
  41052. */
  41053. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  41054. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  41055. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  41056. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  41057. var date = new Date();
  41058. date.setTime(timeStamp * 1000);
  41059. var y = date.getFullYear();
  41060. var m = date.getMonth() + 1;
  41061. m = m < 10 ? '0' + m : m;
  41062. var d = date.getDate();
  41063. d = d < 10 ? '0' + d : d;
  41064. var h = date.getHours();
  41065. h = h < 10 ? '0' + h : h;
  41066. var minute = date.getMinutes();
  41067. var second = date.getSeconds();
  41068. minute = minute < 10 ? '0' + minute : minute;
  41069. second = second < 10 ? '0' + second : second;
  41070. if (returnType == 'full') {
  41071. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  41072. }
  41073. if (returnType == 'y-m-d') {
  41074. return y + '-' + m + '-' + d;
  41075. }
  41076. if (returnType == 'h:m') {
  41077. return h + ':' + minute;
  41078. }
  41079. if (returnType == 'h:m:s') {
  41080. return h + ':' + minute + ':' + second;
  41081. }
  41082. return [y, m, d, h, minute, second];
  41083. };
  41084. var cfu = {
  41085. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  41086. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  41087. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  41088. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  41089. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  41090. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  41091. //instance为实例变量承载属性,不要删除
  41092. "instance": {},
  41093. //option为opts及eopts承载属性,不要删除
  41094. "option": {},
  41095. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  41096. "formatter": {
  41097. "yAxisDemo1": function yAxisDemo1(val) {
  41098. return val + '元';
  41099. },
  41100. "yAxisDemo2": function yAxisDemo2(val) {
  41101. return val.toFixed(2);
  41102. },
  41103. "xAxisDemo1": function xAxisDemo1(val) {
  41104. return val + '年';
  41105. },
  41106. "xAxisDemo2": function xAxisDemo2(val) {
  41107. return formatDateTime(val, 'h:m');
  41108. },
  41109. "seriesDemo1": function seriesDemo1(val) {
  41110. return val + '元';
  41111. },
  41112. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  41113. if (index == 0) {
  41114. return '随便用' + item.data + '年';
  41115. } else {
  41116. return '其他我没改' + item.data + '天';
  41117. }
  41118. },
  41119. "pieDemo": function pieDemo(val, index, series) {
  41120. if (index !== undefined) {
  41121. return series[index].name + ':' + series[index].data + '元';
  41122. }
  41123. }
  41124. },
  41125. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  41126. "demotype": {
  41127. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  41128. "type": "line",
  41129. "color": color,
  41130. "padding": [15, 10, 0, 15],
  41131. "xAxis": {
  41132. "disableGrid": true
  41133. },
  41134. "yAxis": {
  41135. "gridType": "dash",
  41136. "dashLength": 2
  41137. },
  41138. "legend": {},
  41139. "extra": {
  41140. "line": {
  41141. "type": "curve",
  41142. "width": 2
  41143. }
  41144. }
  41145. },
  41146. //下面是自定义配置,请添加项目所需的通用配置
  41147. "pie": {
  41148. "type": "pie",
  41149. "color": color,
  41150. "padding": [5, 5, 5, 5],
  41151. "extra": {
  41152. "pie": {
  41153. "activeOpacity": 0.5,
  41154. "activeRadius": 10,
  41155. "offsetAngle": 0,
  41156. "labelWidth": 15,
  41157. "border": true,
  41158. "borderWidth": 3,
  41159. "borderColor": "#FFFFFF"
  41160. }
  41161. }
  41162. },
  41163. "ring": {
  41164. "type": "ring",
  41165. "color": color,
  41166. "padding": [5, 5, 5, 5],
  41167. "rotate": false,
  41168. "dataLabel": true,
  41169. "legend": {
  41170. "show": true,
  41171. "position": "right",
  41172. "lineHeight": 25
  41173. },
  41174. "title": {
  41175. "name": "收益率",
  41176. "fontSize": 15,
  41177. "color": "#666666"
  41178. },
  41179. "subtitle": {
  41180. "name": "70%",
  41181. "fontSize": 25,
  41182. "color": "#7cb5ec"
  41183. },
  41184. "extra": {
  41185. "ring": {
  41186. "ringWidth": 30,
  41187. "activeOpacity": 0.5,
  41188. "activeRadius": 10,
  41189. "offsetAngle": 0,
  41190. "labelWidth": 15,
  41191. "border": true,
  41192. "borderWidth": 3,
  41193. "borderColor": "#FFFFFF"
  41194. }
  41195. }
  41196. },
  41197. "rose": {
  41198. "type": "rose",
  41199. "color": color,
  41200. "padding": [5, 5, 5, 5],
  41201. "legend": {
  41202. "show": true,
  41203. "position": "left",
  41204. "lineHeight": 25
  41205. },
  41206. "extra": {
  41207. "rose": {
  41208. "type": "area",
  41209. "minRadius": 50,
  41210. "activeOpacity": 0.5,
  41211. "activeRadius": 10,
  41212. "offsetAngle": 0,
  41213. "labelWidth": 15,
  41214. "border": false,
  41215. "borderWidth": 2,
  41216. "borderColor": "#FFFFFF"
  41217. }
  41218. }
  41219. },
  41220. "word": {
  41221. "type": "word",
  41222. "color": color,
  41223. "extra": {
  41224. "word": {
  41225. "type": "normal",
  41226. "autoColors": false
  41227. }
  41228. }
  41229. },
  41230. "funnel": {
  41231. "type": "funnel",
  41232. "color": color,
  41233. "padding": [15, 15, 0, 15],
  41234. "extra": {
  41235. "funnel": {
  41236. "activeOpacity": 0.3,
  41237. "activeWidth": 10,
  41238. "border": true,
  41239. "borderWidth": 2,
  41240. "borderColor": "#FFFFFF",
  41241. "fillOpacity": 1,
  41242. "labelAlign": "right"
  41243. }
  41244. }
  41245. },
  41246. "map": {
  41247. "type": "map",
  41248. "color": color,
  41249. "padding": [0, 0, 0, 0],
  41250. "dataLabel": true,
  41251. "extra": {
  41252. "map": {
  41253. "border": true,
  41254. "borderWidth": 1,
  41255. "borderColor": "#666666",
  41256. "fillOpacity": 0.6,
  41257. "activeBorderColor": "#F04864",
  41258. "activeFillColor": "#FACC14",
  41259. "activeFillOpacity": 1
  41260. }
  41261. }
  41262. },
  41263. "arcbar": {
  41264. "type": "arcbar",
  41265. "color": color,
  41266. "title": {
  41267. "name": "百分比",
  41268. "fontSize": 25,
  41269. "color": "#00FF00"
  41270. },
  41271. "subtitle": {
  41272. "name": "默认标题",
  41273. "fontSize": 15,
  41274. "color": "#666666"
  41275. },
  41276. "extra": {
  41277. "arcbar": {
  41278. "type": "default",
  41279. "width": 12,
  41280. "backgroundColor": "#E9E9E9",
  41281. "startAngle": 0.75,
  41282. "endAngle": 0.25,
  41283. "gap": 2
  41284. }
  41285. }
  41286. },
  41287. "line": {
  41288. "type": "line",
  41289. "color": color,
  41290. "padding": [15, 10, 0, 15],
  41291. "xAxis": {
  41292. "disableGrid": true
  41293. },
  41294. "yAxis": {
  41295. "gridType": "dash",
  41296. "dashLength": 2
  41297. },
  41298. "legend": {},
  41299. "extra": {
  41300. "line": {
  41301. "type": "straight",
  41302. "width": 2
  41303. }
  41304. }
  41305. },
  41306. "tline": {
  41307. "type": "line",
  41308. "color": color,
  41309. "padding": [15, 10, 0, 15],
  41310. "xAxis": {
  41311. "disableGrid": false,
  41312. "boundaryGap": "justify"
  41313. },
  41314. "yAxis": {
  41315. "gridType": "dash",
  41316. "dashLength": 2,
  41317. "data": [{
  41318. "min": 0,
  41319. "max": 80
  41320. }]
  41321. },
  41322. "legend": {},
  41323. "extra": {
  41324. "line": {
  41325. "type": "curve",
  41326. "width": 2
  41327. }
  41328. }
  41329. },
  41330. "tarea": {
  41331. "type": "area",
  41332. "color": color,
  41333. "padding": [15, 10, 0, 15],
  41334. "xAxis": {
  41335. "disableGrid": true,
  41336. "boundaryGap": "justify"
  41337. },
  41338. "yAxis": {
  41339. "gridType": "dash",
  41340. "dashLength": 2,
  41341. "data": [{
  41342. "min": 0,
  41343. "max": 80
  41344. }]
  41345. },
  41346. "legend": {},
  41347. "extra": {
  41348. "area": {
  41349. "type": "curve",
  41350. "opacity": 0.2,
  41351. "addLine": true,
  41352. "width": 2,
  41353. "gradient": true
  41354. }
  41355. }
  41356. },
  41357. "column": {
  41358. "type": "column",
  41359. "color": color,
  41360. "padding": [15, 15, 0, 5],
  41361. "xAxis": {
  41362. "disableGrid": true
  41363. },
  41364. "yAxis": {
  41365. "data": [{
  41366. "min": 0
  41367. }]
  41368. },
  41369. "legend": {},
  41370. "extra": {
  41371. "column": {
  41372. "type": "group",
  41373. "width": 30,
  41374. "meterBorde": 1,
  41375. "meterFillColor": "#FFFFFF",
  41376. "activeBgColor": "#000000",
  41377. "activeBgOpacity": 0.08
  41378. }
  41379. }
  41380. },
  41381. "bar": {
  41382. "type": "bar",
  41383. "color": color,
  41384. "padding": [15, 30, 0, 5],
  41385. "xAxis": {
  41386. "boundaryGap": "justify",
  41387. "disableGrid": false,
  41388. "min": 0,
  41389. "axisLine": false
  41390. },
  41391. "yAxis": {},
  41392. "legend": {},
  41393. "extra": {
  41394. "bar": {
  41395. "type": "group",
  41396. "width": 30,
  41397. "meterBorde": 1,
  41398. "meterFillColor": "#FFFFFF",
  41399. "activeBgColor": "#000000",
  41400. "activeBgOpacity": 0.08
  41401. }
  41402. }
  41403. },
  41404. "area": {
  41405. "type": "area",
  41406. "color": color,
  41407. "padding": [15, 15, 0, 15],
  41408. "xAxis": {
  41409. "disableGrid": true
  41410. },
  41411. "yAxis": {
  41412. "gridType": "dash",
  41413. "dashLength": 2
  41414. },
  41415. "legend": {},
  41416. "extra": {
  41417. "area": {
  41418. "type": "straight",
  41419. "opacity": 0.2,
  41420. "addLine": true,
  41421. "width": 2,
  41422. "gradient": false
  41423. }
  41424. }
  41425. },
  41426. "radar": {
  41427. "type": "radar",
  41428. "color": color,
  41429. "padding": [5, 5, 5, 5],
  41430. "dataLabel": false,
  41431. "legend": {
  41432. "show": true,
  41433. "position": "right",
  41434. "lineHeight": 25
  41435. },
  41436. "extra": {
  41437. "radar": {
  41438. "gridType": "radar",
  41439. "gridColor": "#CCCCCC",
  41440. "gridCount": 3,
  41441. "opacity": 0.2,
  41442. "max": 200
  41443. }
  41444. }
  41445. },
  41446. "gauge": {
  41447. "type": "gauge",
  41448. "color": color,
  41449. "title": {
  41450. "name": "66Km/H",
  41451. "fontSize": 25,
  41452. "color": "#2fc25b",
  41453. "offsetY": 50
  41454. },
  41455. "subtitle": {
  41456. "name": "实时速度",
  41457. "fontSize": 15,
  41458. "color": "#1890ff",
  41459. "offsetY": -50
  41460. },
  41461. "extra": {
  41462. "gauge": {
  41463. "type": "default",
  41464. "width": 30,
  41465. "labelColor": "#666666",
  41466. "startAngle": 0.75,
  41467. "endAngle": 0.25,
  41468. "startNumber": 0,
  41469. "endNumber": 100,
  41470. "labelFormat": "",
  41471. "splitLine": {
  41472. "fixRadius": 0,
  41473. "splitNumber": 10,
  41474. "width": 30,
  41475. "color": "#FFFFFF",
  41476. "childNumber": 5,
  41477. "childWidth": 12
  41478. },
  41479. "pointer": {
  41480. "width": 24,
  41481. "color": "auto"
  41482. }
  41483. }
  41484. }
  41485. },
  41486. "candle": {
  41487. "type": "candle",
  41488. "color": color,
  41489. "padding": [15, 15, 0, 15],
  41490. "enableScroll": true,
  41491. "enableMarkLine": true,
  41492. "dataLabel": false,
  41493. "xAxis": {
  41494. "labelCount": 4,
  41495. "itemCount": 40,
  41496. "disableGrid": true,
  41497. "gridColor": "#CCCCCC",
  41498. "gridType": "solid",
  41499. "dashLength": 4,
  41500. "scrollShow": true,
  41501. "scrollAlign": "left",
  41502. "scrollColor": "#A6A6A6",
  41503. "scrollBackgroundColor": "#EFEBEF"
  41504. },
  41505. "yAxis": {},
  41506. "legend": {},
  41507. "extra": {
  41508. "candle": {
  41509. "color": {
  41510. "upLine": "#f04864",
  41511. "upFill": "#f04864",
  41512. "downLine": "#2fc25b",
  41513. "downFill": "#2fc25b"
  41514. },
  41515. "average": {
  41516. "show": true,
  41517. "name": ["MA5", "MA10", "MA30"],
  41518. "day": [5, 10, 20],
  41519. "color": ["#1890ff", "#2fc25b", "#facc14"]
  41520. }
  41521. },
  41522. "markLine": {
  41523. "type": "dash",
  41524. "dashLength": 5,
  41525. "data": [{
  41526. "value": 2150,
  41527. "lineColor": "#f04864",
  41528. "showLabel": true
  41529. }, {
  41530. "value": 2350,
  41531. "lineColor": "#f04864",
  41532. "showLabel": true
  41533. }]
  41534. }
  41535. }
  41536. },
  41537. "mix": {
  41538. "type": "mix",
  41539. "color": color,
  41540. "padding": [15, 15, 0, 15],
  41541. "xAxis": {
  41542. "disableGrid": true
  41543. },
  41544. "yAxis": {
  41545. "disabled": false,
  41546. "disableGrid": false,
  41547. "splitNumber": 5,
  41548. "gridType": "dash",
  41549. "dashLength": 4,
  41550. "gridColor": "#CCCCCC",
  41551. "padding": 10,
  41552. "showTitle": true,
  41553. "data": []
  41554. },
  41555. "legend": {},
  41556. "extra": {
  41557. "mix": {
  41558. "column": {
  41559. "width": 20
  41560. }
  41561. }
  41562. }
  41563. },
  41564. "scatter": {
  41565. "type": "scatter",
  41566. "color": color,
  41567. "padding": [15, 15, 0, 15],
  41568. "dataLabel": false,
  41569. "xAxis": {
  41570. "disableGrid": false,
  41571. "gridType": "dash",
  41572. "splitNumber": 5,
  41573. "boundaryGap": "justify",
  41574. "min": 0
  41575. },
  41576. "yAxis": {
  41577. "disableGrid": false,
  41578. "gridType": "dash"
  41579. },
  41580. "legend": {},
  41581. "extra": {
  41582. "scatter": {}
  41583. }
  41584. },
  41585. "bubble": {
  41586. "type": "bubble",
  41587. "color": color,
  41588. "padding": [15, 15, 0, 15],
  41589. "xAxis": {
  41590. "disableGrid": false,
  41591. "gridType": "dash",
  41592. "splitNumber": 5,
  41593. "boundaryGap": "justify",
  41594. "min": 0,
  41595. "max": 250
  41596. },
  41597. "yAxis": {
  41598. "disableGrid": false,
  41599. "gridType": "dash",
  41600. "data": [{
  41601. "min": 0,
  41602. "max": 150
  41603. }]
  41604. },
  41605. "legend": {},
  41606. "extra": {
  41607. "bubble": {
  41608. "border": 2,
  41609. "opacity": 0.5
  41610. }
  41611. }
  41612. }
  41613. };
  41614. var _default = cfu;
  41615. exports.default = _default;
  41616. /***/ }),
  41617. /***/ 51:
  41618. /*!*******************************************************************!*\
  41619. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  41620. \*******************************************************************/
  41621. /*! no static exports found */
  41622. /***/ (function(module, exports, __webpack_require__) {
  41623. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  41624. function _regeneratorRuntime() {
  41625. "use strict";
  41626. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  41627. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  41628. return exports;
  41629. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41630. var exports = {},
  41631. Op = Object.prototype,
  41632. hasOwn = Op.hasOwnProperty,
  41633. defineProperty = Object.defineProperty || function (obj, key, desc) {
  41634. obj[key] = desc.value;
  41635. },
  41636. $Symbol = "function" == typeof Symbol ? Symbol : {},
  41637. iteratorSymbol = $Symbol.iterator || "@@iterator",
  41638. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  41639. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  41640. function define(obj, key, value) {
  41641. return Object.defineProperty(obj, key, {
  41642. value: value,
  41643. enumerable: !0,
  41644. configurable: !0,
  41645. writable: !0
  41646. }), obj[key];
  41647. }
  41648. try {
  41649. define({}, "");
  41650. } catch (err) {
  41651. define = function define(obj, key, value) {
  41652. return obj[key] = value;
  41653. };
  41654. }
  41655. function wrap(innerFn, outerFn, self, tryLocsList) {
  41656. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  41657. generator = Object.create(protoGenerator.prototype),
  41658. context = new Context(tryLocsList || []);
  41659. return defineProperty(generator, "_invoke", {
  41660. value: makeInvokeMethod(innerFn, self, context)
  41661. }), generator;
  41662. }
  41663. function tryCatch(fn, obj, arg) {
  41664. try {
  41665. return {
  41666. type: "normal",
  41667. arg: fn.call(obj, arg)
  41668. };
  41669. } catch (err) {
  41670. return {
  41671. type: "throw",
  41672. arg: err
  41673. };
  41674. }
  41675. }
  41676. exports.wrap = wrap;
  41677. var ContinueSentinel = {};
  41678. function Generator() {}
  41679. function GeneratorFunction() {}
  41680. function GeneratorFunctionPrototype() {}
  41681. var IteratorPrototype = {};
  41682. define(IteratorPrototype, iteratorSymbol, function () {
  41683. return this;
  41684. });
  41685. var getProto = Object.getPrototypeOf,
  41686. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  41687. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  41688. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  41689. function defineIteratorMethods(prototype) {
  41690. ["next", "throw", "return"].forEach(function (method) {
  41691. define(prototype, method, function (arg) {
  41692. return this._invoke(method, arg);
  41693. });
  41694. });
  41695. }
  41696. function AsyncIterator(generator, PromiseImpl) {
  41697. function invoke(method, arg, resolve, reject) {
  41698. var record = tryCatch(generator[method], generator, arg);
  41699. if ("throw" !== record.type) {
  41700. var result = record.arg,
  41701. value = result.value;
  41702. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  41703. invoke("next", value, resolve, reject);
  41704. }, function (err) {
  41705. invoke("throw", err, resolve, reject);
  41706. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  41707. result.value = unwrapped, resolve(result);
  41708. }, function (error) {
  41709. return invoke("throw", error, resolve, reject);
  41710. });
  41711. }
  41712. reject(record.arg);
  41713. }
  41714. var previousPromise;
  41715. defineProperty(this, "_invoke", {
  41716. value: function value(method, arg) {
  41717. function callInvokeWithMethodAndArg() {
  41718. return new PromiseImpl(function (resolve, reject) {
  41719. invoke(method, arg, resolve, reject);
  41720. });
  41721. }
  41722. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  41723. }
  41724. });
  41725. }
  41726. function makeInvokeMethod(innerFn, self, context) {
  41727. var state = "suspendedStart";
  41728. return function (method, arg) {
  41729. if ("executing" === state) throw new Error("Generator is already running");
  41730. if ("completed" === state) {
  41731. if ("throw" === method) throw arg;
  41732. return doneResult();
  41733. }
  41734. for (context.method = method, context.arg = arg;;) {
  41735. var delegate = context.delegate;
  41736. if (delegate) {
  41737. var delegateResult = maybeInvokeDelegate(delegate, context);
  41738. if (delegateResult) {
  41739. if (delegateResult === ContinueSentinel) continue;
  41740. return delegateResult;
  41741. }
  41742. }
  41743. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  41744. if ("suspendedStart" === state) throw state = "completed", context.arg;
  41745. context.dispatchException(context.arg);
  41746. } else "return" === context.method && context.abrupt("return", context.arg);
  41747. state = "executing";
  41748. var record = tryCatch(innerFn, self, context);
  41749. if ("normal" === record.type) {
  41750. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  41751. return {
  41752. value: record.arg,
  41753. done: context.done
  41754. };
  41755. }
  41756. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  41757. }
  41758. };
  41759. }
  41760. function maybeInvokeDelegate(delegate, context) {
  41761. var methodName = context.method,
  41762. method = delegate.iterator[methodName];
  41763. 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;
  41764. var record = tryCatch(method, delegate.iterator, context.arg);
  41765. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  41766. var info = record.arg;
  41767. 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);
  41768. }
  41769. function pushTryEntry(locs) {
  41770. var entry = {
  41771. tryLoc: locs[0]
  41772. };
  41773. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  41774. }
  41775. function resetTryEntry(entry) {
  41776. var record = entry.completion || {};
  41777. record.type = "normal", delete record.arg, entry.completion = record;
  41778. }
  41779. function Context(tryLocsList) {
  41780. this.tryEntries = [{
  41781. tryLoc: "root"
  41782. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  41783. }
  41784. function values(iterable) {
  41785. if (iterable) {
  41786. var iteratorMethod = iterable[iteratorSymbol];
  41787. if (iteratorMethod) return iteratorMethod.call(iterable);
  41788. if ("function" == typeof iterable.next) return iterable;
  41789. if (!isNaN(iterable.length)) {
  41790. var i = -1,
  41791. next = function next() {
  41792. for (; ++i < iterable.length;) {
  41793. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  41794. }
  41795. return next.value = undefined, next.done = !0, next;
  41796. };
  41797. return next.next = next;
  41798. }
  41799. }
  41800. return {
  41801. next: doneResult
  41802. };
  41803. }
  41804. function doneResult() {
  41805. return {
  41806. value: undefined,
  41807. done: !0
  41808. };
  41809. }
  41810. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  41811. value: GeneratorFunctionPrototype,
  41812. configurable: !0
  41813. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  41814. value: GeneratorFunction,
  41815. configurable: !0
  41816. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  41817. var ctor = "function" == typeof genFun && genFun.constructor;
  41818. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  41819. }, exports.mark = function (genFun) {
  41820. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  41821. }, exports.awrap = function (arg) {
  41822. return {
  41823. __await: arg
  41824. };
  41825. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  41826. return this;
  41827. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  41828. void 0 === PromiseImpl && (PromiseImpl = Promise);
  41829. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  41830. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  41831. return result.done ? result.value : iter.next();
  41832. });
  41833. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  41834. return this;
  41835. }), define(Gp, "toString", function () {
  41836. return "[object Generator]";
  41837. }), exports.keys = function (val) {
  41838. var object = Object(val),
  41839. keys = [];
  41840. for (var key in object) {
  41841. keys.push(key);
  41842. }
  41843. return keys.reverse(), function next() {
  41844. for (; keys.length;) {
  41845. var key = keys.pop();
  41846. if (key in object) return next.value = key, next.done = !1, next;
  41847. }
  41848. return next.done = !0, next;
  41849. };
  41850. }, exports.values = values, Context.prototype = {
  41851. constructor: Context,
  41852. reset: function reset(skipTempReset) {
  41853. 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) {
  41854. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  41855. }
  41856. },
  41857. stop: function stop() {
  41858. this.done = !0;
  41859. var rootRecord = this.tryEntries[0].completion;
  41860. if ("throw" === rootRecord.type) throw rootRecord.arg;
  41861. return this.rval;
  41862. },
  41863. dispatchException: function dispatchException(exception) {
  41864. if (this.done) throw exception;
  41865. var context = this;
  41866. function handle(loc, caught) {
  41867. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  41868. }
  41869. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41870. var entry = this.tryEntries[i],
  41871. record = entry.completion;
  41872. if ("root" === entry.tryLoc) return handle("end");
  41873. if (entry.tryLoc <= this.prev) {
  41874. var hasCatch = hasOwn.call(entry, "catchLoc"),
  41875. hasFinally = hasOwn.call(entry, "finallyLoc");
  41876. if (hasCatch && hasFinally) {
  41877. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41878. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41879. } else if (hasCatch) {
  41880. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41881. } else {
  41882. if (!hasFinally) throw new Error("try statement without catch or finally");
  41883. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41884. }
  41885. }
  41886. }
  41887. },
  41888. abrupt: function abrupt(type, arg) {
  41889. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41890. var entry = this.tryEntries[i];
  41891. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  41892. var finallyEntry = entry;
  41893. break;
  41894. }
  41895. }
  41896. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  41897. var record = finallyEntry ? finallyEntry.completion : {};
  41898. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  41899. },
  41900. complete: function complete(record, afterLoc) {
  41901. if ("throw" === record.type) throw record.arg;
  41902. 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;
  41903. },
  41904. finish: function finish(finallyLoc) {
  41905. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41906. var entry = this.tryEntries[i];
  41907. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  41908. }
  41909. },
  41910. "catch": function _catch(tryLoc) {
  41911. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41912. var entry = this.tryEntries[i];
  41913. if (entry.tryLoc === tryLoc) {
  41914. var record = entry.completion;
  41915. if ("throw" === record.type) {
  41916. var thrown = record.arg;
  41917. resetTryEntry(entry);
  41918. }
  41919. return thrown;
  41920. }
  41921. }
  41922. throw new Error("illegal catch attempt");
  41923. },
  41924. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  41925. return this.delegate = {
  41926. iterator: values(iterable),
  41927. resultName: resultName,
  41928. nextLoc: nextLoc
  41929. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  41930. }
  41931. }, exports;
  41932. }
  41933. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41934. /***/ }),
  41935. /***/ 52:
  41936. /*!*****************************************************************!*\
  41937. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  41938. \*****************************************************************/
  41939. /*! no static exports found */
  41940. /***/ (function(module, exports) {
  41941. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  41942. try {
  41943. var info = gen[key](arg);
  41944. var value = info.value;
  41945. } catch (error) {
  41946. reject(error);
  41947. return;
  41948. }
  41949. if (info.done) {
  41950. resolve(value);
  41951. } else {
  41952. Promise.resolve(value).then(_next, _throw);
  41953. }
  41954. }
  41955. function _asyncToGenerator(fn) {
  41956. return function () {
  41957. var self = this,
  41958. args = arguments;
  41959. return new Promise(function (resolve, reject) {
  41960. var gen = fn.apply(self, args);
  41961. function _next(value) {
  41962. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  41963. }
  41964. function _throw(err) {
  41965. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  41966. }
  41967. _next(undefined);
  41968. });
  41969. };
  41970. }
  41971. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41972. /***/ }),
  41973. /***/ 53:
  41974. /*!***********************************************************************!*\
  41975. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFormat.js ***!
  41976. \***********************************************************************/
  41977. /*! no static exports found */
  41978. /***/ (function(module, exports, __webpack_require__) {
  41979. "use strict";
  41980. Object.defineProperty(exports, "__esModule", {
  41981. value: true
  41982. });
  41983. exports.default = void 0;
  41984. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  41985. // 所以这里做一个兼容polyfill的兼容处理
  41986. if (!String.prototype.padStart) {
  41987. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  41988. String.prototype.padStart = function (maxLength) {
  41989. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  41990. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  41991. var str = this;
  41992. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  41993. if (str.length >= maxLength) return String(str);
  41994. var fillLength = maxLength - str.length,
  41995. times = Math.ceil(fillLength / fillString.length);
  41996. while (times >>= 1) {
  41997. fillString += fillString;
  41998. if (times === 1) {
  41999. fillString += fillString;
  42000. }
  42001. }
  42002. return fillString.slice(0, fillLength) + str;
  42003. };
  42004. }
  42005. // 其他更多是格式化有如下:
  42006. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  42007. function timeFormat() {
  42008. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42009. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42010. // 如果为null,则格式化当前时间
  42011. if (!dateTime) dateTime = Number(new Date());
  42012. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42013. if (dateTime.toString().length == 10) dateTime *= 1000;
  42014. var date = new Date(dateTime);
  42015. var ret;
  42016. var opt = {
  42017. "y+": date.getFullYear().toString(),
  42018. // 年
  42019. "m+": (date.getMonth() + 1).toString(),
  42020. // 月
  42021. "d+": date.getDate().toString(),
  42022. // 日
  42023. "h+": date.getHours().toString(),
  42024. // 时
  42025. "M+": date.getMinutes().toString(),
  42026. // 分
  42027. "s+": date.getSeconds().toString() // 秒
  42028. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  42029. };
  42030. for (var k in opt) {
  42031. ret = new RegExp("(" + k + ")").exec(fmt);
  42032. if (ret) {
  42033. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  42034. }
  42035. ;
  42036. }
  42037. ;
  42038. return fmt;
  42039. }
  42040. var _default = timeFormat;
  42041. exports.default = _default;
  42042. /***/ }),
  42043. /***/ 54:
  42044. /*!*********************************************************************!*\
  42045. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/timeFrom.js ***!
  42046. \*********************************************************************/
  42047. /*! no static exports found */
  42048. /***/ (function(module, exports, __webpack_require__) {
  42049. "use strict";
  42050. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42051. Object.defineProperty(exports, "__esModule", {
  42052. value: true
  42053. });
  42054. exports.default = void 0;
  42055. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  42056. /**
  42057. * 时间戳转为多久之前
  42058. * @param String timestamp 时间戳
  42059. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  42060. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  42061. */
  42062. function timeFrom() {
  42063. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42064. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42065. // 如果为null,则格式化当前时间
  42066. if (!dateTime) dateTime = Number(new Date());
  42067. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42068. if (dateTime.toString().length == 10) dateTime *= 1000;
  42069. var timestamp = +new Date(Number(dateTime));
  42070. var timer = (Number(new Date()) - timestamp) / 1000;
  42071. // 如果小于5分钟,则返回"刚刚",其他以此类推
  42072. var tips = '';
  42073. switch (true) {
  42074. case timer < 300:
  42075. tips = '刚刚';
  42076. break;
  42077. case timer >= 300 && timer < 3600:
  42078. tips = parseInt(timer / 60) + '分钟前';
  42079. break;
  42080. case timer >= 3600 && timer < 86400:
  42081. tips = parseInt(timer / 3600) + '小时前';
  42082. break;
  42083. case timer >= 86400 && timer < 2592000:
  42084. tips = parseInt(timer / 86400) + '天前';
  42085. break;
  42086. default:
  42087. // 如果format为false,则无论什么时间戳,都显示xx之前
  42088. if (format === false) {
  42089. if (timer >= 2592000 && timer < 365 * 86400) {
  42090. tips = parseInt(timer / (86400 * 30)) + '个月前';
  42091. } else {
  42092. tips = parseInt(timer / (86400 * 365)) + '年前';
  42093. }
  42094. } else {
  42095. tips = (0, _timeFormat.default)(timestamp, format);
  42096. }
  42097. }
  42098. return tips;
  42099. }
  42100. var _default = timeFrom;
  42101. exports.default = _default;
  42102. /***/ }),
  42103. /***/ 55:
  42104. /*!**************************************************************************!*\
  42105. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/colorGradient.js ***!
  42106. \**************************************************************************/
  42107. /*! no static exports found */
  42108. /***/ (function(module, exports, __webpack_require__) {
  42109. "use strict";
  42110. Object.defineProperty(exports, "__esModule", {
  42111. value: true
  42112. });
  42113. exports.default = void 0;
  42114. /**
  42115. * 求两个颜色之间的渐变值
  42116. * @param {string} startColor 开始的颜色
  42117. * @param {string} endColor 结束的颜色
  42118. * @param {number} step 颜色等分的份额
  42119. * */
  42120. function colorGradient() {
  42121. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  42122. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  42123. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  42124. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  42125. var startR = startRGB[0];
  42126. var startG = startRGB[1];
  42127. var startB = startRGB[2];
  42128. var endRGB = hexToRgb(endColor, false);
  42129. var endR = endRGB[0];
  42130. var endG = endRGB[1];
  42131. var endB = endRGB[2];
  42132. var sR = (endR - startR) / step; //总差值
  42133. var sG = (endG - startG) / step;
  42134. var sB = (endB - startB) / step;
  42135. var colorArr = [];
  42136. for (var i = 0; i < step; i++) {
  42137. //计算每一步的hex值
  42138. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  42139. colorArr.push(hex);
  42140. }
  42141. return colorArr;
  42142. }
  42143. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  42144. function hexToRgb(sColor) {
  42145. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42146. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42147. sColor = sColor.toLowerCase();
  42148. if (sColor && reg.test(sColor)) {
  42149. if (sColor.length === 4) {
  42150. var sColorNew = "#";
  42151. for (var i = 1; i < 4; i += 1) {
  42152. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42153. }
  42154. sColor = sColorNew;
  42155. }
  42156. //处理六位的颜色值
  42157. var sColorChange = [];
  42158. for (var _i = 1; _i < 7; _i += 2) {
  42159. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  42160. }
  42161. if (!str) {
  42162. return sColorChange;
  42163. } else {
  42164. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  42165. }
  42166. } else if (/^(rgb|RGB)/.test(sColor)) {
  42167. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42168. return arr.map(function (val) {
  42169. return Number(val);
  42170. });
  42171. } else {
  42172. return sColor;
  42173. }
  42174. }
  42175. ;
  42176. // 将rgb表示方式转换为hex表示方式
  42177. function rgbToHex(rgb) {
  42178. var _this = rgb;
  42179. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42180. if (/^(rgb|RGB)/.test(_this)) {
  42181. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42182. var strHex = "#";
  42183. for (var i = 0; i < aColor.length; i++) {
  42184. var hex = Number(aColor[i]).toString(16);
  42185. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  42186. if (hex === "0") {
  42187. hex += hex;
  42188. }
  42189. strHex += hex;
  42190. }
  42191. if (strHex.length !== 7) {
  42192. strHex = _this;
  42193. }
  42194. return strHex;
  42195. } else if (reg.test(_this)) {
  42196. var aNum = _this.replace(/#/, "").split("");
  42197. if (aNum.length === 6) {
  42198. return _this;
  42199. } else if (aNum.length === 3) {
  42200. var numHex = "#";
  42201. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  42202. numHex += aNum[_i2] + aNum[_i2];
  42203. }
  42204. return numHex;
  42205. }
  42206. } else {
  42207. return _this;
  42208. }
  42209. }
  42210. /**
  42211. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  42212. * sHex为传入的十六进制的色值
  42213. * alpha为rgba的透明度
  42214. */
  42215. function colorToRgba(color) {
  42216. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  42217. color = rgbToHex(color);
  42218. // 十六进制颜色值的正则表达式
  42219. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42220. /* 16进制颜色转为RGB格式 */
  42221. var sColor = color.toLowerCase();
  42222. if (sColor && reg.test(sColor)) {
  42223. if (sColor.length === 4) {
  42224. var sColorNew = '#';
  42225. for (var i = 1; i < 4; i += 1) {
  42226. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42227. }
  42228. sColor = sColorNew;
  42229. }
  42230. // 处理六位的颜色值
  42231. var sColorChange = [];
  42232. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  42233. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  42234. }
  42235. // return sColorChange.join(',')
  42236. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  42237. } else {
  42238. return sColor;
  42239. }
  42240. }
  42241. var _default = {
  42242. colorGradient: colorGradient,
  42243. hexToRgb: hexToRgb,
  42244. rgbToHex: rgbToHex,
  42245. colorToRgba: colorToRgba
  42246. };
  42247. exports.default = _default;
  42248. /***/ }),
  42249. /***/ 56:
  42250. /*!*****************************************************************!*\
  42251. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/guid.js ***!
  42252. \*****************************************************************/
  42253. /*! no static exports found */
  42254. /***/ (function(module, exports, __webpack_require__) {
  42255. "use strict";
  42256. Object.defineProperty(exports, "__esModule", {
  42257. value: true
  42258. });
  42259. exports.default = void 0;
  42260. /**
  42261. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  42262. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  42263. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  42264. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  42265. * v-for的时候,推荐使用后端返回的id而不是循环的index
  42266. * @param {Number} len uuid的长度
  42267. * @param {Boolean} firstU 将返回的首字母置为"u"
  42268. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  42269. */
  42270. function guid() {
  42271. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  42272. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42273. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  42274. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  42275. var uuid = [];
  42276. radix = radix || chars.length;
  42277. if (len) {
  42278. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  42279. for (var i = 0; i < len; i++) {
  42280. uuid[i] = chars[0 | Math.random() * radix];
  42281. }
  42282. } else {
  42283. var r;
  42284. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  42285. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  42286. uuid[14] = '4';
  42287. for (var _i = 0; _i < 36; _i++) {
  42288. if (!uuid[_i]) {
  42289. r = 0 | Math.random() * 16;
  42290. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  42291. }
  42292. }
  42293. }
  42294. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  42295. if (firstU) {
  42296. uuid.shift();
  42297. return 'u' + uuid.join('');
  42298. } else {
  42299. return uuid.join('');
  42300. }
  42301. }
  42302. var _default = guid;
  42303. exports.default = _default;
  42304. /***/ }),
  42305. /***/ 57:
  42306. /*!******************************************************************!*\
  42307. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/color.js ***!
  42308. \******************************************************************/
  42309. /*! no static exports found */
  42310. /***/ (function(module, exports, __webpack_require__) {
  42311. "use strict";
  42312. Object.defineProperty(exports, "__esModule", {
  42313. value: true
  42314. });
  42315. exports.default = void 0;
  42316. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  42317. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  42318. var color = {
  42319. primary: "#2979ff",
  42320. primaryDark: "#2b85e4",
  42321. primaryDisabled: "#a0cfff",
  42322. primaryLight: "#ecf5ff",
  42323. bgColor: "#f3f4f6",
  42324. info: "#909399",
  42325. infoDark: "#82848a",
  42326. infoDisabled: "#c8c9cc",
  42327. infoLight: "#f4f4f5",
  42328. warning: "#ff9900",
  42329. warningDark: "#f29100",
  42330. warningDisabled: "#fcbd71",
  42331. warningLight: "#fdf6ec",
  42332. error: "#fa3534",
  42333. errorDark: "#dd6161",
  42334. errorDisabled: "#fab6b6",
  42335. errorLight: "#fef0f0",
  42336. success: "#19be6b",
  42337. successDark: "#18b566",
  42338. successDisabled: "#71d5a1",
  42339. successLight: "#dbf1e1",
  42340. mainColor: "#303133",
  42341. contentColor: "#606266",
  42342. tipsColor: "#909399",
  42343. lightColor: "#c0c4cc",
  42344. borderColor: "#e4e7ed"
  42345. };
  42346. var _default = color;
  42347. exports.default = _default;
  42348. /***/ }),
  42349. /***/ 58:
  42350. /*!**********************************************************************!*\
  42351. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/type2icon.js ***!
  42352. \**********************************************************************/
  42353. /*! no static exports found */
  42354. /***/ (function(module, exports, __webpack_require__) {
  42355. "use strict";
  42356. Object.defineProperty(exports, "__esModule", {
  42357. value: true
  42358. });
  42359. exports.default = void 0;
  42360. /**
  42361. * 根据主题type值,获取对应的图标
  42362. * @param String type 主题名称,primary|info|error|warning|success
  42363. * @param String fill 是否使用fill填充实体的图标
  42364. */
  42365. function type2icon() {
  42366. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  42367. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  42368. // 如果非预置值,默认为success
  42369. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  42370. var iconName = '';
  42371. // 目前(2019-12-12),info和primary使用同一个图标
  42372. switch (type) {
  42373. case 'primary':
  42374. iconName = 'info-circle';
  42375. break;
  42376. case 'info':
  42377. iconName = 'info-circle';
  42378. break;
  42379. case 'error':
  42380. iconName = 'close-circle';
  42381. break;
  42382. case 'warning':
  42383. iconName = 'error-circle';
  42384. break;
  42385. case 'success':
  42386. iconName = 'checkmark-circle';
  42387. break;
  42388. default:
  42389. iconName = 'checkmark-circle';
  42390. }
  42391. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  42392. if (fill) iconName += '-fill';
  42393. return iconName;
  42394. }
  42395. var _default = type2icon;
  42396. exports.default = _default;
  42397. /***/ }),
  42398. /***/ 59:
  42399. /*!************************************************************************!*\
  42400. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/randomArray.js ***!
  42401. \************************************************************************/
  42402. /*! no static exports found */
  42403. /***/ (function(module, exports, __webpack_require__) {
  42404. "use strict";
  42405. Object.defineProperty(exports, "__esModule", {
  42406. value: true
  42407. });
  42408. exports.default = void 0;
  42409. // 打乱数组
  42410. function randomArray() {
  42411. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  42412. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  42413. return array.sort(function () {
  42414. return Math.random() - 0.5;
  42415. });
  42416. }
  42417. var _default = randomArray;
  42418. exports.default = _default;
  42419. /***/ }),
  42420. /***/ 6:
  42421. /*!***************************************************************!*\
  42422. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  42423. \***************************************************************/
  42424. /*! no static exports found */
  42425. /***/ (function(module, exports) {
  42426. function _arrayWithHoles(arr) {
  42427. if (Array.isArray(arr)) return arr;
  42428. }
  42429. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42430. /***/ }),
  42431. /***/ 60:
  42432. /*!********************************************************************!*\
  42433. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/addUnit.js ***!
  42434. \********************************************************************/
  42435. /*! no static exports found */
  42436. /***/ (function(module, exports, __webpack_require__) {
  42437. "use strict";
  42438. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42439. Object.defineProperty(exports, "__esModule", {
  42440. value: true
  42441. });
  42442. exports.default = addUnit;
  42443. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  42444. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  42445. function addUnit() {
  42446. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  42447. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  42448. value = String(value);
  42449. // 用uView内置验证规则中的number判断是否为数值
  42450. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  42451. }
  42452. /***/ }),
  42453. /***/ 61:
  42454. /*!*******************************************************************!*\
  42455. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/random.js ***!
  42456. \*******************************************************************/
  42457. /*! no static exports found */
  42458. /***/ (function(module, exports, __webpack_require__) {
  42459. "use strict";
  42460. Object.defineProperty(exports, "__esModule", {
  42461. value: true
  42462. });
  42463. exports.default = void 0;
  42464. function random(min, max) {
  42465. if (min >= 0 && max > 0 && max >= min) {
  42466. var gab = max - min + 1;
  42467. return Math.floor(Math.random() * gab + min);
  42468. } else {
  42469. return 0;
  42470. }
  42471. }
  42472. var _default = random;
  42473. exports.default = _default;
  42474. /***/ }),
  42475. /***/ 62:
  42476. /*!*****************************************************************!*\
  42477. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/trim.js ***!
  42478. \*****************************************************************/
  42479. /*! no static exports found */
  42480. /***/ (function(module, exports, __webpack_require__) {
  42481. "use strict";
  42482. Object.defineProperty(exports, "__esModule", {
  42483. value: true
  42484. });
  42485. exports.default = void 0;
  42486. function trim(str) {
  42487. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  42488. if (pos == 'both') {
  42489. return str.replace(/^\s+|\s+$/g, "");
  42490. } else if (pos == "left") {
  42491. return str.replace(/^\s*/, '');
  42492. } else if (pos == 'right') {
  42493. return str.replace(/(\s*$)/g, "");
  42494. } else if (pos == 'all') {
  42495. return str.replace(/\s+/g, "");
  42496. } else {
  42497. return str;
  42498. }
  42499. }
  42500. var _default = trim;
  42501. exports.default = _default;
  42502. /***/ }),
  42503. /***/ 63:
  42504. /*!******************************************************************!*\
  42505. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/toast.js ***!
  42506. \******************************************************************/
  42507. /*! no static exports found */
  42508. /***/ (function(module, exports, __webpack_require__) {
  42509. "use strict";
  42510. /* WEBPACK VAR INJECTION */(function(uni) {
  42511. Object.defineProperty(exports, "__esModule", {
  42512. value: true
  42513. });
  42514. exports.default = void 0;
  42515. function toast(title) {
  42516. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  42517. uni.showToast({
  42518. title: title,
  42519. icon: 'none',
  42520. duration: duration
  42521. });
  42522. }
  42523. var _default = toast;
  42524. exports.default = _default;
  42525. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42526. /***/ }),
  42527. /***/ 64:
  42528. /*!**********************************************************************!*\
  42529. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/getParent.js ***!
  42530. \**********************************************************************/
  42531. /*! no static exports found */
  42532. /***/ (function(module, exports, __webpack_require__) {
  42533. "use strict";
  42534. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42535. Object.defineProperty(exports, "__esModule", {
  42536. value: true
  42537. });
  42538. exports.default = getParent;
  42539. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  42540. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42541. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42542. function getParent(name, keys) {
  42543. var parent = this.$parent;
  42544. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42545. while (parent) {
  42546. // 父组件
  42547. if (parent.$options.name !== name) {
  42548. // 如果组件的name不相等,继续上一级寻找
  42549. parent = parent.$parent;
  42550. } else {
  42551. var _ret = function () {
  42552. var data = {};
  42553. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  42554. if (Array.isArray(keys)) {
  42555. keys.map(function (val) {
  42556. data[val] = parent[val] ? parent[val] : '';
  42557. });
  42558. } else {
  42559. // 历遍传过来的对象参数
  42560. for (var i in keys) {
  42561. // 如果子组件有此值则用,无此值则用父组件的值
  42562. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  42563. if (Array.isArray(keys[i])) {
  42564. if (keys[i].length) {
  42565. data[i] = keys[i];
  42566. } else {
  42567. data[i] = parent[i];
  42568. }
  42569. } else if (keys[i].constructor === Object) {
  42570. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  42571. if (Object.keys(keys[i]).length) {
  42572. data[i] = keys[i];
  42573. } else {
  42574. data[i] = parent[i];
  42575. }
  42576. } else {
  42577. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  42578. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  42579. }
  42580. }
  42581. }
  42582. return {
  42583. v: data
  42584. };
  42585. }();
  42586. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  42587. }
  42588. }
  42589. return {};
  42590. }
  42591. /***/ }),
  42592. /***/ 65:
  42593. /*!********************************************************************!*\
  42594. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/$parent.js ***!
  42595. \********************************************************************/
  42596. /*! no static exports found */
  42597. /***/ (function(module, exports, __webpack_require__) {
  42598. "use strict";
  42599. Object.defineProperty(exports, "__esModule", {
  42600. value: true
  42601. });
  42602. exports.default = $parent;
  42603. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42604. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42605. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  42606. // 值(默认为undefined),就是查找最顶层的$parent
  42607. function $parent() {
  42608. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  42609. var parent = this.$parent;
  42610. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42611. while (parent) {
  42612. // 父组件
  42613. if (parent.$options && parent.$options.name !== name) {
  42614. // 如果组件的name不相等,继续上一级寻找
  42615. parent = parent.$parent;
  42616. } else {
  42617. return parent;
  42618. }
  42619. }
  42620. return false;
  42621. }
  42622. /***/ }),
  42623. /***/ 66:
  42624. /*!****************************************************************!*\
  42625. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/sys.js ***!
  42626. \****************************************************************/
  42627. /*! no static exports found */
  42628. /***/ (function(module, exports, __webpack_require__) {
  42629. "use strict";
  42630. /* WEBPACK VAR INJECTION */(function(uni) {
  42631. Object.defineProperty(exports, "__esModule", {
  42632. value: true
  42633. });
  42634. exports.os = os;
  42635. exports.sys = sys;
  42636. function os() {
  42637. return uni.getSystemInfoSync().platform;
  42638. }
  42639. ;
  42640. function sys() {
  42641. return uni.getSystemInfoSync();
  42642. }
  42643. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42644. /***/ }),
  42645. /***/ 67:
  42646. /*!*********************************************************************!*\
  42647. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/debounce.js ***!
  42648. \*********************************************************************/
  42649. /*! no static exports found */
  42650. /***/ (function(module, exports, __webpack_require__) {
  42651. "use strict";
  42652. Object.defineProperty(exports, "__esModule", {
  42653. value: true
  42654. });
  42655. exports.default = void 0;
  42656. var timeout = null;
  42657. /**
  42658. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  42659. *
  42660. * @param {Function} func 要执行的回调函数
  42661. * @param {Number} wait 延时的时间
  42662. * @param {Boolean} immediate 是否立即执行
  42663. * @return null
  42664. */
  42665. function debounce(func) {
  42666. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42667. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  42668. // 清除定时器
  42669. if (timeout !== null) clearTimeout(timeout);
  42670. // 立即执行,此类情况一般用不到
  42671. if (immediate) {
  42672. var callNow = !timeout;
  42673. timeout = setTimeout(function () {
  42674. timeout = null;
  42675. }, wait);
  42676. if (callNow) typeof func === 'function' && func();
  42677. } else {
  42678. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  42679. timeout = setTimeout(function () {
  42680. typeof func === 'function' && func();
  42681. }, wait);
  42682. }
  42683. }
  42684. var _default = debounce;
  42685. exports.default = _default;
  42686. /***/ }),
  42687. /***/ 68:
  42688. /*!*********************************************************************!*\
  42689. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/function/throttle.js ***!
  42690. \*********************************************************************/
  42691. /*! no static exports found */
  42692. /***/ (function(module, exports, __webpack_require__) {
  42693. "use strict";
  42694. Object.defineProperty(exports, "__esModule", {
  42695. value: true
  42696. });
  42697. exports.default = void 0;
  42698. var timer, flag;
  42699. /**
  42700. * 节流原理:在一定时间内,只能触发一次
  42701. *
  42702. * @param {Function} func 要执行的回调函数
  42703. * @param {Number} wait 延时的时间
  42704. * @param {Boolean} immediate 是否立即执行
  42705. * @return null
  42706. */
  42707. function throttle(func) {
  42708. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42709. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  42710. if (immediate) {
  42711. if (!flag) {
  42712. flag = true;
  42713. // 如果是立即执行,则在wait毫秒内开始时执行
  42714. typeof func === 'function' && func();
  42715. timer = setTimeout(function () {
  42716. flag = false;
  42717. }, wait);
  42718. }
  42719. } else {
  42720. if (!flag) {
  42721. flag = true;
  42722. // 如果是非立即执行,则在wait毫秒内的结束处执行
  42723. timer = setTimeout(function () {
  42724. flag = false;
  42725. typeof func === 'function' && func();
  42726. }, wait);
  42727. }
  42728. }
  42729. }
  42730. ;
  42731. var _default = throttle;
  42732. exports.default = _default;
  42733. /***/ }),
  42734. /***/ 69:
  42735. /*!*****************************************************************!*\
  42736. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/config.js ***!
  42737. \*****************************************************************/
  42738. /*! no static exports found */
  42739. /***/ (function(module, exports, __webpack_require__) {
  42740. "use strict";
  42741. Object.defineProperty(exports, "__esModule", {
  42742. value: true
  42743. });
  42744. exports.default = void 0;
  42745. // 此版本发布于2022-04-19
  42746. var version = '1.8.6';
  42747. var _default = {
  42748. v: version,
  42749. version: version,
  42750. // 主题名称
  42751. type: ['primary', 'success', 'info', 'error', 'warning']
  42752. };
  42753. exports.default = _default;
  42754. /***/ }),
  42755. /***/ 7:
  42756. /*!*********************************************************************!*\
  42757. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  42758. \*********************************************************************/
  42759. /*! no static exports found */
  42760. /***/ (function(module, exports) {
  42761. function _iterableToArrayLimit(arr, i) {
  42762. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  42763. if (null != _i) {
  42764. var _s,
  42765. _e,
  42766. _x,
  42767. _r,
  42768. _arr = [],
  42769. _n = !0,
  42770. _d = !1;
  42771. try {
  42772. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  42773. if (Object(_i) !== _i) return;
  42774. _n = !1;
  42775. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  42776. ;
  42777. }
  42778. } catch (err) {
  42779. _d = !0, _e = err;
  42780. } finally {
  42781. try {
  42782. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  42783. } finally {
  42784. if (_d) throw _e;
  42785. }
  42786. }
  42787. return _arr;
  42788. }
  42789. }
  42790. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42791. /***/ }),
  42792. /***/ 70:
  42793. /*!*****************************************************************!*\
  42794. !*** E:/Desktop/zd_wechatApp(1)/uview-ui/libs/config/zIndex.js ***!
  42795. \*****************************************************************/
  42796. /*! no static exports found */
  42797. /***/ (function(module, exports, __webpack_require__) {
  42798. "use strict";
  42799. Object.defineProperty(exports, "__esModule", {
  42800. value: true
  42801. });
  42802. exports.default = void 0;
  42803. // uniapp在H5中各API的z-index值如下:
  42804. /**
  42805. * actionsheet: 999
  42806. * modal: 999
  42807. * navigate: 998
  42808. * tabbar: 998
  42809. * toast: 999
  42810. */
  42811. var _default = {
  42812. toast: 10090,
  42813. noNetwork: 10080,
  42814. // popup包含popup,actionsheet,keyboard,picker的值
  42815. popup: 10075,
  42816. mask: 10070,
  42817. navbar: 980,
  42818. topTips: 975,
  42819. sticky: 970,
  42820. indexListSticky: 965
  42821. };
  42822. exports.default = _default;
  42823. /***/ }),
  42824. /***/ 8:
  42825. /*!***************************************************************************!*\
  42826. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  42827. \***************************************************************************/
  42828. /*! no static exports found */
  42829. /***/ (function(module, exports, __webpack_require__) {
  42830. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  42831. function _unsupportedIterableToArray(o, minLen) {
  42832. if (!o) return;
  42833. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  42834. var n = Object.prototype.toString.call(o).slice(8, -1);
  42835. if (n === "Object" && o.constructor) n = o.constructor.name;
  42836. if (n === "Map" || n === "Set") return Array.from(o);
  42837. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  42838. }
  42839. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42840. /***/ }),
  42841. /***/ 9:
  42842. /*!*****************************************************************!*\
  42843. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  42844. \*****************************************************************/
  42845. /*! no static exports found */
  42846. /***/ (function(module, exports) {
  42847. function _arrayLikeToArray(arr, len) {
  42848. if (len == null || len > arr.length) len = arr.length;
  42849. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  42850. arr2[i] = arr[i];
  42851. }
  42852. return arr2;
  42853. }
  42854. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42855. /***/ })
  42856. }]);
  42857. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map