vendor.js 1.3 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951
  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. !*** D:/IdeaProjects/zdsz_WeChatApplet/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. !*** D:/IdeaProjects/zdsz_WeChatApplet/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. !*** D:/IdeaProjects/zdsz_WeChatApplet/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$getArea$;
  8864. var _default = (_getDistrict$getArea$ = {
  8865. //选择行政区
  8866. getDistrict: function getDistrict(data) {
  8867. return _request.default.requestFn("/system/dict/data/type/district", data);
  8868. },
  8869. //选择小区
  8870. getArea: function getArea(data) {
  8871. return _request.default.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. }, (0, _defineProperty2.default)(_getDistrict$getArea$, "getArea", function getArea() {
  9027. return _request.default.requestEn("/mobile/area/getArea");
  9028. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getDictInfoList", function getDictInfoList(data) {
  9029. return _request.default.requestEn("/mobile/sysInfo/dictlist", data, 'POST');
  9030. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setregulatorBox", function setregulatorBox(data) {
  9031. return _request.default.requestEn("/mobile/regulatorBox", data, 'POST');
  9032. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setwarningPile", function setwarningPile(data) {
  9033. return _request.default.requestEn("/mobile/warningPile", data, 'Put');
  9034. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPileList", function getwarningPileList(data) {
  9035. return _request.default.requestEn("/mobile/warningPile/getList", data);
  9036. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPileInfo", function getwarningPileInfo(data) {
  9037. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9038. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setcourtyardNetworkManagement", function setcourtyardNetworkManagement(data) {
  9039. return _request.default.requestEn("/mobile/courtyardNetworkManagement", data, 'POST');
  9040. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "setemergencyRepair", function setemergencyRepair(data) {
  9041. return _request.default.requestEn("/mobile/emergencyRepair", data, 'POST');
  9042. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getOne", function getOne() {
  9043. return _request.default.requestEn("/mobile/explain/getOne");
  9044. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getWorker", function getWorker() {
  9045. return _request.default.requestEn("/mobile/user/getWorker");
  9046. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getSearch", function getSearch(data) {
  9047. return _request.default.requestEn("/mobile/sysInfo/search", data);
  9048. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getcourtyardNetworkManagement", function getcourtyardNetworkManagement(data) {
  9049. return _request.default.requestEn("/mobile/courtyardNetworkManagement/".concat(data));
  9050. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getemergencyRepair", function getemergencyRepair(data) {
  9051. return _request.default.requestEn("/mobile/emergencyRepair/".concat(data));
  9052. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getregulatorBox", function getregulatorBox(data) {
  9053. return _request.default.requestEn("/mobile/regulatorBox/".concat(data));
  9054. }), (0, _defineProperty2.default)(_getDistrict$getArea$, "getwarningPile", function getwarningPile(data) {
  9055. return _request.default.requestEn("/mobile/warningPile/".concat(data));
  9056. }), _getDistrict$getArea$);
  9057. exports.default = _default;
  9058. /***/ }),
  9059. /***/ 35:
  9060. /*!***********************************************************!*\
  9061. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/request.js ***!
  9062. \***********************************************************/
  9063. /*! no static exports found */
  9064. /***/ (function(module, exports, __webpack_require__) {
  9065. "use strict";
  9066. /* WEBPACK VAR INJECTION */(function(uni) {
  9067. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9068. Object.defineProperty(exports, "__esModule", {
  9069. value: true
  9070. });
  9071. exports.default = void 0;
  9072. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 36));
  9073. var _default = {
  9074. // 请求方法
  9075. requestEn: function requestEn(url) {
  9076. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9077. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9078. return new Promise(function (resolve, reject) {
  9079. // console.log(http.webUrl + url +'---'+ uni.getStorageSync('token'))
  9080. uni.request({
  9081. url: _http.default.webUrl + url,
  9082. method: methods ? methods : 'GET',
  9083. data: data,
  9084. success: function success(res) {
  9085. if (res.data.code === 200) {
  9086. resolve(res.data.data === undefined ? null : res.data.data);
  9087. } else if (res.data.code === 403 || res.data.code === 401) {
  9088. uni.showToast({
  9089. title: 'Token超时,请重新登录',
  9090. icon: 'none'
  9091. });
  9092. if (uni.getStorageSync('token')) {
  9093. uni.removeStorage({
  9094. key: 'token',
  9095. success: function success() {
  9096. uni.navigateTo({
  9097. url: '/pages/login/login'
  9098. });
  9099. }
  9100. });
  9101. } else {
  9102. uni.navigateTo({
  9103. url: '/pages/login/login'
  9104. });
  9105. }
  9106. } else {
  9107. uni.showToast({
  9108. title: res.data.msg ? res.data.msg : '系统异常',
  9109. icon: 'none'
  9110. });
  9111. }
  9112. },
  9113. fail: function fail() {
  9114. uni.showToast({
  9115. title: '网络异常',
  9116. icon: 'none'
  9117. });
  9118. }
  9119. });
  9120. });
  9121. },
  9122. // 请求方法
  9123. requestFn: function requestFn(url) {
  9124. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9125. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9126. return new Promise(function (resolve, reject) {
  9127. console.log(_http.default.webUrl + url + '---' + uni.getStorageSync('token'));
  9128. uni.request({
  9129. url: _http.default.webUrl + url,
  9130. method: methods ? methods : 'GET',
  9131. data: data,
  9132. header: {
  9133. "MAuthorization": "wxBearer ".concat(uni.getStorageSync('token') ? uni.getStorageSync('token') : ''),
  9134. "userType": 'MOdBILE'
  9135. },
  9136. success: function success(res) {
  9137. console.log(res);
  9138. if (res.data.code === 200) {
  9139. resolve(res.data.data === undefined ? null : res.data.data);
  9140. } else if (res.data.code === 403 || res.data.code === 401) {
  9141. uni.showToast({
  9142. title: 'Token超时,请重新登录',
  9143. icon: 'none'
  9144. });
  9145. if (uni.getStorageSync('token')) {
  9146. uni.removeStorage({
  9147. key: 'token',
  9148. success: function success() {
  9149. uni.navigateTo({
  9150. url: '/pages/login/login'
  9151. });
  9152. }
  9153. });
  9154. } else {
  9155. uni.navigateTo({
  9156. url: '/pages/login/login'
  9157. });
  9158. }
  9159. } else {
  9160. uni.showToast({
  9161. title: res.data.msg ? res.data.msg : '系统异常',
  9162. icon: 'none'
  9163. });
  9164. }
  9165. },
  9166. fail: function fail() {
  9167. uni.showToast({
  9168. title: '网络异常',
  9169. icon: 'none'
  9170. });
  9171. }
  9172. });
  9173. });
  9174. },
  9175. requestLo: function requestLo(url) {
  9176. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9177. var methods = arguments.length > 2 ? arguments[2] : undefined;
  9178. return new Promise(function (resolve, reject) {
  9179. console.log(_http.default.webUrl + url);
  9180. uni.request({
  9181. url: _http.default.webUrl + url,
  9182. method: methods ? methods : 'GET',
  9183. data: data,
  9184. header: {
  9185. "userType": 'MOBILE'
  9186. },
  9187. success: function success(res) {
  9188. console.log(res);
  9189. if (res.data.code === 200) {
  9190. resolve(res.data === undefined ? null : res.data);
  9191. } else if (res.data.code === 403) {
  9192. uni.showToast({
  9193. title: res.data.msg ? res.data.msg : 'Token超时,请重新登录',
  9194. icon: 'none'
  9195. });
  9196. if (uni.getStorageSync('token')) {
  9197. uni.removeStorage({
  9198. key: 'token',
  9199. success: function success() {
  9200. uni.navigateTo({
  9201. url: '/pages/login/login'
  9202. });
  9203. }
  9204. });
  9205. } else {
  9206. uni.navigateTo({
  9207. url: '/pages/login/login'
  9208. });
  9209. }
  9210. } else {
  9211. uni.showToast({
  9212. title: res.data.msg ? res.data.msg : '系统异常',
  9213. icon: 'none'
  9214. });
  9215. }
  9216. },
  9217. fail: function fail() {
  9218. uni.showToast({
  9219. title: '网络异常',
  9220. icon: 'none'
  9221. });
  9222. }
  9223. });
  9224. });
  9225. }
  9226. };
  9227. exports.default = _default;
  9228. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9229. /***/ }),
  9230. /***/ 358:
  9231. /*!***********************************************************************!*\
  9232. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/emitter.js ***!
  9233. \***********************************************************************/
  9234. /*! no static exports found */
  9235. /***/ (function(module, exports, __webpack_require__) {
  9236. "use strict";
  9237. Object.defineProperty(exports, "__esModule", {
  9238. value: true
  9239. });
  9240. exports.default = void 0;
  9241. /**
  9242. * 递归使用 call 方式this指向
  9243. * @param componentName // 需要找的组件的名称
  9244. * @param eventName // 事件名称
  9245. * @param params // 需要传递的参数
  9246. */
  9247. function _broadcast(componentName, eventName, params) {
  9248. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  9249. this.$children.map(function (child) {
  9250. if (componentName === child.$options.name) {
  9251. child.$emit.apply(child, [eventName].concat(params));
  9252. } else {
  9253. _broadcast.apply(child, [componentName, eventName].concat(params));
  9254. }
  9255. });
  9256. }
  9257. var _default = {
  9258. methods: {
  9259. /**
  9260. * 派发 (向上查找) (一个)
  9261. * @param componentName // 需要找的组件的名称
  9262. * @param eventName // 事件名称
  9263. * @param params // 需要传递的参数
  9264. */
  9265. dispatch: function dispatch(componentName, eventName, params) {
  9266. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  9267. var name = parent.$options.name; // 获取当前组件实例的name
  9268. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  9269. // 循环出当前名称的一样的组件实例
  9270. while (parent && (!name || name !== componentName)) {
  9271. parent = parent.$parent;
  9272. if (parent) {
  9273. name = parent.$options.name;
  9274. }
  9275. }
  9276. // 有节点表示当前找到了name一样的实例
  9277. if (parent) {
  9278. parent.$emit.apply(parent, [eventName].concat(params));
  9279. }
  9280. },
  9281. /**
  9282. * 广播 (向下查找) (广播多个)
  9283. * @param componentName // 需要找的组件的名称
  9284. * @param eventName // 事件名称
  9285. * @param params // 需要传递的参数
  9286. */
  9287. broadcast: function broadcast(componentName, eventName, params) {
  9288. _broadcast.call(this, componentName, eventName, params);
  9289. }
  9290. }
  9291. };
  9292. exports.default = _default;
  9293. /***/ }),
  9294. /***/ 36:
  9295. /*!********************************************************!*\
  9296. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/http.js ***!
  9297. \********************************************************/
  9298. /*! no static exports found */
  9299. /***/ (function(module, exports, __webpack_require__) {
  9300. "use strict";
  9301. Object.defineProperty(exports, "__esModule", {
  9302. value: true
  9303. });
  9304. exports.default = void 0;
  9305. // 配置信息
  9306. var _default = {
  9307. // webUrl: 'http://127.0.0.1:8080',
  9308. //webUrl: 'https://cczdsz.com/prod-api/',
  9309. //webUrl: 'https://44550f5n36.goho.co',
  9310. webUrl: 'http://192.168.4.20:8081'
  9311. };
  9312. exports.default = _default;
  9313. /***/ }),
  9314. /***/ 37:
  9315. /*!******************************************************!*\
  9316. !*** D:/IdeaProjects/zdsz_WeChatApplet/api/login.js ***!
  9317. \******************************************************/
  9318. /*! no static exports found */
  9319. /***/ (function(module, exports, __webpack_require__) {
  9320. "use strict";
  9321. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9322. Object.defineProperty(exports, "__esModule", {
  9323. value: true
  9324. });
  9325. exports.default = void 0;
  9326. var _request = _interopRequireDefault(__webpack_require__(/*! ../common/request.js */ 35));
  9327. var _default = {
  9328. // 登录
  9329. login: function login(data) {
  9330. return _request.default.requestEn('/mobile/user', data, 'POST');
  9331. }
  9332. };
  9333. exports.default = _default;
  9334. /***/ }),
  9335. /***/ 38:
  9336. /*!*********************************************************!*\
  9337. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/utils.js ***!
  9338. \*********************************************************/
  9339. /*! no static exports found */
  9340. /***/ (function(module, exports, __webpack_require__) {
  9341. "use strict";
  9342. /* WEBPACK VAR INJECTION */(function(uni) {
  9343. Object.defineProperty(exports, "__esModule", {
  9344. value: true
  9345. });
  9346. exports.default = void 0;
  9347. var _default = {
  9348. // 页面提示信息函数
  9349. showPrompt: function showPrompt(msg) {
  9350. uni.showToast({
  9351. title: msg,
  9352. icon: 'none',
  9353. mask: true
  9354. });
  9355. },
  9356. // APP名称
  9357. appName: function appName() {
  9358. return "贞达市政工程";
  9359. },
  9360. formatRichText: function formatRichText(html) {
  9361. var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
  9362. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  9363. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  9364. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  9365. return match;
  9366. });
  9367. newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
  9368. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  9369. return match;
  9370. });
  9371. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  9372. newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
  9373. return newContent;
  9374. },
  9375. getHeight: function getHeight(e) {
  9376. console.log(e);
  9377. },
  9378. changeTwoDecimal_f: function changeTwoDecimal_f(x) {
  9379. var f_x = parseFloat(x);
  9380. if (isNaN(f_x)) {
  9381. return 0;
  9382. }
  9383. var f_x = Math.round(x * 100) / 100;
  9384. var s_x = f_x.toString();
  9385. var pos_decimal = s_x.indexOf('.');
  9386. if (pos_decimal < 0) {
  9387. pos_decimal = s_x.length;
  9388. s_x += '.';
  9389. }
  9390. while (s_x.length <= pos_decimal + 2) {
  9391. s_x += '0';
  9392. }
  9393. return s_x;
  9394. },
  9395. // token过期
  9396. tokenOverdue: function tokenOverdue() {
  9397. uni.setStorage({
  9398. key: "jumpUrl",
  9399. data: ''
  9400. });
  9401. uni.setStorage({
  9402. key: "jumpType",
  9403. data: ''
  9404. });
  9405. uni.navigateTo({
  9406. url: "/pages/login/login"
  9407. });
  9408. },
  9409. checkLoginTo: function checkLoginTo(url, type) {
  9410. console.log(type);
  9411. var status = uni.getStorageSync('token');
  9412. console.log(status);
  9413. if (status) {
  9414. uni.navigateTo({
  9415. url: url
  9416. });
  9417. } else {
  9418. uni.showModal({
  9419. title: '',
  9420. content: '您未登录,是否登录?',
  9421. success: function success(res) {
  9422. if (res.confirm) {
  9423. uni.setStorage({
  9424. key: "jumpUrl",
  9425. data: url
  9426. });
  9427. uni.setStorage({
  9428. key: "jumpType",
  9429. data: type
  9430. });
  9431. uni.navigateTo({
  9432. url: "/pages/login/login"
  9433. });
  9434. }
  9435. }
  9436. });
  9437. }
  9438. },
  9439. // 拨打电话
  9440. toCall: function toCall(tel) {
  9441. if (!tel) {
  9442. this.showPrompt('暂无商家电话');
  9443. return;
  9444. }
  9445. uni.makePhoneCall({
  9446. phoneNumber: tel
  9447. });
  9448. },
  9449. toBack: function toBack() {
  9450. uni.navigateBack({
  9451. delta: 1
  9452. });
  9453. },
  9454. // 图片预览
  9455. previewImage: function previewImage(url) {
  9456. var urlList = [];
  9457. if (typeof url == 'string') {
  9458. urlList.push(url);
  9459. } else {
  9460. urlList = url;
  9461. }
  9462. uni.previewImage({
  9463. urls: urlList
  9464. });
  9465. },
  9466. // 登录成功后的跳转
  9467. loginSuccess: function loginSuccess() {
  9468. var type = uni.getStorageSync('jumpType');
  9469. // console.log(type)
  9470. if (type) {
  9471. var url = uni.getStorageSync('jumpUrl');
  9472. // console.log(url)
  9473. if (!url) {
  9474. uni.navigateBack({
  9475. delta: 1
  9476. });
  9477. return;
  9478. }
  9479. if (type == 'page') {
  9480. uni.redirectTo({
  9481. url: url
  9482. });
  9483. } else {
  9484. uni.switchTab({
  9485. url: url,
  9486. fail: function fail(error) {
  9487. console.log(error);
  9488. }
  9489. });
  9490. }
  9491. } else {
  9492. // uni.switchTab({
  9493. // url: "/pages/index/index"
  9494. // })
  9495. uni.navigateBack({
  9496. delta: 1
  9497. });
  9498. }
  9499. },
  9500. parseNumber: function parseNumber(num) {
  9501. return num < 10 ? "0" + num : num;
  9502. },
  9503. // 时间格式化基类
  9504. dateFormat: function dateFormat(date, formatStr) {
  9505. var dateObj = {},
  9506. rStr = /\{([^}]+)\}/,
  9507. mons = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
  9508. dateObj["Y"] = date.getFullYear();
  9509. dateObj["M"] = date.getMonth() + 1;
  9510. dateObj["MM"] = this.parseNumber(dateObj["M"]);
  9511. dateObj["Mon"] = mons[dateObj['M'] - 1];
  9512. dateObj["D"] = date.getDate();
  9513. dateObj["DD"] = this.parseNumber(dateObj["D"]);
  9514. dateObj["h"] = date.getHours();
  9515. dateObj["hh"] = this.parseNumber(dateObj["h"]);
  9516. // dateObj["t"] = dateObj["h"] > 12 ? dateObj["h"] - 12 : dateObj["h"];
  9517. dateObj["t"] = dateObj["h"];
  9518. dateObj["tt"] = this.parseNumber(dateObj["t"]);
  9519. // dateObj["A"] = dateObj["h"] > 12 ? '下午' : '上午';
  9520. dateObj["i"] = date.getMinutes();
  9521. dateObj["ii"] = this.parseNumber(dateObj["i"]);
  9522. dateObj["s"] = date.getSeconds();
  9523. dateObj["ss"] = this.parseNumber(dateObj["s"]);
  9524. while (rStr.test(formatStr)) {
  9525. formatStr = formatStr.replace(rStr, dateObj[RegExp.$1]);
  9526. }
  9527. return formatStr;
  9528. },
  9529. // 时间格式 年月日时分秒
  9530. gettime: function gettime(shorttime, type) {
  9531. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9532. var now = new Date().getTime();
  9533. var cha = (now - parseInt(shorttime)) / 1000;
  9534. // type: 格式化类型 1为年月日时分秒 2为年月日时分 3为年月日
  9535. if (type == 1) {
  9536. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}:{ss}");
  9537. } else if (type == 2) {
  9538. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD} {t}:{ii}");
  9539. } else if (type == 3) {
  9540. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9541. }
  9542. },
  9543. // 时间格式 年月日
  9544. getDate: function getDate(shorttime) {
  9545. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9546. var now = new Date().getTime();
  9547. var cha = (now - parseInt(shorttime)) / 1000;
  9548. return this.dateFormat(new Date(shorttime), "{Y}-{MM}-{DD}");
  9549. },
  9550. // 时间格式 月日
  9551. getDateMd: function getDateMd(shorttime) {
  9552. shorttime = shorttime.toString().length < 13 ? shorttime * 1000 : shorttime;
  9553. var now = new Date().getTime();
  9554. var cha = (now - parseInt(shorttime)) / 1000;
  9555. return this.dateFormat(new Date(shorttime), "{MM}-{DD}");
  9556. },
  9557. getSevenDate: function getSevenDate(num) {
  9558. var date1 = new Date();
  9559. //今天时间
  9560. var time1 = (date1.getMonth() + 1 < 10 ? '0' + (date1.getMonth() + 1).toString() : date1.getMonth() + 1) + "-" + (date1.getDate() < 10 ? '0' + date1.getDate().toString() : date1.getDate());
  9561. var date2 = new Date(date1);
  9562. date2.setDate(date1.getDate() + num);
  9563. //num是正数表示之后的时间,num负数表示之前的时间,0表示今天
  9564. var time2 = date2.getMonth() + 1 + "-" + date2.getDate();
  9565. return this.getdiffdate(time1, time2, num);
  9566. },
  9567. //获取两日期之间日期列表函数
  9568. getdiffdate: function getdiffdate(stime, etime, num) {
  9569. //初始化日期列表,数组
  9570. var diffdate = new Array();
  9571. var i = 0;
  9572. //开始日期小于等于结束日期,并循环
  9573. while (i <= num - 1) {
  9574. diffdate.push({
  9575. dateStr: stime,
  9576. weekStr: this.getWeek(new Date().getFullYear().toString() + "-" + stime)
  9577. });
  9578. //获取开始日期时间戳
  9579. var stime_ts = new Date(stime).getTime();
  9580. // console.log('当前日期:'+stime +'当前时间戳:'+stime_ts)
  9581. //增加一天时间戳后的日期
  9582. var next_date = stime_ts + 24 * 60 * 60 * 1000;
  9583. //拼接年月日,这里的月份会返回(0-11),所以要+1
  9584. var next_dates_y = new Date(next_date).getFullYear() + '-';
  9585. var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
  9586. var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
  9587. stime = next_dates_m + next_dates_d;
  9588. // 增加数组key
  9589. i++;
  9590. }
  9591. return diffdate;
  9592. },
  9593. // 根据日期转换星期
  9594. getWeek: function getWeek(dateString) {
  9595. var dateArray = dateString.split("-");
  9596. var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
  9597. return "周" + "日一二三四五六".charAt(date.getDay());
  9598. },
  9599. // 获取当前位置
  9600. getNowAddress: function getNowAddress() {
  9601. console.log(222);
  9602. return new Promise(function (resolve, reject) {
  9603. var mapkey = '';
  9604. mapkey = 'c827c04d1d74d8589ec826fce02a135a';
  9605. console.log(mapkey);
  9606. var amapPlugin = new amap.AMapWX({
  9607. key: mapkey
  9608. });
  9609. amapPlugin.getRegeo({
  9610. success: function success(res) {
  9611. resolve(res[0]);
  9612. },
  9613. fail: function fail(error) {
  9614. console.log(error);
  9615. uni.showToast({
  9616. mask: true,
  9617. icon: "none",
  9618. title: error
  9619. });
  9620. }
  9621. });
  9622. });
  9623. }
  9624. };
  9625. exports.default = _default;
  9626. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9627. /***/ }),
  9628. /***/ 39:
  9629. /*!**************************************************************!*\
  9630. !*** D:/IdeaProjects/zdsz_WeChatApplet/common/lodash.min.js ***!
  9631. \**************************************************************/
  9632. /*! no static exports found */
  9633. /***/ (function(module, exports, __webpack_require__) {
  9634. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9635. /**
  9636. * @license
  9637. * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
  9638. */
  9639. ;
  9640. (function () {
  9641. function n(n, t, r) {
  9642. switch (r.length) {
  9643. case 0:
  9644. return n.call(t);
  9645. case 1:
  9646. return n.call(t, r[0]);
  9647. case 2:
  9648. return n.call(t, r[0], r[1]);
  9649. case 3:
  9650. return n.call(t, r[0], r[1], r[2]);
  9651. }
  9652. return n.apply(t, r);
  9653. }
  9654. function t(n, t, r, e) {
  9655. for (var u = -1, i = null == n ? 0 : n.length; ++u < i;) {
  9656. var o = n[u];
  9657. t(e, o, r(o), n);
  9658. }
  9659. return e;
  9660. }
  9661. function r(n, t) {
  9662. for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n);) {
  9663. ;
  9664. }
  9665. return n;
  9666. }
  9667. function e(n, t) {
  9668. for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n);) {
  9669. ;
  9670. }
  9671. return n;
  9672. }
  9673. function u(n, t) {
  9674. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  9675. if (!t(n[r], r, n)) return false;
  9676. }
  9677. return true;
  9678. }
  9679. function i(n, t) {
  9680. for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e;) {
  9681. var o = n[r];
  9682. t(o, r, n) && (i[u++] = o);
  9683. }
  9684. return i;
  9685. }
  9686. function o(n, t) {
  9687. return !(null == n || !n.length) && -1 < v(n, t, 0);
  9688. }
  9689. function f(n, t, r) {
  9690. for (var e = -1, u = null == n ? 0 : n.length; ++e < u;) {
  9691. if (r(t, n[e])) return true;
  9692. }
  9693. return false;
  9694. }
  9695. function c(n, t) {
  9696. for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e;) {
  9697. u[r] = t(n[r], r, n);
  9698. }
  9699. return u;
  9700. }
  9701. function a(n, t) {
  9702. for (var r = -1, e = t.length, u = n.length; ++r < e;) {
  9703. n[u + r] = t[r];
  9704. }
  9705. return n;
  9706. }
  9707. function l(n, t, r, e) {
  9708. var u = -1,
  9709. i = null == n ? 0 : n.length;
  9710. for (e && i && (r = n[++u]); ++u < i;) {
  9711. r = t(r, n[u], u, n);
  9712. }
  9713. return r;
  9714. }
  9715. function s(n, t, r, e) {
  9716. var u = null == n ? 0 : n.length;
  9717. for (e && u && (r = n[--u]); u--;) {
  9718. r = t(r, n[u], u, n);
  9719. }
  9720. return r;
  9721. }
  9722. function h(n, t) {
  9723. for (var r = -1, e = null == n ? 0 : n.length; ++r < e;) {
  9724. if (t(n[r], r, n)) return true;
  9725. }
  9726. return false;
  9727. }
  9728. function p(n, t, r) {
  9729. var e;
  9730. return r(n, function (n, r, u) {
  9731. if (t(n, r, u)) return e = r, false;
  9732. }), e;
  9733. }
  9734. function _(n, t, r, e) {
  9735. var u = n.length;
  9736. for (r += e ? 1 : -1; e ? r-- : ++r < u;) {
  9737. if (t(n[r], r, n)) return r;
  9738. }
  9739. return -1;
  9740. }
  9741. function v(n, t, r) {
  9742. if (t === t) n: {
  9743. --r;
  9744. for (var e = n.length; ++r < e;) {
  9745. if (n[r] === t) {
  9746. n = r;
  9747. break n;
  9748. }
  9749. }
  9750. n = -1;
  9751. } else n = _(n, d, r);
  9752. return n;
  9753. }
  9754. function g(n, t, r, e) {
  9755. --r;
  9756. for (var u = n.length; ++r < u;) {
  9757. if (e(n[r], t)) return r;
  9758. }
  9759. return -1;
  9760. }
  9761. function d(n) {
  9762. return n !== n;
  9763. }
  9764. function y(n, t) {
  9765. var r = null == n ? 0 : n.length;
  9766. return r ? m(n, t) / r : F;
  9767. }
  9768. function b(n) {
  9769. return function (t) {
  9770. return null == t ? T : t[n];
  9771. };
  9772. }
  9773. function x(n) {
  9774. return function (t) {
  9775. return null == n ? T : n[t];
  9776. };
  9777. }
  9778. function j(n, t, r, e, u) {
  9779. return u(n, function (n, u, i) {
  9780. r = e ? (e = false, n) : t(r, n, u, i);
  9781. }), r;
  9782. }
  9783. function w(n, t) {
  9784. var r = n.length;
  9785. for (n.sort(t); r--;) {
  9786. n[r] = n[r].c;
  9787. }
  9788. return n;
  9789. }
  9790. function m(n, t) {
  9791. for (var r, e = -1, u = n.length; ++e < u;) {
  9792. var i = t(n[e]);
  9793. i !== T && (r = r === T ? i : r + i);
  9794. }
  9795. return r;
  9796. }
  9797. function A(n, t) {
  9798. for (var r = -1, e = Array(n); ++r < n;) {
  9799. e[r] = t(r);
  9800. }
  9801. return e;
  9802. }
  9803. function E(n, t) {
  9804. return c(t, function (t) {
  9805. return [t, n[t]];
  9806. });
  9807. }
  9808. function k(n) {
  9809. return function (t) {
  9810. return n(t);
  9811. };
  9812. }
  9813. function S(n, t) {
  9814. return c(t, function (t) {
  9815. return n[t];
  9816. });
  9817. }
  9818. function O(n, t) {
  9819. return n.has(t);
  9820. }
  9821. function I(n, t) {
  9822. for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0);) {
  9823. ;
  9824. }
  9825. return r;
  9826. }
  9827. function R(n, t) {
  9828. for (var r = n.length; r-- && -1 < v(t, n[r], 0);) {
  9829. ;
  9830. }
  9831. return r;
  9832. }
  9833. function z(n) {
  9834. return "\\" + Un[n];
  9835. }
  9836. function W(n) {
  9837. var t = -1,
  9838. r = Array(n.size);
  9839. return n.forEach(function (n, e) {
  9840. r[++t] = [e, n];
  9841. }), r;
  9842. }
  9843. function B(n, t) {
  9844. return function (r) {
  9845. return n(t(r));
  9846. };
  9847. }
  9848. function L(n, t) {
  9849. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  9850. var o = n[r];
  9851. o !== t && "__lodash_placeholder__" !== o || (n[r] = "__lodash_placeholder__", i[u++] = r);
  9852. }
  9853. return i;
  9854. }
  9855. function U(n) {
  9856. var t = -1,
  9857. r = Array(n.size);
  9858. return n.forEach(function (n) {
  9859. r[++t] = n;
  9860. }), r;
  9861. }
  9862. function C(n) {
  9863. var t = -1,
  9864. r = Array(n.size);
  9865. return n.forEach(function (n) {
  9866. r[++t] = [n, n];
  9867. }), r;
  9868. }
  9869. function D(n) {
  9870. if (Rn.test(n)) {
  9871. for (var t = On.lastIndex = 0; On.test(n);) {
  9872. ++t;
  9873. }
  9874. n = t;
  9875. } else n = Qn(n);
  9876. return n;
  9877. }
  9878. function M(n) {
  9879. return Rn.test(n) ? n.match(On) || [] : n.split("");
  9880. }
  9881. var T,
  9882. $ = 1 / 0,
  9883. F = NaN,
  9884. N = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]],
  9885. P = /\b__p\+='';/g,
  9886. Z = /\b(__p\+=)''\+/g,
  9887. q = /(__e\(.*?\)|\b__t\))\+'';/g,
  9888. V = /&(?:amp|lt|gt|quot|#39);/g,
  9889. K = /[&<>"']/g,
  9890. G = RegExp(V.source),
  9891. H = RegExp(K.source),
  9892. J = /<%-([\s\S]+?)%>/g,
  9893. Y = /<%([\s\S]+?)%>/g,
  9894. Q = /<%=([\s\S]+?)%>/g,
  9895. X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  9896. nn = /^\w*$/,
  9897. tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  9898. rn = /[\\^$.*+?()[\]{}|]/g,
  9899. en = RegExp(rn.source),
  9900. un = /^\s+|\s+$/g,
  9901. on = /^\s+/,
  9902. fn = /\s+$/,
  9903. cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  9904. an = /\{\n\/\* \[wrapped with (.+)\] \*/,
  9905. ln = /,? & /,
  9906. sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
  9907. hn = /\\(\\)?/g,
  9908. pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
  9909. _n = /\w*$/,
  9910. vn = /^[-+]0x[0-9a-f]+$/i,
  9911. gn = /^0b[01]+$/i,
  9912. dn = /^\[object .+?Constructor\]$/,
  9913. yn = /^0o[0-7]+$/i,
  9914. bn = /^(?:0|[1-9]\d*)$/,
  9915. xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
  9916. jn = /($^)/,
  9917. wn = /['\n\r\u2028\u2029\\]/g,
  9918. 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])?)*",
  9919. An = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + mn,
  9920. 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])",
  9921. kn = RegExp("['\u2019]", "g"),
  9922. Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
  9923. On = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn, "g"),
  9924. 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"),
  9925. Rn = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),
  9926. zn = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
  9927. 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(" "),
  9928. Bn = {};
  9929. 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;
  9930. var Ln = {};
  9931. 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;
  9932. var Un = {
  9933. "\\": "\\",
  9934. "'": "'",
  9935. "\n": "n",
  9936. "\r": "r",
  9937. "\u2028": "u2028",
  9938. "\u2029": "u2029"
  9939. },
  9940. Cn = parseFloat,
  9941. Dn = parseInt,
  9942. Mn = (typeof global === "undefined" ? "undefined" : _typeof(global)) == "object" && global && global.Object === Object && global,
  9943. Tn = (typeof self === "undefined" ? "undefined" : _typeof(self)) == "object" && self && self.Object === Object && self,
  9944. $n = Mn || Tn || Function("return this")(),
  9945. Fn = ( false ? undefined : _typeof(exports)) == "object" && exports && !exports.nodeType && exports,
  9946. Nn = Fn && ( false ? undefined : _typeof(module)) == "object" && module && !module.nodeType && module,
  9947. Pn = Nn && Nn.exports === Fn,
  9948. Zn = Pn && Mn.process,
  9949. qn = function () {
  9950. try {
  9951. var n = Nn && Nn.f && Nn.f("util").types;
  9952. return n ? n : Zn && Zn.binding && Zn.binding("util");
  9953. } catch (n) {}
  9954. }(),
  9955. Vn = qn && qn.isArrayBuffer,
  9956. Kn = qn && qn.isDate,
  9957. Gn = qn && qn.isMap,
  9958. Hn = qn && qn.isRegExp,
  9959. Jn = qn && qn.isSet,
  9960. Yn = qn && qn.isTypedArray,
  9961. Qn = b("length"),
  9962. Xn = x({
  9963. "\xc0": "A",
  9964. "\xc1": "A",
  9965. "\xc2": "A",
  9966. "\xc3": "A",
  9967. "\xc4": "A",
  9968. "\xc5": "A",
  9969. "\xe0": "a",
  9970. "\xe1": "a",
  9971. "\xe2": "a",
  9972. "\xe3": "a",
  9973. "\xe4": "a",
  9974. "\xe5": "a",
  9975. "\xc7": "C",
  9976. "\xe7": "c",
  9977. "\xd0": "D",
  9978. "\xf0": "d",
  9979. "\xc8": "E",
  9980. "\xc9": "E",
  9981. "\xca": "E",
  9982. "\xcb": "E",
  9983. "\xe8": "e",
  9984. "\xe9": "e",
  9985. "\xea": "e",
  9986. "\xeb": "e",
  9987. "\xcc": "I",
  9988. "\xcd": "I",
  9989. "\xce": "I",
  9990. "\xcf": "I",
  9991. "\xec": "i",
  9992. "\xed": "i",
  9993. "\xee": "i",
  9994. "\xef": "i",
  9995. "\xd1": "N",
  9996. "\xf1": "n",
  9997. "\xd2": "O",
  9998. "\xd3": "O",
  9999. "\xd4": "O",
  10000. "\xd5": "O",
  10001. "\xd6": "O",
  10002. "\xd8": "O",
  10003. "\xf2": "o",
  10004. "\xf3": "o",
  10005. "\xf4": "o",
  10006. "\xf5": "o",
  10007. "\xf6": "o",
  10008. "\xf8": "o",
  10009. "\xd9": "U",
  10010. "\xda": "U",
  10011. "\xdb": "U",
  10012. "\xdc": "U",
  10013. "\xf9": "u",
  10014. "\xfa": "u",
  10015. "\xfb": "u",
  10016. "\xfc": "u",
  10017. "\xdd": "Y",
  10018. "\xfd": "y",
  10019. "\xff": "y",
  10020. "\xc6": "Ae",
  10021. "\xe6": "ae",
  10022. "\xde": "Th",
  10023. "\xfe": "th",
  10024. "\xdf": "ss",
  10025. "\u0100": "A",
  10026. "\u0102": "A",
  10027. "\u0104": "A",
  10028. "\u0101": "a",
  10029. "\u0103": "a",
  10030. "\u0105": "a",
  10031. "\u0106": "C",
  10032. "\u0108": "C",
  10033. "\u010A": "C",
  10034. "\u010C": "C",
  10035. "\u0107": "c",
  10036. "\u0109": "c",
  10037. "\u010B": "c",
  10038. "\u010D": "c",
  10039. "\u010E": "D",
  10040. "\u0110": "D",
  10041. "\u010F": "d",
  10042. "\u0111": "d",
  10043. "\u0112": "E",
  10044. "\u0114": "E",
  10045. "\u0116": "E",
  10046. "\u0118": "E",
  10047. "\u011A": "E",
  10048. "\u0113": "e",
  10049. "\u0115": "e",
  10050. "\u0117": "e",
  10051. "\u0119": "e",
  10052. "\u011B": "e",
  10053. "\u011C": "G",
  10054. "\u011E": "G",
  10055. "\u0120": "G",
  10056. "\u0122": "G",
  10057. "\u011D": "g",
  10058. "\u011F": "g",
  10059. "\u0121": "g",
  10060. "\u0123": "g",
  10061. "\u0124": "H",
  10062. "\u0126": "H",
  10063. "\u0125": "h",
  10064. "\u0127": "h",
  10065. "\u0128": "I",
  10066. "\u012A": "I",
  10067. "\u012C": "I",
  10068. "\u012E": "I",
  10069. "\u0130": "I",
  10070. "\u0129": "i",
  10071. "\u012B": "i",
  10072. "\u012D": "i",
  10073. "\u012F": "i",
  10074. "\u0131": "i",
  10075. "\u0134": "J",
  10076. "\u0135": "j",
  10077. "\u0136": "K",
  10078. "\u0137": "k",
  10079. "\u0138": "k",
  10080. "\u0139": "L",
  10081. "\u013B": "L",
  10082. "\u013D": "L",
  10083. "\u013F": "L",
  10084. "\u0141": "L",
  10085. "\u013A": "l",
  10086. "\u013C": "l",
  10087. "\u013E": "l",
  10088. "\u0140": "l",
  10089. "\u0142": "l",
  10090. "\u0143": "N",
  10091. "\u0145": "N",
  10092. "\u0147": "N",
  10093. "\u014A": "N",
  10094. "\u0144": "n",
  10095. "\u0146": "n",
  10096. "\u0148": "n",
  10097. "\u014B": "n",
  10098. "\u014C": "O",
  10099. "\u014E": "O",
  10100. "\u0150": "O",
  10101. "\u014D": "o",
  10102. "\u014F": "o",
  10103. "\u0151": "o",
  10104. "\u0154": "R",
  10105. "\u0156": "R",
  10106. "\u0158": "R",
  10107. "\u0155": "r",
  10108. "\u0157": "r",
  10109. "\u0159": "r",
  10110. "\u015A": "S",
  10111. "\u015C": "S",
  10112. "\u015E": "S",
  10113. "\u0160": "S",
  10114. "\u015B": "s",
  10115. "\u015D": "s",
  10116. "\u015F": "s",
  10117. "\u0161": "s",
  10118. "\u0162": "T",
  10119. "\u0164": "T",
  10120. "\u0166": "T",
  10121. "\u0163": "t",
  10122. "\u0165": "t",
  10123. "\u0167": "t",
  10124. "\u0168": "U",
  10125. "\u016A": "U",
  10126. "\u016C": "U",
  10127. "\u016E": "U",
  10128. "\u0170": "U",
  10129. "\u0172": "U",
  10130. "\u0169": "u",
  10131. "\u016B": "u",
  10132. "\u016D": "u",
  10133. "\u016F": "u",
  10134. "\u0171": "u",
  10135. "\u0173": "u",
  10136. "\u0174": "W",
  10137. "\u0175": "w",
  10138. "\u0176": "Y",
  10139. "\u0177": "y",
  10140. "\u0178": "Y",
  10141. "\u0179": "Z",
  10142. "\u017B": "Z",
  10143. "\u017D": "Z",
  10144. "\u017A": "z",
  10145. "\u017C": "z",
  10146. "\u017E": "z",
  10147. "\u0132": "IJ",
  10148. "\u0133": "ij",
  10149. "\u0152": "Oe",
  10150. "\u0153": "oe",
  10151. "\u0149": "'n",
  10152. "\u017F": "s"
  10153. }),
  10154. nt = x({
  10155. "&": "&amp;",
  10156. "<": "&lt;",
  10157. ">": "&gt;",
  10158. '"': "&quot;",
  10159. "'": "&#39;"
  10160. }),
  10161. tt = x({
  10162. "&amp;": "&",
  10163. "&lt;": "<",
  10164. "&gt;": ">",
  10165. "&quot;": '"',
  10166. "&#39;": "'"
  10167. }),
  10168. rt = function x(mn) {
  10169. function An(n) {
  10170. if (du(n) && !of(n) && !(n instanceof Un)) {
  10171. if (n instanceof On) return n;
  10172. if (ii.call(n, "__wrapped__")) return $e(n);
  10173. }
  10174. return new On(n);
  10175. }
  10176. function En() {}
  10177. function On(n, t) {
  10178. this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = T;
  10179. }
  10180. function Un(n) {
  10181. this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
  10182. }
  10183. function Mn(n) {
  10184. var t = -1,
  10185. r = null == n ? 0 : n.length;
  10186. for (this.clear(); ++t < r;) {
  10187. var e = n[t];
  10188. this.set(e[0], e[1]);
  10189. }
  10190. }
  10191. function Tn(n) {
  10192. var t = -1,
  10193. r = null == n ? 0 : n.length;
  10194. for (this.clear(); ++t < r;) {
  10195. var e = n[t];
  10196. this.set(e[0], e[1]);
  10197. }
  10198. }
  10199. function Fn(n) {
  10200. var t = -1,
  10201. r = null == n ? 0 : n.length;
  10202. for (this.clear(); ++t < r;) {
  10203. var e = n[t];
  10204. this.set(e[0], e[1]);
  10205. }
  10206. }
  10207. function Nn(n) {
  10208. var t = -1,
  10209. r = null == n ? 0 : n.length;
  10210. for (this.__data__ = new Fn(); ++t < r;) {
  10211. this.add(n[t]);
  10212. }
  10213. }
  10214. function Zn(n) {
  10215. this.size = (this.__data__ = new Tn(n)).size;
  10216. }
  10217. function qn(n, t) {
  10218. var r,
  10219. e = of(n),
  10220. u = !e && uf(n),
  10221. i = !e && !u && cf(n),
  10222. o = !e && !u && !i && pf(n),
  10223. u = (e = e || u || i || o) ? A(n.length, Xu) : [],
  10224. f = u.length;
  10225. for (r in n) {
  10226. !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);
  10227. }
  10228. return u;
  10229. }
  10230. function Qn(n) {
  10231. var t = n.length;
  10232. return t ? n[ir(0, t - 1)] : T;
  10233. }
  10234. function et(n, t) {
  10235. return Ce(Ur(n), pt(t, 0, n.length));
  10236. }
  10237. function ut(n) {
  10238. return Ce(Ur(n));
  10239. }
  10240. function it(n, t, r) {
  10241. (r === T || au(n[t], r)) && (r !== T || t in n) || st(n, t, r);
  10242. }
  10243. function ot(n, t, r) {
  10244. var e = n[t];
  10245. ii.call(n, t) && au(e, r) && (r !== T || t in n) || st(n, t, r);
  10246. }
  10247. function ft(n, t) {
  10248. for (var r = n.length; r--;) {
  10249. if (au(n[r][0], t)) return r;
  10250. }
  10251. return -1;
  10252. }
  10253. function ct(n, t, r, e) {
  10254. return eo(n, function (n, u, i) {
  10255. t(e, n, r(n), i);
  10256. }), e;
  10257. }
  10258. function at(n, t) {
  10259. return n && Cr(t, zu(t), n);
  10260. }
  10261. function lt(n, t) {
  10262. return n && Cr(t, Wu(t), n);
  10263. }
  10264. function st(n, t, r) {
  10265. "__proto__" == t && mi ? mi(n, t, {
  10266. configurable: true,
  10267. enumerable: true,
  10268. value: r,
  10269. writable: true
  10270. }) : n[t] = r;
  10271. }
  10272. function ht(n, t) {
  10273. for (var r = -1, e = t.length, u = Vu(e), i = null == n; ++r < e;) {
  10274. u[r] = i ? T : Iu(n, t[r]);
  10275. }
  10276. return u;
  10277. }
  10278. function pt(n, t, r) {
  10279. return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n;
  10280. }
  10281. function _t(n, t, e, u, i, o) {
  10282. var f,
  10283. c = 1 & t,
  10284. a = 2 & t,
  10285. l = 4 & t;
  10286. if (e && (f = i ? e(n, u, i, o) : e(n)), f !== T) return f;
  10287. if (!gu(n)) return n;
  10288. if (u = of(n)) {
  10289. if (f = me(n), !c) return Ur(n, f);
  10290. } else {
  10291. var s = _o(n),
  10292. h = "[object Function]" == s || "[object GeneratorFunction]" == s;
  10293. if (cf(n)) return Ir(n, c);
  10294. if ("[object Object]" == s || "[object Arguments]" == s || h && !i) {
  10295. if (f = a || h ? {} : Ae(n), !c) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n));
  10296. } else {
  10297. if (!Ln[s]) return i ? n : {};
  10298. f = Ee(n, s, c);
  10299. }
  10300. }
  10301. if (o || (o = new Zn()), i = o.get(n)) return i;
  10302. if (o.set(n, f), hf(n)) return n.forEach(function (r) {
  10303. f.add(_t(r, t, e, r, n, o));
  10304. }), f;
  10305. if (lf(n)) return n.forEach(function (r, u) {
  10306. f.set(u, _t(r, t, e, u, n, o));
  10307. }), f;
  10308. var a = l ? a ? ve : _e : a ? Wu : zu,
  10309. p = u ? T : a(n);
  10310. return r(p || n, function (r, u) {
  10311. p && (u = r, r = n[u]), ot(f, u, _t(r, t, e, u, n, o));
  10312. }), f;
  10313. }
  10314. function vt(n) {
  10315. var t = zu(n);
  10316. return function (r) {
  10317. return gt(r, n, t);
  10318. };
  10319. }
  10320. function gt(n, t, r) {
  10321. var e = r.length;
  10322. if (null == n) return !e;
  10323. for (n = Yu(n); e--;) {
  10324. var u = r[e],
  10325. i = t[u],
  10326. o = n[u];
  10327. if (o === T && !(u in n) || !i(o)) return false;
  10328. }
  10329. return true;
  10330. }
  10331. function dt(n, t, r) {
  10332. if (typeof n != "function") throw new ni("Expected a function");
  10333. return yo(function () {
  10334. n.apply(T, r);
  10335. }, t);
  10336. }
  10337. function yt(n, t, r, e) {
  10338. var u = -1,
  10339. i = o,
  10340. a = true,
  10341. l = n.length,
  10342. s = [],
  10343. h = t.length;
  10344. if (!l) return s;
  10345. r && (t = c(t, k(r))), e ? (i = f, a = false) : 200 <= t.length && (i = O, a = false, t = new Nn(t));
  10346. n: for (; ++u < l;) {
  10347. var p = n[u],
  10348. _ = null == r ? p : r(p),
  10349. p = e || 0 !== p ? p : 0;
  10350. if (a && _ === _) {
  10351. for (var v = h; v--;) {
  10352. if (t[v] === _) continue n;
  10353. }
  10354. s.push(p);
  10355. } else i(t, _, e) || s.push(p);
  10356. }
  10357. return s;
  10358. }
  10359. function bt(n, t) {
  10360. var r = true;
  10361. return eo(n, function (n, e, u) {
  10362. return r = !!t(n, e, u);
  10363. }), r;
  10364. }
  10365. function xt(n, t, r) {
  10366. for (var e = -1, u = n.length; ++e < u;) {
  10367. var i = n[e],
  10368. o = t(i);
  10369. if (null != o && (f === T ? o === o && !ju(o) : r(o, f))) var f = o,
  10370. c = i;
  10371. }
  10372. return c;
  10373. }
  10374. function jt(n, t) {
  10375. var r = [];
  10376. return eo(n, function (n, e, u) {
  10377. t(n, e, u) && r.push(n);
  10378. }), r;
  10379. }
  10380. function wt(n, t, r, e, u) {
  10381. var i = -1,
  10382. o = n.length;
  10383. for (r || (r = ke), u || (u = []); ++i < o;) {
  10384. var f = n[i];
  10385. 0 < t && r(f) ? 1 < t ? wt(f, t - 1, r, e, u) : a(u, f) : e || (u[u.length] = f);
  10386. }
  10387. return u;
  10388. }
  10389. function mt(n, t) {
  10390. return n && io(n, t, zu);
  10391. }
  10392. function At(n, t) {
  10393. return n && oo(n, t, zu);
  10394. }
  10395. function Et(n, t) {
  10396. return i(t, function (t) {
  10397. return pu(n[t]);
  10398. });
  10399. }
  10400. function kt(n, t) {
  10401. t = Sr(t, n);
  10402. for (var r = 0, e = t.length; null != n && r < e;) {
  10403. n = n[De(t[r++])];
  10404. }
  10405. return r && r == e ? n : T;
  10406. }
  10407. function St(n, t, r) {
  10408. return t = t(n), of(n) ? t : a(t, r(n));
  10409. }
  10410. function Ot(n) {
  10411. if (null == n) n = n === T ? "[object Undefined]" : "[object Null]";else if (wi && wi in Yu(n)) {
  10412. var t = ii.call(n, wi),
  10413. r = n[wi];
  10414. try {
  10415. n[wi] = T;
  10416. var e = true;
  10417. } catch (n) {}
  10418. var u = ci.call(n);
  10419. e && (t ? n[wi] = r : delete n[wi]), n = u;
  10420. } else n = ci.call(n);
  10421. return n;
  10422. }
  10423. function It(n, t) {
  10424. return n > t;
  10425. }
  10426. function Rt(n, t) {
  10427. return null != n && ii.call(n, t);
  10428. }
  10429. function zt(n, t) {
  10430. return null != n && t in Yu(n);
  10431. }
  10432. function Wt(n, t, r) {
  10433. for (var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Vu(i), s = 1 / 0, h = []; a--;) {
  10434. var p = n[a];
  10435. 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;
  10436. }
  10437. var p = n[0],
  10438. _ = -1,
  10439. v = l[0];
  10440. n: for (; ++_ < u && h.length < s;) {
  10441. var g = p[_],
  10442. d = t ? t(g) : g,
  10443. g = r || 0 !== g ? g : 0;
  10444. if (v ? !O(v, d) : !e(h, d, r)) {
  10445. for (a = i; --a;) {
  10446. var y = l[a];
  10447. if (y ? !O(y, d) : !e(n[a], d, r)) continue n;
  10448. }
  10449. v && v.push(d), h.push(g);
  10450. }
  10451. }
  10452. return h;
  10453. }
  10454. function Bt(n, t, r) {
  10455. var e = {};
  10456. return mt(n, function (n, u, i) {
  10457. t(e, r(n), u, i);
  10458. }), e;
  10459. }
  10460. function Lt(t, r, e) {
  10461. 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);
  10462. }
  10463. function Ut(n) {
  10464. return du(n) && "[object Arguments]" == Ot(n);
  10465. }
  10466. function Ct(n) {
  10467. return du(n) && "[object ArrayBuffer]" == Ot(n);
  10468. }
  10469. function Dt(n) {
  10470. return du(n) && "[object Date]" == Ot(n);
  10471. }
  10472. function Mt(n, t, r, e, u) {
  10473. if (n === t) t = true;else if (null == n || null == t || !du(n) && !du(t)) t = n !== n && t !== t;else n: {
  10474. var i = of(n),
  10475. o = of(t),
  10476. f = i ? "[object Array]" : _o(n),
  10477. c = o ? "[object Array]" : _o(t),
  10478. f = "[object Arguments]" == f ? "[object Object]" : f,
  10479. c = "[object Arguments]" == c ? "[object Object]" : c,
  10480. a = "[object Object]" == f,
  10481. o = "[object Object]" == c;
  10482. if ((c = f == c) && cf(n)) {
  10483. if (!cf(t)) {
  10484. t = false;
  10485. break n;
  10486. }
  10487. i = true, a = false;
  10488. }
  10489. 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 {
  10490. if (!(1 & r) && (i = a && ii.call(n, "__wrapped__"), f = o && ii.call(t, "__wrapped__"), i || f)) {
  10491. n = i ? n.value() : n, t = f ? t.value() : t, u || (u = new Zn()), t = Mt(n, t, r, e, u);
  10492. break n;
  10493. }
  10494. if (c) {
  10495. t: if (u || (u = new Zn()), i = 1 & r, f = _e(n), o = f.length, c = _e(t).length, o == c || i) {
  10496. for (a = o; a--;) {
  10497. var l = f[a];
  10498. if (!(i ? l in t : ii.call(t, l))) {
  10499. t = false;
  10500. break t;
  10501. }
  10502. }
  10503. if ((c = u.get(n)) && u.get(t)) t = c == t;else {
  10504. c = true, u.set(n, t), u.set(t, n);
  10505. for (var s = i; ++a < o;) {
  10506. var l = f[a],
  10507. h = n[l],
  10508. p = t[l];
  10509. if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u);
  10510. if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
  10511. c = false;
  10512. break;
  10513. }
  10514. s || (s = "constructor" == l);
  10515. }
  10516. 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;
  10517. }
  10518. } else t = false;
  10519. } else t = false;
  10520. }
  10521. }
  10522. return t;
  10523. }
  10524. function Tt(n) {
  10525. return du(n) && "[object Map]" == _o(n);
  10526. }
  10527. function $t(n, t, r, e) {
  10528. var u = r.length,
  10529. i = u,
  10530. o = !e;
  10531. if (null == n) return !i;
  10532. for (n = Yu(n); u--;) {
  10533. var f = r[u];
  10534. if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false;
  10535. }
  10536. for (; ++u < i;) {
  10537. var f = r[u],
  10538. c = f[0],
  10539. a = n[c],
  10540. l = f[1];
  10541. if (o && f[2]) {
  10542. if (a === T && !(c in n)) return false;
  10543. } else {
  10544. if (f = new Zn(), e) var s = e(a, l, c, n, t, f);
  10545. if (s === T ? !Mt(l, a, 3, e, f) : !s) return false;
  10546. }
  10547. }
  10548. return true;
  10549. }
  10550. function Ft(n) {
  10551. return !(!gu(n) || fi && fi in n) && (pu(n) ? si : dn).test(Me(n));
  10552. }
  10553. function Nt(n) {
  10554. return du(n) && "[object RegExp]" == Ot(n);
  10555. }
  10556. function Pt(n) {
  10557. return du(n) && "[object Set]" == _o(n);
  10558. }
  10559. function Zt(n) {
  10560. return du(n) && vu(n.length) && !!Bn[Ot(n)];
  10561. }
  10562. function qt(n) {
  10563. return typeof n == "function" ? n : null == n ? Tu : _typeof(n) == "object" ? of(n) ? Jt(n[0], n[1]) : Ht(n) : Pu(n);
  10564. }
  10565. function Vt(n) {
  10566. if (!ze(n)) return Bi(n);
  10567. var t,
  10568. r = [];
  10569. for (t in Yu(n)) {
  10570. ii.call(n, t) && "constructor" != t && r.push(t);
  10571. }
  10572. return r;
  10573. }
  10574. function Kt(n, t) {
  10575. return n < t;
  10576. }
  10577. function Gt(n, t) {
  10578. var r = -1,
  10579. e = lu(n) ? Vu(n.length) : [];
  10580. return eo(n, function (n, u, i) {
  10581. e[++r] = t(n, u, i);
  10582. }), e;
  10583. }
  10584. function Ht(n) {
  10585. var t = xe(n);
  10586. return 1 == t.length && t[0][2] ? We(t[0][0], t[0][1]) : function (r) {
  10587. return r === n || $t(r, n, t);
  10588. };
  10589. }
  10590. function Jt(n, t) {
  10591. return Ie(n) && t === t && !gu(t) ? We(De(n), t) : function (r) {
  10592. var e = Iu(r, n);
  10593. return e === T && e === t ? Ru(r, n) : Mt(t, e, 3);
  10594. };
  10595. }
  10596. function Yt(n, t, r, e, u) {
  10597. n !== t && io(t, function (i, o) {
  10598. if (gu(i)) {
  10599. u || (u = new Zn());
  10600. var f = u,
  10601. c = "__proto__" == o ? T : n[o],
  10602. a = "__proto__" == o ? T : t[o],
  10603. l = f.get(a);
  10604. if (l) it(n, o, l);else {
  10605. var l = e ? e(c, a, o + "", n, t, f) : T,
  10606. s = l === T;
  10607. if (s) {
  10608. var h = of(a),
  10609. p = !h && cf(a),
  10610. _ = !h && !p && pf(a),
  10611. l = a;
  10612. 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;
  10613. }
  10614. s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l);
  10615. }
  10616. } else f = e ? e("__proto__" == o ? T : n[o], i, o + "", n, t, u) : T, f === T && (f = i), it(n, o, f);
  10617. }, Wu);
  10618. }
  10619. function Qt(n, t) {
  10620. var r = n.length;
  10621. if (r) return t += 0 > t ? r : 0, Se(t, r) ? n[t] : T;
  10622. }
  10623. function Xt(n, t, r) {
  10624. var e = -1;
  10625. return t = c(t.length ? t : [Tu], k(ye())), n = Gt(n, function (n) {
  10626. return {
  10627. a: c(t, function (t) {
  10628. return t(n);
  10629. }),
  10630. b: ++e,
  10631. c: n
  10632. };
  10633. }), w(n, function (n, t) {
  10634. var e;
  10635. n: {
  10636. e = -1;
  10637. for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o;) {
  10638. var c = Wr(u[e], i[e]);
  10639. if (c) {
  10640. e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1);
  10641. break n;
  10642. }
  10643. }
  10644. e = n.b - t.b;
  10645. }
  10646. return e;
  10647. });
  10648. }
  10649. function nr(n, t) {
  10650. return tr(n, t, function (t, r) {
  10651. return Ru(n, r);
  10652. });
  10653. }
  10654. function tr(n, t, r) {
  10655. for (var e = -1, u = t.length, i = {}; ++e < u;) {
  10656. var o = t[e],
  10657. f = kt(n, o);
  10658. r(f, o) && lr(i, Sr(o, n), f);
  10659. }
  10660. return i;
  10661. }
  10662. function rr(n) {
  10663. return function (t) {
  10664. return kt(t, n);
  10665. };
  10666. }
  10667. function er(n, t, r, e) {
  10668. var u = e ? g : v,
  10669. i = -1,
  10670. o = t.length,
  10671. f = n;
  10672. for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o;) {
  10673. for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e));) {
  10674. f !== n && bi.call(f, a, 1), bi.call(n, a, 1);
  10675. }
  10676. }
  10677. return n;
  10678. }
  10679. function ur(n, t) {
  10680. for (var r = n ? t.length : 0, e = r - 1; r--;) {
  10681. var u = t[r];
  10682. if (r == e || u !== i) {
  10683. var i = u;
  10684. Se(u) ? bi.call(n, u, 1) : xr(n, u);
  10685. }
  10686. }
  10687. }
  10688. function ir(n, t) {
  10689. return n + Oi(Mi() * (t - n + 1));
  10690. }
  10691. function or(n, t) {
  10692. var r = "";
  10693. if (!n || 1 > t || 9007199254740991 < t) return r;
  10694. do {
  10695. t % 2 && (r += n), (t = Oi(t / 2)) && (n += n);
  10696. } while (t);
  10697. return r;
  10698. }
  10699. function fr(n, t) {
  10700. return bo(Be(n, t, Tu), n + "");
  10701. }
  10702. function cr(n) {
  10703. return Qn(Lu(n));
  10704. }
  10705. function ar(n, t) {
  10706. var r = Lu(n);
  10707. return Ce(r, pt(t, 0, r.length));
  10708. }
  10709. function lr(n, t, r, e) {
  10710. if (!gu(n)) return n;
  10711. t = Sr(t, n);
  10712. for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i;) {
  10713. var c = De(t[u]),
  10714. a = r;
  10715. if (u != o) {
  10716. var l = f[c],
  10717. a = e ? e(l, c, f) : T;
  10718. a === T && (a = gu(l) ? l : Se(t[u + 1]) ? [] : {});
  10719. }
  10720. ot(f, c, a), f = f[c];
  10721. }
  10722. return n;
  10723. }
  10724. function sr(n) {
  10725. return Ce(Lu(n));
  10726. }
  10727. function hr(n, t, r) {
  10728. var e = -1,
  10729. u = n.length;
  10730. 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;) {
  10731. r[e] = n[e + t];
  10732. }
  10733. return r;
  10734. }
  10735. function pr(n, t) {
  10736. var r;
  10737. return eo(n, function (n, e, u) {
  10738. return r = t(n, e, u), !r;
  10739. }), !!r;
  10740. }
  10741. function _r(n, t, r) {
  10742. var e = 0,
  10743. u = null == n ? e : n.length;
  10744. if (typeof t == "number" && t === t && 2147483647 >= u) {
  10745. for (; e < u;) {
  10746. var i = e + u >>> 1,
  10747. o = n[i];
  10748. null !== o && !ju(o) && (r ? o <= t : o < t) ? e = i + 1 : u = i;
  10749. }
  10750. return u;
  10751. }
  10752. return vr(n, t, Tu, r);
  10753. }
  10754. function vr(n, t, r, e) {
  10755. t = r(t);
  10756. for (var u = 0, i = null == n ? 0 : n.length, o = t !== t, f = null === t, c = ju(t), a = t === T; u < i;) {
  10757. var l = Oi((u + i) / 2),
  10758. s = r(n[l]),
  10759. h = s !== T,
  10760. p = null === s,
  10761. _ = s === s,
  10762. v = ju(s);
  10763. (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;
  10764. }
  10765. return Ui(i, 4294967294);
  10766. }
  10767. function gr(n, t) {
  10768. for (var r = -1, e = n.length, u = 0, i = []; ++r < e;) {
  10769. var o = n[r],
  10770. f = t ? t(o) : o;
  10771. if (!r || !au(f, c)) {
  10772. var c = f;
  10773. i[u++] = 0 === o ? 0 : o;
  10774. }
  10775. }
  10776. return i;
  10777. }
  10778. function dr(n) {
  10779. return typeof n == "number" ? n : ju(n) ? F : +n;
  10780. }
  10781. function yr(n) {
  10782. if (typeof n == "string") return n;
  10783. if (of(n)) return c(n, yr) + "";
  10784. if (ju(n)) return to ? to.call(n) : "";
  10785. var t = n + "";
  10786. return "0" == t && 1 / n == -$ ? "-0" : t;
  10787. }
  10788. function br(n, t, r) {
  10789. var e = -1,
  10790. u = o,
  10791. i = n.length,
  10792. c = true,
  10793. a = [],
  10794. l = a;
  10795. if (r) c = false, u = f;else if (200 <= i) {
  10796. if (u = t ? null : lo(n)) return U(u);
  10797. c = false, u = O, l = new Nn();
  10798. } else l = t ? [] : a;
  10799. n: for (; ++e < i;) {
  10800. var s = n[e],
  10801. h = t ? t(s) : s,
  10802. s = r || 0 !== s ? s : 0;
  10803. if (c && h === h) {
  10804. for (var p = l.length; p--;) {
  10805. if (l[p] === h) continue n;
  10806. }
  10807. t && l.push(h), a.push(s);
  10808. } else u(l, h, r) || (l !== a && l.push(h), a.push(s));
  10809. }
  10810. return a;
  10811. }
  10812. function xr(n, t) {
  10813. return t = Sr(t, n), n = 2 > t.length ? n : kt(n, hr(t, 0, -1)), null == n || delete n[De(qe(t))];
  10814. }
  10815. function jr(n, t, r, e) {
  10816. for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n);) {
  10817. ;
  10818. }
  10819. return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i);
  10820. }
  10821. function wr(n, t) {
  10822. var r = n;
  10823. return r instanceof Un && (r = r.value()), l(t, function (n, t) {
  10824. return t.func.apply(t.thisArg, a([n], t.args));
  10825. }, r);
  10826. }
  10827. function mr(n, t, r) {
  10828. var e = n.length;
  10829. if (2 > e) return e ? br(n[0]) : [];
  10830. for (var u = -1, i = Vu(e); ++u < e;) {
  10831. for (var o = n[u], f = -1; ++f < e;) {
  10832. f != u && (i[u] = yt(i[u] || o, n[f], t, r));
  10833. }
  10834. }
  10835. return br(wt(i, 1), t, r);
  10836. }
  10837. function Ar(n, t, r) {
  10838. for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u;) {
  10839. r(o, n[e], e < i ? t[e] : T);
  10840. }
  10841. return o;
  10842. }
  10843. function Er(n) {
  10844. return su(n) ? n : [];
  10845. }
  10846. function kr(n) {
  10847. return typeof n == "function" ? n : Tu;
  10848. }
  10849. function Sr(n, t) {
  10850. return of(n) ? n : Ie(n, t) ? [n] : xo(Ou(n));
  10851. }
  10852. function Or(n, t, r) {
  10853. var e = n.length;
  10854. return r = r === T ? e : r, !t && r >= e ? n : hr(n, t, r);
  10855. }
  10856. function Ir(n, t) {
  10857. if (t) return n.slice();
  10858. var r = n.length,
  10859. r = vi ? vi(r) : new n.constructor(r);
  10860. return n.copy(r), r;
  10861. }
  10862. function Rr(n) {
  10863. var t = new n.constructor(n.byteLength);
  10864. return new _i(t).set(new _i(n)), t;
  10865. }
  10866. function zr(n, t) {
  10867. return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length);
  10868. }
  10869. function Wr(n, t) {
  10870. if (n !== t) {
  10871. var r = n !== T,
  10872. e = null === n,
  10873. u = n === n,
  10874. i = ju(n),
  10875. o = t !== T,
  10876. f = null === t,
  10877. c = t === t,
  10878. a = ju(t);
  10879. if (!f && !a && !i && n > t || i && o && c && !f && !a || e && o && c || !r && c || !u) return 1;
  10880. if (!e && !i && !a && n < t || a && r && u && !e && !i || f && r && u || !o && u || !c) return -1;
  10881. }
  10882. return 0;
  10883. }
  10884. function Br(n, t, r, e) {
  10885. var u = -1,
  10886. i = n.length,
  10887. o = r.length,
  10888. f = -1,
  10889. c = t.length,
  10890. a = Li(i - o, 0),
  10891. l = Vu(c + a);
  10892. for (e = !e; ++f < c;) {
  10893. l[f] = t[f];
  10894. }
  10895. for (; ++u < o;) {
  10896. (e || u < i) && (l[r[u]] = n[u]);
  10897. }
  10898. for (; a--;) {
  10899. l[f++] = n[u++];
  10900. }
  10901. return l;
  10902. }
  10903. function Lr(n, t, r, e) {
  10904. var u = -1,
  10905. i = n.length,
  10906. o = -1,
  10907. f = r.length,
  10908. c = -1,
  10909. a = t.length,
  10910. l = Li(i - f, 0),
  10911. s = Vu(l + a);
  10912. for (e = !e; ++u < l;) {
  10913. s[u] = n[u];
  10914. }
  10915. for (l = u; ++c < a;) {
  10916. s[l + c] = t[c];
  10917. }
  10918. for (; ++o < f;) {
  10919. (e || u < i) && (s[l + r[o]] = n[u++]);
  10920. }
  10921. return s;
  10922. }
  10923. function Ur(n, t) {
  10924. var r = -1,
  10925. e = n.length;
  10926. for (t || (t = Vu(e)); ++r < e;) {
  10927. t[r] = n[r];
  10928. }
  10929. return t;
  10930. }
  10931. function Cr(n, t, r, e) {
  10932. var u = !r;
  10933. r || (r = {});
  10934. for (var i = -1, o = t.length; ++i < o;) {
  10935. var f = t[i],
  10936. c = e ? e(r[f], n[f], f, r, n) : T;
  10937. c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c);
  10938. }
  10939. return r;
  10940. }
  10941. function Dr(n, t) {
  10942. return Cr(n, ho(n), t);
  10943. }
  10944. function Mr(n, t) {
  10945. return Cr(n, po(n), t);
  10946. }
  10947. function Tr(n, r) {
  10948. return function (e, u) {
  10949. var i = of(e) ? t : ct,
  10950. o = r ? r() : {};
  10951. return i(e, n, ye(u, 2), o);
  10952. };
  10953. }
  10954. function $r(n) {
  10955. return fr(function (t, r) {
  10956. var e = -1,
  10957. u = r.length,
  10958. i = 1 < u ? r[u - 1] : T,
  10959. o = 2 < u ? r[2] : T,
  10960. i = 3 < n.length && typeof i == "function" ? (u--, i) : T;
  10961. for (o && Oe(r[0], r[1], o) && (i = 3 > u ? T : i, u = 1), t = Yu(t); ++e < u;) {
  10962. (o = r[e]) && n(t, o, e, i);
  10963. }
  10964. return t;
  10965. });
  10966. }
  10967. function Fr(n, t) {
  10968. return function (r, e) {
  10969. if (null == r) return r;
  10970. if (!lu(r)) return n(r, e);
  10971. for (var u = r.length, i = t ? u : -1, o = Yu(r); (t ? i-- : ++i < u) && false !== e(o[i], i, o);) {
  10972. ;
  10973. }
  10974. return r;
  10975. };
  10976. }
  10977. function Nr(n) {
  10978. return function (t, r, e) {
  10979. var u = -1,
  10980. i = Yu(t);
  10981. e = e(t);
  10982. for (var o = e.length; o--;) {
  10983. var f = e[n ? o : ++u];
  10984. if (false === r(i[f], f, i)) break;
  10985. }
  10986. return t;
  10987. };
  10988. }
  10989. function Pr(n, t, r) {
  10990. function e() {
  10991. return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments);
  10992. }
  10993. var u = 1 & t,
  10994. i = Vr(n);
  10995. return e;
  10996. }
  10997. function Zr(n) {
  10998. return function (t) {
  10999. t = Ou(t);
  11000. var r = Rn.test(t) ? M(t) : T,
  11001. e = r ? r[0] : t.charAt(0);
  11002. return t = r ? Or(r, 1).join("") : t.slice(1), e[n]() + t;
  11003. };
  11004. }
  11005. function qr(n) {
  11006. return function (t) {
  11007. return l(Du(Cu(t).replace(kn, "")), n, "");
  11008. };
  11009. }
  11010. function Vr(n) {
  11011. return function () {
  11012. var t = arguments;
  11013. switch (t.length) {
  11014. case 0:
  11015. return new n();
  11016. case 1:
  11017. return new n(t[0]);
  11018. case 2:
  11019. return new n(t[0], t[1]);
  11020. case 3:
  11021. return new n(t[0], t[1], t[2]);
  11022. case 4:
  11023. return new n(t[0], t[1], t[2], t[3]);
  11024. case 5:
  11025. return new n(t[0], t[1], t[2], t[3], t[4]);
  11026. case 6:
  11027. return new n(t[0], t[1], t[2], t[3], t[4], t[5]);
  11028. case 7:
  11029. return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
  11030. }
  11031. var r = ro(n.prototype),
  11032. t = n.apply(r, t);
  11033. return gu(t) ? t : r;
  11034. };
  11035. }
  11036. function Kr(t, r, e) {
  11037. function u() {
  11038. for (var o = arguments.length, f = Vu(o), c = o, a = de(u); c--;) {
  11039. f[c] = arguments[c];
  11040. }
  11041. 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);
  11042. }
  11043. var i = Vr(t);
  11044. return u;
  11045. }
  11046. function Gr(n) {
  11047. return function (t, r, e) {
  11048. var u = Yu(t);
  11049. if (!lu(t)) {
  11050. var i = ye(r, 3);
  11051. t = zu(t), r = function r(n) {
  11052. return i(u[n], n, u);
  11053. };
  11054. }
  11055. return r = n(t, r, e), -1 < r ? u[i ? t[r] : r] : T;
  11056. };
  11057. }
  11058. function Hr(n) {
  11059. return pe(function (t) {
  11060. var r = t.length,
  11061. e = r,
  11062. u = On.prototype.thru;
  11063. for (n && t.reverse(); e--;) {
  11064. var i = t[e];
  11065. if (typeof i != "function") throw new ni("Expected a function");
  11066. if (u && !o && "wrapper" == ge(i)) var o = new On([], true);
  11067. }
  11068. for (e = o ? e : r; ++e < r;) {
  11069. var i = t[e],
  11070. u = ge(i),
  11071. f = "wrapper" == u ? so(i) : T,
  11072. 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);
  11073. }
  11074. return function () {
  11075. var n = arguments,
  11076. e = n[0];
  11077. if (o && 1 == n.length && of(e)) return o.plant(e).value();
  11078. for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r;) {
  11079. n = t[u].call(this, n);
  11080. }
  11081. return n;
  11082. };
  11083. });
  11084. }
  11085. function Jr(n, t, r, e, u, i, o, f, c, a) {
  11086. function l() {
  11087. for (var d = arguments.length, y = Vu(d), b = d; b--;) {
  11088. y[b] = arguments[b];
  11089. }
  11090. if (_) {
  11091. var x,
  11092. j = de(l),
  11093. b = y.length;
  11094. for (x = 0; b--;) {
  11095. y[b] === j && ++x;
  11096. }
  11097. }
  11098. 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);
  11099. if (j = h ? r : this, b = p ? j[n] : n, d = y.length, f) {
  11100. x = y.length;
  11101. for (var w = Ui(f.length, x), m = Ur(y); w--;) {
  11102. var A = f[w];
  11103. y[w] = Se(A, x) ? m[A] : T;
  11104. }
  11105. } else v && 1 < d && y.reverse();
  11106. return s && c < d && (y.length = c), this && this !== $n && this instanceof l && (b = g || Vr(b)), b.apply(j, y);
  11107. }
  11108. var s = 128 & t,
  11109. h = 1 & t,
  11110. p = 2 & t,
  11111. _ = 24 & t,
  11112. v = 512 & t,
  11113. g = p ? T : Vr(n);
  11114. return l;
  11115. }
  11116. function Yr(n, t) {
  11117. return function (r, e) {
  11118. return Bt(r, n, t(e));
  11119. };
  11120. }
  11121. function Qr(n, t) {
  11122. return function (r, e) {
  11123. var u;
  11124. if (r === T && e === T) return t;
  11125. if (r !== T && (u = r), e !== T) {
  11126. if (u === T) return e;
  11127. typeof r == "string" || typeof e == "string" ? (r = yr(r), e = yr(e)) : (r = dr(r), e = dr(e)), u = n(r, e);
  11128. }
  11129. return u;
  11130. };
  11131. }
  11132. function Xr(t) {
  11133. return pe(function (r) {
  11134. return r = c(r, k(ye())), fr(function (e) {
  11135. var u = this;
  11136. return t(r, function (t) {
  11137. return n(t, u, e);
  11138. });
  11139. });
  11140. });
  11141. }
  11142. function ne(n, t) {
  11143. t = t === T ? " " : yr(t);
  11144. var r = t.length;
  11145. 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));
  11146. }
  11147. function te(t, r, e, u) {
  11148. function i() {
  11149. 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;) {
  11150. s[a] = u[a];
  11151. }
  11152. for (; c--;) {
  11153. s[a++] = arguments[++r];
  11154. }
  11155. return n(h, o ? e : this, s);
  11156. }
  11157. var o = 1 & r,
  11158. f = Vr(t);
  11159. return i;
  11160. }
  11161. function re(n) {
  11162. return function (t, r, e) {
  11163. 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);
  11164. var u = -1;
  11165. r = Li(Si((r - t) / (e || 1)), 0);
  11166. for (var i = Vu(r); r--;) {
  11167. i[n ? r : ++u] = t, t += e;
  11168. }
  11169. return i;
  11170. };
  11171. }
  11172. function ee(n) {
  11173. return function (t, r) {
  11174. return typeof t == "string" && typeof r == "string" || (t = ku(t), r = ku(r)), n(t, r);
  11175. };
  11176. }
  11177. function ue(n, t, r, e, u, i, o, f, c, a) {
  11178. var l = 8 & t,
  11179. s = l ? o : T;
  11180. o = l ? T : o;
  11181. var h = l ? i : T;
  11182. 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);
  11183. }
  11184. function ie(n) {
  11185. var t = Ju[n];
  11186. return function (n, r) {
  11187. if (n = ku(n), r = null == r ? 0 : Ui(Au(r), 292)) {
  11188. var e = (Ou(n) + "e").split("e"),
  11189. e = t(e[0] + "e" + (+e[1] + r)),
  11190. e = (Ou(e) + "e").split("e");
  11191. return +(e[0] + "e" + (+e[1] - r));
  11192. }
  11193. return t(n);
  11194. };
  11195. }
  11196. function oe(n) {
  11197. return function (t) {
  11198. var r = _o(t);
  11199. return "[object Map]" == r ? W(t) : "[object Set]" == r ? C(t) : E(t, n(t));
  11200. };
  11201. }
  11202. function fe(n, t, r, e, u, i, o, f) {
  11203. var c = 2 & t;
  11204. if (!c && typeof n != "function") throw new ni("Expected a function");
  11205. var a = e ? e.length : 0;
  11206. 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) {
  11207. var l = e,
  11208. s = u;
  11209. e = u = T;
  11210. }
  11211. var h = c ? T : so(n);
  11212. 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);
  11213. }
  11214. function ce(n, t, r, e) {
  11215. return n === T || au(n, ri[r]) && !ii.call(e, r) ? t : n;
  11216. }
  11217. function ae(n, t, r, e, u, i) {
  11218. return gu(n) && gu(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n;
  11219. }
  11220. function le(n) {
  11221. return bu(n) ? T : n;
  11222. }
  11223. function se(n, t, r, e, u, i) {
  11224. var o = 1 & r,
  11225. f = n.length,
  11226. c = t.length;
  11227. if (f != c && !(o && c > f)) return false;
  11228. if ((c = i.get(n)) && i.get(t)) return c == t;
  11229. var c = -1,
  11230. a = true,
  11231. l = 2 & r ? new Nn() : T;
  11232. for (i.set(n, t), i.set(t, n); ++c < f;) {
  11233. var s = n[c],
  11234. p = t[c];
  11235. if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i);
  11236. if (_ !== T) {
  11237. if (_) continue;
  11238. a = false;
  11239. break;
  11240. }
  11241. if (l) {
  11242. if (!h(t, function (n, t) {
  11243. if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t);
  11244. })) {
  11245. a = false;
  11246. break;
  11247. }
  11248. } else if (s !== p && !u(s, p, r, e, i)) {
  11249. a = false;
  11250. break;
  11251. }
  11252. }
  11253. return i.delete(n), i.delete(t), a;
  11254. }
  11255. function he(n, t, r, e, u, i, o) {
  11256. switch (r) {
  11257. case "[object DataView]":
  11258. if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break;
  11259. n = n.buffer, t = t.buffer;
  11260. case "[object ArrayBuffer]":
  11261. if (n.byteLength != t.byteLength || !i(new _i(n), new _i(t))) break;
  11262. return true;
  11263. case "[object Boolean]":
  11264. case "[object Date]":
  11265. case "[object Number]":
  11266. return au(+n, +t);
  11267. case "[object Error]":
  11268. return n.name == t.name && n.message == t.message;
  11269. case "[object RegExp]":
  11270. case "[object String]":
  11271. return n == t + "";
  11272. case "[object Map]":
  11273. var f = W;
  11274. case "[object Set]":
  11275. if (f || (f = U), n.size != t.size && !(1 & e)) break;
  11276. 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);
  11277. case "[object Symbol]":
  11278. if (no) return no.call(n) == no.call(t);
  11279. }
  11280. return false;
  11281. }
  11282. function pe(n) {
  11283. return bo(Be(n, T, Pe), n + "");
  11284. }
  11285. function _e(n) {
  11286. return St(n, zu, ho);
  11287. }
  11288. function ve(n) {
  11289. return St(n, Wu, po);
  11290. }
  11291. function ge(n) {
  11292. for (var t = n.name + "", r = Ki[t], e = ii.call(Ki, t) ? r.length : 0; e--;) {
  11293. var u = r[e],
  11294. i = u.func;
  11295. if (null == i || i == n) return u.name;
  11296. }
  11297. return t;
  11298. }
  11299. function de(n) {
  11300. return (ii.call(An, "placeholder") ? An : n).placeholder;
  11301. }
  11302. function ye() {
  11303. var n = An.iteratee || $u,
  11304. n = n === $u ? qt : n;
  11305. return arguments.length ? n(arguments[0], arguments[1]) : n;
  11306. }
  11307. function be(n, t) {
  11308. var r = n.__data__,
  11309. e = _typeof(t);
  11310. return ("string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
  11311. }
  11312. function xe(n) {
  11313. for (var t = zu(n), r = t.length; r--;) {
  11314. var e = t[r],
  11315. u = n[e];
  11316. t[r] = [e, u, u === u && !gu(u)];
  11317. }
  11318. return t;
  11319. }
  11320. function je(n, t) {
  11321. var r = null == n ? T : n[t];
  11322. return Ft(r) ? r : T;
  11323. }
  11324. function we(n, t, r) {
  11325. t = Sr(t, n);
  11326. for (var e = -1, u = t.length, i = false; ++e < u;) {
  11327. var o = De(t[e]);
  11328. if (!(i = null != n && r(n, o))) break;
  11329. n = n[o];
  11330. }
  11331. return i || ++e != u ? i : (u = null == n ? 0 : n.length, !!u && vu(u) && Se(o, u) && (of(n) || uf(n)));
  11332. }
  11333. function me(n) {
  11334. var t = n.length,
  11335. r = new n.constructor(t);
  11336. return t && "string" == typeof n[0] && ii.call(n, "index") && (r.index = n.index, r.input = n.input), r;
  11337. }
  11338. function Ae(n) {
  11339. return typeof n.constructor != "function" || ze(n) ? {} : ro(gi(n));
  11340. }
  11341. function Ee(n, t, r) {
  11342. var e = n.constructor;
  11343. switch (t) {
  11344. case "[object ArrayBuffer]":
  11345. return Rr(n);
  11346. case "[object Boolean]":
  11347. case "[object Date]":
  11348. return new e(+n);
  11349. case "[object DataView]":
  11350. return t = r ? Rr(n.buffer) : n.buffer, new n.constructor(t, n.byteOffset, n.byteLength);
  11351. case "[object Float32Array]":
  11352. case "[object Float64Array]":
  11353. case "[object Int8Array]":
  11354. case "[object Int16Array]":
  11355. case "[object Int32Array]":
  11356. case "[object Uint8Array]":
  11357. case "[object Uint8ClampedArray]":
  11358. case "[object Uint16Array]":
  11359. case "[object Uint32Array]":
  11360. return zr(n, r);
  11361. case "[object Map]":
  11362. return new e();
  11363. case "[object Number]":
  11364. case "[object String]":
  11365. return new e(n);
  11366. case "[object RegExp]":
  11367. return t = new n.constructor(n.source, _n.exec(n)), t.lastIndex = n.lastIndex, t;
  11368. case "[object Set]":
  11369. return new e();
  11370. case "[object Symbol]":
  11371. return no ? Yu(no.call(n)) : {};
  11372. }
  11373. }
  11374. function ke(n) {
  11375. return of(n) || uf(n) || !!(xi && n && n[xi]);
  11376. }
  11377. function Se(n, t) {
  11378. var r = _typeof(n);
  11379. return t = null == t ? 9007199254740991 : t, !!t && ("number" == r || "symbol" != r && bn.test(n)) && -1 < n && 0 == n % 1 && n < t;
  11380. }
  11381. function Oe(n, t, r) {
  11382. if (!gu(r)) return false;
  11383. var e = _typeof(t);
  11384. return !!("number" == e ? lu(r) && Se(t, r.length) : "string" == e && t in r) && au(r[t], n);
  11385. }
  11386. function Ie(n, t) {
  11387. if (of(n)) return false;
  11388. var r = _typeof(n);
  11389. return !("number" != r && "symbol" != r && "boolean" != r && null != n && !ju(n)) || nn.test(n) || !X.test(n) || null != t && n in Yu(t);
  11390. }
  11391. function Re(n) {
  11392. var t = ge(n),
  11393. r = An[t];
  11394. return typeof r == "function" && t in Un.prototype && (n === r || (t = so(r), !!t && n === t[0]));
  11395. }
  11396. function ze(n) {
  11397. var t = n && n.constructor;
  11398. return n === (typeof t == "function" && t.prototype || ri);
  11399. }
  11400. function We(n, t) {
  11401. return function (r) {
  11402. return null != r && r[n] === t && (t !== T || n in Yu(r));
  11403. };
  11404. }
  11405. function Be(t, r, e) {
  11406. return r = Li(r === T ? t.length - 1 : r, 0), function () {
  11407. for (var u = arguments, i = -1, o = Li(u.length - r, 0), f = Vu(o); ++i < o;) {
  11408. f[i] = u[r + i];
  11409. }
  11410. for (i = -1, o = Vu(r + 1); ++i < r;) {
  11411. o[i] = u[i];
  11412. }
  11413. return o[r] = e(f), n(t, this, o);
  11414. };
  11415. }
  11416. function Le(n, t, r) {
  11417. var e = t + "";
  11418. t = bo;
  11419. var u,
  11420. i = Te;
  11421. 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);
  11422. }
  11423. function Ue(n) {
  11424. var t = 0,
  11425. r = 0;
  11426. return function () {
  11427. var e = Ci(),
  11428. u = 16 - (e - r);
  11429. if (r = e, 0 < u) {
  11430. if (800 <= ++t) return arguments[0];
  11431. } else t = 0;
  11432. return n.apply(T, arguments);
  11433. };
  11434. }
  11435. function Ce(n, t) {
  11436. var r = -1,
  11437. e = n.length,
  11438. u = e - 1;
  11439. for (t = t === T ? e : t; ++r < t;) {
  11440. var e = ir(r, u),
  11441. i = n[e];
  11442. n[e] = n[r], n[r] = i;
  11443. }
  11444. return n.length = t, n;
  11445. }
  11446. function De(n) {
  11447. if (typeof n == "string" || ju(n)) return n;
  11448. var t = n + "";
  11449. return "0" == t && 1 / n == -$ ? "-0" : t;
  11450. }
  11451. function Me(n) {
  11452. if (null != n) {
  11453. try {
  11454. return ui.call(n);
  11455. } catch (n) {}
  11456. return n + "";
  11457. }
  11458. return "";
  11459. }
  11460. function Te(n, t) {
  11461. return r(N, function (r) {
  11462. var e = "_." + r[0];
  11463. t & r[1] && !o(n, e) && n.push(e);
  11464. }), n.sort();
  11465. }
  11466. function $e(n) {
  11467. if (n instanceof Un) return n.clone();
  11468. var t = new On(n.__wrapped__, n.__chain__);
  11469. return t.__actions__ = Ur(n.__actions__), t.__index__ = n.__index__, t.__values__ = n.__values__, t;
  11470. }
  11471. function Fe(n, t, r) {
  11472. var e = null == n ? 0 : n.length;
  11473. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), _(n, ye(t, 3), r)) : -1;
  11474. }
  11475. function Ne(n, t, r) {
  11476. var e = null == n ? 0 : n.length;
  11477. if (!e) return -1;
  11478. var u = e - 1;
  11479. return r !== T && (u = Au(r), u = 0 > r ? Li(e + u, 0) : Ui(u, e - 1)), _(n, ye(t, 3), u, true);
  11480. }
  11481. function Pe(n) {
  11482. return (null == n ? 0 : n.length) ? wt(n, 1) : [];
  11483. }
  11484. function Ze(n) {
  11485. return n && n.length ? n[0] : T;
  11486. }
  11487. function qe(n) {
  11488. var t = null == n ? 0 : n.length;
  11489. return t ? n[t - 1] : T;
  11490. }
  11491. function Ve(n, t) {
  11492. return n && n.length && t && t.length ? er(n, t) : n;
  11493. }
  11494. function Ke(n) {
  11495. return null == n ? n : Ti.call(n);
  11496. }
  11497. function Ge(n) {
  11498. if (!n || !n.length) return [];
  11499. var t = 0;
  11500. return n = i(n, function (n) {
  11501. if (su(n)) return t = Li(n.length, t), true;
  11502. }), A(t, function (t) {
  11503. return c(n, b(t));
  11504. });
  11505. }
  11506. function He(t, r) {
  11507. if (!t || !t.length) return [];
  11508. var e = Ge(t);
  11509. return null == r ? e : c(e, function (t) {
  11510. return n(r, T, t);
  11511. });
  11512. }
  11513. function Je(n) {
  11514. return n = An(n), n.__chain__ = true, n;
  11515. }
  11516. function Ye(n, t) {
  11517. return t(n);
  11518. }
  11519. function Qe() {
  11520. return this;
  11521. }
  11522. function Xe(n, t) {
  11523. return (of(n) ? r : eo)(n, ye(t, 3));
  11524. }
  11525. function nu(n, t) {
  11526. return (of(n) ? e : uo)(n, ye(t, 3));
  11527. }
  11528. function tu(n, t) {
  11529. return (of(n) ? c : Gt)(n, ye(t, 3));
  11530. }
  11531. function ru(n, t, r) {
  11532. return t = r ? T : t, t = n && null == t ? n.length : t, fe(n, 128, T, T, T, T, t);
  11533. }
  11534. function eu(n, t) {
  11535. var r;
  11536. if (typeof t != "function") throw new ni("Expected a function");
  11537. return n = Au(n), function () {
  11538. return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r;
  11539. };
  11540. }
  11541. function uu(n, t, r) {
  11542. return t = r ? T : t, n = fe(n, 8, T, T, T, T, T, t), n.placeholder = uu.placeholder, n;
  11543. }
  11544. function iu(n, t, r) {
  11545. return t = r ? T : t, n = fe(n, 16, T, T, T, T, T, t), n.placeholder = iu.placeholder, n;
  11546. }
  11547. function ou(n, t, r) {
  11548. function e(t) {
  11549. var r = c,
  11550. e = a;
  11551. return c = a = T, _ = t, s = n.apply(e, r);
  11552. }
  11553. function u(n) {
  11554. var r = n - p;
  11555. return n -= _, p === T || r >= t || 0 > r || g && n >= l;
  11556. }
  11557. function i() {
  11558. var n = Ko();
  11559. if (u(n)) return o(n);
  11560. var r,
  11561. e = yo;
  11562. r = n - _, n = t - (n - p), r = g ? Ui(n, l - r) : n, h = e(i, r);
  11563. }
  11564. function o(n) {
  11565. return h = T, d && c ? e(n) : (c = a = T, s);
  11566. }
  11567. function f() {
  11568. var n = Ko(),
  11569. r = u(n);
  11570. if (c = arguments, a = this, p = n, r) {
  11571. if (h === T) return _ = n = p, h = yo(i, t), v ? e(n) : s;
  11572. if (g) return h = yo(i, t), e(p);
  11573. }
  11574. return h === T && (h = yo(i, t)), s;
  11575. }
  11576. var c,
  11577. a,
  11578. l,
  11579. s,
  11580. h,
  11581. p,
  11582. _ = 0,
  11583. v = false,
  11584. g = false,
  11585. d = true;
  11586. if (typeof n != "function") throw new ni("Expected a function");
  11587. 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 () {
  11588. h !== T && ao(h), _ = 0, c = p = a = h = T;
  11589. }, f.flush = function () {
  11590. return h === T ? s : o(Ko());
  11591. }, f;
  11592. }
  11593. function fu(n, t) {
  11594. function r() {
  11595. var e = arguments,
  11596. u = t ? t.apply(this, e) : e[0],
  11597. i = r.cache;
  11598. return i.has(u) ? i.get(u) : (e = n.apply(this, e), r.cache = i.set(u, e) || i, e);
  11599. }
  11600. if (typeof n != "function" || null != t && typeof t != "function") throw new ni("Expected a function");
  11601. return r.cache = new (fu.Cache || Fn)(), r;
  11602. }
  11603. function cu(n) {
  11604. if (typeof n != "function") throw new ni("Expected a function");
  11605. return function () {
  11606. var t = arguments;
  11607. switch (t.length) {
  11608. case 0:
  11609. return !n.call(this);
  11610. case 1:
  11611. return !n.call(this, t[0]);
  11612. case 2:
  11613. return !n.call(this, t[0], t[1]);
  11614. case 3:
  11615. return !n.call(this, t[0], t[1], t[2]);
  11616. }
  11617. return !n.apply(this, t);
  11618. };
  11619. }
  11620. function au(n, t) {
  11621. return n === t || n !== n && t !== t;
  11622. }
  11623. function lu(n) {
  11624. return null != n && vu(n.length) && !pu(n);
  11625. }
  11626. function su(n) {
  11627. return du(n) && lu(n);
  11628. }
  11629. function hu(n) {
  11630. if (!du(n)) return false;
  11631. var t = Ot(n);
  11632. return "[object Error]" == t || "[object DOMException]" == t || typeof n.message == "string" && typeof n.name == "string" && !bu(n);
  11633. }
  11634. function pu(n) {
  11635. return !!gu(n) && (n = Ot(n), "[object Function]" == n || "[object GeneratorFunction]" == n || "[object AsyncFunction]" == n || "[object Proxy]" == n);
  11636. }
  11637. function _u(n) {
  11638. return typeof n == "number" && n == Au(n);
  11639. }
  11640. function vu(n) {
  11641. return typeof n == "number" && -1 < n && 0 == n % 1 && 9007199254740991 >= n;
  11642. }
  11643. function gu(n) {
  11644. var t = _typeof(n);
  11645. return null != n && ("object" == t || "function" == t);
  11646. }
  11647. function du(n) {
  11648. return null != n && _typeof(n) == "object";
  11649. }
  11650. function yu(n) {
  11651. return typeof n == "number" || du(n) && "[object Number]" == Ot(n);
  11652. }
  11653. function bu(n) {
  11654. 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));
  11655. }
  11656. function xu(n) {
  11657. return typeof n == "string" || !of(n) && du(n) && "[object String]" == Ot(n);
  11658. }
  11659. function ju(n) {
  11660. return _typeof(n) == "symbol" || du(n) && "[object Symbol]" == Ot(n);
  11661. }
  11662. function wu(n) {
  11663. if (!n) return [];
  11664. if (lu(n)) return xu(n) ? M(n) : Ur(n);
  11665. if (ji && n[ji]) {
  11666. n = n[ji]();
  11667. for (var t, r = []; !(t = n.next()).done;) {
  11668. r.push(t.value);
  11669. }
  11670. return r;
  11671. }
  11672. return t = _o(n), ("[object Map]" == t ? W : "[object Set]" == t ? U : Lu)(n);
  11673. }
  11674. function mu(n) {
  11675. return n ? (n = ku(n), n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) : 0 === n ? n : 0;
  11676. }
  11677. function Au(n) {
  11678. n = mu(n);
  11679. var t = n % 1;
  11680. return n === n ? t ? n - t : n : 0;
  11681. }
  11682. function Eu(n) {
  11683. return n ? pt(Au(n), 0, 4294967295) : 0;
  11684. }
  11685. function ku(n) {
  11686. if (typeof n == "number") return n;
  11687. if (ju(n)) return F;
  11688. if (gu(n) && (n = typeof n.valueOf == "function" ? n.valueOf() : n, n = gu(n) ? n + "" : n), typeof n != "string") return 0 === n ? n : +n;
  11689. n = n.replace(un, "");
  11690. var t = gn.test(n);
  11691. return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n;
  11692. }
  11693. function Su(n) {
  11694. return Cr(n, Wu(n));
  11695. }
  11696. function Ou(n) {
  11697. return null == n ? "" : yr(n);
  11698. }
  11699. function Iu(n, t, r) {
  11700. return n = null == n ? T : kt(n, t), n === T ? r : n;
  11701. }
  11702. function Ru(n, t) {
  11703. return null != n && we(n, t, zt);
  11704. }
  11705. function zu(n) {
  11706. return lu(n) ? qn(n) : Vt(n);
  11707. }
  11708. function Wu(n) {
  11709. if (lu(n)) n = qn(n, true);else if (gu(n)) {
  11710. var t,
  11711. r = ze(n),
  11712. e = [];
  11713. for (t in n) {
  11714. ("constructor" != t || !r && ii.call(n, t)) && e.push(t);
  11715. }
  11716. n = e;
  11717. } else {
  11718. if (t = [], null != n) for (r in Yu(n)) {
  11719. t.push(r);
  11720. }
  11721. n = t;
  11722. }
  11723. return n;
  11724. }
  11725. function Bu(n, t) {
  11726. if (null == n) return {};
  11727. var r = c(ve(n), function (n) {
  11728. return [n];
  11729. });
  11730. return t = ye(t), tr(n, r, function (n, r) {
  11731. return t(n, r[0]);
  11732. });
  11733. }
  11734. function Lu(n) {
  11735. return null == n ? [] : S(n, zu(n));
  11736. }
  11737. function Uu(n) {
  11738. return Tf(Ou(n).toLowerCase());
  11739. }
  11740. function Cu(n) {
  11741. return (n = Ou(n)) && n.replace(xn, Xn).replace(Sn, "");
  11742. }
  11743. function Du(n, t, r) {
  11744. return n = Ou(n), t = r ? T : t, t === T ? zn.test(n) ? n.match(In) || [] : n.match(sn) || [] : n.match(t) || [];
  11745. }
  11746. function Mu(n) {
  11747. return function () {
  11748. return n;
  11749. };
  11750. }
  11751. function Tu(n) {
  11752. return n;
  11753. }
  11754. function $u(n) {
  11755. return qt(typeof n == "function" ? n : _t(n, 1));
  11756. }
  11757. function Fu(n, t, e) {
  11758. var u = zu(t),
  11759. i = Et(t, u);
  11760. null != e || gu(t) && (i.length || !u.length) || (e = t, t = n, n = this, i = Et(t, zu(t)));
  11761. var o = !(gu(e) && "chain" in e && !e.chain),
  11762. f = pu(n);
  11763. return r(i, function (r) {
  11764. var e = t[r];
  11765. n[r] = e, f && (n.prototype[r] = function () {
  11766. var t = this.__chain__;
  11767. if (o || t) {
  11768. var r = n(this.__wrapped__);
  11769. return (r.__actions__ = Ur(this.__actions__)).push({
  11770. func: e,
  11771. args: arguments,
  11772. thisArg: n
  11773. }), r.__chain__ = t, r;
  11774. }
  11775. return e.apply(n, a([this.value()], arguments));
  11776. });
  11777. }), n;
  11778. }
  11779. function Nu() {}
  11780. function Pu(n) {
  11781. return Ie(n) ? b(De(n)) : rr(n);
  11782. }
  11783. function Zu() {
  11784. return [];
  11785. }
  11786. function qu() {
  11787. return false;
  11788. }
  11789. mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn));
  11790. var Vu = mn.Array,
  11791. Ku = mn.Date,
  11792. Gu = mn.Error,
  11793. Hu = mn.Function,
  11794. Ju = mn.Math,
  11795. Yu = mn.Object,
  11796. Qu = mn.RegExp,
  11797. Xu = mn.String,
  11798. ni = mn.TypeError,
  11799. ti = Vu.prototype,
  11800. ri = Yu.prototype,
  11801. ei = mn["__core-js_shared__"],
  11802. ui = Hu.prototype.toString,
  11803. ii = ri.hasOwnProperty,
  11804. oi = 0,
  11805. fi = function () {
  11806. var n = /[^.]+$/.exec(ei && ei.keys && ei.keys.IE_PROTO || "");
  11807. return n ? "Symbol(src)_1." + n : "";
  11808. }(),
  11809. ci = ri.toString,
  11810. ai = ui.call(Yu),
  11811. li = $n._,
  11812. si = Qu("^" + ui.call(ii).replace(rn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
  11813. hi = Pn ? mn.Buffer : T,
  11814. pi = mn.Symbol,
  11815. _i = mn.Uint8Array,
  11816. vi = hi ? hi.g : T,
  11817. gi = B(Yu.getPrototypeOf, Yu),
  11818. di = Yu.create,
  11819. yi = ri.propertyIsEnumerable,
  11820. bi = ti.splice,
  11821. xi = pi ? pi.isConcatSpreadable : T,
  11822. ji = pi ? pi.iterator : T,
  11823. wi = pi ? pi.toStringTag : T,
  11824. mi = function () {
  11825. try {
  11826. var n = je(Yu, "defineProperty");
  11827. return n({}, "", {}), n;
  11828. } catch (n) {}
  11829. }(),
  11830. Ai = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
  11831. Ei = Ku && Ku.now !== $n.Date.now && Ku.now,
  11832. ki = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
  11833. Si = Ju.ceil,
  11834. Oi = Ju.floor,
  11835. Ii = Yu.getOwnPropertySymbols,
  11836. Ri = hi ? hi.isBuffer : T,
  11837. zi = mn.isFinite,
  11838. Wi = ti.join,
  11839. Bi = B(Yu.keys, Yu),
  11840. Li = Ju.max,
  11841. Ui = Ju.min,
  11842. Ci = Ku.now,
  11843. Di = mn.parseInt,
  11844. Mi = Ju.random,
  11845. Ti = ti.reverse,
  11846. $i = je(mn, "DataView"),
  11847. Fi = je(mn, "Map"),
  11848. Ni = je(mn, "Promise"),
  11849. Pi = je(mn, "Set"),
  11850. Zi = je(mn, "WeakMap"),
  11851. qi = je(Yu, "create"),
  11852. Vi = Zi && new Zi(),
  11853. Ki = {},
  11854. Gi = Me($i),
  11855. Hi = Me(Fi),
  11856. Ji = Me(Ni),
  11857. Yi = Me(Pi),
  11858. Qi = Me(Zi),
  11859. Xi = pi ? pi.prototype : T,
  11860. no = Xi ? Xi.valueOf : T,
  11861. to = Xi ? Xi.toString : T,
  11862. ro = function () {
  11863. function n() {}
  11864. return function (t) {
  11865. return gu(t) ? di ? di(t) : (n.prototype = t, t = new n(), n.prototype = T, t) : {};
  11866. };
  11867. }();
  11868. An.templateSettings = {
  11869. escape: J,
  11870. evaluate: Y,
  11871. interpolate: Q,
  11872. variable: "",
  11873. imports: {
  11874. _: An
  11875. }
  11876. }, 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 () {
  11877. this.__data__ = qi ? qi(null) : {}, this.size = 0;
  11878. }, Mn.prototype.delete = function (n) {
  11879. return n = this.has(n) && delete this.__data__[n], this.size -= n ? 1 : 0, n;
  11880. }, Mn.prototype.get = function (n) {
  11881. var t = this.__data__;
  11882. return qi ? (n = t[n], "__lodash_hash_undefined__" === n ? T : n) : ii.call(t, n) ? t[n] : T;
  11883. }, Mn.prototype.has = function (n) {
  11884. var t = this.__data__;
  11885. return qi ? t[n] !== T : ii.call(t, n);
  11886. }, Mn.prototype.set = function (n, t) {
  11887. var r = this.__data__;
  11888. return this.size += this.has(n) ? 0 : 1, r[n] = qi && t === T ? "__lodash_hash_undefined__" : t, this;
  11889. }, Tn.prototype.clear = function () {
  11890. this.__data__ = [], this.size = 0;
  11891. }, Tn.prototype.delete = function (n) {
  11892. var t = this.__data__;
  11893. return n = ft(t, n), !(0 > n) && (n == t.length - 1 ? t.pop() : bi.call(t, n, 1), --this.size, true);
  11894. }, Tn.prototype.get = function (n) {
  11895. var t = this.__data__;
  11896. return n = ft(t, n), 0 > n ? T : t[n][1];
  11897. }, Tn.prototype.has = function (n) {
  11898. return -1 < ft(this.__data__, n);
  11899. }, Tn.prototype.set = function (n, t) {
  11900. var r = this.__data__,
  11901. e = ft(r, n);
  11902. return 0 > e ? (++this.size, r.push([n, t])) : r[e][1] = t, this;
  11903. }, Fn.prototype.clear = function () {
  11904. this.size = 0, this.__data__ = {
  11905. hash: new Mn(),
  11906. map: new (Fi || Tn)(),
  11907. string: new Mn()
  11908. };
  11909. }, Fn.prototype.delete = function (n) {
  11910. return n = be(this, n).delete(n), this.size -= n ? 1 : 0, n;
  11911. }, Fn.prototype.get = function (n) {
  11912. return be(this, n).get(n);
  11913. }, Fn.prototype.has = function (n) {
  11914. return be(this, n).has(n);
  11915. }, Fn.prototype.set = function (n, t) {
  11916. var r = be(this, n),
  11917. e = r.size;
  11918. return r.set(n, t), this.size += r.size == e ? 0 : 1, this;
  11919. }, Nn.prototype.add = Nn.prototype.push = function (n) {
  11920. return this.__data__.set(n, "__lodash_hash_undefined__"), this;
  11921. }, Nn.prototype.has = function (n) {
  11922. return this.__data__.has(n);
  11923. }, Zn.prototype.clear = function () {
  11924. this.__data__ = new Tn(), this.size = 0;
  11925. }, Zn.prototype.delete = function (n) {
  11926. var t = this.__data__;
  11927. return n = t.delete(n), this.size = t.size, n;
  11928. }, Zn.prototype.get = function (n) {
  11929. return this.__data__.get(n);
  11930. }, Zn.prototype.has = function (n) {
  11931. return this.__data__.has(n);
  11932. }, Zn.prototype.set = function (n, t) {
  11933. var r = this.__data__;
  11934. if (r instanceof Tn) {
  11935. var e = r.__data__;
  11936. if (!Fi || 199 > e.length) return e.push([n, t]), this.size = ++r.size, this;
  11937. r = this.__data__ = new Fn(e);
  11938. }
  11939. return r.set(n, t), this.size = r.size, this;
  11940. };
  11941. var eo = Fr(mt),
  11942. uo = Fr(At, true),
  11943. io = Nr(),
  11944. oo = Nr(true),
  11945. fo = Vi ? function (n, t) {
  11946. return Vi.set(n, t), n;
  11947. } : Tu,
  11948. co = mi ? function (n, t) {
  11949. return mi(n, "toString", {
  11950. configurable: true,
  11951. enumerable: false,
  11952. value: Mu(t),
  11953. writable: true
  11954. });
  11955. } : Tu,
  11956. ao = Ai || function (n) {
  11957. return $n.clearTimeout(n);
  11958. },
  11959. lo = Pi && 1 / U(new Pi([, -0]))[1] == $ ? function (n) {
  11960. return new Pi(n);
  11961. } : Nu,
  11962. so = Vi ? function (n) {
  11963. return Vi.get(n);
  11964. } : Nu,
  11965. ho = Ii ? function (n) {
  11966. return null == n ? [] : (n = Yu(n), i(Ii(n), function (t) {
  11967. return yi.call(n, t);
  11968. }));
  11969. } : Zu,
  11970. po = Ii ? function (n) {
  11971. for (var t = []; n;) {
  11972. a(t, ho(n)), n = gi(n);
  11973. }
  11974. return t;
  11975. } : Zu,
  11976. _o = Ot;
  11977. ($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) {
  11978. var t = Ot(n);
  11979. if (n = (n = "[object Object]" == t ? n.constructor : T) ? Me(n) : "") switch (n) {
  11980. case Gi:
  11981. return "[object DataView]";
  11982. case Hi:
  11983. return "[object Map]";
  11984. case Ji:
  11985. return "[object Promise]";
  11986. case Yi:
  11987. return "[object Set]";
  11988. case Qi:
  11989. return "[object WeakMap]";
  11990. }
  11991. return t;
  11992. });
  11993. var vo = ei ? pu : qu,
  11994. go = Ue(fo),
  11995. yo = ki || function (n, t) {
  11996. return $n.setTimeout(n, t);
  11997. },
  11998. bo = Ue(co),
  11999. xo = function (n) {
  12000. n = fu(n, function (n) {
  12001. return 500 === t.size && t.clear(), n;
  12002. });
  12003. var t = n.cache;
  12004. return n;
  12005. }(function (n) {
  12006. var t = [];
  12007. return 46 === n.charCodeAt(0) && t.push(""), n.replace(tn, function (n, r, e, u) {
  12008. t.push(e ? u.replace(hn, "$1") : r || n);
  12009. }), t;
  12010. }),
  12011. jo = fr(function (n, t) {
  12012. return su(n) ? yt(n, wt(t, 1, su, true)) : [];
  12013. }),
  12014. wo = fr(function (n, t) {
  12015. var r = qe(t);
  12016. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), ye(r, 2)) : [];
  12017. }),
  12018. mo = fr(function (n, t) {
  12019. var r = qe(t);
  12020. return su(r) && (r = T), su(n) ? yt(n, wt(t, 1, su, true), T, r) : [];
  12021. }),
  12022. Ao = fr(function (n) {
  12023. var t = c(n, Er);
  12024. return t.length && t[0] === n[0] ? Wt(t) : [];
  12025. }),
  12026. Eo = fr(function (n) {
  12027. var t = qe(n),
  12028. r = c(n, Er);
  12029. return t === qe(r) ? t = T : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : [];
  12030. }),
  12031. ko = fr(function (n) {
  12032. var t = qe(n),
  12033. r = c(n, Er);
  12034. return (t = typeof t == "function" ? t : T) && r.pop(), r.length && r[0] === n[0] ? Wt(r, T, t) : [];
  12035. }),
  12036. So = fr(Ve),
  12037. Oo = pe(function (n, t) {
  12038. var r = null == n ? 0 : n.length,
  12039. e = ht(n, t);
  12040. return ur(n, c(t, function (n) {
  12041. return Se(n, r) ? +n : n;
  12042. }).sort(Wr)), e;
  12043. }),
  12044. Io = fr(function (n) {
  12045. return br(wt(n, 1, su, true));
  12046. }),
  12047. Ro = fr(function (n) {
  12048. var t = qe(n);
  12049. return su(t) && (t = T), br(wt(n, 1, su, true), ye(t, 2));
  12050. }),
  12051. zo = fr(function (n) {
  12052. var t = qe(n),
  12053. t = typeof t == "function" ? t : T;
  12054. return br(wt(n, 1, su, true), T, t);
  12055. }),
  12056. Wo = fr(function (n, t) {
  12057. return su(n) ? yt(n, t) : [];
  12058. }),
  12059. Bo = fr(function (n) {
  12060. return mr(i(n, su));
  12061. }),
  12062. Lo = fr(function (n) {
  12063. var t = qe(n);
  12064. return su(t) && (t = T), mr(i(n, su), ye(t, 2));
  12065. }),
  12066. Uo = fr(function (n) {
  12067. var t = qe(n),
  12068. t = typeof t == "function" ? t : T;
  12069. return mr(i(n, su), T, t);
  12070. }),
  12071. Co = fr(Ge),
  12072. Do = fr(function (n) {
  12073. var t = n.length,
  12074. t = 1 < t ? n[t - 1] : T,
  12075. t = typeof t == "function" ? (n.pop(), t) : T;
  12076. return He(n, t);
  12077. }),
  12078. Mo = pe(function (n) {
  12079. function t(t) {
  12080. return ht(t, n);
  12081. }
  12082. var r = n.length,
  12083. e = r ? n[0] : 0,
  12084. u = this.__wrapped__;
  12085. return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({
  12086. func: Ye,
  12087. args: [t],
  12088. thisArg: T
  12089. }), new On(u, this.__chain__).thru(function (n) {
  12090. return r && !n.length && n.push(T), n;
  12091. })) : this.thru(t);
  12092. }),
  12093. To = Tr(function (n, t, r) {
  12094. ii.call(n, r) ? ++n[r] : st(n, r, 1);
  12095. }),
  12096. $o = Gr(Fe),
  12097. Fo = Gr(Ne),
  12098. No = Tr(function (n, t, r) {
  12099. ii.call(n, r) ? n[r].push(t) : st(n, r, [t]);
  12100. }),
  12101. Po = fr(function (t, r, e) {
  12102. var u = -1,
  12103. i = typeof r == "function",
  12104. o = lu(t) ? Vu(t.length) : [];
  12105. return eo(t, function (t) {
  12106. o[++u] = i ? n(r, t, e) : Lt(t, r, e);
  12107. }), o;
  12108. }),
  12109. Zo = Tr(function (n, t, r) {
  12110. st(n, r, t);
  12111. }),
  12112. qo = Tr(function (n, t, r) {
  12113. n[r ? 0 : 1].push(t);
  12114. }, function () {
  12115. return [[], []];
  12116. }),
  12117. Vo = fr(function (n, t) {
  12118. if (null == n) return [];
  12119. var r = t.length;
  12120. 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), []);
  12121. }),
  12122. Ko = Ei || function () {
  12123. return $n.Date.now();
  12124. },
  12125. Go = fr(function (n, t, r) {
  12126. var e = 1;
  12127. if (r.length) var u = L(r, de(Go)),
  12128. e = 32 | e;
  12129. return fe(n, e, t, r, u);
  12130. }),
  12131. Ho = fr(function (n, t, r) {
  12132. var e = 3;
  12133. if (r.length) var u = L(r, de(Ho)),
  12134. e = 32 | e;
  12135. return fe(t, e, n, r, u);
  12136. }),
  12137. Jo = fr(function (n, t) {
  12138. return dt(n, 1, t);
  12139. }),
  12140. Yo = fr(function (n, t, r) {
  12141. return dt(n, ku(t) || 0, r);
  12142. });
  12143. fu.Cache = Fn;
  12144. var Qo = fr(function (t, r) {
  12145. r = 1 == r.length && of(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye()));
  12146. var e = r.length;
  12147. return fr(function (u) {
  12148. for (var i = -1, o = Ui(u.length, e); ++i < o;) {
  12149. u[i] = r[i].call(this, u[i]);
  12150. }
  12151. return n(t, this, u);
  12152. });
  12153. }),
  12154. Xo = fr(function (n, t) {
  12155. return fe(n, 32, T, t, L(t, de(Xo)));
  12156. }),
  12157. nf = fr(function (n, t) {
  12158. return fe(n, 64, T, t, L(t, de(nf)));
  12159. }),
  12160. tf = pe(function (n, t) {
  12161. return fe(n, 256, T, T, T, t);
  12162. }),
  12163. rf = ee(It),
  12164. ef = ee(function (n, t) {
  12165. return n >= t;
  12166. }),
  12167. uf = Ut(function () {
  12168. return arguments;
  12169. }()) ? Ut : function (n) {
  12170. return du(n) && ii.call(n, "callee") && !yi.call(n, "callee");
  12171. },
  12172. of = Vu.isArray,
  12173. ff = Vn ? k(Vn) : Ct,
  12174. cf = Ri || qu,
  12175. af = Kn ? k(Kn) : Dt,
  12176. lf = Gn ? k(Gn) : Tt,
  12177. sf = Hn ? k(Hn) : Nt,
  12178. hf = Jn ? k(Jn) : Pt,
  12179. pf = Yn ? k(Yn) : Zt,
  12180. _f = ee(Kt),
  12181. vf = ee(function (n, t) {
  12182. return n <= t;
  12183. }),
  12184. gf = $r(function (n, t) {
  12185. if (ze(t) || lu(t)) Cr(t, zu(t), n);else for (var r in t) {
  12186. ii.call(t, r) && ot(n, r, t[r]);
  12187. }
  12188. }),
  12189. df = $r(function (n, t) {
  12190. Cr(t, Wu(t), n);
  12191. }),
  12192. yf = $r(function (n, t, r, e) {
  12193. Cr(t, Wu(t), n, e);
  12194. }),
  12195. bf = $r(function (n, t, r, e) {
  12196. Cr(t, zu(t), n, e);
  12197. }),
  12198. xf = pe(ht),
  12199. jf = fr(function (n, t) {
  12200. n = Yu(n);
  12201. var r = -1,
  12202. e = t.length,
  12203. u = 2 < e ? t[2] : T;
  12204. for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e;) {
  12205. for (var u = t[r], i = Wu(u), o = -1, f = i.length; ++o < f;) {
  12206. var c = i[o],
  12207. a = n[c];
  12208. (a === T || au(a, ri[c]) && !ii.call(n, c)) && (n[c] = u[c]);
  12209. }
  12210. }
  12211. return n;
  12212. }),
  12213. wf = fr(function (t) {
  12214. return t.push(T, ae), n(Sf, T, t);
  12215. }),
  12216. mf = Yr(function (n, t, r) {
  12217. null != t && typeof t.toString != "function" && (t = ci.call(t)), n[t] = r;
  12218. }, Mu(Tu)),
  12219. Af = Yr(function (n, t, r) {
  12220. null != t && typeof t.toString != "function" && (t = ci.call(t)), ii.call(n, t) ? n[t].push(r) : n[t] = [r];
  12221. }, ye),
  12222. Ef = fr(Lt),
  12223. kf = $r(function (n, t, r) {
  12224. Yt(n, t, r);
  12225. }),
  12226. Sf = $r(function (n, t, r, e) {
  12227. Yt(n, t, r, e);
  12228. }),
  12229. Of = pe(function (n, t) {
  12230. var r = {};
  12231. if (null == n) return r;
  12232. var e = false;
  12233. t = c(t, function (t) {
  12234. return t = Sr(t, n), e || (e = 1 < t.length), t;
  12235. }), Cr(n, ve(n), r), e && (r = _t(r, 7, le));
  12236. for (var u = t.length; u--;) {
  12237. xr(r, t[u]);
  12238. }
  12239. return r;
  12240. }),
  12241. If = pe(function (n, t) {
  12242. return null == n ? {} : nr(n, t);
  12243. }),
  12244. Rf = oe(zu),
  12245. zf = oe(Wu),
  12246. Wf = qr(function (n, t, r) {
  12247. return t = t.toLowerCase(), n + (r ? Uu(t) : t);
  12248. }),
  12249. Bf = qr(function (n, t, r) {
  12250. return n + (r ? "-" : "") + t.toLowerCase();
  12251. }),
  12252. Lf = qr(function (n, t, r) {
  12253. return n + (r ? " " : "") + t.toLowerCase();
  12254. }),
  12255. Uf = Zr("toLowerCase"),
  12256. Cf = qr(function (n, t, r) {
  12257. return n + (r ? "_" : "") + t.toLowerCase();
  12258. }),
  12259. Df = qr(function (n, t, r) {
  12260. return n + (r ? " " : "") + Tf(t);
  12261. }),
  12262. Mf = qr(function (n, t, r) {
  12263. return n + (r ? " " : "") + t.toUpperCase();
  12264. }),
  12265. Tf = Zr("toUpperCase"),
  12266. $f = fr(function (t, r) {
  12267. try {
  12268. return n(t, T, r);
  12269. } catch (n) {
  12270. return hu(n) ? n : new Gu(n);
  12271. }
  12272. }),
  12273. Ff = pe(function (n, t) {
  12274. return r(t, function (t) {
  12275. t = De(t), st(n, t, Go(n[t], n));
  12276. }), n;
  12277. }),
  12278. Nf = Hr(),
  12279. Pf = Hr(true),
  12280. Zf = fr(function (n, t) {
  12281. return function (r) {
  12282. return Lt(r, n, t);
  12283. };
  12284. }),
  12285. qf = fr(function (n, t) {
  12286. return function (r) {
  12287. return Lt(n, r, t);
  12288. };
  12289. }),
  12290. Vf = Xr(c),
  12291. Kf = Xr(u),
  12292. Gf = Xr(h),
  12293. Hf = re(),
  12294. Jf = re(true),
  12295. Yf = Qr(function (n, t) {
  12296. return n + t;
  12297. }, 0),
  12298. Qf = ie("ceil"),
  12299. Xf = Qr(function (n, t) {
  12300. return n / t;
  12301. }, 1),
  12302. nc = ie("floor"),
  12303. tc = Qr(function (n, t) {
  12304. return n * t;
  12305. }, 1),
  12306. rc = ie("round"),
  12307. ec = Qr(function (n, t) {
  12308. return n - t;
  12309. }, 0);
  12310. return An.after = function (n, t) {
  12311. if (typeof t != "function") throw new ni("Expected a function");
  12312. return n = Au(n), function () {
  12313. if (1 > --n) return t.apply(this, arguments);
  12314. };
  12315. }, 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 () {
  12316. if (!arguments.length) return [];
  12317. var n = arguments[0];
  12318. return of(n) ? n : [n];
  12319. }, An.chain = Je, An.chunk = function (n, t, r) {
  12320. if (t = (r ? Oe(n, t, r) : t === T) ? 1 : Li(Au(t), 0), r = null == n ? 0 : n.length, !r || 1 > t) return [];
  12321. for (var e = 0, u = 0, i = Vu(Si(r / t)); e < r;) {
  12322. i[u++] = hr(n, e, e += t);
  12323. }
  12324. return i;
  12325. }, An.compact = function (n) {
  12326. for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r;) {
  12327. var i = n[t];
  12328. i && (u[e++] = i);
  12329. }
  12330. return u;
  12331. }, An.concat = function () {
  12332. var n = arguments.length;
  12333. if (!n) return [];
  12334. for (var t = Vu(n - 1), r = arguments[0]; n--;) {
  12335. t[n - 1] = arguments[n];
  12336. }
  12337. return a(of(r) ? Ur(r) : [r], wt(t, 1));
  12338. }, An.cond = function (t) {
  12339. var r = null == t ? 0 : t.length,
  12340. e = ye();
  12341. return t = r ? c(t, function (n) {
  12342. if ("function" != typeof n[1]) throw new ni("Expected a function");
  12343. return [e(n[0]), n[1]];
  12344. }) : [], fr(function (e) {
  12345. for (var u = -1; ++u < r;) {
  12346. var i = t[u];
  12347. if (n(i[0], this, e)) return n(i[1], this, e);
  12348. }
  12349. });
  12350. }, An.conforms = function (n) {
  12351. return vt(_t(n, 1));
  12352. }, An.constant = Mu, An.countBy = To, An.create = function (n, t) {
  12353. var r = ro(n);
  12354. return null == t ? r : at(r, t);
  12355. }, 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) {
  12356. var e = null == n ? 0 : n.length;
  12357. return e ? (t = r || t === T ? 1 : Au(t), hr(n, 0 > t ? 0 : t, e)) : [];
  12358. }, An.dropRight = function (n, t, r) {
  12359. var e = null == n ? 0 : n.length;
  12360. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0, 0 > t ? 0 : t)) : [];
  12361. }, An.dropRightWhile = function (n, t) {
  12362. return n && n.length ? jr(n, ye(t, 3), true, true) : [];
  12363. }, An.dropWhile = function (n, t) {
  12364. return n && n.length ? jr(n, ye(t, 3), true) : [];
  12365. }, An.fill = function (n, t, r, e) {
  12366. var u = null == n ? 0 : n.length;
  12367. if (!u) return [];
  12368. 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;) {
  12369. n[r++] = t;
  12370. }
  12371. return n;
  12372. }, An.filter = function (n, t) {
  12373. return (of(n) ? i : jt)(n, ye(t, 3));
  12374. }, An.flatMap = function (n, t) {
  12375. return wt(tu(n, t), 1);
  12376. }, An.flatMapDeep = function (n, t) {
  12377. return wt(tu(n, t), $);
  12378. }, An.flatMapDepth = function (n, t, r) {
  12379. return r = r === T ? 1 : Au(r), wt(tu(n, t), r);
  12380. }, An.flatten = Pe, An.flattenDeep = function (n) {
  12381. return (null == n ? 0 : n.length) ? wt(n, $) : [];
  12382. }, An.flattenDepth = function (n, t) {
  12383. return null != n && n.length ? (t = t === T ? 1 : Au(t), wt(n, t)) : [];
  12384. }, An.flip = function (n) {
  12385. return fe(n, 512);
  12386. }, An.flow = Nf, An.flowRight = Pf, An.fromPairs = function (n) {
  12387. for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r;) {
  12388. var u = n[t];
  12389. e[u[0]] = u[1];
  12390. }
  12391. return e;
  12392. }, An.functions = function (n) {
  12393. return null == n ? [] : Et(n, zu(n));
  12394. }, An.functionsIn = function (n) {
  12395. return null == n ? [] : Et(n, Wu(n));
  12396. }, An.groupBy = No, An.initial = function (n) {
  12397. return (null == n ? 0 : n.length) ? hr(n, 0, -1) : [];
  12398. }, 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) {
  12399. var r = {};
  12400. return t = ye(t, 3), mt(n, function (n, e, u) {
  12401. st(r, t(n, e, u), n);
  12402. }), r;
  12403. }, An.mapValues = function (n, t) {
  12404. var r = {};
  12405. return t = ye(t, 3), mt(n, function (n, e, u) {
  12406. st(r, e, t(n, e, u));
  12407. }), r;
  12408. }, An.matches = function (n) {
  12409. return Ht(_t(n, 1));
  12410. }, An.matchesProperty = function (n, t) {
  12411. return Jt(n, _t(t, 1));
  12412. }, 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) {
  12413. return n = Au(n), fr(function (t) {
  12414. return Qt(t, n);
  12415. });
  12416. }, An.omit = Of, An.omitBy = function (n, t) {
  12417. return Bu(n, cu(ye(t)));
  12418. }, An.once = function (n) {
  12419. return eu(2, n);
  12420. }, An.orderBy = function (n, t, r, e) {
  12421. return null == n ? [] : (of(t) || (t = null == t ? [] : [t]), r = e ? T : r, of(r) || (r = null == r ? [] : [r]), Xt(n, t, r));
  12422. }, 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) {
  12423. return function (t) {
  12424. return null == n ? T : kt(n, t);
  12425. };
  12426. }, An.pull = So, An.pullAll = Ve, An.pullAllBy = function (n, t, r) {
  12427. return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n;
  12428. }, An.pullAllWith = function (n, t, r) {
  12429. return n && n.length && t && t.length ? er(n, t, T, r) : n;
  12430. }, An.pullAt = Oo, An.range = Hf, An.rangeRight = Jf, An.rearg = tf, An.reject = function (n, t) {
  12431. return (of(n) ? i : jt)(n, cu(ye(t, 3)));
  12432. }, An.remove = function (n, t) {
  12433. var r = [];
  12434. if (!n || !n.length) return r;
  12435. var e = -1,
  12436. u = [],
  12437. i = n.length;
  12438. for (t = ye(t, 3); ++e < i;) {
  12439. var o = n[e];
  12440. t(o, e, n) && (r.push(o), u.push(e));
  12441. }
  12442. return ur(n, u), r;
  12443. }, An.rest = function (n, t) {
  12444. if (typeof n != "function") throw new ni("Expected a function");
  12445. return t = t === T ? t : Au(t), fr(n, t);
  12446. }, An.reverse = Ke, An.sampleSize = function (n, t, r) {
  12447. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), (of(n) ? et : ar)(n, t);
  12448. }, An.set = function (n, t, r) {
  12449. return null == n ? n : lr(n, t, r);
  12450. }, An.setWith = function (n, t, r, e) {
  12451. return e = typeof e == "function" ? e : T, null == n ? n : lr(n, t, r, e);
  12452. }, An.shuffle = function (n) {
  12453. return (of(n) ? ut : sr)(n);
  12454. }, An.slice = function (n, t, r) {
  12455. var e = null == n ? 0 : n.length;
  12456. 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)) : [];
  12457. }, An.sortBy = Vo, An.sortedUniq = function (n) {
  12458. return n && n.length ? gr(n) : [];
  12459. }, An.sortedUniqBy = function (n, t) {
  12460. return n && n.length ? gr(n, ye(t, 2)) : [];
  12461. }, An.split = function (n, t, r) {
  12462. 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) : [];
  12463. }, An.spread = function (t, r) {
  12464. if (typeof t != "function") throw new ni("Expected a function");
  12465. return r = null == r ? 0 : Li(Au(r), 0), fr(function (e) {
  12466. var u = e[r];
  12467. return e = Or(e, 0, r), u && a(e, u), n(t, this, e);
  12468. });
  12469. }, An.tail = function (n) {
  12470. var t = null == n ? 0 : n.length;
  12471. return t ? hr(n, 1, t) : [];
  12472. }, An.take = function (n, t, r) {
  12473. return n && n.length ? (t = r || t === T ? 1 : Au(t), hr(n, 0, 0 > t ? 0 : t)) : [];
  12474. }, An.takeRight = function (n, t, r) {
  12475. var e = null == n ? 0 : n.length;
  12476. return e ? (t = r || t === T ? 1 : Au(t), t = e - t, hr(n, 0 > t ? 0 : t, e)) : [];
  12477. }, An.takeRightWhile = function (n, t) {
  12478. return n && n.length ? jr(n, ye(t, 3), false, true) : [];
  12479. }, An.takeWhile = function (n, t) {
  12480. return n && n.length ? jr(n, ye(t, 3)) : [];
  12481. }, An.tap = function (n, t) {
  12482. return t(n), n;
  12483. }, An.throttle = function (n, t, r) {
  12484. var e = true,
  12485. u = true;
  12486. if (typeof n != "function") throw new ni("Expected a function");
  12487. return gu(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), ou(n, t, {
  12488. leading: e,
  12489. maxWait: t,
  12490. trailing: u
  12491. });
  12492. }, An.thru = Ye, An.toArray = wu, An.toPairs = Rf, An.toPairsIn = zf, An.toPath = function (n) {
  12493. return of(n) ? c(n, De) : ju(n) ? [n] : Ur(xo(Ou(n)));
  12494. }, An.toPlainObject = Su, An.transform = function (n, t, e) {
  12495. var u = of(n),
  12496. i = u || cf(n) || pf(n);
  12497. if (t = ye(t, 4), null == e) {
  12498. var o = n && n.constructor;
  12499. e = i ? u ? new o() : [] : gu(n) && pu(o) ? ro(gi(n)) : {};
  12500. }
  12501. return (i ? r : mt)(n, function (n, r, u) {
  12502. return t(e, n, r, u);
  12503. }), e;
  12504. }, An.unary = function (n) {
  12505. return ru(n, 1);
  12506. }, An.union = Io, An.unionBy = Ro, An.unionWith = zo, An.uniq = function (n) {
  12507. return n && n.length ? br(n) : [];
  12508. }, An.uniqBy = function (n, t) {
  12509. return n && n.length ? br(n, ye(t, 2)) : [];
  12510. }, An.uniqWith = function (n, t) {
  12511. return t = typeof t == "function" ? t : T, n && n.length ? br(n, T, t) : [];
  12512. }, An.unset = function (n, t) {
  12513. return null == n || xr(n, t);
  12514. }, An.unzip = Ge, An.unzipWith = He, An.update = function (n, t, r) {
  12515. return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0);
  12516. }, An.updateWith = function (n, t, r, e) {
  12517. return e = typeof e == "function" ? e : T, null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n;
  12518. }, An.values = Lu, An.valuesIn = function (n) {
  12519. return null == n ? [] : S(n, Wu(n));
  12520. }, An.without = Wo, An.words = Du, An.wrap = function (n, t) {
  12521. return Xo(kr(t), n);
  12522. }, An.xor = Bo, An.xorBy = Lo, An.xorWith = Uo, An.zip = Co, An.zipObject = function (n, t) {
  12523. return Ar(n || [], t || [], ot);
  12524. }, An.zipObjectDeep = function (n, t) {
  12525. return Ar(n || [], t || [], lr);
  12526. }, 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) {
  12527. 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);
  12528. }, An.clone = function (n) {
  12529. return _t(n, 4);
  12530. }, An.cloneDeep = function (n) {
  12531. return _t(n, 5);
  12532. }, An.cloneDeepWith = function (n, t) {
  12533. return t = typeof t == "function" ? t : T, _t(n, 5, t);
  12534. }, An.cloneWith = function (n, t) {
  12535. return t = typeof t == "function" ? t : T, _t(n, 4, t);
  12536. }, An.conformsTo = function (n, t) {
  12537. return null == t || gt(n, t, zu(t));
  12538. }, An.deburr = Cu, An.defaultTo = function (n, t) {
  12539. return null == n || n !== n ? t : n;
  12540. }, An.divide = Xf, An.endsWith = function (n, t, r) {
  12541. n = Ou(n), t = yr(t);
  12542. var e = n.length,
  12543. e = r = r === T ? e : pt(Au(r), 0, e);
  12544. return r -= t.length, 0 <= r && n.slice(r, e) == t;
  12545. }, An.eq = au, An.escape = function (n) {
  12546. return (n = Ou(n)) && H.test(n) ? n.replace(K, nt) : n;
  12547. }, An.escapeRegExp = function (n) {
  12548. return (n = Ou(n)) && en.test(n) ? n.replace(rn, "\\$&") : n;
  12549. }, An.every = function (n, t, r) {
  12550. var e = of(n) ? u : bt;
  12551. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  12552. }, An.find = $o, An.findIndex = Fe, An.findKey = function (n, t) {
  12553. return p(n, ye(t, 3), mt);
  12554. }, An.findLast = Fo, An.findLastIndex = Ne, An.findLastKey = function (n, t) {
  12555. return p(n, ye(t, 3), At);
  12556. }, An.floor = nc, An.forEach = Xe, An.forEachRight = nu, An.forIn = function (n, t) {
  12557. return null == n ? n : io(n, ye(t, 3), Wu);
  12558. }, An.forInRight = function (n, t) {
  12559. return null == n ? n : oo(n, ye(t, 3), Wu);
  12560. }, An.forOwn = function (n, t) {
  12561. return n && mt(n, ye(t, 3));
  12562. }, An.forOwnRight = function (n, t) {
  12563. return n && At(n, ye(t, 3));
  12564. }, An.get = Iu, An.gt = rf, An.gte = ef, An.has = function (n, t) {
  12565. return null != n && we(n, t, Rt);
  12566. }, An.hasIn = Ru, An.head = Ze, An.identity = Tu, An.includes = function (n, t, r, e) {
  12567. 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);
  12568. }, An.indexOf = function (n, t, r) {
  12569. var e = null == n ? 0 : n.length;
  12570. return e ? (r = null == r ? 0 : Au(r), 0 > r && (r = Li(e + r, 0)), v(n, t, r)) : -1;
  12571. }, An.inRange = function (n, t, r) {
  12572. return t = mu(t), r === T ? (r = t, t = 0) : r = mu(r), n = ku(n), n >= Ui(t, r) && n < Li(t, r);
  12573. }, An.invoke = Ef, An.isArguments = uf, An.isArray = of, An.isArrayBuffer = ff, An.isArrayLike = lu, An.isArrayLikeObject = su, An.isBoolean = function (n) {
  12574. return true === n || false === n || du(n) && "[object Boolean]" == Ot(n);
  12575. }, An.isBuffer = cf, An.isDate = af, An.isElement = function (n) {
  12576. return du(n) && 1 === n.nodeType && !bu(n);
  12577. }, An.isEmpty = function (n) {
  12578. if (null == n) return true;
  12579. if (lu(n) && (of(n) || typeof n == "string" || typeof n.splice == "function" || cf(n) || pf(n) || uf(n))) return !n.length;
  12580. var t = _o(n);
  12581. if ("[object Map]" == t || "[object Set]" == t) return !n.size;
  12582. if (ze(n)) return !Vt(n).length;
  12583. for (var r in n) {
  12584. if (ii.call(n, r)) return false;
  12585. }
  12586. return true;
  12587. }, An.isEqual = function (n, t) {
  12588. return Mt(n, t);
  12589. }, An.isEqualWith = function (n, t, r) {
  12590. var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T;
  12591. return e === T ? Mt(n, t, T, r) : !!e;
  12592. }, An.isError = hu, An.isFinite = function (n) {
  12593. return typeof n == "number" && zi(n);
  12594. }, An.isFunction = pu, An.isInteger = _u, An.isLength = vu, An.isMap = lf, An.isMatch = function (n, t) {
  12595. return n === t || $t(n, t, xe(t));
  12596. }, An.isMatchWith = function (n, t, r) {
  12597. return r = typeof r == "function" ? r : T, $t(n, t, xe(t), r);
  12598. }, An.isNaN = function (n) {
  12599. return yu(n) && n != +n;
  12600. }, An.isNative = function (n) {
  12601. if (vo(n)) throw new Gu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
  12602. return Ft(n);
  12603. }, An.isNil = function (n) {
  12604. return null == n;
  12605. }, An.isNull = function (n) {
  12606. return null === n;
  12607. }, An.isNumber = yu, An.isObject = gu, An.isObjectLike = du, An.isPlainObject = bu, An.isRegExp = sf, An.isSafeInteger = function (n) {
  12608. return _u(n) && -9007199254740991 <= n && 9007199254740991 >= n;
  12609. }, An.isSet = hf, An.isString = xu, An.isSymbol = ju, An.isTypedArray = pf, An.isUndefined = function (n) {
  12610. return n === T;
  12611. }, An.isWeakMap = function (n) {
  12612. return du(n) && "[object WeakMap]" == _o(n);
  12613. }, An.isWeakSet = function (n) {
  12614. return du(n) && "[object WeakSet]" == Ot(n);
  12615. }, An.join = function (n, t) {
  12616. return null == n ? "" : Wi.call(n, t);
  12617. }, An.kebabCase = Bf, An.last = qe, An.lastIndexOf = function (n, t, r) {
  12618. var e = null == n ? 0 : n.length;
  12619. if (!e) return -1;
  12620. var u = e;
  12621. if (r !== T && (u = Au(r), u = 0 > u ? Li(e + u, 0) : Ui(u, e - 1)), t === t) {
  12622. for (r = u + 1; r-- && n[r] !== t;) {
  12623. ;
  12624. }
  12625. n = r;
  12626. } else n = _(n, d, u, true);
  12627. return n;
  12628. }, An.lowerCase = Lf, An.lowerFirst = Uf, An.lt = _f, An.lte = vf, An.max = function (n) {
  12629. return n && n.length ? xt(n, Tu, It) : T;
  12630. }, An.maxBy = function (n, t) {
  12631. return n && n.length ? xt(n, ye(t, 2), It) : T;
  12632. }, An.mean = function (n) {
  12633. return y(n, Tu);
  12634. }, An.meanBy = function (n, t) {
  12635. return y(n, ye(t, 2));
  12636. }, An.min = function (n) {
  12637. return n && n.length ? xt(n, Tu, Kt) : T;
  12638. }, An.minBy = function (n, t) {
  12639. return n && n.length ? xt(n, ye(t, 2), Kt) : T;
  12640. }, An.stubArray = Zu, An.stubFalse = qu, An.stubObject = function () {
  12641. return {};
  12642. }, An.stubString = function () {
  12643. return "";
  12644. }, An.stubTrue = function () {
  12645. return true;
  12646. }, An.multiply = tc, An.nth = function (n, t) {
  12647. return n && n.length ? Qt(n, Au(t)) : T;
  12648. }, An.noConflict = function () {
  12649. return $n._ === this && ($n._ = li), this;
  12650. }, An.noop = Nu, An.now = Ko, An.pad = function (n, t, r) {
  12651. n = Ou(n);
  12652. var e = (t = Au(t)) ? D(n) : 0;
  12653. return !t || e >= t ? n : (t = (t - e) / 2, ne(Oi(t), r) + n + ne(Si(t), r));
  12654. }, An.padEnd = function (n, t, r) {
  12655. n = Ou(n);
  12656. var e = (t = Au(t)) ? D(n) : 0;
  12657. return t && e < t ? n + ne(t - e, r) : n;
  12658. }, An.padStart = function (n, t, r) {
  12659. n = Ou(n);
  12660. var e = (t = Au(t)) ? D(n) : 0;
  12661. return t && e < t ? ne(t - e, r) + n : n;
  12662. }, An.parseInt = function (n, t, r) {
  12663. return r || null == t ? t = 0 : t && (t = +t), Di(Ou(n).replace(on, ""), t || 0);
  12664. }, An.random = function (n, t, r) {
  12665. 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) {
  12666. var e = n;
  12667. n = t, t = e;
  12668. }
  12669. return r || n % 1 || t % 1 ? (r = Mi(), Ui(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t)) : ir(n, t);
  12670. }, An.reduce = function (n, t, r) {
  12671. var e = of(n) ? l : j,
  12672. u = 3 > arguments.length;
  12673. return e(n, ye(t, 4), r, u, eo);
  12674. }, An.reduceRight = function (n, t, r) {
  12675. var e = of(n) ? s : j,
  12676. u = 3 > arguments.length;
  12677. return e(n, ye(t, 4), r, u, uo);
  12678. }, An.repeat = function (n, t, r) {
  12679. return t = (r ? Oe(n, t, r) : t === T) ? 1 : Au(t), or(Ou(n), t);
  12680. }, An.replace = function () {
  12681. var n = arguments,
  12682. t = Ou(n[0]);
  12683. return 3 > n.length ? t : t.replace(n[1], n[2]);
  12684. }, An.result = function (n, t, r) {
  12685. t = Sr(t, n);
  12686. var e = -1,
  12687. u = t.length;
  12688. for (u || (u = 1, n = T); ++e < u;) {
  12689. var i = null == n ? T : n[De(t[e])];
  12690. i === T && (e = u, i = r), n = pu(i) ? i.call(n) : i;
  12691. }
  12692. return n;
  12693. }, An.round = rc, An.runInContext = x, An.sample = function (n) {
  12694. return (of(n) ? Qn : cr)(n);
  12695. }, An.size = function (n) {
  12696. if (null == n) return 0;
  12697. if (lu(n)) return xu(n) ? D(n) : n.length;
  12698. var t = _o(n);
  12699. return "[object Map]" == t || "[object Set]" == t ? n.size : Vt(n).length;
  12700. }, An.snakeCase = Cf, An.some = function (n, t, r) {
  12701. var e = of(n) ? h : pr;
  12702. return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3));
  12703. }, An.sortedIndex = function (n, t) {
  12704. return _r(n, t);
  12705. }, An.sortedIndexBy = function (n, t, r) {
  12706. return vr(n, t, ye(r, 2));
  12707. }, An.sortedIndexOf = function (n, t) {
  12708. var r = null == n ? 0 : n.length;
  12709. if (r) {
  12710. var e = _r(n, t);
  12711. if (e < r && au(n[e], t)) return e;
  12712. }
  12713. return -1;
  12714. }, An.sortedLastIndex = function (n, t) {
  12715. return _r(n, t, true);
  12716. }, An.sortedLastIndexBy = function (n, t, r) {
  12717. return vr(n, t, ye(r, 2), true);
  12718. }, An.sortedLastIndexOf = function (n, t) {
  12719. if (null == n ? 0 : n.length) {
  12720. var r = _r(n, t, true) - 1;
  12721. if (au(n[r], t)) return r;
  12722. }
  12723. return -1;
  12724. }, An.startCase = Df, An.startsWith = function (n, t, r) {
  12725. return n = Ou(n), r = null == r ? 0 : pt(Au(r), 0, n.length), t = yr(t), n.slice(r, r + t.length) == t;
  12726. }, An.subtract = ec, An.sum = function (n) {
  12727. return n && n.length ? m(n, Tu) : 0;
  12728. }, An.sumBy = function (n, t) {
  12729. return n && n.length ? m(n, ye(t, 2)) : 0;
  12730. }, An.template = function (n, t, r) {
  12731. var e = An.templateSettings;
  12732. r && Oe(n, t, r) && (t = T), n = Ou(n), t = yf({}, t, e, ce), r = yf({}, t.imports, e.imports, ce);
  12733. var u,
  12734. i,
  12735. o = zu(r),
  12736. f = S(r, o),
  12737. c = 0;
  12738. r = t.interpolate || jn;
  12739. var a = "__p+='";
  12740. r = Qu((t.escape || jn).source + "|" + r.source + "|" + (r === Q ? pn : jn).source + "|" + (t.evaluate || jn).source + "|$", "g");
  12741. var l = "sourceURL" in t ? "//# sourceURL=" + t.sourceURL + "\n" : "";
  12742. if (n.replace(r, function (t, r, e, o, f, l) {
  12743. 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;
  12744. }), 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 () {
  12745. return Hu(o, l + "return " + a).apply(T, f);
  12746. }), t.source = a, hu(t)) throw t;
  12747. return t;
  12748. }, An.times = function (n, t) {
  12749. if (n = Au(n), 1 > n || 9007199254740991 < n) return [];
  12750. var r = 4294967295,
  12751. e = Ui(n, 4294967295);
  12752. for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n;) {
  12753. t(r);
  12754. }
  12755. return e;
  12756. }, An.toFinite = mu, An.toInteger = Au, An.toLength = Eu, An.toLower = function (n) {
  12757. return Ou(n).toLowerCase();
  12758. }, An.toNumber = ku, An.toSafeInteger = function (n) {
  12759. return n ? pt(Au(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0;
  12760. }, An.toString = Ou, An.toUpper = function (n) {
  12761. return Ou(n).toUpperCase();
  12762. }, An.trim = function (n, t, r) {
  12763. 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;
  12764. }, An.trimEnd = function (n, t, r) {
  12765. 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;
  12766. }, An.trimStart = function (n, t, r) {
  12767. 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;
  12768. }, An.truncate = function (n, t) {
  12769. var r = 30,
  12770. e = "...";
  12771. if (gu(t)) var u = "separator" in t ? t.separator : u,
  12772. r = "length" in t ? Au(t.length) : r,
  12773. e = "omission" in t ? yr(t.omission) : e;
  12774. n = Ou(n);
  12775. var i = n.length;
  12776. if (Rn.test(n)) var o = M(n),
  12777. i = o.length;
  12778. if (r >= i) return n;
  12779. if (i = r - D(e), 1 > i) return e;
  12780. if (r = o ? Or(o, 0, i).join("") : n.slice(0, i), u === T) return r + e;
  12781. if (o && (i += r.length - i), sf(u)) {
  12782. if (n.slice(i).search(u)) {
  12783. var f = r;
  12784. for (u.global || (u = Qu(u.source, Ou(_n.exec(u)) + "g")), u.lastIndex = 0; o = u.exec(f);) {
  12785. var c = o.index;
  12786. }
  12787. r = r.slice(0, c === T ? i : c);
  12788. }
  12789. } else n.indexOf(yr(u), i) != i && (u = r.lastIndexOf(u), -1 < u && (r = r.slice(0, u)));
  12790. return r + e;
  12791. }, An.unescape = function (n) {
  12792. return (n = Ou(n)) && G.test(n) ? n.replace(V, tt) : n;
  12793. }, An.uniqueId = function (n) {
  12794. var t = ++oi;
  12795. return Ou(n) + t;
  12796. }, An.upperCase = Mf, An.upperFirst = Tf, An.each = Xe, An.eachRight = nu, An.first = Ze, Fu(An, function () {
  12797. var n = {};
  12798. return mt(An, function (t, r) {
  12799. ii.call(An.prototype, r) || (n[r] = t);
  12800. }), n;
  12801. }(), {
  12802. chain: false
  12803. }), An.VERSION = "4.17.10", r("bind bindKey curry curryRight partial partialRight".split(" "), function (n) {
  12804. An[n].placeholder = An;
  12805. }), r(["drop", "take"], function (n, t) {
  12806. Un.prototype[n] = function (r) {
  12807. r = r === T ? 1 : Li(Au(r), 0);
  12808. var e = this.__filtered__ && !t ? new Un(this) : this.clone();
  12809. return e.__filtered__ ? e.__takeCount__ = Ui(r, e.__takeCount__) : e.__views__.push({
  12810. size: Ui(r, 4294967295),
  12811. type: n + (0 > e.__dir__ ? "Right" : "")
  12812. }), e;
  12813. }, Un.prototype[n + "Right"] = function (t) {
  12814. return this.reverse()[n](t).reverse();
  12815. };
  12816. }), r(["filter", "map", "takeWhile"], function (n, t) {
  12817. var r = t + 1,
  12818. e = 1 == r || 3 == r;
  12819. Un.prototype[n] = function (n) {
  12820. var t = this.clone();
  12821. return t.__iteratees__.push({
  12822. iteratee: ye(n, 3),
  12823. type: r
  12824. }), t.__filtered__ = t.__filtered__ || e, t;
  12825. };
  12826. }), r(["head", "last"], function (n, t) {
  12827. var r = "take" + (t ? "Right" : "");
  12828. Un.prototype[n] = function () {
  12829. return this[r](1).value()[0];
  12830. };
  12831. }), r(["initial", "tail"], function (n, t) {
  12832. var r = "drop" + (t ? "" : "Right");
  12833. Un.prototype[n] = function () {
  12834. return this.__filtered__ ? new Un(this) : this[r](1);
  12835. };
  12836. }), Un.prototype.compact = function () {
  12837. return this.filter(Tu);
  12838. }, Un.prototype.find = function (n) {
  12839. return this.filter(n).head();
  12840. }, Un.prototype.findLast = function (n) {
  12841. return this.reverse().find(n);
  12842. }, Un.prototype.invokeMap = fr(function (n, t) {
  12843. return typeof n == "function" ? new Un(this) : this.map(function (r) {
  12844. return Lt(r, n, t);
  12845. });
  12846. }), Un.prototype.reject = function (n) {
  12847. return this.filter(cu(ye(n)));
  12848. }, Un.prototype.slice = function (n, t) {
  12849. n = Au(n);
  12850. var r = this;
  12851. 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);
  12852. }, Un.prototype.takeRightWhile = function (n) {
  12853. return this.reverse().takeWhile(n).reverse();
  12854. }, Un.prototype.toArray = function () {
  12855. return this.take(4294967295);
  12856. }, mt(Un.prototype, function (n, t) {
  12857. var r = /^(?:filter|find|map|reject)|While$/.test(t),
  12858. e = /^(?:head|last)$/.test(t),
  12859. u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
  12860. i = e || /^find/.test(t);
  12861. u && (An.prototype[t] = function () {
  12862. function t(n) {
  12863. return n = u.apply(An, a([n], f)), e && h ? n[0] : n;
  12864. }
  12865. var o = this.__wrapped__,
  12866. f = e ? [1] : arguments,
  12867. c = o instanceof Un,
  12868. l = f[0],
  12869. s = c || of(o);
  12870. s && r && typeof l == "function" && 1 != l.length && (c = s = false);
  12871. var h = this.__chain__,
  12872. p = !!this.__actions__.length,
  12873. l = i && !h,
  12874. c = c && !p;
  12875. return !i && s ? (o = c ? o : new Un(this), o = n.apply(o, f), o.__actions__.push({
  12876. func: Ye,
  12877. args: [t],
  12878. thisArg: T
  12879. }), new On(o, h)) : l && c ? n.apply(this, f) : (o = this.thru(t), l ? e ? o.value()[0] : o.value() : o);
  12880. });
  12881. }), r("pop push shift sort splice unshift".split(" "), function (n) {
  12882. var t = ti[n],
  12883. r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
  12884. e = /^(?:pop|shift)$/.test(n);
  12885. An.prototype[n] = function () {
  12886. var n = arguments;
  12887. if (e && !this.__chain__) {
  12888. var u = this.value();
  12889. return t.apply(of(u) ? u : [], n);
  12890. }
  12891. return this[r](function (r) {
  12892. return t.apply(of(r) ? r : [], n);
  12893. });
  12894. };
  12895. }), mt(Un.prototype, function (n, t) {
  12896. var r = An[t];
  12897. if (r) {
  12898. var e = r.name + "";
  12899. (Ki[e] || (Ki[e] = [])).push({
  12900. name: t,
  12901. func: r
  12902. });
  12903. }
  12904. }), Ki[Jr(T, 2).name] = [{
  12905. name: "wrapper",
  12906. func: T
  12907. }], Un.prototype.clone = function () {
  12908. var n = new Un(this.__wrapped__);
  12909. 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;
  12910. }, Un.prototype.reverse = function () {
  12911. if (this.__filtered__) {
  12912. var n = new Un(this);
  12913. n.__dir__ = -1, n.__filtered__ = true;
  12914. } else n = this.clone(), n.__dir__ *= -1;
  12915. return n;
  12916. }, Un.prototype.value = function () {
  12917. var n,
  12918. t = this.__wrapped__.value(),
  12919. r = this.__dir__,
  12920. e = of(t),
  12921. u = 0 > r,
  12922. i = e ? t.length : 0;
  12923. n = i;
  12924. for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a;) {
  12925. var l = o[c],
  12926. s = l.size;
  12927. switch (l.type) {
  12928. case "drop":
  12929. f += s;
  12930. break;
  12931. case "dropRight":
  12932. n -= s;
  12933. break;
  12934. case "take":
  12935. n = Ui(n, f + s);
  12936. break;
  12937. case "takeRight":
  12938. f = Li(f, n - s);
  12939. }
  12940. }
  12941. if (n = {
  12942. start: f,
  12943. end: n
  12944. }, 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__);
  12945. e = [];
  12946. n: for (; n-- && a < l;) {
  12947. for (o += r, u = -1, i = t[o]; ++u < c;) {
  12948. var h = f[u],
  12949. s = h.type,
  12950. h = (0, h.iteratee)(i);
  12951. if (2 == s) i = h;else if (!h) {
  12952. if (1 == s) continue n;
  12953. break n;
  12954. }
  12955. }
  12956. e[a++] = i;
  12957. }
  12958. return e;
  12959. }, An.prototype.at = Mo, An.prototype.chain = function () {
  12960. return Je(this);
  12961. }, An.prototype.commit = function () {
  12962. return new On(this.value(), this.__chain__);
  12963. }, An.prototype.next = function () {
  12964. this.__values__ === T && (this.__values__ = wu(this.value()));
  12965. var n = this.__index__ >= this.__values__.length;
  12966. return {
  12967. done: n,
  12968. value: n ? T : this.__values__[this.__index__++]
  12969. };
  12970. }, An.prototype.plant = function (n) {
  12971. for (var t, r = this; r instanceof En;) {
  12972. var e = $e(r);
  12973. e.__index__ = 0, e.__values__ = T, t ? u.__wrapped__ = e : t = e;
  12974. var u = e,
  12975. r = r.__wrapped__;
  12976. }
  12977. return u.__wrapped__ = n, t;
  12978. }, An.prototype.reverse = function () {
  12979. var n = this.__wrapped__;
  12980. return n instanceof Un ? (this.__actions__.length && (n = new Un(this)), n = n.reverse(), n.__actions__.push({
  12981. func: Ye,
  12982. args: [Ke],
  12983. thisArg: T
  12984. }), new On(n, this.__chain__)) : this.thru(Ke);
  12985. }, An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function () {
  12986. return wr(this.__wrapped__, this.__actions__);
  12987. }, An.prototype.first = An.prototype.head, ji && (An.prototype[ji] = Qe), An;
  12988. }();
  12989. true && _typeof(__webpack_require__(/*! !webpack amd options */ 41)) == "object" && __webpack_require__(/*! !webpack amd options */ 41) ? ($n._ = rt, !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  12990. return rt;
  12991. }).call(exports, __webpack_require__, exports, module),
  12992. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) : Nn ? ((Nn.exports = rt)._ = rt, Fn._ = rt) : $n._ = rt;
  12993. }).call(this);
  12994. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/module.js */ 40)(module)))
  12995. /***/ }),
  12996. /***/ 394:
  12997. /*!*******************************************************************************!*\
  12998. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/async-validator.js ***!
  12999. \*******************************************************************************/
  13000. /*! no static exports found */
  13001. /***/ (function(module, exports, __webpack_require__) {
  13002. "use strict";
  13003. /* WEBPACK VAR INJECTION */(function(process) {
  13004. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13005. Object.defineProperty(exports, "__esModule", {
  13006. value: true
  13007. });
  13008. exports.default = void 0;
  13009. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  13010. function _extends() {
  13011. _extends = Object.assign || function (target) {
  13012. for (var i = 1; i < arguments.length; i++) {
  13013. var source = arguments[i];
  13014. for (var key in source) {
  13015. if (Object.prototype.hasOwnProperty.call(source, key)) {
  13016. target[key] = source[key];
  13017. }
  13018. }
  13019. }
  13020. return target;
  13021. };
  13022. return _extends.apply(this, arguments);
  13023. }
  13024. /* eslint no-console:0 */
  13025. var formatRegExp = /%[sdj%]/g;
  13026. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  13027. 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') {
  13028. warning = function warning(type, errors) {
  13029. if (typeof console !== 'undefined' && console.warn) {
  13030. if (errors.every(function (e) {
  13031. return typeof e === 'string';
  13032. })) {
  13033. console.warn(type, errors);
  13034. }
  13035. }
  13036. };
  13037. }
  13038. function convertFieldsError(errors) {
  13039. if (!errors || !errors.length) return null;
  13040. var fields = {};
  13041. errors.forEach(function (error) {
  13042. var field = error.field;
  13043. fields[field] = fields[field] || [];
  13044. fields[field].push(error);
  13045. });
  13046. return fields;
  13047. }
  13048. function format() {
  13049. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  13050. args[_key] = arguments[_key];
  13051. }
  13052. var i = 1;
  13053. var f = args[0];
  13054. var len = args.length;
  13055. if (typeof f === 'function') {
  13056. return f.apply(null, args.slice(1));
  13057. }
  13058. if (typeof f === 'string') {
  13059. var str = String(f).replace(formatRegExp, function (x) {
  13060. if (x === '%%') {
  13061. return '%';
  13062. }
  13063. if (i >= len) {
  13064. return x;
  13065. }
  13066. switch (x) {
  13067. case '%s':
  13068. return String(args[i++]);
  13069. case '%d':
  13070. return Number(args[i++]);
  13071. case '%j':
  13072. try {
  13073. return JSON.stringify(args[i++]);
  13074. } catch (_) {
  13075. return '[Circular]';
  13076. }
  13077. break;
  13078. default:
  13079. return x;
  13080. }
  13081. });
  13082. for (var arg = args[i]; i < len; arg = args[++i]) {
  13083. str += " " + arg;
  13084. }
  13085. return str;
  13086. }
  13087. return f;
  13088. }
  13089. function isNativeStringType(type) {
  13090. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  13091. }
  13092. function isEmptyValue(value, type) {
  13093. if (value === undefined || value === null) {
  13094. return true;
  13095. }
  13096. if (type === 'array' && Array.isArray(value) && !value.length) {
  13097. return true;
  13098. }
  13099. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  13100. return true;
  13101. }
  13102. return false;
  13103. }
  13104. function asyncParallelArray(arr, func, callback) {
  13105. var results = [];
  13106. var total = 0;
  13107. var arrLength = arr.length;
  13108. function count(errors) {
  13109. results.push.apply(results, errors);
  13110. total++;
  13111. if (total === arrLength) {
  13112. callback(results);
  13113. }
  13114. }
  13115. arr.forEach(function (a) {
  13116. func(a, count);
  13117. });
  13118. }
  13119. function asyncSerialArray(arr, func, callback) {
  13120. var index = 0;
  13121. var arrLength = arr.length;
  13122. function next(errors) {
  13123. if (errors && errors.length) {
  13124. callback(errors);
  13125. return;
  13126. }
  13127. var original = index;
  13128. index = index + 1;
  13129. if (original < arrLength) {
  13130. func(arr[original], next);
  13131. } else {
  13132. callback([]);
  13133. }
  13134. }
  13135. next([]);
  13136. }
  13137. function flattenObjArr(objArr) {
  13138. var ret = [];
  13139. Object.keys(objArr).forEach(function (k) {
  13140. ret.push.apply(ret, objArr[k]);
  13141. });
  13142. return ret;
  13143. }
  13144. function asyncMap(objArr, option, func, callback) {
  13145. if (option.first) {
  13146. var _pending = new Promise(function (resolve, reject) {
  13147. var next = function next(errors) {
  13148. callback(errors);
  13149. return errors.length ? reject({
  13150. errors: errors,
  13151. fields: convertFieldsError(errors)
  13152. }) : resolve();
  13153. };
  13154. var flattenArr = flattenObjArr(objArr);
  13155. asyncSerialArray(flattenArr, func, next);
  13156. });
  13157. _pending["catch"](function (e) {
  13158. return e;
  13159. });
  13160. return _pending;
  13161. }
  13162. var firstFields = option.firstFields || [];
  13163. if (firstFields === true) {
  13164. firstFields = Object.keys(objArr);
  13165. }
  13166. var objArrKeys = Object.keys(objArr);
  13167. var objArrLength = objArrKeys.length;
  13168. var total = 0;
  13169. var results = [];
  13170. var pending = new Promise(function (resolve, reject) {
  13171. var next = function next(errors) {
  13172. results.push.apply(results, errors);
  13173. total++;
  13174. if (total === objArrLength) {
  13175. callback(results);
  13176. return results.length ? reject({
  13177. errors: results,
  13178. fields: convertFieldsError(results)
  13179. }) : resolve();
  13180. }
  13181. };
  13182. if (!objArrKeys.length) {
  13183. callback(results);
  13184. resolve();
  13185. }
  13186. objArrKeys.forEach(function (key) {
  13187. var arr = objArr[key];
  13188. if (firstFields.indexOf(key) !== -1) {
  13189. asyncSerialArray(arr, func, next);
  13190. } else {
  13191. asyncParallelArray(arr, func, next);
  13192. }
  13193. });
  13194. });
  13195. pending["catch"](function (e) {
  13196. return e;
  13197. });
  13198. return pending;
  13199. }
  13200. function complementError(rule) {
  13201. return function (oe) {
  13202. if (oe && oe.message) {
  13203. oe.field = oe.field || rule.fullField;
  13204. return oe;
  13205. }
  13206. return {
  13207. message: typeof oe === 'function' ? oe() : oe,
  13208. field: oe.field || rule.fullField
  13209. };
  13210. };
  13211. }
  13212. function deepMerge(target, source) {
  13213. if (source) {
  13214. for (var s in source) {
  13215. if (source.hasOwnProperty(s)) {
  13216. var value = source[s];
  13217. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  13218. target[s] = _extends({}, target[s], {}, value);
  13219. } else {
  13220. target[s] = value;
  13221. }
  13222. }
  13223. }
  13224. }
  13225. return target;
  13226. }
  13227. /**
  13228. * Rule for validating required fields.
  13229. *
  13230. * @param rule The validation rule.
  13231. * @param value The value of the field on the source object.
  13232. * @param source The source object being validated.
  13233. * @param errors An array of errors that this rule may add
  13234. * validation errors to.
  13235. * @param options The validation options.
  13236. * @param options.messages The validation messages.
  13237. */
  13238. function required(rule, value, source, errors, options, type) {
  13239. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  13240. errors.push(format(options.messages.required, rule.fullField));
  13241. }
  13242. }
  13243. /**
  13244. * Rule for validating whitespace.
  13245. *
  13246. * @param rule The validation rule.
  13247. * @param value The value of the field on the source object.
  13248. * @param source The source object being validated.
  13249. * @param errors An array of errors that this rule may add
  13250. * validation errors to.
  13251. * @param options The validation options.
  13252. * @param options.messages The validation messages.
  13253. */
  13254. function whitespace(rule, value, source, errors, options) {
  13255. if (/^\s+$/.test(value) || value === '') {
  13256. errors.push(format(options.messages.whitespace, rule.fullField));
  13257. }
  13258. }
  13259. /* eslint max-len:0 */
  13260. var pattern = {
  13261. // http://emailregex.com/
  13262. 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,}))$/,
  13263. 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'),
  13264. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  13265. };
  13266. var types = {
  13267. integer: function integer(value) {
  13268. return types.number(value) && parseInt(value, 10) === value;
  13269. },
  13270. "float": function float(value) {
  13271. return types.number(value) && !types.integer(value);
  13272. },
  13273. array: function array(value) {
  13274. return Array.isArray(value);
  13275. },
  13276. regexp: function regexp(value) {
  13277. if (value instanceof RegExp) {
  13278. return true;
  13279. }
  13280. try {
  13281. return !!new RegExp(value);
  13282. } catch (e) {
  13283. return false;
  13284. }
  13285. },
  13286. date: function date(value) {
  13287. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  13288. },
  13289. number: function number(value) {
  13290. if (isNaN(value)) {
  13291. return false;
  13292. }
  13293. // 修改源码,将字符串数值先转为数值
  13294. return typeof +value === 'number';
  13295. },
  13296. object: function object(value) {
  13297. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  13298. },
  13299. method: function method(value) {
  13300. return typeof value === 'function';
  13301. },
  13302. email: function email(value) {
  13303. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  13304. },
  13305. url: function url(value) {
  13306. return typeof value === 'string' && !!value.match(pattern.url);
  13307. },
  13308. hex: function hex(value) {
  13309. return typeof value === 'string' && !!value.match(pattern.hex);
  13310. }
  13311. };
  13312. /**
  13313. * Rule for validating the type of a value.
  13314. *
  13315. * @param rule The validation rule.
  13316. * @param value The value of the field on the source object.
  13317. * @param source The source object being validated.
  13318. * @param errors An array of errors that this rule may add
  13319. * validation errors to.
  13320. * @param options The validation options.
  13321. * @param options.messages The validation messages.
  13322. */
  13323. function type(rule, value, source, errors, options) {
  13324. if (rule.required && value === undefined) {
  13325. required(rule, value, source, errors, options);
  13326. return;
  13327. }
  13328. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  13329. var ruleType = rule.type;
  13330. if (custom.indexOf(ruleType) > -1) {
  13331. if (!types[ruleType](value)) {
  13332. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13333. } // straight typeof check
  13334. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  13335. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13336. }
  13337. }
  13338. /**
  13339. * Rule for validating minimum and maximum allowed values.
  13340. *
  13341. * @param rule The validation rule.
  13342. * @param value The value of the field on the source object.
  13343. * @param source The source object being validated.
  13344. * @param errors An array of errors that this rule may add
  13345. * validation errors to.
  13346. * @param options The validation options.
  13347. * @param options.messages The validation messages.
  13348. */
  13349. function range(rule, value, source, errors, options) {
  13350. var len = typeof rule.len === 'number';
  13351. var min = typeof rule.min === 'number';
  13352. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  13353. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  13354. var val = value;
  13355. var key = null;
  13356. var num = typeof value === 'number';
  13357. var str = typeof value === 'string';
  13358. var arr = Array.isArray(value);
  13359. if (num) {
  13360. key = 'number';
  13361. } else if (str) {
  13362. key = 'string';
  13363. } else if (arr) {
  13364. key = 'array';
  13365. } // if the value is not of a supported type for range validation
  13366. // the validation rule rule should use the
  13367. // type property to also test for a particular type
  13368. if (!key) {
  13369. return false;
  13370. }
  13371. if (arr) {
  13372. val = value.length;
  13373. }
  13374. if (str) {
  13375. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  13376. val = value.replace(spRegexp, '_').length;
  13377. }
  13378. if (len) {
  13379. if (val !== rule.len) {
  13380. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  13381. }
  13382. } else if (min && !max && val < rule.min) {
  13383. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  13384. } else if (max && !min && val > rule.max) {
  13385. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  13386. } else if (min && max && (val < rule.min || val > rule.max)) {
  13387. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  13388. }
  13389. }
  13390. var ENUM = 'enum';
  13391. /**
  13392. * Rule for validating a value exists in an enumerable list.
  13393. *
  13394. * @param rule The validation rule.
  13395. * @param value The value of the field on the source object.
  13396. * @param source The source object being validated.
  13397. * @param errors An array of errors that this rule may add
  13398. * validation errors to.
  13399. * @param options The validation options.
  13400. * @param options.messages The validation messages.
  13401. */
  13402. function enumerable(rule, value, source, errors, options) {
  13403. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  13404. if (rule[ENUM].indexOf(value) === -1) {
  13405. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  13406. }
  13407. }
  13408. /**
  13409. * Rule for validating a regular expression pattern.
  13410. *
  13411. * @param rule The validation rule.
  13412. * @param value The value of the field on the source object.
  13413. * @param source The source object being validated.
  13414. * @param errors An array of errors that this rule may add
  13415. * validation errors to.
  13416. * @param options The validation options.
  13417. * @param options.messages The validation messages.
  13418. */
  13419. function pattern$1(rule, value, source, errors, options) {
  13420. if (rule.pattern) {
  13421. if (rule.pattern instanceof RegExp) {
  13422. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  13423. // flag is accidentally set to `true`, which in a validation scenario
  13424. // is not necessary and the result might be misleading
  13425. rule.pattern.lastIndex = 0;
  13426. if (!rule.pattern.test(value)) {
  13427. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13428. }
  13429. } else if (typeof rule.pattern === 'string') {
  13430. var _pattern = new RegExp(rule.pattern);
  13431. if (!_pattern.test(value)) {
  13432. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13433. }
  13434. }
  13435. }
  13436. }
  13437. var rules = {
  13438. required: required,
  13439. whitespace: whitespace,
  13440. type: type,
  13441. range: range,
  13442. "enum": enumerable,
  13443. pattern: pattern$1
  13444. };
  13445. /**
  13446. * Performs validation for string types.
  13447. *
  13448. * @param rule The validation rule.
  13449. * @param value The value of the field on the source object.
  13450. * @param callback The callback function.
  13451. * @param source The source object being validated.
  13452. * @param options The validation options.
  13453. * @param options.messages The validation messages.
  13454. */
  13455. function string(rule, value, callback, source, options) {
  13456. var errors = [];
  13457. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13458. if (validate) {
  13459. if (isEmptyValue(value, 'string') && !rule.required) {
  13460. return callback();
  13461. }
  13462. rules.required(rule, value, source, errors, options, 'string');
  13463. if (!isEmptyValue(value, 'string')) {
  13464. rules.type(rule, value, source, errors, options);
  13465. rules.range(rule, value, source, errors, options);
  13466. rules.pattern(rule, value, source, errors, options);
  13467. if (rule.whitespace === true) {
  13468. rules.whitespace(rule, value, source, errors, options);
  13469. }
  13470. }
  13471. }
  13472. callback(errors);
  13473. }
  13474. /**
  13475. * Validates a function.
  13476. *
  13477. * @param rule The validation rule.
  13478. * @param value The value of the field on the source object.
  13479. * @param callback The callback function.
  13480. * @param source The source object being validated.
  13481. * @param options The validation options.
  13482. * @param options.messages The validation messages.
  13483. */
  13484. function method(rule, value, callback, source, options) {
  13485. var errors = [];
  13486. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13487. if (validate) {
  13488. if (isEmptyValue(value) && !rule.required) {
  13489. return callback();
  13490. }
  13491. rules.required(rule, value, source, errors, options);
  13492. if (value !== undefined) {
  13493. rules.type(rule, value, source, errors, options);
  13494. }
  13495. }
  13496. callback(errors);
  13497. }
  13498. /**
  13499. * Validates a number.
  13500. *
  13501. * @param rule The validation rule.
  13502. * @param value The value of the field on the source object.
  13503. * @param callback The callback function.
  13504. * @param source The source object being validated.
  13505. * @param options The validation options.
  13506. * @param options.messages The validation messages.
  13507. */
  13508. function number(rule, value, callback, source, options) {
  13509. var errors = [];
  13510. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13511. if (validate) {
  13512. if (value === '') {
  13513. value = undefined;
  13514. }
  13515. if (isEmptyValue(value) && !rule.required) {
  13516. return callback();
  13517. }
  13518. rules.required(rule, value, source, errors, options);
  13519. if (value !== undefined) {
  13520. rules.type(rule, value, source, errors, options);
  13521. rules.range(rule, value, source, errors, options);
  13522. }
  13523. }
  13524. callback(errors);
  13525. }
  13526. /**
  13527. * Validates a boolean.
  13528. *
  13529. * @param rule The validation rule.
  13530. * @param value The value of the field on the source object.
  13531. * @param callback The callback function.
  13532. * @param source The source object being validated.
  13533. * @param options The validation options.
  13534. * @param options.messages The validation messages.
  13535. */
  13536. function _boolean(rule, value, callback, source, options) {
  13537. var errors = [];
  13538. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13539. if (validate) {
  13540. if (isEmptyValue(value) && !rule.required) {
  13541. return callback();
  13542. }
  13543. rules.required(rule, value, source, errors, options);
  13544. if (value !== undefined) {
  13545. rules.type(rule, value, source, errors, options);
  13546. }
  13547. }
  13548. callback(errors);
  13549. }
  13550. /**
  13551. * Validates the regular expression type.
  13552. *
  13553. * @param rule The validation rule.
  13554. * @param value The value of the field on the source object.
  13555. * @param callback The callback function.
  13556. * @param source The source object being validated.
  13557. * @param options The validation options.
  13558. * @param options.messages The validation messages.
  13559. */
  13560. function regexp(rule, value, callback, source, options) {
  13561. var errors = [];
  13562. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13563. if (validate) {
  13564. if (isEmptyValue(value) && !rule.required) {
  13565. return callback();
  13566. }
  13567. rules.required(rule, value, source, errors, options);
  13568. if (!isEmptyValue(value)) {
  13569. rules.type(rule, value, source, errors, options);
  13570. }
  13571. }
  13572. callback(errors);
  13573. }
  13574. /**
  13575. * Validates a number is an integer.
  13576. *
  13577. * @param rule The validation rule.
  13578. * @param value The value of the field on the source object.
  13579. * @param callback The callback function.
  13580. * @param source The source object being validated.
  13581. * @param options The validation options.
  13582. * @param options.messages The validation messages.
  13583. */
  13584. function integer(rule, value, callback, source, options) {
  13585. var errors = [];
  13586. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13587. if (validate) {
  13588. if (isEmptyValue(value) && !rule.required) {
  13589. return callback();
  13590. }
  13591. rules.required(rule, value, source, errors, options);
  13592. if (value !== undefined) {
  13593. rules.type(rule, value, source, errors, options);
  13594. rules.range(rule, value, source, errors, options);
  13595. }
  13596. }
  13597. callback(errors);
  13598. }
  13599. /**
  13600. * Validates a number is a floating point number.
  13601. *
  13602. * @param rule The validation rule.
  13603. * @param value The value of the field on the source object.
  13604. * @param callback The callback function.
  13605. * @param source The source object being validated.
  13606. * @param options The validation options.
  13607. * @param options.messages The validation messages.
  13608. */
  13609. function floatFn(rule, value, callback, source, options) {
  13610. var errors = [];
  13611. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13612. if (validate) {
  13613. if (isEmptyValue(value) && !rule.required) {
  13614. return callback();
  13615. }
  13616. rules.required(rule, value, source, errors, options);
  13617. if (value !== undefined) {
  13618. rules.type(rule, value, source, errors, options);
  13619. rules.range(rule, value, source, errors, options);
  13620. }
  13621. }
  13622. callback(errors);
  13623. }
  13624. /**
  13625. * Validates an array.
  13626. *
  13627. * @param rule The validation rule.
  13628. * @param value The value of the field on the source object.
  13629. * @param callback The callback function.
  13630. * @param source The source object being validated.
  13631. * @param options The validation options.
  13632. * @param options.messages The validation messages.
  13633. */
  13634. function array(rule, value, callback, source, options) {
  13635. var errors = [];
  13636. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13637. if (validate) {
  13638. if (isEmptyValue(value, 'array') && !rule.required) {
  13639. return callback();
  13640. }
  13641. rules.required(rule, value, source, errors, options, 'array');
  13642. if (!isEmptyValue(value, 'array')) {
  13643. rules.type(rule, value, source, errors, options);
  13644. rules.range(rule, value, source, errors, options);
  13645. }
  13646. }
  13647. callback(errors);
  13648. }
  13649. /**
  13650. * Validates an object.
  13651. *
  13652. * @param rule The validation rule.
  13653. * @param value The value of the field on the source object.
  13654. * @param callback The callback function.
  13655. * @param source The source object being validated.
  13656. * @param options The validation options.
  13657. * @param options.messages The validation messages.
  13658. */
  13659. function object(rule, value, callback, source, options) {
  13660. var errors = [];
  13661. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13662. if (validate) {
  13663. if (isEmptyValue(value) && !rule.required) {
  13664. return callback();
  13665. }
  13666. rules.required(rule, value, source, errors, options);
  13667. if (value !== undefined) {
  13668. rules.type(rule, value, source, errors, options);
  13669. }
  13670. }
  13671. callback(errors);
  13672. }
  13673. var ENUM$1 = 'enum';
  13674. /**
  13675. * Validates an enumerable list.
  13676. *
  13677. * @param rule The validation rule.
  13678. * @param value The value of the field on the source object.
  13679. * @param callback The callback function.
  13680. * @param source The source object being validated.
  13681. * @param options The validation options.
  13682. * @param options.messages The validation messages.
  13683. */
  13684. function enumerable$1(rule, value, callback, source, options) {
  13685. var errors = [];
  13686. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13687. if (validate) {
  13688. if (isEmptyValue(value) && !rule.required) {
  13689. return callback();
  13690. }
  13691. rules.required(rule, value, source, errors, options);
  13692. if (value !== undefined) {
  13693. rules[ENUM$1](rule, value, source, errors, options);
  13694. }
  13695. }
  13696. callback(errors);
  13697. }
  13698. /**
  13699. * Validates a regular expression pattern.
  13700. *
  13701. * Performs validation when a rule only contains
  13702. * a pattern property but is not declared as a string type.
  13703. *
  13704. * @param rule The validation rule.
  13705. * @param value The value of the field on the source object.
  13706. * @param callback The callback function.
  13707. * @param source The source object being validated.
  13708. * @param options The validation options.
  13709. * @param options.messages The validation messages.
  13710. */
  13711. function pattern$2(rule, value, callback, source, options) {
  13712. var errors = [];
  13713. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13714. if (validate) {
  13715. if (isEmptyValue(value, 'string') && !rule.required) {
  13716. return callback();
  13717. }
  13718. rules.required(rule, value, source, errors, options);
  13719. if (!isEmptyValue(value, 'string')) {
  13720. rules.pattern(rule, value, source, errors, options);
  13721. }
  13722. }
  13723. callback(errors);
  13724. }
  13725. function date(rule, value, callback, source, options) {
  13726. var errors = [];
  13727. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13728. if (validate) {
  13729. if (isEmptyValue(value) && !rule.required) {
  13730. return callback();
  13731. }
  13732. rules.required(rule, value, source, errors, options);
  13733. if (!isEmptyValue(value)) {
  13734. var dateObject;
  13735. if (typeof value === 'number') {
  13736. dateObject = new Date(value);
  13737. } else {
  13738. dateObject = value;
  13739. }
  13740. rules.type(rule, dateObject, source, errors, options);
  13741. if (dateObject) {
  13742. rules.range(rule, dateObject.getTime(), source, errors, options);
  13743. }
  13744. }
  13745. }
  13746. callback(errors);
  13747. }
  13748. function required$1(rule, value, callback, source, options) {
  13749. var errors = [];
  13750. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  13751. rules.required(rule, value, source, errors, options, type);
  13752. callback(errors);
  13753. }
  13754. function type$1(rule, value, callback, source, options) {
  13755. var ruleType = rule.type;
  13756. var errors = [];
  13757. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13758. if (validate) {
  13759. if (isEmptyValue(value, ruleType) && !rule.required) {
  13760. return callback();
  13761. }
  13762. rules.required(rule, value, source, errors, options, ruleType);
  13763. if (!isEmptyValue(value, ruleType)) {
  13764. rules.type(rule, value, source, errors, options);
  13765. }
  13766. }
  13767. callback(errors);
  13768. }
  13769. /**
  13770. * Performs validation for any type.
  13771. *
  13772. * @param rule The validation rule.
  13773. * @param value The value of the field on the source object.
  13774. * @param callback The callback function.
  13775. * @param source The source object being validated.
  13776. * @param options The validation options.
  13777. * @param options.messages The validation messages.
  13778. */
  13779. function any(rule, value, callback, source, options) {
  13780. var errors = [];
  13781. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13782. if (validate) {
  13783. if (isEmptyValue(value) && !rule.required) {
  13784. return callback();
  13785. }
  13786. rules.required(rule, value, source, errors, options);
  13787. }
  13788. callback(errors);
  13789. }
  13790. var validators = {
  13791. string: string,
  13792. method: method,
  13793. number: number,
  13794. "boolean": _boolean,
  13795. regexp: regexp,
  13796. integer: integer,
  13797. "float": floatFn,
  13798. array: array,
  13799. object: object,
  13800. "enum": enumerable$1,
  13801. pattern: pattern$2,
  13802. date: date,
  13803. url: type$1,
  13804. hex: type$1,
  13805. email: type$1,
  13806. required: required$1,
  13807. any: any
  13808. };
  13809. function newMessages() {
  13810. return {
  13811. "default": 'Validation error on field %s',
  13812. required: '%s is required',
  13813. "enum": '%s must be one of %s',
  13814. whitespace: '%s cannot be empty',
  13815. date: {
  13816. format: '%s date %s is invalid for format %s',
  13817. parse: '%s date could not be parsed, %s is invalid ',
  13818. invalid: '%s date %s is invalid'
  13819. },
  13820. types: {
  13821. string: '%s is not a %s',
  13822. method: '%s is not a %s (function)',
  13823. array: '%s is not an %s',
  13824. object: '%s is not an %s',
  13825. number: '%s is not a %s',
  13826. date: '%s is not a %s',
  13827. "boolean": '%s is not a %s',
  13828. integer: '%s is not an %s',
  13829. "float": '%s is not a %s',
  13830. regexp: '%s is not a valid %s',
  13831. email: '%s is not a valid %s',
  13832. url: '%s is not a valid %s',
  13833. hex: '%s is not a valid %s'
  13834. },
  13835. string: {
  13836. len: '%s must be exactly %s characters',
  13837. min: '%s must be at least %s characters',
  13838. max: '%s cannot be longer than %s characters',
  13839. range: '%s must be between %s and %s characters'
  13840. },
  13841. number: {
  13842. len: '%s must equal %s',
  13843. min: '%s cannot be less than %s',
  13844. max: '%s cannot be greater than %s',
  13845. range: '%s must be between %s and %s'
  13846. },
  13847. array: {
  13848. len: '%s must be exactly %s in length',
  13849. min: '%s cannot be less than %s in length',
  13850. max: '%s cannot be greater than %s in length',
  13851. range: '%s must be between %s and %s in length'
  13852. },
  13853. pattern: {
  13854. mismatch: '%s value %s does not match pattern %s'
  13855. },
  13856. clone: function clone() {
  13857. var cloned = JSON.parse(JSON.stringify(this));
  13858. cloned.clone = this.clone;
  13859. return cloned;
  13860. }
  13861. };
  13862. }
  13863. var messages = newMessages();
  13864. /**
  13865. * Encapsulates a validation schema.
  13866. *
  13867. * @param descriptor An object declaring validation rules
  13868. * for this schema.
  13869. */
  13870. function Schema(descriptor) {
  13871. this.rules = null;
  13872. this._messages = messages;
  13873. this.define(descriptor);
  13874. }
  13875. Schema.prototype = {
  13876. messages: function messages(_messages) {
  13877. if (_messages) {
  13878. this._messages = deepMerge(newMessages(), _messages);
  13879. }
  13880. return this._messages;
  13881. },
  13882. define: function define(rules) {
  13883. if (!rules) {
  13884. throw new Error('Cannot configure a schema with no rules');
  13885. }
  13886. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  13887. throw new Error('Rules must be an object');
  13888. }
  13889. this.rules = {};
  13890. var z;
  13891. var item;
  13892. for (z in rules) {
  13893. if (rules.hasOwnProperty(z)) {
  13894. item = rules[z];
  13895. this.rules[z] = Array.isArray(item) ? item : [item];
  13896. }
  13897. }
  13898. },
  13899. validate: function validate(source_, o, oc) {
  13900. var _this = this;
  13901. if (o === void 0) {
  13902. o = {};
  13903. }
  13904. if (oc === void 0) {
  13905. oc = function oc() {};
  13906. }
  13907. var source = source_;
  13908. var options = o;
  13909. var callback = oc;
  13910. if (typeof options === 'function') {
  13911. callback = options;
  13912. options = {};
  13913. }
  13914. if (!this.rules || Object.keys(this.rules).length === 0) {
  13915. if (callback) {
  13916. callback();
  13917. }
  13918. return Promise.resolve();
  13919. }
  13920. function complete(results) {
  13921. var i;
  13922. var errors = [];
  13923. var fields = {};
  13924. function add(e) {
  13925. if (Array.isArray(e)) {
  13926. var _errors;
  13927. errors = (_errors = errors).concat.apply(_errors, e);
  13928. } else {
  13929. errors.push(e);
  13930. }
  13931. }
  13932. for (i = 0; i < results.length; i++) {
  13933. add(results[i]);
  13934. }
  13935. if (!errors.length) {
  13936. errors = null;
  13937. fields = null;
  13938. } else {
  13939. fields = convertFieldsError(errors);
  13940. }
  13941. callback(errors, fields);
  13942. }
  13943. if (options.messages) {
  13944. var messages$1 = this.messages();
  13945. if (messages$1 === messages) {
  13946. messages$1 = newMessages();
  13947. }
  13948. deepMerge(messages$1, options.messages);
  13949. options.messages = messages$1;
  13950. } else {
  13951. options.messages = this.messages();
  13952. }
  13953. var arr;
  13954. var value;
  13955. var series = {};
  13956. var keys = options.keys || Object.keys(this.rules);
  13957. keys.forEach(function (z) {
  13958. arr = _this.rules[z];
  13959. value = source[z];
  13960. arr.forEach(function (r) {
  13961. var rule = r;
  13962. if (typeof rule.transform === 'function') {
  13963. if (source === source_) {
  13964. source = _extends({}, source);
  13965. }
  13966. value = source[z] = rule.transform(value);
  13967. }
  13968. if (typeof rule === 'function') {
  13969. rule = {
  13970. validator: rule
  13971. };
  13972. } else {
  13973. rule = _extends({}, rule);
  13974. }
  13975. rule.validator = _this.getValidationMethod(rule);
  13976. rule.field = z;
  13977. rule.fullField = rule.fullField || z;
  13978. rule.type = _this.getType(rule);
  13979. if (!rule.validator) {
  13980. return;
  13981. }
  13982. series[z] = series[z] || [];
  13983. series[z].push({
  13984. rule: rule,
  13985. value: value,
  13986. source: source,
  13987. field: z
  13988. });
  13989. });
  13990. });
  13991. var errorFields = {};
  13992. return asyncMap(series, options, function (data, doIt) {
  13993. var rule = data.rule;
  13994. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  13995. deep = deep && (rule.required || !rule.required && data.value);
  13996. rule.field = data.field;
  13997. function addFullfield(key, schema) {
  13998. return _extends({}, schema, {
  13999. fullField: rule.fullField + "." + key
  14000. });
  14001. }
  14002. function cb(e) {
  14003. if (e === void 0) {
  14004. e = [];
  14005. }
  14006. var errors = e;
  14007. if (!Array.isArray(errors)) {
  14008. errors = [errors];
  14009. }
  14010. if (!options.suppressWarning && errors.length) {
  14011. Schema.warning('async-validator:', errors);
  14012. }
  14013. if (errors.length && rule.message) {
  14014. errors = [].concat(rule.message);
  14015. }
  14016. errors = errors.map(complementError(rule));
  14017. if (options.first && errors.length) {
  14018. errorFields[rule.field] = 1;
  14019. return doIt(errors);
  14020. }
  14021. if (!deep) {
  14022. doIt(errors);
  14023. } else {
  14024. // if rule is required but the target object
  14025. // does not exist fail at the rule level and don't
  14026. // go deeper
  14027. if (rule.required && !data.value) {
  14028. if (rule.message) {
  14029. errors = [].concat(rule.message).map(complementError(rule));
  14030. } else if (options.error) {
  14031. errors = [options.error(rule, format(options.messages.required, rule.field))];
  14032. } else {
  14033. errors = [];
  14034. }
  14035. return doIt(errors);
  14036. }
  14037. var fieldsSchema = {};
  14038. if (rule.defaultField) {
  14039. for (var k in data.value) {
  14040. if (data.value.hasOwnProperty(k)) {
  14041. fieldsSchema[k] = rule.defaultField;
  14042. }
  14043. }
  14044. }
  14045. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  14046. for (var f in fieldsSchema) {
  14047. if (fieldsSchema.hasOwnProperty(f)) {
  14048. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  14049. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  14050. }
  14051. }
  14052. var schema = new Schema(fieldsSchema);
  14053. schema.messages(options.messages);
  14054. if (data.rule.options) {
  14055. data.rule.options.messages = options.messages;
  14056. data.rule.options.error = options.error;
  14057. }
  14058. schema.validate(data.value, data.rule.options || options, function (errs) {
  14059. var finalErrors = [];
  14060. if (errors && errors.length) {
  14061. finalErrors.push.apply(finalErrors, errors);
  14062. }
  14063. if (errs && errs.length) {
  14064. finalErrors.push.apply(finalErrors, errs);
  14065. }
  14066. doIt(finalErrors.length ? finalErrors : null);
  14067. });
  14068. }
  14069. }
  14070. var res;
  14071. if (rule.asyncValidator) {
  14072. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  14073. } else if (rule.validator) {
  14074. res = rule.validator(rule, data.value, cb, data.source, options);
  14075. if (res === true) {
  14076. cb();
  14077. } else if (res === false) {
  14078. cb(rule.message || rule.field + " fails");
  14079. } else if (res instanceof Array) {
  14080. cb(res);
  14081. } else if (res instanceof Error) {
  14082. cb(res.message);
  14083. }
  14084. }
  14085. if (res && res.then) {
  14086. res.then(function () {
  14087. return cb();
  14088. }, function (e) {
  14089. return cb(e);
  14090. });
  14091. }
  14092. }, function (results) {
  14093. complete(results);
  14094. });
  14095. },
  14096. getType: function getType(rule) {
  14097. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  14098. rule.type = 'pattern';
  14099. }
  14100. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  14101. throw new Error(format('Unknown rule type %s', rule.type));
  14102. }
  14103. return rule.type || 'string';
  14104. },
  14105. getValidationMethod: function getValidationMethod(rule) {
  14106. if (typeof rule.validator === 'function') {
  14107. return rule.validator;
  14108. }
  14109. var keys = Object.keys(rule);
  14110. var messageIndex = keys.indexOf('message');
  14111. if (messageIndex !== -1) {
  14112. keys.splice(messageIndex, 1);
  14113. }
  14114. if (keys.length === 1 && keys[0] === 'required') {
  14115. return validators.required;
  14116. }
  14117. return validators[this.getType(rule)] || false;
  14118. }
  14119. };
  14120. Schema.register = function register(type, validator) {
  14121. if (typeof validator !== 'function') {
  14122. throw new Error('Cannot register a validator by type, validator is not a function');
  14123. }
  14124. validators[type] = validator;
  14125. };
  14126. Schema.warning = warning;
  14127. Schema.messages = messages;
  14128. var _default = Schema;
  14129. exports.default = _default;
  14130. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 395)))
  14131. /***/ }),
  14132. /***/ 395:
  14133. /*!********************************************************!*\
  14134. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  14135. \********************************************************/
  14136. /*! no static exports found */
  14137. /***/ (function(module, exports, __webpack_require__) {
  14138. exports.nextTick = function nextTick(fn) {
  14139. var args = Array.prototype.slice.call(arguments);
  14140. args.shift();
  14141. setTimeout(function () {
  14142. fn.apply(null, args);
  14143. }, 0);
  14144. };
  14145. exports.platform = exports.arch =
  14146. exports.execPath = exports.title = 'browser';
  14147. exports.pid = 1;
  14148. exports.browser = true;
  14149. exports.env = {};
  14150. exports.argv = [];
  14151. exports.binding = function (name) {
  14152. throw new Error('No such module. (Possibly not yet loaded)')
  14153. };
  14154. (function () {
  14155. var cwd = '/';
  14156. var path;
  14157. exports.cwd = function () { return cwd };
  14158. exports.chdir = function (dir) {
  14159. if (!path) path = __webpack_require__(/*! path */ 396);
  14160. cwd = path.resolve(dir, cwd);
  14161. };
  14162. })();
  14163. exports.exit = exports.kill =
  14164. exports.umask = exports.dlopen =
  14165. exports.uptime = exports.memoryUsage =
  14166. exports.uvCounters = function() {};
  14167. exports.features = {};
  14168. /***/ }),
  14169. /***/ 396:
  14170. /*!***********************************************!*\
  14171. !*** ./node_modules/path-browserify/index.js ***!
  14172. \***********************************************/
  14173. /*! no static exports found */
  14174. /***/ (function(module, exports, __webpack_require__) {
  14175. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  14176. // backported and transplited with Babel, with backwards-compat fixes
  14177. // Copyright Joyent, Inc. and other Node contributors.
  14178. //
  14179. // Permission is hereby granted, free of charge, to any person obtaining a
  14180. // copy of this software and associated documentation files (the
  14181. // "Software"), to deal in the Software without restriction, including
  14182. // without limitation the rights to use, copy, modify, merge, publish,
  14183. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14184. // persons to whom the Software is furnished to do so, subject to the
  14185. // following conditions:
  14186. //
  14187. // The above copyright notice and this permission notice shall be included
  14188. // in all copies or substantial portions of the Software.
  14189. //
  14190. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14191. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14192. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14193. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14194. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14195. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14196. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14197. // resolves . and .. elements in a path array with directory names there
  14198. // must be no slashes, empty elements, or device names (c:\) in the array
  14199. // (so also no leading and trailing slashes - it does not distinguish
  14200. // relative and absolute paths)
  14201. function normalizeArray(parts, allowAboveRoot) {
  14202. // if the path tries to go above the root, `up` ends up > 0
  14203. var up = 0;
  14204. for (var i = parts.length - 1; i >= 0; i--) {
  14205. var last = parts[i];
  14206. if (last === '.') {
  14207. parts.splice(i, 1);
  14208. } else if (last === '..') {
  14209. parts.splice(i, 1);
  14210. up++;
  14211. } else if (up) {
  14212. parts.splice(i, 1);
  14213. up--;
  14214. }
  14215. }
  14216. // if the path is allowed to go above the root, restore leading ..s
  14217. if (allowAboveRoot) {
  14218. for (; up--; up) {
  14219. parts.unshift('..');
  14220. }
  14221. }
  14222. return parts;
  14223. }
  14224. // path.resolve([from ...], to)
  14225. // posix version
  14226. exports.resolve = function() {
  14227. var resolvedPath = '',
  14228. resolvedAbsolute = false;
  14229. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  14230. var path = (i >= 0) ? arguments[i] : process.cwd();
  14231. // Skip empty and invalid entries
  14232. if (typeof path !== 'string') {
  14233. throw new TypeError('Arguments to path.resolve must be strings');
  14234. } else if (!path) {
  14235. continue;
  14236. }
  14237. resolvedPath = path + '/' + resolvedPath;
  14238. resolvedAbsolute = path.charAt(0) === '/';
  14239. }
  14240. // At this point the path should be resolved to a full absolute path, but
  14241. // handle relative paths to be safe (might happen when process.cwd() fails)
  14242. // Normalize the path
  14243. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  14244. return !!p;
  14245. }), !resolvedAbsolute).join('/');
  14246. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  14247. };
  14248. // path.normalize(path)
  14249. // posix version
  14250. exports.normalize = function(path) {
  14251. var isAbsolute = exports.isAbsolute(path),
  14252. trailingSlash = substr(path, -1) === '/';
  14253. // Normalize the path
  14254. path = normalizeArray(filter(path.split('/'), function(p) {
  14255. return !!p;
  14256. }), !isAbsolute).join('/');
  14257. if (!path && !isAbsolute) {
  14258. path = '.';
  14259. }
  14260. if (path && trailingSlash) {
  14261. path += '/';
  14262. }
  14263. return (isAbsolute ? '/' : '') + path;
  14264. };
  14265. // posix version
  14266. exports.isAbsolute = function(path) {
  14267. return path.charAt(0) === '/';
  14268. };
  14269. // posix version
  14270. exports.join = function() {
  14271. var paths = Array.prototype.slice.call(arguments, 0);
  14272. return exports.normalize(filter(paths, function(p, index) {
  14273. if (typeof p !== 'string') {
  14274. throw new TypeError('Arguments to path.join must be strings');
  14275. }
  14276. return p;
  14277. }).join('/'));
  14278. };
  14279. // path.relative(from, to)
  14280. // posix version
  14281. exports.relative = function(from, to) {
  14282. from = exports.resolve(from).substr(1);
  14283. to = exports.resolve(to).substr(1);
  14284. function trim(arr) {
  14285. var start = 0;
  14286. for (; start < arr.length; start++) {
  14287. if (arr[start] !== '') break;
  14288. }
  14289. var end = arr.length - 1;
  14290. for (; end >= 0; end--) {
  14291. if (arr[end] !== '') break;
  14292. }
  14293. if (start > end) return [];
  14294. return arr.slice(start, end - start + 1);
  14295. }
  14296. var fromParts = trim(from.split('/'));
  14297. var toParts = trim(to.split('/'));
  14298. var length = Math.min(fromParts.length, toParts.length);
  14299. var samePartsLength = length;
  14300. for (var i = 0; i < length; i++) {
  14301. if (fromParts[i] !== toParts[i]) {
  14302. samePartsLength = i;
  14303. break;
  14304. }
  14305. }
  14306. var outputParts = [];
  14307. for (var i = samePartsLength; i < fromParts.length; i++) {
  14308. outputParts.push('..');
  14309. }
  14310. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  14311. return outputParts.join('/');
  14312. };
  14313. exports.sep = '/';
  14314. exports.delimiter = ':';
  14315. exports.dirname = function (path) {
  14316. if (typeof path !== 'string') path = path + '';
  14317. if (path.length === 0) return '.';
  14318. var code = path.charCodeAt(0);
  14319. var hasRoot = code === 47 /*/*/;
  14320. var end = -1;
  14321. var matchedSlash = true;
  14322. for (var i = path.length - 1; i >= 1; --i) {
  14323. code = path.charCodeAt(i);
  14324. if (code === 47 /*/*/) {
  14325. if (!matchedSlash) {
  14326. end = i;
  14327. break;
  14328. }
  14329. } else {
  14330. // We saw the first non-path separator
  14331. matchedSlash = false;
  14332. }
  14333. }
  14334. if (end === -1) return hasRoot ? '/' : '.';
  14335. if (hasRoot && end === 1) {
  14336. // return '//';
  14337. // Backwards-compat fix:
  14338. return '/';
  14339. }
  14340. return path.slice(0, end);
  14341. };
  14342. function basename(path) {
  14343. if (typeof path !== 'string') path = path + '';
  14344. var start = 0;
  14345. var end = -1;
  14346. var matchedSlash = true;
  14347. var i;
  14348. for (i = path.length - 1; i >= 0; --i) {
  14349. if (path.charCodeAt(i) === 47 /*/*/) {
  14350. // If we reached a path separator that was not part of a set of path
  14351. // separators at the end of the string, stop now
  14352. if (!matchedSlash) {
  14353. start = i + 1;
  14354. break;
  14355. }
  14356. } else if (end === -1) {
  14357. // We saw the first non-path separator, mark this as the end of our
  14358. // path component
  14359. matchedSlash = false;
  14360. end = i + 1;
  14361. }
  14362. }
  14363. if (end === -1) return '';
  14364. return path.slice(start, end);
  14365. }
  14366. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  14367. // in new Node.js versions, so only basename() above is backported here
  14368. exports.basename = function (path, ext) {
  14369. var f = basename(path);
  14370. if (ext && f.substr(-1 * ext.length) === ext) {
  14371. f = f.substr(0, f.length - ext.length);
  14372. }
  14373. return f;
  14374. };
  14375. exports.extname = function (path) {
  14376. if (typeof path !== 'string') path = path + '';
  14377. var startDot = -1;
  14378. var startPart = 0;
  14379. var end = -1;
  14380. var matchedSlash = true;
  14381. // Track the state of characters (if any) we see before our first dot and
  14382. // after any path separator we find
  14383. var preDotState = 0;
  14384. for (var i = path.length - 1; i >= 0; --i) {
  14385. var code = path.charCodeAt(i);
  14386. if (code === 47 /*/*/) {
  14387. // If we reached a path separator that was not part of a set of path
  14388. // separators at the end of the string, stop now
  14389. if (!matchedSlash) {
  14390. startPart = i + 1;
  14391. break;
  14392. }
  14393. continue;
  14394. }
  14395. if (end === -1) {
  14396. // We saw the first non-path separator, mark this as the end of our
  14397. // extension
  14398. matchedSlash = false;
  14399. end = i + 1;
  14400. }
  14401. if (code === 46 /*.*/) {
  14402. // If this is our first dot, mark it as the start of our extension
  14403. if (startDot === -1)
  14404. startDot = i;
  14405. else if (preDotState !== 1)
  14406. preDotState = 1;
  14407. } else if (startDot !== -1) {
  14408. // We saw a non-dot and non-path separator before our dot, so we should
  14409. // have a good chance at having a non-empty extension
  14410. preDotState = -1;
  14411. }
  14412. }
  14413. if (startDot === -1 || end === -1 ||
  14414. // We saw a non-dot character immediately before the dot
  14415. preDotState === 0 ||
  14416. // The (right-most) trimmed path component is exactly '..'
  14417. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  14418. return '';
  14419. }
  14420. return path.slice(startDot, end);
  14421. };
  14422. function filter (xs, f) {
  14423. if (xs.filter) return xs.filter(f);
  14424. var res = [];
  14425. for (var i = 0; i < xs.length; i++) {
  14426. if (f(xs[i], i, xs)) res.push(xs[i]);
  14427. }
  14428. return res;
  14429. }
  14430. // String.prototype.substr - negative index don't work in IE8
  14431. var substr = 'ab'.substr(-1) === 'b'
  14432. ? function (str, start, len) { return str.substr(start, len) }
  14433. : function (str, start, len) {
  14434. if (start < 0) start = str.length + start;
  14435. return str.substr(start, len);
  14436. }
  14437. ;
  14438. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 395)))
  14439. /***/ }),
  14440. /***/ 4:
  14441. /*!**********************************************************************!*\
  14442. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  14443. \**********************************************************************/
  14444. /*! no static exports found */
  14445. /***/ (function(module, exports) {
  14446. function _interopRequireDefault(obj) {
  14447. return obj && obj.__esModule ? obj : {
  14448. "default": obj
  14449. };
  14450. }
  14451. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14452. /***/ }),
  14453. /***/ 40:
  14454. /*!***********************************!*\
  14455. !*** (webpack)/buildin/module.js ***!
  14456. \***********************************/
  14457. /*! no static exports found */
  14458. /***/ (function(module, exports) {
  14459. module.exports = function(module) {
  14460. if (!module.webpackPolyfill) {
  14461. module.deprecate = function() {};
  14462. module.paths = [];
  14463. // module.parent = undefined by default
  14464. if (!module.children) module.children = [];
  14465. Object.defineProperty(module, "loaded", {
  14466. enumerable: true,
  14467. get: function() {
  14468. return module.l;
  14469. }
  14470. });
  14471. Object.defineProperty(module, "id", {
  14472. enumerable: true,
  14473. get: function() {
  14474. return module.i;
  14475. }
  14476. });
  14477. module.webpackPolyfill = 1;
  14478. }
  14479. return module;
  14480. };
  14481. /***/ }),
  14482. /***/ 41:
  14483. /*!****************************************!*\
  14484. !*** (webpack)/buildin/amd-options.js ***!
  14485. \****************************************/
  14486. /*! no static exports found */
  14487. /***/ (function(module, exports) {
  14488. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  14489. module.exports = __webpack_amd_options__;
  14490. /* WEBPACK VAR INJECTION */}.call(this, {}))
  14491. /***/ }),
  14492. /***/ 42:
  14493. /*!***********************************************************!*\
  14494. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/index.js ***!
  14495. \***********************************************************/
  14496. /*! no static exports found */
  14497. /***/ (function(module, exports, __webpack_require__) {
  14498. "use strict";
  14499. /* WEBPACK VAR INJECTION */(function(uni) {
  14500. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14501. Object.defineProperty(exports, "__esModule", {
  14502. value: true
  14503. });
  14504. exports.default = void 0;
  14505. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 43));
  14506. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 44));
  14507. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 48));
  14508. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 49));
  14509. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 53));
  14510. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 54));
  14511. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 55));
  14512. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 56));
  14513. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 57));
  14514. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 58));
  14515. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 59));
  14516. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 46));
  14517. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 45));
  14518. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 60));
  14519. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 47));
  14520. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 61));
  14521. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 62));
  14522. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 63));
  14523. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 64));
  14524. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 65));
  14525. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 66);
  14526. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 67));
  14527. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 68));
  14528. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 69));
  14529. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 70));
  14530. // 引入全局mixin
  14531. // 引入关于是否mixin集成小程序分享的配置
  14532. // import wxshare from './libs/mixin/mpShare.js'
  14533. // 全局挂载引入http相关请求拦截插件
  14534. function wranning(str) {
  14535. // 开发环境进行信息输出,主要是一些报错信息
  14536. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  14537. // 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
  14538. if (true) {
  14539. console.warn(str);
  14540. }
  14541. }
  14542. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  14543. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  14544. // let vuexStore = {};
  14545. // try {
  14546. // vuexStore = require("@/store/$u.mixin.js");
  14547. // } catch (e) {
  14548. // //TODO handle the exception
  14549. // }
  14550. // post类型对象参数转为get类型url参数
  14551. var $u = {
  14552. queryParams: _queryParams.default,
  14553. route: _route.default,
  14554. timeFormat: _timeFormat.default,
  14555. date: _timeFormat.default,
  14556. // 另名date
  14557. timeFrom: _timeFrom.default,
  14558. colorGradient: _colorGradient.default.colorGradient,
  14559. colorToRgba: _colorGradient.default.colorToRgba,
  14560. guid: _guid.default,
  14561. color: _color.default,
  14562. sys: _sys.sys,
  14563. os: _sys.os,
  14564. type2icon: _type2icon.default,
  14565. randomArray: _randomArray.default,
  14566. wranning: wranning,
  14567. get: _request.default.get,
  14568. post: _request.default.post,
  14569. put: _request.default.put,
  14570. 'delete': _request.default.delete,
  14571. hexToRgb: _colorGradient.default.hexToRgb,
  14572. rgbToHex: _colorGradient.default.rgbToHex,
  14573. test: _test.default,
  14574. random: _random.default,
  14575. deepClone: _deepClone.default,
  14576. deepMerge: _deepMerge.default,
  14577. getParent: _getParent.default,
  14578. $parent: _$parent.default,
  14579. addUnit: _addUnit.default,
  14580. trim: _trim.default,
  14581. type: ['primary', 'success', 'error', 'warning', 'info'],
  14582. http: _request.default,
  14583. toast: _toast.default,
  14584. config: _config.default,
  14585. // uView配置信息相关,比如版本号
  14586. zIndex: _zIndex.default,
  14587. debounce: _debounce.default,
  14588. throttle: _throttle.default
  14589. };
  14590. // $u挂载到uni对象上
  14591. uni.$u = $u;
  14592. var install = function install(Vue) {
  14593. Vue.mixin(_mixin.default);
  14594. if (Vue.prototype.openShare) {
  14595. Vue.mixin(mpShare);
  14596. }
  14597. // Vue.mixin(vuexStore);
  14598. // 时间格式化,同时两个名称,date和timeFormat
  14599. Vue.filter('timeFormat', function (timestamp, format) {
  14600. return (0, _timeFormat.default)(timestamp, format);
  14601. });
  14602. Vue.filter('date', function (timestamp, format) {
  14603. return (0, _timeFormat.default)(timestamp, format);
  14604. });
  14605. // 将多久以前的方法,注入到全局过滤器
  14606. Vue.filter('timeFrom', function (timestamp, format) {
  14607. return (0, _timeFrom.default)(timestamp, format);
  14608. });
  14609. Vue.prototype.$u = $u;
  14610. };
  14611. var _default = {
  14612. install: install
  14613. };
  14614. exports.default = _default;
  14615. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14616. /***/ }),
  14617. /***/ 43:
  14618. /*!**********************************************************************!*\
  14619. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/mixin/mixin.js ***!
  14620. \**********************************************************************/
  14621. /*! no static exports found */
  14622. /***/ (function(module, exports, __webpack_require__) {
  14623. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  14624. data: function data() {
  14625. return {};
  14626. },
  14627. onLoad: function onLoad() {
  14628. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  14629. this.$u.getRect = this.$uGetRect;
  14630. },
  14631. methods: {
  14632. // 查询节点信息
  14633. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  14634. // 解决办法为在组件根部再套一个没有任何作用的view元素
  14635. $uGetRect: function $uGetRect(selector, all) {
  14636. var _this = this;
  14637. return new Promise(function (resolve) {
  14638. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  14639. if (all && Array.isArray(rect) && rect.length) {
  14640. resolve(rect);
  14641. }
  14642. if (!all && rect) {
  14643. resolve(rect);
  14644. }
  14645. }).exec();
  14646. });
  14647. },
  14648. getParentData: function getParentData() {
  14649. var _this2 = this;
  14650. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  14651. // 避免在created中去定义parent变量
  14652. if (!this.parent) this.parent = false;
  14653. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  14654. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  14655. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  14656. this.parent = this.$u.$parent.call(this, parentName);
  14657. if (this.parent) {
  14658. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  14659. Object.keys(this.parentData).map(function (key) {
  14660. _this2.parentData[key] = _this2.parent[key];
  14661. });
  14662. }
  14663. },
  14664. // 阻止事件冒泡
  14665. preventEvent: function preventEvent(e) {
  14666. e && e.stopPropagation && e.stopPropagation();
  14667. }
  14668. },
  14669. onReachBottom: function onReachBottom() {
  14670. uni.$emit('uOnReachBottom');
  14671. },
  14672. beforeDestroy: function beforeDestroy() {
  14673. var _this3 = this;
  14674. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  14675. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  14676. if (this.parent && uni.$u.test.array(this.parent.children)) {
  14677. // 组件销毁时,移除父组件中的children数组中对应的实例
  14678. var childrenList = this.parent.children;
  14679. childrenList.map(function (child, index) {
  14680. // 如果相等,则移除
  14681. if (child === _this3) {
  14682. childrenList.splice(index, 1);
  14683. }
  14684. });
  14685. }
  14686. }
  14687. };
  14688. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14689. /***/ }),
  14690. /***/ 44:
  14691. /*!************************************************************************!*\
  14692. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/request/index.js ***!
  14693. \************************************************************************/
  14694. /*! no static exports found */
  14695. /***/ (function(module, exports, __webpack_require__) {
  14696. "use strict";
  14697. /* WEBPACK VAR INJECTION */(function(uni) {
  14698. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14699. Object.defineProperty(exports, "__esModule", {
  14700. value: true
  14701. });
  14702. exports.default = void 0;
  14703. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14704. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14705. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 45));
  14706. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 47));
  14707. var Request = /*#__PURE__*/function () {
  14708. function Request() {
  14709. var _this = this;
  14710. (0, _classCallCheck2.default)(this, Request);
  14711. this.config = {
  14712. baseUrl: '',
  14713. // 请求的根域名
  14714. // 默认的请求头
  14715. header: {},
  14716. method: 'POST',
  14717. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  14718. dataType: 'json',
  14719. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  14720. responseType: 'text',
  14721. showLoading: true,
  14722. // 是否显示请求中的loading
  14723. loadingText: '请求中...',
  14724. loadingTime: 800,
  14725. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  14726. timer: null,
  14727. // 定时器
  14728. originalData: false,
  14729. // 是否在拦截器中返回服务端的原始数据,见文档说明
  14730. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  14731. };
  14732. // 拦截器
  14733. this.interceptor = {
  14734. // 请求前的拦截
  14735. request: null,
  14736. // 请求后的拦截
  14737. response: null
  14738. };
  14739. // get请求
  14740. this.get = function (url) {
  14741. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14742. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14743. return _this.request({
  14744. method: 'GET',
  14745. url: url,
  14746. header: header,
  14747. data: data
  14748. });
  14749. };
  14750. // post请求
  14751. this.post = function (url) {
  14752. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14753. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14754. return _this.request({
  14755. url: url,
  14756. method: 'POST',
  14757. header: header,
  14758. data: data
  14759. });
  14760. };
  14761. // put请求,不支持支付宝小程序(HX2.6.15)
  14762. this.put = function (url) {
  14763. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14764. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14765. return _this.request({
  14766. url: url,
  14767. method: 'PUT',
  14768. header: header,
  14769. data: data
  14770. });
  14771. };
  14772. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  14773. this.delete = function (url) {
  14774. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14775. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14776. return _this.request({
  14777. url: url,
  14778. method: 'DELETE',
  14779. header: header,
  14780. data: data
  14781. });
  14782. };
  14783. }
  14784. (0, _createClass2.default)(Request, [{
  14785. key: "setConfig",
  14786. value:
  14787. // 设置全局默认配置
  14788. function setConfig(customConfig) {
  14789. // 深度合并对象,否则会造成对象深层属性丢失
  14790. this.config = (0, _deepMerge.default)(this.config, customConfig);
  14791. }
  14792. // 主要请求部分
  14793. }, {
  14794. key: "request",
  14795. value: function request() {
  14796. var _this2 = this;
  14797. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14798. // 检查请求拦截
  14799. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  14800. var tmpConfig = {};
  14801. var interceptorRequest = this.interceptor.request(options);
  14802. if (interceptorRequest === false) {
  14803. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  14804. return new Promise(function () {});
  14805. }
  14806. this.options = interceptorRequest;
  14807. }
  14808. options.dataType = options.dataType || this.config.dataType;
  14809. options.responseType = options.responseType || this.config.responseType;
  14810. options.url = options.url || '';
  14811. options.params = options.params || {};
  14812. options.header = Object.assign({}, this.config.header, options.header);
  14813. options.method = options.method || this.config.method;
  14814. return new Promise(function (resolve, reject) {
  14815. options.complete = function (response) {
  14816. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  14817. uni.hideLoading();
  14818. // 清除定时器,如果请求回来了,就无需loading
  14819. clearTimeout(_this2.config.timer);
  14820. _this2.config.timer = null;
  14821. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  14822. if (_this2.config.originalData) {
  14823. // 判断是否存在拦截器
  14824. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14825. var resInterceptors = _this2.interceptor.response(response);
  14826. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  14827. if (resInterceptors !== false) {
  14828. resolve(resInterceptors);
  14829. } else {
  14830. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  14831. reject(response);
  14832. }
  14833. } else {
  14834. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  14835. resolve(response);
  14836. }
  14837. } else {
  14838. if (response.statusCode == 200) {
  14839. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  14840. var _resInterceptors = _this2.interceptor.response(response.data);
  14841. if (_resInterceptors !== false) {
  14842. resolve(_resInterceptors);
  14843. } else {
  14844. reject(response.data);
  14845. }
  14846. } else {
  14847. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  14848. resolve(response.data);
  14849. }
  14850. } else {
  14851. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  14852. // if(response.errMsg) {
  14853. // uni.showModal({
  14854. // title: response.errMsg
  14855. // });
  14856. // }
  14857. reject(response);
  14858. }
  14859. }
  14860. };
  14861. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  14862. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  14863. // 是否显示loading
  14864. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  14865. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  14866. if (_this2.config.showLoading && !_this2.config.timer) {
  14867. _this2.config.timer = setTimeout(function () {
  14868. uni.showLoading({
  14869. title: _this2.config.loadingText,
  14870. mask: _this2.config.loadingMask
  14871. });
  14872. _this2.config.timer = null;
  14873. }, _this2.config.loadingTime);
  14874. }
  14875. uni.request(options);
  14876. });
  14877. // .catch(res => {
  14878. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  14879. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  14880. // return new Promise(()=>{});
  14881. // })
  14882. }
  14883. }]);
  14884. return Request;
  14885. }();
  14886. var _default = new Request();
  14887. exports.default = _default;
  14888. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14889. /***/ }),
  14890. /***/ 45:
  14891. /*!*****************************************************************************!*\
  14892. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/deepMerge.js ***!
  14893. \*****************************************************************************/
  14894. /*! no static exports found */
  14895. /***/ (function(module, exports, __webpack_require__) {
  14896. "use strict";
  14897. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14898. Object.defineProperty(exports, "__esModule", {
  14899. value: true
  14900. });
  14901. exports.default = void 0;
  14902. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  14903. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 46));
  14904. // JS对象深度合并
  14905. function deepMerge() {
  14906. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14907. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14908. target = (0, _deepClone.default)(target);
  14909. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  14910. for (var prop in source) {
  14911. if (!source.hasOwnProperty(prop)) continue;
  14912. if (prop in target) {
  14913. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  14914. target[prop] = source[prop];
  14915. } else {
  14916. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  14917. target[prop] = source[prop];
  14918. } else {
  14919. if (target[prop].concat && source[prop].concat) {
  14920. target[prop] = target[prop].concat(source[prop]);
  14921. } else {
  14922. target[prop] = deepMerge(target[prop], source[prop]);
  14923. }
  14924. }
  14925. }
  14926. } else {
  14927. target[prop] = source[prop];
  14928. }
  14929. }
  14930. return target;
  14931. }
  14932. var _default = deepMerge;
  14933. exports.default = _default;
  14934. /***/ }),
  14935. /***/ 453:
  14936. /*!******************************************************************************************!*\
  14937. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  14938. \******************************************************************************************/
  14939. /*! no static exports found */
  14940. /***/ (function(module, exports, __webpack_require__) {
  14941. /* WEBPACK VAR INJECTION */(function(uni) {/**
  14942. * html 解析器
  14943. * @tutorial https://github.com/jin-yufeng/Parser
  14944. * @version 20201029
  14945. * @author JinYufeng
  14946. * @listens MIT
  14947. */
  14948. var cfg = __webpack_require__(/*! ./config.js */ 454),
  14949. blankChar = cfg.blankChar,
  14950. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 455),
  14951. windowWidth = uni.getSystemInfoSync().windowWidth;
  14952. var emoji;
  14953. function MpHtmlParser(data) {
  14954. var _this = this;
  14955. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14956. this.attrs = {};
  14957. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  14958. this.data = data;
  14959. this.domain = options.domain;
  14960. this.DOM = [];
  14961. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  14962. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  14963. this.options = options;
  14964. this.state = this.Text;
  14965. this.STACK = [];
  14966. // 工具函数
  14967. this.bubble = function () {
  14968. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  14969. if (cfg.richOnlyTags[item.name]) return false;
  14970. item.c = 1;
  14971. }
  14972. return true;
  14973. };
  14974. this.decode = function (val, amp) {
  14975. var i = -1,
  14976. j,
  14977. en;
  14978. while (1) {
  14979. if ((i = val.indexOf('&', i + 1)) == -1) break;
  14980. if ((j = val.indexOf(';', i + 2)) == -1) break;
  14981. if (val[i + 1] == '#') {
  14982. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  14983. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  14984. } else {
  14985. en = val.substring(i + 1, j);
  14986. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  14987. }
  14988. }
  14989. return val;
  14990. };
  14991. this.getUrl = function (url) {
  14992. if (url[0] == '/') {
  14993. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  14994. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  14995. return url;
  14996. };
  14997. this.isClose = function () {
  14998. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  14999. };
  15000. this.section = function () {
  15001. return _this.data.substring(_this.start, _this.i);
  15002. };
  15003. this.parent = function () {
  15004. return _this.STACK[_this.STACK.length - 1];
  15005. };
  15006. this.siblings = function () {
  15007. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15008. };
  15009. }
  15010. MpHtmlParser.prototype.parse = function () {
  15011. if (emoji) this.data = emoji.parseEmoji(this.data);
  15012. for (var c; c = this.data[this.i]; this.i++) {
  15013. this.state(c);
  15014. }
  15015. if (this.state == this.Text) this.setText();
  15016. while (this.STACK.length) {
  15017. this.popNode(this.STACK.pop());
  15018. }
  15019. return this.DOM;
  15020. };
  15021. // 设置属性
  15022. MpHtmlParser.prototype.setAttr = function () {
  15023. var name = this.attrName.toLowerCase(),
  15024. val = this.attrVal;
  15025. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15026. 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;
  15027. }
  15028. this.attrVal = '';
  15029. while (blankChar[this.data[this.i]]) {
  15030. this.i++;
  15031. }
  15032. if (this.isClose()) this.setNode();else {
  15033. this.start = this.i;
  15034. this.state = this.AttrName;
  15035. }
  15036. };
  15037. // 设置文本节点
  15038. MpHtmlParser.prototype.setText = function () {
  15039. var back,
  15040. text = this.section();
  15041. if (!text) return;
  15042. text = cfg.onText && cfg.onText(text, function () {
  15043. return back = true;
  15044. }) || text;
  15045. if (back) {
  15046. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15047. var j = this.start + text.length;
  15048. for (this.i = this.start; this.i < j; this.i++) {
  15049. this.state(this.data[this.i]);
  15050. }
  15051. return;
  15052. }
  15053. if (!this.pre) {
  15054. // 合并空白符
  15055. var flag,
  15056. tmp = [];
  15057. for (var i = text.length, c; c = text[--i];) {
  15058. if (!blankChar[c]) {
  15059. tmp.unshift(c);
  15060. if (!flag) flag = 1;
  15061. } else {
  15062. if (tmp[0] != ' ') tmp.unshift(' ');
  15063. if (c == '\n' && flag == void 0) flag = 0;
  15064. }
  15065. }
  15066. if (flag == 0) return;
  15067. text = tmp.join('');
  15068. }
  15069. this.siblings().push({
  15070. type: 'text',
  15071. text: this.decode(text)
  15072. });
  15073. };
  15074. // 设置元素节点
  15075. MpHtmlParser.prototype.setNode = function () {
  15076. var node = {
  15077. name: this.tagName.toLowerCase(),
  15078. attrs: this.attrs
  15079. },
  15080. close = cfg.selfClosingTags[node.name];
  15081. if (this.options.nodes.length) node.type = 'node';
  15082. this.attrs = {};
  15083. if (!cfg.ignoreTags[node.name]) {
  15084. // 处理属性
  15085. var attrs = node.attrs,
  15086. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15087. styleObj = {};
  15088. if (attrs.id) {
  15089. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15090. }
  15091. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15092. switch (node.name) {
  15093. case 'a':
  15094. case 'ad':
  15095. this.bubble();
  15096. break;
  15097. case 'font':
  15098. if (attrs.color) {
  15099. styleObj['color'] = attrs.color;
  15100. attrs.color = void 0;
  15101. }
  15102. if (attrs.face) {
  15103. styleObj['font-family'] = attrs.face;
  15104. attrs.face = void 0;
  15105. }
  15106. if (attrs.size) {
  15107. var size = parseInt(attrs.size);
  15108. if (size < 1) size = 1;else if (size > 7) size = 7;
  15109. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15110. styleObj['font-size'] = map[size - 1];
  15111. attrs.size = void 0;
  15112. }
  15113. break;
  15114. case 'embed':
  15115. var src = node.attrs.src || '',
  15116. type = node.attrs.type || '';
  15117. 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;
  15118. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15119. node.attrs.controls = 'T';
  15120. case 'video':
  15121. case 'audio':
  15122. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15123. if (node.name == 'video') {
  15124. if (this.videoNum > 3) node.lazyLoad = 1;
  15125. if (attrs.width) {
  15126. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15127. attrs.width = void 0;
  15128. }
  15129. if (attrs.height) {
  15130. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15131. attrs.height = void 0;
  15132. }
  15133. }
  15134. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15135. attrs.source = [];
  15136. if (attrs.src) {
  15137. attrs.source.push(attrs.src);
  15138. attrs.src = void 0;
  15139. }
  15140. this.bubble();
  15141. break;
  15142. case 'td':
  15143. case 'th':
  15144. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15145. if (item.name == 'table') {
  15146. item.flag = 1;
  15147. break;
  15148. }
  15149. }
  15150. }
  15151. if (attrs.align) {
  15152. if (node.name == 'table') {
  15153. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj['float'] = attrs.align;
  15154. } else styleObj['text-align'] = attrs.align;
  15155. attrs.align = void 0;
  15156. }
  15157. // 压缩 style
  15158. var styles = style.split(';');
  15159. style = '';
  15160. for (var i = 0, len = styles.length; i < len; i++) {
  15161. var info = styles[i].split(':');
  15162. if (info.length < 2) continue;
  15163. var _key = info[0].trim().toLowerCase(),
  15164. _value = info.slice(1).join(':').trim();
  15165. 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;
  15166. }
  15167. if (node.name == 'img') {
  15168. if (attrs.src && !attrs.ignore) {
  15169. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15170. }
  15171. if (attrs.ignore) {
  15172. style += ';-webkit-touch-callout:none';
  15173. styleObj['max-width'] = '100%';
  15174. }
  15175. var width;
  15176. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  15177. if (width) {
  15178. styleObj.width = width;
  15179. attrs.width = '100%';
  15180. if (parseInt(width) > windowWidth) {
  15181. styleObj.height = '';
  15182. if (attrs.height) attrs.height = void 0;
  15183. }
  15184. }
  15185. if (styleObj.height) {
  15186. attrs.height = styleObj.height;
  15187. styleObj.height = '';
  15188. } else if (attrs.height && !attrs.height.includes('%')) attrs.height = parseFloat(attrs.height) + 'px';
  15189. }
  15190. for (var key in styleObj) {
  15191. var value = styleObj[key];
  15192. if (!value) continue;
  15193. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15194. // 填充链接
  15195. if (value.includes('url')) {
  15196. var j = value.indexOf('(');
  15197. if (j++ != -1) {
  15198. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15199. j++;
  15200. }
  15201. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15202. }
  15203. }
  15204. // 转换 rpx
  15205. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15206. return parseFloat($) * windowWidth / 750 + 'px';
  15207. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15208. style += ";".concat(key, ":").concat(value);
  15209. }
  15210. style = style.substr(1);
  15211. if (style) attrs.style = style;
  15212. if (!close) {
  15213. node.children = [];
  15214. if (node.name == 'pre' && cfg.highlight) {
  15215. this.remove(node);
  15216. this.pre = node.pre = true;
  15217. }
  15218. this.siblings().push(node);
  15219. this.STACK.push(node);
  15220. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15221. } else {
  15222. if (!close) this.remove(node);else if (node.name == 'source') {
  15223. var parent = this.parent();
  15224. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15225. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15226. }
  15227. if (this.data[this.i] == '/') this.i++;
  15228. this.start = this.i + 1;
  15229. this.state = this.Text;
  15230. };
  15231. // 移除标签
  15232. MpHtmlParser.prototype.remove = function (node) {
  15233. var _this2 = this;
  15234. var name = node.name,
  15235. j = this.i;
  15236. // 处理 svg
  15237. var handleSvg = function handleSvg() {
  15238. var src = _this2.data.substring(j, _this2.i + 1);
  15239. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  15240. for (var key in node.attrs) {
  15241. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  15242. }
  15243. src = '<svg' + src;
  15244. var parent = _this2.parent();
  15245. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15246. _this2.siblings().push({
  15247. name: 'img',
  15248. attrs: {
  15249. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15250. style: node.attrs.style,
  15251. ignore: 'T'
  15252. }
  15253. });
  15254. };
  15255. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15256. while (1) {
  15257. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15258. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15259. return;
  15260. }
  15261. this.start = this.i += 2;
  15262. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15263. this.i++;
  15264. }
  15265. if (this.section().toLowerCase() == name) {
  15266. // 代码块高亮
  15267. if (name == 'pre') {
  15268. 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);
  15269. return this.i = j;
  15270. } 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);
  15271. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15272. if (name == 'svg') handleSvg();
  15273. return;
  15274. }
  15275. }
  15276. };
  15277. // 节点出栈处理
  15278. MpHtmlParser.prototype.popNode = function (node) {
  15279. // 空白符处理
  15280. if (node.pre) {
  15281. node.pre = this.pre = void 0;
  15282. for (var i = this.STACK.length; i--;) {
  15283. if (this.STACK[i].pre) this.pre = true;
  15284. }
  15285. }
  15286. var siblings = this.siblings(),
  15287. len = siblings.length,
  15288. childs = node.children;
  15289. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15290. var attrs = node.attrs;
  15291. // 替换一些标签名
  15292. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15293. // 处理列表
  15294. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15295. if ((node.attrs.style || '').includes('list-style:none')) {
  15296. for (var _i = 0, child; child = childs[_i++];) {
  15297. if (child.name == 'li') child.name = 'div';
  15298. }
  15299. } else if (node.name == 'ul') {
  15300. var floor = 1;
  15301. for (var _i2 = this.STACK.length; _i2--;) {
  15302. if (this.STACK[_i2].name == 'ul') floor++;
  15303. }
  15304. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15305. childs[_i3].floor = floor;
  15306. }
  15307. } else {
  15308. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15309. if (_child.name == 'li') {
  15310. _child.type = 'ol';
  15311. _child.num = function (num, type) {
  15312. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15313. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15314. if (type == 'i' || type == 'I') {
  15315. num = (num - 1) % 99 + 1;
  15316. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15317. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15318. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15319. if (type == 'i') return res.toLowerCase();
  15320. return res;
  15321. }
  15322. return num;
  15323. }(num++, attrs.type) + '.';
  15324. }
  15325. }
  15326. }
  15327. }
  15328. // 处理表格
  15329. if (node.name == 'table') {
  15330. var padding = parseFloat(attrs.cellpadding),
  15331. spacing = parseFloat(attrs.cellspacing),
  15332. border = parseFloat(attrs.border);
  15333. if (node.c) {
  15334. if (isNaN(padding)) padding = 2;
  15335. if (isNaN(spacing)) spacing = 2;
  15336. }
  15337. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  15338. if (node.flag && node.c) {
  15339. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  15340. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  15341. var row = 1,
  15342. col = 1,
  15343. colNum,
  15344. trs = [],
  15345. children = [],
  15346. map = {};
  15347. (function f(ns) {
  15348. for (var i = 0; i < ns.length; i++) {
  15349. if (ns[i].name == 'tr') trs.push(ns[i]);else f(ns[i].children || []);
  15350. }
  15351. })(node.children);
  15352. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  15353. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  15354. if (td.name == 'td' || td.name == 'th') {
  15355. while (map[row + '.' + col]) {
  15356. col++;
  15357. }
  15358. var cell = {
  15359. name: 'div',
  15360. c: 1,
  15361. attrs: {
  15362. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '')
  15363. },
  15364. children: td.children
  15365. };
  15366. if (td.attrs.colspan) {
  15367. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  15368. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  15369. col += parseInt(td.attrs.colspan) - 1;
  15370. }
  15371. if (td.attrs.rowspan) {
  15372. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  15373. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  15374. for (var k = 1; k < td.attrs.rowspan; k++) {
  15375. map[row + k + '.' + col] = 1;
  15376. }
  15377. }
  15378. children.push(cell);
  15379. col++;
  15380. }
  15381. }
  15382. if (!colNum) {
  15383. colNum = col - 1;
  15384. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  15385. }
  15386. col = 1;
  15387. row++;
  15388. }
  15389. node.children = children;
  15390. } else {
  15391. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  15392. if (border || padding) (function f(ns) {
  15393. for (var i = 0, n; n = ns[i]; i++) {
  15394. if (n.name == 'th' || n.name == 'td') {
  15395. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  15396. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  15397. } else f(n.children || []);
  15398. }
  15399. })(childs);
  15400. }
  15401. if (this.options.autoscroll) {
  15402. var table = Object.assign({}, node);
  15403. node.name = 'div';
  15404. node.attrs = {
  15405. style: 'overflow:scroll'
  15406. };
  15407. node.children = [table];
  15408. }
  15409. }
  15410. this.CssHandler.pop && this.CssHandler.pop(node);
  15411. // 自动压缩
  15412. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  15413. };
  15414. // 状态机
  15415. MpHtmlParser.prototype.Text = function (c) {
  15416. if (c == '<') {
  15417. var next = this.data[this.i + 1],
  15418. isLetter = function isLetter(c) {
  15419. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15420. };
  15421. if (isLetter(next)) {
  15422. this.setText();
  15423. this.start = this.i + 1;
  15424. this.state = this.TagName;
  15425. } else if (next == '/') {
  15426. this.setText();
  15427. if (isLetter(this.data[++this.i + 1])) {
  15428. this.start = this.i + 1;
  15429. this.state = this.EndTag;
  15430. } else this.Comment();
  15431. } else if (next == '!' || next == '?') {
  15432. this.setText();
  15433. this.Comment();
  15434. }
  15435. }
  15436. };
  15437. MpHtmlParser.prototype.Comment = function () {
  15438. var key;
  15439. 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 = '>';
  15440. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  15441. this.start = this.i + 1;
  15442. this.state = this.Text;
  15443. };
  15444. MpHtmlParser.prototype.TagName = function (c) {
  15445. if (blankChar[c]) {
  15446. this.tagName = this.section();
  15447. while (blankChar[this.data[this.i]]) {
  15448. this.i++;
  15449. }
  15450. if (this.isClose()) this.setNode();else {
  15451. this.start = this.i;
  15452. this.state = this.AttrName;
  15453. }
  15454. } else if (this.isClose()) {
  15455. this.tagName = this.section();
  15456. this.setNode();
  15457. }
  15458. };
  15459. MpHtmlParser.prototype.AttrName = function (c) {
  15460. if (c == '=' || blankChar[c] || this.isClose()) {
  15461. this.attrName = this.section();
  15462. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  15463. ;
  15464. }
  15465. if (this.data[this.i] == '=') {
  15466. while (blankChar[this.data[++this.i]]) {
  15467. ;
  15468. }
  15469. this.start = this.i--;
  15470. this.state = this.AttrValue;
  15471. } else this.setAttr();
  15472. }
  15473. };
  15474. MpHtmlParser.prototype.AttrValue = function (c) {
  15475. if (c == '"' || c == "'") {
  15476. this.start++;
  15477. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  15478. this.attrVal = this.section();
  15479. this.i++;
  15480. } else {
  15481. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  15482. ;
  15483. }
  15484. this.attrVal = this.section();
  15485. }
  15486. this.setAttr();
  15487. };
  15488. MpHtmlParser.prototype.EndTag = function (c) {
  15489. if (blankChar[c] || c == '>' || c == '/') {
  15490. var name = this.section().toLowerCase();
  15491. for (var i = this.STACK.length; i--;) {
  15492. if (this.STACK[i].name == name) break;
  15493. }
  15494. if (i != -1) {
  15495. var node;
  15496. while ((node = this.STACK.pop()).name != name) {
  15497. this.popNode(node);
  15498. }
  15499. this.popNode(node);
  15500. } else if (name == 'p' || name == 'br') this.siblings().push({
  15501. name: name,
  15502. attrs: {}
  15503. });
  15504. this.i = this.data.indexOf('>', this.i);
  15505. this.start = this.i + 1;
  15506. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  15507. }
  15508. };
  15509. module.exports = MpHtmlParser;
  15510. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15511. /***/ }),
  15512. /***/ 454:
  15513. /*!************************************************************************************!*\
  15514. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/config.js ***!
  15515. \************************************************************************************/
  15516. /*! no static exports found */
  15517. /***/ (function(module, exports, __webpack_require__) {
  15518. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  15519. var cfg = {
  15520. // 出错占位图
  15521. errorImg: null,
  15522. // 过滤器函数
  15523. filter: null,
  15524. // 代码高亮函数
  15525. highlight: null,
  15526. // 文本处理函数
  15527. onText: null,
  15528. // 实体编码列表
  15529. entities: {
  15530. quot: '"',
  15531. apos: "'",
  15532. semi: ';',
  15533. nbsp: '\xA0',
  15534. ensp: "\u2002",
  15535. emsp: "\u2003",
  15536. ndash: '–',
  15537. mdash: '—',
  15538. middot: '·',
  15539. lsquo: '‘',
  15540. rsquo: '’',
  15541. ldquo: '“',
  15542. rdquo: '”',
  15543. bull: '•',
  15544. hellip: '…'
  15545. },
  15546. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  15547. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  15548. // 块级标签,将被转为 div
  15549. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  15550. // 将被移除的标签
  15551. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  15552. // 只能被 rich-text 显示的标签
  15553. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  15554. // 自闭合的标签
  15555. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  15556. // 信任的标签
  15557. 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'),
  15558. // 默认的标签样式
  15559. userAgentStyles: {
  15560. address: 'font-style:italic',
  15561. big: 'display:inline;font-size:1.2em',
  15562. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  15563. caption: 'display:table-caption;text-align:center',
  15564. center: 'text-align:center',
  15565. cite: 'font-style:italic',
  15566. dd: 'margin-left:40px',
  15567. mark: 'background-color:yellow',
  15568. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  15569. s: 'text-decoration:line-through',
  15570. small: 'display:inline;font-size:0.8em',
  15571. u: 'text-decoration:underline'
  15572. }
  15573. };
  15574. function makeMap(str) {
  15575. var map = Object.create(null),
  15576. list = str.split(',');
  15577. for (var i = list.length; i--;) {
  15578. map[list[i]] = true;
  15579. }
  15580. return map;
  15581. }
  15582. if (wx.canIUse('editor')) {
  15583. cfg.blockTags.pre = void 0;
  15584. cfg.ignoreTags.rp = true;
  15585. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  15586. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  15587. }
  15588. module.exports = cfg;
  15589. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  15590. /***/ }),
  15591. /***/ 455:
  15592. /*!****************************************************************************************!*\
  15593. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/components/u-parse/libs/CssHandler.js ***!
  15594. \****************************************************************************************/
  15595. /*! no static exports found */
  15596. /***/ (function(module, exports, __webpack_require__) {
  15597. var cfg = __webpack_require__(/*! ./config.js */ 454),
  15598. isLetter = function isLetter(c) {
  15599. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  15600. };
  15601. function CssHandler(tagStyle) {
  15602. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  15603. for (var item in tagStyle) {
  15604. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  15605. }
  15606. this.styles = styles;
  15607. }
  15608. CssHandler.prototype.getStyle = function (data) {
  15609. this.styles = new parser(data, this.styles).parse();
  15610. };
  15611. CssHandler.prototype.match = function (name, attrs) {
  15612. var tmp,
  15613. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  15614. if (attrs.class) {
  15615. var items = attrs.class.split(' ');
  15616. for (var i = 0, item; item = items[i]; i++) {
  15617. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  15618. }
  15619. }
  15620. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  15621. return matched;
  15622. };
  15623. module.exports = CssHandler;
  15624. function parser(data, init) {
  15625. this.data = data;
  15626. this.floor = 0;
  15627. this.i = 0;
  15628. this.list = [];
  15629. this.res = init;
  15630. this.state = this.Space;
  15631. }
  15632. parser.prototype.parse = function () {
  15633. for (var c; c = this.data[this.i]; this.i++) {
  15634. this.state(c);
  15635. }
  15636. return this.res;
  15637. };
  15638. parser.prototype.section = function () {
  15639. return this.data.substring(this.start, this.i);
  15640. };
  15641. // 状态机
  15642. parser.prototype.Space = function (c) {
  15643. if (c == '.' || c == '#' || isLetter(c)) {
  15644. this.start = this.i;
  15645. this.state = this.Name;
  15646. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  15647. };
  15648. parser.prototype.Comment = function () {
  15649. this.i = this.data.indexOf('*/', this.i) + 1;
  15650. if (!this.i) this.i = this.data.length;
  15651. this.state = this.Space;
  15652. };
  15653. parser.prototype.Ignore = function (c) {
  15654. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) {
  15655. this.list = [];
  15656. this.state = this.Space;
  15657. }
  15658. };
  15659. parser.prototype.Name = function (c) {
  15660. if (cfg.blankChar[c]) {
  15661. this.list.push(this.section());
  15662. this.state = this.NameSpace;
  15663. } else if (c == '{') {
  15664. this.list.push(this.section());
  15665. this.Content();
  15666. } else if (c == ',') {
  15667. this.list.push(this.section());
  15668. this.Comma();
  15669. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  15670. };
  15671. parser.prototype.NameSpace = function (c) {
  15672. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  15673. };
  15674. parser.prototype.Comma = function () {
  15675. while (cfg.blankChar[this.data[++this.i]]) {
  15676. ;
  15677. }
  15678. if (this.data[this.i] == '{') this.Content();else {
  15679. this.start = this.i--;
  15680. this.state = this.Name;
  15681. }
  15682. };
  15683. parser.prototype.Content = function () {
  15684. this.start = ++this.i;
  15685. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  15686. var content = this.section();
  15687. for (var i = 0, item; item = this.list[i++];) {
  15688. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  15689. }
  15690. this.list = [];
  15691. this.state = this.Space;
  15692. };
  15693. /***/ }),
  15694. /***/ 46:
  15695. /*!*****************************************************************************!*\
  15696. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/deepClone.js ***!
  15697. \*****************************************************************************/
  15698. /*! no static exports found */
  15699. /***/ (function(module, exports, __webpack_require__) {
  15700. "use strict";
  15701. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15702. Object.defineProperty(exports, "__esModule", {
  15703. value: true
  15704. });
  15705. exports.default = void 0;
  15706. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15707. // 判断arr是否为一个数组,返回一个bool值
  15708. function isArray(arr) {
  15709. return Object.prototype.toString.call(arr) === '[object Array]';
  15710. }
  15711. // 深度克隆
  15712. function deepClone(obj) {
  15713. // 对常见的“非”值,直接返回原来值
  15714. if ([null, undefined, NaN, false].includes(obj)) return obj;
  15715. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  15716. //原始类型直接返回
  15717. return obj;
  15718. }
  15719. var o = isArray(obj) ? [] : {};
  15720. for (var i in obj) {
  15721. if (obj.hasOwnProperty(i)) {
  15722. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  15723. }
  15724. }
  15725. return o;
  15726. }
  15727. var _default = deepClone;
  15728. exports.default = _default;
  15729. /***/ }),
  15730. /***/ 47:
  15731. /*!************************************************************************!*\
  15732. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/test.js ***!
  15733. \************************************************************************/
  15734. /*! no static exports found */
  15735. /***/ (function(module, exports, __webpack_require__) {
  15736. "use strict";
  15737. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15738. Object.defineProperty(exports, "__esModule", {
  15739. value: true
  15740. });
  15741. exports.default = void 0;
  15742. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  15743. /**
  15744. * 验证电子邮箱格式
  15745. */
  15746. function email(value) {
  15747. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  15748. }
  15749. /**
  15750. * 验证手机格式
  15751. */
  15752. function mobile(value) {
  15753. return /^1[3-9]\d{9}$/.test(value);
  15754. }
  15755. /**
  15756. * 验证URL格式
  15757. */
  15758. function url(value) {
  15759. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  15760. }
  15761. /**
  15762. * 验证日期格式
  15763. */
  15764. function date(value) {
  15765. return !/Invalid|NaN/.test(new Date(value).toString());
  15766. }
  15767. /**
  15768. * 验证ISO类型的日期格式
  15769. */
  15770. function dateISO(value) {
  15771. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  15772. }
  15773. /**
  15774. * 验证十进制数字
  15775. */
  15776. function number(value) {
  15777. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  15778. }
  15779. /**
  15780. * 验证整数
  15781. */
  15782. function digits(value) {
  15783. return /^\d+$/.test(value);
  15784. }
  15785. /**
  15786. * 验证身份证号码
  15787. */
  15788. function idCard(value) {
  15789. 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);
  15790. }
  15791. /**
  15792. * 是否车牌号
  15793. */
  15794. function carNo(value) {
  15795. // 新能源车牌
  15796. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  15797. // 旧车牌
  15798. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  15799. if (value.length === 7) {
  15800. return creg.test(value);
  15801. } else if (value.length === 8) {
  15802. return xreg.test(value);
  15803. } else {
  15804. return false;
  15805. }
  15806. }
  15807. /**
  15808. * 金额,只允许2位小数
  15809. */
  15810. function amount(value) {
  15811. //金额,只允许保留两位小数
  15812. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  15813. }
  15814. /**
  15815. * 中文
  15816. */
  15817. function chinese(value) {
  15818. var reg = /^[\u4e00-\u9fa5]+$/gi;
  15819. return reg.test(value);
  15820. }
  15821. /**
  15822. * 只能输入字母
  15823. */
  15824. function letter(value) {
  15825. return /^[a-zA-Z]*$/.test(value);
  15826. }
  15827. /**
  15828. * 只能是字母或者数字
  15829. */
  15830. function enOrNum(value) {
  15831. //英文或者数字
  15832. var reg = /^[0-9a-zA-Z]*$/g;
  15833. return reg.test(value);
  15834. }
  15835. /**
  15836. * 验证是否包含某个值
  15837. */
  15838. function contains(value, param) {
  15839. return value.indexOf(param) >= 0;
  15840. }
  15841. /**
  15842. * 验证一个值范围[min, max]
  15843. */
  15844. function range(value, param) {
  15845. return value >= param[0] && value <= param[1];
  15846. }
  15847. /**
  15848. * 验证一个长度范围[min, max]
  15849. */
  15850. function rangeLength(value, param) {
  15851. return value.length >= param[0] && value.length <= param[1];
  15852. }
  15853. /**
  15854. * 是否固定电话
  15855. */
  15856. function landline(value) {
  15857. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  15858. return reg.test(value);
  15859. }
  15860. /**
  15861. * 判断是否为空
  15862. */
  15863. function empty(value) {
  15864. switch ((0, _typeof2.default)(value)) {
  15865. case 'undefined':
  15866. return true;
  15867. case 'string':
  15868. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  15869. break;
  15870. case 'boolean':
  15871. if (!value) return true;
  15872. break;
  15873. case 'number':
  15874. if (0 === value || isNaN(value)) return true;
  15875. break;
  15876. case 'object':
  15877. if (null === value || value.length === 0) return true;
  15878. for (var i in value) {
  15879. return false;
  15880. }
  15881. return true;
  15882. }
  15883. return false;
  15884. }
  15885. /**
  15886. * 是否json字符串
  15887. */
  15888. function jsonString(value) {
  15889. if (typeof value == 'string') {
  15890. try {
  15891. var obj = JSON.parse(value);
  15892. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  15893. return true;
  15894. } else {
  15895. return false;
  15896. }
  15897. } catch (e) {
  15898. return false;
  15899. }
  15900. }
  15901. return false;
  15902. }
  15903. /**
  15904. * 是否数组
  15905. */
  15906. function array(value) {
  15907. if (typeof Array.isArray === "function") {
  15908. return Array.isArray(value);
  15909. } else {
  15910. return Object.prototype.toString.call(value) === "[object Array]";
  15911. }
  15912. }
  15913. /**
  15914. * 是否对象
  15915. */
  15916. function object(value) {
  15917. return Object.prototype.toString.call(value) === '[object Object]';
  15918. }
  15919. /**
  15920. * 是否短信验证码
  15921. */
  15922. function code(value) {
  15923. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  15924. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  15925. }
  15926. var _default = {
  15927. email: email,
  15928. mobile: mobile,
  15929. url: url,
  15930. date: date,
  15931. dateISO: dateISO,
  15932. number: number,
  15933. digits: digits,
  15934. idCard: idCard,
  15935. carNo: carNo,
  15936. amount: amount,
  15937. chinese: chinese,
  15938. letter: letter,
  15939. enOrNum: enOrNum,
  15940. contains: contains,
  15941. range: range,
  15942. rangeLength: rangeLength,
  15943. empty: empty,
  15944. isEmpty: empty,
  15945. jsonString: jsonString,
  15946. landline: landline,
  15947. object: object,
  15948. array: array,
  15949. code: code
  15950. };
  15951. exports.default = _default;
  15952. /***/ }),
  15953. /***/ 477:
  15954. /*!************************************************************************!*\
  15955. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/province.js ***!
  15956. \************************************************************************/
  15957. /*! no static exports found */
  15958. /***/ (function(module, exports, __webpack_require__) {
  15959. "use strict";
  15960. Object.defineProperty(exports, "__esModule", {
  15961. value: true
  15962. });
  15963. exports.default = void 0;
  15964. var provinceData = [{
  15965. "label": "北京市",
  15966. "value": "11"
  15967. }, {
  15968. "label": "天津市",
  15969. "value": "12"
  15970. }, {
  15971. "label": "河北省",
  15972. "value": "13"
  15973. }, {
  15974. "label": "山西省",
  15975. "value": "14"
  15976. }, {
  15977. "label": "内蒙古自治区",
  15978. "value": "15"
  15979. }, {
  15980. "label": "辽宁省",
  15981. "value": "21"
  15982. }, {
  15983. "label": "吉林省",
  15984. "value": "22"
  15985. }, {
  15986. "label": "黑龙江省",
  15987. "value": "23"
  15988. }, {
  15989. "label": "上海市",
  15990. "value": "31"
  15991. }, {
  15992. "label": "江苏省",
  15993. "value": "32"
  15994. }, {
  15995. "label": "浙江省",
  15996. "value": "33"
  15997. }, {
  15998. "label": "安徽省",
  15999. "value": "34"
  16000. }, {
  16001. "label": "福建省",
  16002. "value": "35"
  16003. }, {
  16004. "label": "江西省",
  16005. "value": "36"
  16006. }, {
  16007. "label": "山东省",
  16008. "value": "37"
  16009. }, {
  16010. "label": "河南省",
  16011. "value": "41"
  16012. }, {
  16013. "label": "湖北省",
  16014. "value": "42"
  16015. }, {
  16016. "label": "湖南省",
  16017. "value": "43"
  16018. }, {
  16019. "label": "广东省",
  16020. "value": "44"
  16021. }, {
  16022. "label": "广西壮族自治区",
  16023. "value": "45"
  16024. }, {
  16025. "label": "海南省",
  16026. "value": "46"
  16027. }, {
  16028. "label": "重庆市",
  16029. "value": "50"
  16030. }, {
  16031. "label": "四川省",
  16032. "value": "51"
  16033. }, {
  16034. "label": "贵州省",
  16035. "value": "52"
  16036. }, {
  16037. "label": "云南省",
  16038. "value": "53"
  16039. }, {
  16040. "label": "西藏自治区",
  16041. "value": "54"
  16042. }, {
  16043. "label": "陕西省",
  16044. "value": "61"
  16045. }, {
  16046. "label": "甘肃省",
  16047. "value": "62"
  16048. }, {
  16049. "label": "青海省",
  16050. "value": "63"
  16051. }, {
  16052. "label": "宁夏回族自治区",
  16053. "value": "64"
  16054. }, {
  16055. "label": "新疆维吾尔自治区",
  16056. "value": "65"
  16057. }, {
  16058. "label": "台湾",
  16059. "value": "66"
  16060. }, {
  16061. "label": "香港",
  16062. "value": "67"
  16063. }, {
  16064. "label": "澳门",
  16065. "value": "68"
  16066. }];
  16067. var _default = provinceData;
  16068. exports.default = _default;
  16069. /***/ }),
  16070. /***/ 478:
  16071. /*!********************************************************************!*\
  16072. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/city.js ***!
  16073. \********************************************************************/
  16074. /*! no static exports found */
  16075. /***/ (function(module, exports, __webpack_require__) {
  16076. "use strict";
  16077. Object.defineProperty(exports, "__esModule", {
  16078. value: true
  16079. });
  16080. exports.default = void 0;
  16081. var cityData = [[{
  16082. "label": "市辖区",
  16083. "value": "1101"
  16084. }], [{
  16085. "label": "市辖区",
  16086. "value": "1201"
  16087. }], [{
  16088. "label": "石家庄市",
  16089. "value": "1301"
  16090. }, {
  16091. "label": "唐山市",
  16092. "value": "1302"
  16093. }, {
  16094. "label": "秦皇岛市",
  16095. "value": "1303"
  16096. }, {
  16097. "label": "邯郸市",
  16098. "value": "1304"
  16099. }, {
  16100. "label": "邢台市",
  16101. "value": "1305"
  16102. }, {
  16103. "label": "保定市",
  16104. "value": "1306"
  16105. }, {
  16106. "label": "张家口市",
  16107. "value": "1307"
  16108. }, {
  16109. "label": "承德市",
  16110. "value": "1308"
  16111. }, {
  16112. "label": "沧州市",
  16113. "value": "1309"
  16114. }, {
  16115. "label": "廊坊市",
  16116. "value": "1310"
  16117. }, {
  16118. "label": "衡水市",
  16119. "value": "1311"
  16120. }], [{
  16121. "label": "太原市",
  16122. "value": "1401"
  16123. }, {
  16124. "label": "大同市",
  16125. "value": "1402"
  16126. }, {
  16127. "label": "阳泉市",
  16128. "value": "1403"
  16129. }, {
  16130. "label": "长治市",
  16131. "value": "1404"
  16132. }, {
  16133. "label": "晋城市",
  16134. "value": "1405"
  16135. }, {
  16136. "label": "朔州市",
  16137. "value": "1406"
  16138. }, {
  16139. "label": "晋中市",
  16140. "value": "1407"
  16141. }, {
  16142. "label": "运城市",
  16143. "value": "1408"
  16144. }, {
  16145. "label": "忻州市",
  16146. "value": "1409"
  16147. }, {
  16148. "label": "临汾市",
  16149. "value": "1410"
  16150. }, {
  16151. "label": "吕梁市",
  16152. "value": "1411"
  16153. }], [{
  16154. "label": "呼和浩特市",
  16155. "value": "1501"
  16156. }, {
  16157. "label": "包头市",
  16158. "value": "1502"
  16159. }, {
  16160. "label": "乌海市",
  16161. "value": "1503"
  16162. }, {
  16163. "label": "赤峰市",
  16164. "value": "1504"
  16165. }, {
  16166. "label": "通辽市",
  16167. "value": "1505"
  16168. }, {
  16169. "label": "鄂尔多斯市",
  16170. "value": "1506"
  16171. }, {
  16172. "label": "呼伦贝尔市",
  16173. "value": "1507"
  16174. }, {
  16175. "label": "巴彦淖尔市",
  16176. "value": "1508"
  16177. }, {
  16178. "label": "乌兰察布市",
  16179. "value": "1509"
  16180. }, {
  16181. "label": "兴安盟",
  16182. "value": "1522"
  16183. }, {
  16184. "label": "锡林郭勒盟",
  16185. "value": "1525"
  16186. }, {
  16187. "label": "阿拉善盟",
  16188. "value": "1529"
  16189. }], [{
  16190. "label": "沈阳市",
  16191. "value": "2101"
  16192. }, {
  16193. "label": "大连市",
  16194. "value": "2102"
  16195. }, {
  16196. "label": "鞍山市",
  16197. "value": "2103"
  16198. }, {
  16199. "label": "抚顺市",
  16200. "value": "2104"
  16201. }, {
  16202. "label": "本溪市",
  16203. "value": "2105"
  16204. }, {
  16205. "label": "丹东市",
  16206. "value": "2106"
  16207. }, {
  16208. "label": "锦州市",
  16209. "value": "2107"
  16210. }, {
  16211. "label": "营口市",
  16212. "value": "2108"
  16213. }, {
  16214. "label": "阜新市",
  16215. "value": "2109"
  16216. }, {
  16217. "label": "辽阳市",
  16218. "value": "2110"
  16219. }, {
  16220. "label": "盘锦市",
  16221. "value": "2111"
  16222. }, {
  16223. "label": "铁岭市",
  16224. "value": "2112"
  16225. }, {
  16226. "label": "朝阳市",
  16227. "value": "2113"
  16228. }, {
  16229. "label": "葫芦岛市",
  16230. "value": "2114"
  16231. }], [{
  16232. "label": "长春市",
  16233. "value": "2201"
  16234. }, {
  16235. "label": "吉林市",
  16236. "value": "2202"
  16237. }, {
  16238. "label": "四平市",
  16239. "value": "2203"
  16240. }, {
  16241. "label": "辽源市",
  16242. "value": "2204"
  16243. }, {
  16244. "label": "通化市",
  16245. "value": "2205"
  16246. }, {
  16247. "label": "白山市",
  16248. "value": "2206"
  16249. }, {
  16250. "label": "松原市",
  16251. "value": "2207"
  16252. }, {
  16253. "label": "白城市",
  16254. "value": "2208"
  16255. }, {
  16256. "label": "延边朝鲜族自治州",
  16257. "value": "2224"
  16258. }], [{
  16259. "label": "哈尔滨市",
  16260. "value": "2301"
  16261. }, {
  16262. "label": "齐齐哈尔市",
  16263. "value": "2302"
  16264. }, {
  16265. "label": "鸡西市",
  16266. "value": "2303"
  16267. }, {
  16268. "label": "鹤岗市",
  16269. "value": "2304"
  16270. }, {
  16271. "label": "双鸭山市",
  16272. "value": "2305"
  16273. }, {
  16274. "label": "大庆市",
  16275. "value": "2306"
  16276. }, {
  16277. "label": "伊春市",
  16278. "value": "2307"
  16279. }, {
  16280. "label": "佳木斯市",
  16281. "value": "2308"
  16282. }, {
  16283. "label": "七台河市",
  16284. "value": "2309"
  16285. }, {
  16286. "label": "牡丹江市",
  16287. "value": "2310"
  16288. }, {
  16289. "label": "黑河市",
  16290. "value": "2311"
  16291. }, {
  16292. "label": "绥化市",
  16293. "value": "2312"
  16294. }, {
  16295. "label": "大兴安岭地区",
  16296. "value": "2327"
  16297. }], [{
  16298. "label": "市辖区",
  16299. "value": "3101"
  16300. }], [{
  16301. "label": "南京市",
  16302. "value": "3201"
  16303. }, {
  16304. "label": "无锡市",
  16305. "value": "3202"
  16306. }, {
  16307. "label": "徐州市",
  16308. "value": "3203"
  16309. }, {
  16310. "label": "常州市",
  16311. "value": "3204"
  16312. }, {
  16313. "label": "苏州市",
  16314. "value": "3205"
  16315. }, {
  16316. "label": "南通市",
  16317. "value": "3206"
  16318. }, {
  16319. "label": "连云港市",
  16320. "value": "3207"
  16321. }, {
  16322. "label": "淮安市",
  16323. "value": "3208"
  16324. }, {
  16325. "label": "盐城市",
  16326. "value": "3209"
  16327. }, {
  16328. "label": "扬州市",
  16329. "value": "3210"
  16330. }, {
  16331. "label": "镇江市",
  16332. "value": "3211"
  16333. }, {
  16334. "label": "泰州市",
  16335. "value": "3212"
  16336. }, {
  16337. "label": "宿迁市",
  16338. "value": "3213"
  16339. }], [{
  16340. "label": "杭州市",
  16341. "value": "3301"
  16342. }, {
  16343. "label": "宁波市",
  16344. "value": "3302"
  16345. }, {
  16346. "label": "温州市",
  16347. "value": "3303"
  16348. }, {
  16349. "label": "嘉兴市",
  16350. "value": "3304"
  16351. }, {
  16352. "label": "湖州市",
  16353. "value": "3305"
  16354. }, {
  16355. "label": "绍兴市",
  16356. "value": "3306"
  16357. }, {
  16358. "label": "金华市",
  16359. "value": "3307"
  16360. }, {
  16361. "label": "衢州市",
  16362. "value": "3308"
  16363. }, {
  16364. "label": "舟山市",
  16365. "value": "3309"
  16366. }, {
  16367. "label": "台州市",
  16368. "value": "3310"
  16369. }, {
  16370. "label": "丽水市",
  16371. "value": "3311"
  16372. }], [{
  16373. "label": "合肥市",
  16374. "value": "3401"
  16375. }, {
  16376. "label": "芜湖市",
  16377. "value": "3402"
  16378. }, {
  16379. "label": "蚌埠市",
  16380. "value": "3403"
  16381. }, {
  16382. "label": "淮南市",
  16383. "value": "3404"
  16384. }, {
  16385. "label": "马鞍山市",
  16386. "value": "3405"
  16387. }, {
  16388. "label": "淮北市",
  16389. "value": "3406"
  16390. }, {
  16391. "label": "铜陵市",
  16392. "value": "3407"
  16393. }, {
  16394. "label": "安庆市",
  16395. "value": "3408"
  16396. }, {
  16397. "label": "黄山市",
  16398. "value": "3410"
  16399. }, {
  16400. "label": "滁州市",
  16401. "value": "3411"
  16402. }, {
  16403. "label": "阜阳市",
  16404. "value": "3412"
  16405. }, {
  16406. "label": "宿州市",
  16407. "value": "3413"
  16408. }, {
  16409. "label": "六安市",
  16410. "value": "3415"
  16411. }, {
  16412. "label": "亳州市",
  16413. "value": "3416"
  16414. }, {
  16415. "label": "池州市",
  16416. "value": "3417"
  16417. }, {
  16418. "label": "宣城市",
  16419. "value": "3418"
  16420. }], [{
  16421. "label": "福州市",
  16422. "value": "3501"
  16423. }, {
  16424. "label": "厦门市",
  16425. "value": "3502"
  16426. }, {
  16427. "label": "莆田市",
  16428. "value": "3503"
  16429. }, {
  16430. "label": "三明市",
  16431. "value": "3504"
  16432. }, {
  16433. "label": "泉州市",
  16434. "value": "3505"
  16435. }, {
  16436. "label": "漳州市",
  16437. "value": "3506"
  16438. }, {
  16439. "label": "南平市",
  16440. "value": "3507"
  16441. }, {
  16442. "label": "龙岩市",
  16443. "value": "3508"
  16444. }, {
  16445. "label": "宁德市",
  16446. "value": "3509"
  16447. }], [{
  16448. "label": "南昌市",
  16449. "value": "3601"
  16450. }, {
  16451. "label": "景德镇市",
  16452. "value": "3602"
  16453. }, {
  16454. "label": "萍乡市",
  16455. "value": "3603"
  16456. }, {
  16457. "label": "九江市",
  16458. "value": "3604"
  16459. }, {
  16460. "label": "新余市",
  16461. "value": "3605"
  16462. }, {
  16463. "label": "鹰潭市",
  16464. "value": "3606"
  16465. }, {
  16466. "label": "赣州市",
  16467. "value": "3607"
  16468. }, {
  16469. "label": "吉安市",
  16470. "value": "3608"
  16471. }, {
  16472. "label": "宜春市",
  16473. "value": "3609"
  16474. }, {
  16475. "label": "抚州市",
  16476. "value": "3610"
  16477. }, {
  16478. "label": "上饶市",
  16479. "value": "3611"
  16480. }], [{
  16481. "label": "济南市",
  16482. "value": "3701"
  16483. }, {
  16484. "label": "青岛市",
  16485. "value": "3702"
  16486. }, {
  16487. "label": "淄博市",
  16488. "value": "3703"
  16489. }, {
  16490. "label": "枣庄市",
  16491. "value": "3704"
  16492. }, {
  16493. "label": "东营市",
  16494. "value": "3705"
  16495. }, {
  16496. "label": "烟台市",
  16497. "value": "3706"
  16498. }, {
  16499. "label": "潍坊市",
  16500. "value": "3707"
  16501. }, {
  16502. "label": "济宁市",
  16503. "value": "3708"
  16504. }, {
  16505. "label": "泰安市",
  16506. "value": "3709"
  16507. }, {
  16508. "label": "威海市",
  16509. "value": "3710"
  16510. }, {
  16511. "label": "日照市",
  16512. "value": "3711"
  16513. }, {
  16514. "label": "莱芜市",
  16515. "value": "3712"
  16516. }, {
  16517. "label": "临沂市",
  16518. "value": "3713"
  16519. }, {
  16520. "label": "德州市",
  16521. "value": "3714"
  16522. }, {
  16523. "label": "聊城市",
  16524. "value": "3715"
  16525. }, {
  16526. "label": "滨州市",
  16527. "value": "3716"
  16528. }, {
  16529. "label": "菏泽市",
  16530. "value": "3717"
  16531. }], [{
  16532. "label": "郑州市",
  16533. "value": "4101"
  16534. }, {
  16535. "label": "开封市",
  16536. "value": "4102"
  16537. }, {
  16538. "label": "洛阳市",
  16539. "value": "4103"
  16540. }, {
  16541. "label": "平顶山市",
  16542. "value": "4104"
  16543. }, {
  16544. "label": "安阳市",
  16545. "value": "4105"
  16546. }, {
  16547. "label": "鹤壁市",
  16548. "value": "4106"
  16549. }, {
  16550. "label": "新乡市",
  16551. "value": "4107"
  16552. }, {
  16553. "label": "焦作市",
  16554. "value": "4108"
  16555. }, {
  16556. "label": "濮阳市",
  16557. "value": "4109"
  16558. }, {
  16559. "label": "许昌市",
  16560. "value": "4110"
  16561. }, {
  16562. "label": "漯河市",
  16563. "value": "4111"
  16564. }, {
  16565. "label": "三门峡市",
  16566. "value": "4112"
  16567. }, {
  16568. "label": "南阳市",
  16569. "value": "4113"
  16570. }, {
  16571. "label": "商丘市",
  16572. "value": "4114"
  16573. }, {
  16574. "label": "信阳市",
  16575. "value": "4115"
  16576. }, {
  16577. "label": "周口市",
  16578. "value": "4116"
  16579. }, {
  16580. "label": "驻马店市",
  16581. "value": "4117"
  16582. }, {
  16583. "label": "省直辖县级行政区划",
  16584. "value": "4190"
  16585. }], [{
  16586. "label": "武汉市",
  16587. "value": "4201"
  16588. }, {
  16589. "label": "黄石市",
  16590. "value": "4202"
  16591. }, {
  16592. "label": "十堰市",
  16593. "value": "4203"
  16594. }, {
  16595. "label": "宜昌市",
  16596. "value": "4205"
  16597. }, {
  16598. "label": "襄阳市",
  16599. "value": "4206"
  16600. }, {
  16601. "label": "鄂州市",
  16602. "value": "4207"
  16603. }, {
  16604. "label": "荆门市",
  16605. "value": "4208"
  16606. }, {
  16607. "label": "孝感市",
  16608. "value": "4209"
  16609. }, {
  16610. "label": "荆州市",
  16611. "value": "4210"
  16612. }, {
  16613. "label": "黄冈市",
  16614. "value": "4211"
  16615. }, {
  16616. "label": "咸宁市",
  16617. "value": "4212"
  16618. }, {
  16619. "label": "随州市",
  16620. "value": "4213"
  16621. }, {
  16622. "label": "恩施土家族苗族自治州",
  16623. "value": "4228"
  16624. }, {
  16625. "label": "省直辖县级行政区划",
  16626. "value": "4290"
  16627. }], [{
  16628. "label": "长沙市",
  16629. "value": "4301"
  16630. }, {
  16631. "label": "株洲市",
  16632. "value": "4302"
  16633. }, {
  16634. "label": "湘潭市",
  16635. "value": "4303"
  16636. }, {
  16637. "label": "衡阳市",
  16638. "value": "4304"
  16639. }, {
  16640. "label": "邵阳市",
  16641. "value": "4305"
  16642. }, {
  16643. "label": "岳阳市",
  16644. "value": "4306"
  16645. }, {
  16646. "label": "常德市",
  16647. "value": "4307"
  16648. }, {
  16649. "label": "张家界市",
  16650. "value": "4308"
  16651. }, {
  16652. "label": "益阳市",
  16653. "value": "4309"
  16654. }, {
  16655. "label": "郴州市",
  16656. "value": "4310"
  16657. }, {
  16658. "label": "永州市",
  16659. "value": "4311"
  16660. }, {
  16661. "label": "怀化市",
  16662. "value": "4312"
  16663. }, {
  16664. "label": "娄底市",
  16665. "value": "4313"
  16666. }, {
  16667. "label": "湘西土家族苗族自治州",
  16668. "value": "4331"
  16669. }], [{
  16670. "label": "广州市",
  16671. "value": "4401"
  16672. }, {
  16673. "label": "韶关市",
  16674. "value": "4402"
  16675. }, {
  16676. "label": "深圳市",
  16677. "value": "4403"
  16678. }, {
  16679. "label": "珠海市",
  16680. "value": "4404"
  16681. }, {
  16682. "label": "汕头市",
  16683. "value": "4405"
  16684. }, {
  16685. "label": "佛山市",
  16686. "value": "4406"
  16687. }, {
  16688. "label": "江门市",
  16689. "value": "4407"
  16690. }, {
  16691. "label": "湛江市",
  16692. "value": "4408"
  16693. }, {
  16694. "label": "茂名市",
  16695. "value": "4409"
  16696. }, {
  16697. "label": "肇庆市",
  16698. "value": "4412"
  16699. }, {
  16700. "label": "惠州市",
  16701. "value": "4413"
  16702. }, {
  16703. "label": "梅州市",
  16704. "value": "4414"
  16705. }, {
  16706. "label": "汕尾市",
  16707. "value": "4415"
  16708. }, {
  16709. "label": "河源市",
  16710. "value": "4416"
  16711. }, {
  16712. "label": "阳江市",
  16713. "value": "4417"
  16714. }, {
  16715. "label": "清远市",
  16716. "value": "4418"
  16717. }, {
  16718. "label": "东莞市",
  16719. "value": "4419"
  16720. }, {
  16721. "label": "中山市",
  16722. "value": "4420"
  16723. }, {
  16724. "label": "潮州市",
  16725. "value": "4451"
  16726. }, {
  16727. "label": "揭阳市",
  16728. "value": "4452"
  16729. }, {
  16730. "label": "云浮市",
  16731. "value": "4453"
  16732. }], [{
  16733. "label": "南宁市",
  16734. "value": "4501"
  16735. }, {
  16736. "label": "柳州市",
  16737. "value": "4502"
  16738. }, {
  16739. "label": "桂林市",
  16740. "value": "4503"
  16741. }, {
  16742. "label": "梧州市",
  16743. "value": "4504"
  16744. }, {
  16745. "label": "北海市",
  16746. "value": "4505"
  16747. }, {
  16748. "label": "防城港市",
  16749. "value": "4506"
  16750. }, {
  16751. "label": "钦州市",
  16752. "value": "4507"
  16753. }, {
  16754. "label": "贵港市",
  16755. "value": "4508"
  16756. }, {
  16757. "label": "玉林市",
  16758. "value": "4509"
  16759. }, {
  16760. "label": "百色市",
  16761. "value": "4510"
  16762. }, {
  16763. "label": "贺州市",
  16764. "value": "4511"
  16765. }, {
  16766. "label": "河池市",
  16767. "value": "4512"
  16768. }, {
  16769. "label": "来宾市",
  16770. "value": "4513"
  16771. }, {
  16772. "label": "崇左市",
  16773. "value": "4514"
  16774. }], [{
  16775. "label": "海口市",
  16776. "value": "4601"
  16777. }, {
  16778. "label": "三亚市",
  16779. "value": "4602"
  16780. }, {
  16781. "label": "三沙市",
  16782. "value": "4603"
  16783. }, {
  16784. "label": "儋州市",
  16785. "value": "4604"
  16786. }, {
  16787. "label": "省直辖县级行政区划",
  16788. "value": "4690"
  16789. }], [{
  16790. "label": "市辖区",
  16791. "value": "5001"
  16792. }, {
  16793. "label": "县",
  16794. "value": "5002"
  16795. }], [{
  16796. "label": "成都市",
  16797. "value": "5101"
  16798. }, {
  16799. "label": "自贡市",
  16800. "value": "5103"
  16801. }, {
  16802. "label": "攀枝花市",
  16803. "value": "5104"
  16804. }, {
  16805. "label": "泸州市",
  16806. "value": "5105"
  16807. }, {
  16808. "label": "德阳市",
  16809. "value": "5106"
  16810. }, {
  16811. "label": "绵阳市",
  16812. "value": "5107"
  16813. }, {
  16814. "label": "广元市",
  16815. "value": "5108"
  16816. }, {
  16817. "label": "遂宁市",
  16818. "value": "5109"
  16819. }, {
  16820. "label": "内江市",
  16821. "value": "5110"
  16822. }, {
  16823. "label": "乐山市",
  16824. "value": "5111"
  16825. }, {
  16826. "label": "南充市",
  16827. "value": "5113"
  16828. }, {
  16829. "label": "眉山市",
  16830. "value": "5114"
  16831. }, {
  16832. "label": "宜宾市",
  16833. "value": "5115"
  16834. }, {
  16835. "label": "广安市",
  16836. "value": "5116"
  16837. }, {
  16838. "label": "达州市",
  16839. "value": "5117"
  16840. }, {
  16841. "label": "雅安市",
  16842. "value": "5118"
  16843. }, {
  16844. "label": "巴中市",
  16845. "value": "5119"
  16846. }, {
  16847. "label": "资阳市",
  16848. "value": "5120"
  16849. }, {
  16850. "label": "阿坝藏族羌族自治州",
  16851. "value": "5132"
  16852. }, {
  16853. "label": "甘孜藏族自治州",
  16854. "value": "5133"
  16855. }, {
  16856. "label": "凉山彝族自治州",
  16857. "value": "5134"
  16858. }], [{
  16859. "label": "贵阳市",
  16860. "value": "5201"
  16861. }, {
  16862. "label": "六盘水市",
  16863. "value": "5202"
  16864. }, {
  16865. "label": "遵义市",
  16866. "value": "5203"
  16867. }, {
  16868. "label": "安顺市",
  16869. "value": "5204"
  16870. }, {
  16871. "label": "毕节市",
  16872. "value": "5205"
  16873. }, {
  16874. "label": "铜仁市",
  16875. "value": "5206"
  16876. }, {
  16877. "label": "黔西南布依族苗族自治州",
  16878. "value": "5223"
  16879. }, {
  16880. "label": "黔东南苗族侗族自治州",
  16881. "value": "5226"
  16882. }, {
  16883. "label": "黔南布依族苗族自治州",
  16884. "value": "5227"
  16885. }], [{
  16886. "label": "昆明市",
  16887. "value": "5301"
  16888. }, {
  16889. "label": "曲靖市",
  16890. "value": "5303"
  16891. }, {
  16892. "label": "玉溪市",
  16893. "value": "5304"
  16894. }, {
  16895. "label": "保山市",
  16896. "value": "5305"
  16897. }, {
  16898. "label": "昭通市",
  16899. "value": "5306"
  16900. }, {
  16901. "label": "丽江市",
  16902. "value": "5307"
  16903. }, {
  16904. "label": "普洱市",
  16905. "value": "5308"
  16906. }, {
  16907. "label": "临沧市",
  16908. "value": "5309"
  16909. }, {
  16910. "label": "楚雄彝族自治州",
  16911. "value": "5323"
  16912. }, {
  16913. "label": "红河哈尼族彝族自治州",
  16914. "value": "5325"
  16915. }, {
  16916. "label": "文山壮族苗族自治州",
  16917. "value": "5326"
  16918. }, {
  16919. "label": "西双版纳傣族自治州",
  16920. "value": "5328"
  16921. }, {
  16922. "label": "大理白族自治州",
  16923. "value": "5329"
  16924. }, {
  16925. "label": "德宏傣族景颇族自治州",
  16926. "value": "5331"
  16927. }, {
  16928. "label": "怒江傈僳族自治州",
  16929. "value": "5333"
  16930. }, {
  16931. "label": "迪庆藏族自治州",
  16932. "value": "5334"
  16933. }], [{
  16934. "label": "拉萨市",
  16935. "value": "5401"
  16936. }, {
  16937. "label": "日喀则市",
  16938. "value": "5402"
  16939. }, {
  16940. "label": "昌都市",
  16941. "value": "5403"
  16942. }, {
  16943. "label": "林芝市",
  16944. "value": "5404"
  16945. }, {
  16946. "label": "山南市",
  16947. "value": "5405"
  16948. }, {
  16949. "label": "那曲地区",
  16950. "value": "5424"
  16951. }, {
  16952. "label": "阿里地区",
  16953. "value": "5425"
  16954. }], [{
  16955. "label": "西安市",
  16956. "value": "6101"
  16957. }, {
  16958. "label": "铜川市",
  16959. "value": "6102"
  16960. }, {
  16961. "label": "宝鸡市",
  16962. "value": "6103"
  16963. }, {
  16964. "label": "咸阳市",
  16965. "value": "6104"
  16966. }, {
  16967. "label": "渭南市",
  16968. "value": "6105"
  16969. }, {
  16970. "label": "延安市",
  16971. "value": "6106"
  16972. }, {
  16973. "label": "汉中市",
  16974. "value": "6107"
  16975. }, {
  16976. "label": "榆林市",
  16977. "value": "6108"
  16978. }, {
  16979. "label": "安康市",
  16980. "value": "6109"
  16981. }, {
  16982. "label": "商洛市",
  16983. "value": "6110"
  16984. }], [{
  16985. "label": "兰州市",
  16986. "value": "6201"
  16987. }, {
  16988. "label": "嘉峪关市",
  16989. "value": "6202"
  16990. }, {
  16991. "label": "金昌市",
  16992. "value": "6203"
  16993. }, {
  16994. "label": "白银市",
  16995. "value": "6204"
  16996. }, {
  16997. "label": "天水市",
  16998. "value": "6205"
  16999. }, {
  17000. "label": "武威市",
  17001. "value": "6206"
  17002. }, {
  17003. "label": "张掖市",
  17004. "value": "6207"
  17005. }, {
  17006. "label": "平凉市",
  17007. "value": "6208"
  17008. }, {
  17009. "label": "酒泉市",
  17010. "value": "6209"
  17011. }, {
  17012. "label": "庆阳市",
  17013. "value": "6210"
  17014. }, {
  17015. "label": "定西市",
  17016. "value": "6211"
  17017. }, {
  17018. "label": "陇南市",
  17019. "value": "6212"
  17020. }, {
  17021. "label": "临夏回族自治州",
  17022. "value": "6229"
  17023. }, {
  17024. "label": "甘南藏族自治州",
  17025. "value": "6230"
  17026. }], [{
  17027. "label": "西宁市",
  17028. "value": "6301"
  17029. }, {
  17030. "label": "海东市",
  17031. "value": "6302"
  17032. }, {
  17033. "label": "海北藏族自治州",
  17034. "value": "6322"
  17035. }, {
  17036. "label": "黄南藏族自治州",
  17037. "value": "6323"
  17038. }, {
  17039. "label": "海南藏族自治州",
  17040. "value": "6325"
  17041. }, {
  17042. "label": "果洛藏族自治州",
  17043. "value": "6326"
  17044. }, {
  17045. "label": "玉树藏族自治州",
  17046. "value": "6327"
  17047. }, {
  17048. "label": "海西蒙古族藏族自治州",
  17049. "value": "6328"
  17050. }], [{
  17051. "label": "银川市",
  17052. "value": "6401"
  17053. }, {
  17054. "label": "石嘴山市",
  17055. "value": "6402"
  17056. }, {
  17057. "label": "吴忠市",
  17058. "value": "6403"
  17059. }, {
  17060. "label": "固原市",
  17061. "value": "6404"
  17062. }, {
  17063. "label": "中卫市",
  17064. "value": "6405"
  17065. }], [{
  17066. "label": "乌鲁木齐市",
  17067. "value": "6501"
  17068. }, {
  17069. "label": "克拉玛依市",
  17070. "value": "6502"
  17071. }, {
  17072. "label": "吐鲁番市",
  17073. "value": "6504"
  17074. }, {
  17075. "label": "哈密市",
  17076. "value": "6505"
  17077. }, {
  17078. "label": "昌吉回族自治州",
  17079. "value": "6523"
  17080. }, {
  17081. "label": "博尔塔拉蒙古自治州",
  17082. "value": "6527"
  17083. }, {
  17084. "label": "巴音郭楞蒙古自治州",
  17085. "value": "6528"
  17086. }, {
  17087. "label": "阿克苏地区",
  17088. "value": "6529"
  17089. }, {
  17090. "label": "克孜勒苏柯尔克孜自治州",
  17091. "value": "6530"
  17092. }, {
  17093. "label": "喀什地区",
  17094. "value": "6531"
  17095. }, {
  17096. "label": "和田地区",
  17097. "value": "6532"
  17098. }, {
  17099. "label": "伊犁哈萨克自治州",
  17100. "value": "6540"
  17101. }, {
  17102. "label": "塔城地区",
  17103. "value": "6542"
  17104. }, {
  17105. "label": "阿勒泰地区",
  17106. "value": "6543"
  17107. }, {
  17108. "label": "自治区直辖县级行政区划",
  17109. "value": "6590"
  17110. }], [{
  17111. "label": "台北",
  17112. "value": "6601"
  17113. }, {
  17114. "label": "高雄",
  17115. "value": "6602"
  17116. }, {
  17117. "label": "基隆",
  17118. "value": "6603"
  17119. }, {
  17120. "label": "台中",
  17121. "value": "6604"
  17122. }, {
  17123. "label": "台南",
  17124. "value": "6605"
  17125. }, {
  17126. "label": "新竹",
  17127. "value": "6606"
  17128. }, {
  17129. "label": "嘉义",
  17130. "value": "6607"
  17131. }, {
  17132. "label": "宜兰",
  17133. "value": "6608"
  17134. }, {
  17135. "label": "桃园",
  17136. "value": "6609"
  17137. }, {
  17138. "label": "苗栗",
  17139. "value": "6610"
  17140. }, {
  17141. "label": "彰化",
  17142. "value": "6611"
  17143. }, {
  17144. "label": "南投",
  17145. "value": "6612"
  17146. }, {
  17147. "label": "云林",
  17148. "value": "6613"
  17149. }, {
  17150. "label": "屏东",
  17151. "value": "6614"
  17152. }, {
  17153. "label": "台东",
  17154. "value": "6615"
  17155. }, {
  17156. "label": "花莲",
  17157. "value": "6616"
  17158. }, {
  17159. "label": "澎湖",
  17160. "value": "6617"
  17161. }], [{
  17162. "label": "香港岛",
  17163. "value": "6701"
  17164. }, {
  17165. "label": "九龙",
  17166. "value": "6702"
  17167. }, {
  17168. "label": "新界",
  17169. "value": "6703"
  17170. }], [{
  17171. "label": "澳门半岛",
  17172. "value": "6801"
  17173. }, {
  17174. "label": "氹仔岛",
  17175. "value": "6802"
  17176. }, {
  17177. "label": "路环岛",
  17178. "value": "6803"
  17179. }, {
  17180. "label": "路氹城",
  17181. "value": "6804"
  17182. }]];
  17183. var _default = cityData;
  17184. exports.default = _default;
  17185. /***/ }),
  17186. /***/ 479:
  17187. /*!********************************************************************!*\
  17188. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/util/area.js ***!
  17189. \********************************************************************/
  17190. /*! no static exports found */
  17191. /***/ (function(module, exports, __webpack_require__) {
  17192. "use strict";
  17193. Object.defineProperty(exports, "__esModule", {
  17194. value: true
  17195. });
  17196. exports.default = void 0;
  17197. var areaData = [[[{
  17198. "label": "东城区",
  17199. "value": "110101"
  17200. }, {
  17201. "label": "西城区",
  17202. "value": "110102"
  17203. }, {
  17204. "label": "朝阳区",
  17205. "value": "110105"
  17206. }, {
  17207. "label": "丰台区",
  17208. "value": "110106"
  17209. }, {
  17210. "label": "石景山区",
  17211. "value": "110107"
  17212. }, {
  17213. "label": "海淀区",
  17214. "value": "110108"
  17215. }, {
  17216. "label": "门头沟区",
  17217. "value": "110109"
  17218. }, {
  17219. "label": "房山区",
  17220. "value": "110111"
  17221. }, {
  17222. "label": "通州区",
  17223. "value": "110112"
  17224. }, {
  17225. "label": "顺义区",
  17226. "value": "110113"
  17227. }, {
  17228. "label": "昌平区",
  17229. "value": "110114"
  17230. }, {
  17231. "label": "大兴区",
  17232. "value": "110115"
  17233. }, {
  17234. "label": "怀柔区",
  17235. "value": "110116"
  17236. }, {
  17237. "label": "平谷区",
  17238. "value": "110117"
  17239. }, {
  17240. "label": "密云区",
  17241. "value": "110118"
  17242. }, {
  17243. "label": "延庆区",
  17244. "value": "110119"
  17245. }]], [[{
  17246. "label": "和平区",
  17247. "value": "120101"
  17248. }, {
  17249. "label": "河东区",
  17250. "value": "120102"
  17251. }, {
  17252. "label": "河西区",
  17253. "value": "120103"
  17254. }, {
  17255. "label": "南开区",
  17256. "value": "120104"
  17257. }, {
  17258. "label": "河北区",
  17259. "value": "120105"
  17260. }, {
  17261. "label": "红桥区",
  17262. "value": "120106"
  17263. }, {
  17264. "label": "东丽区",
  17265. "value": "120110"
  17266. }, {
  17267. "label": "西青区",
  17268. "value": "120111"
  17269. }, {
  17270. "label": "津南区",
  17271. "value": "120112"
  17272. }, {
  17273. "label": "北辰区",
  17274. "value": "120113"
  17275. }, {
  17276. "label": "武清区",
  17277. "value": "120114"
  17278. }, {
  17279. "label": "宝坻区",
  17280. "value": "120115"
  17281. }, {
  17282. "label": "滨海新区",
  17283. "value": "120116"
  17284. }, {
  17285. "label": "宁河区",
  17286. "value": "120117"
  17287. }, {
  17288. "label": "静海区",
  17289. "value": "120118"
  17290. }, {
  17291. "label": "蓟州区",
  17292. "value": "120119"
  17293. }]], [[{
  17294. "label": "长安区",
  17295. "value": "130102"
  17296. }, {
  17297. "label": "桥西区",
  17298. "value": "130104"
  17299. }, {
  17300. "label": "新华区",
  17301. "value": "130105"
  17302. }, {
  17303. "label": "井陉矿区",
  17304. "value": "130107"
  17305. }, {
  17306. "label": "裕华区",
  17307. "value": "130108"
  17308. }, {
  17309. "label": "藁城区",
  17310. "value": "130109"
  17311. }, {
  17312. "label": "鹿泉区",
  17313. "value": "130110"
  17314. }, {
  17315. "label": "栾城区",
  17316. "value": "130111"
  17317. }, {
  17318. "label": "井陉县",
  17319. "value": "130121"
  17320. }, {
  17321. "label": "正定县",
  17322. "value": "130123"
  17323. }, {
  17324. "label": "行唐县",
  17325. "value": "130125"
  17326. }, {
  17327. "label": "灵寿县",
  17328. "value": "130126"
  17329. }, {
  17330. "label": "高邑县",
  17331. "value": "130127"
  17332. }, {
  17333. "label": "深泽县",
  17334. "value": "130128"
  17335. }, {
  17336. "label": "赞皇县",
  17337. "value": "130129"
  17338. }, {
  17339. "label": "无极县",
  17340. "value": "130130"
  17341. }, {
  17342. "label": "平山县",
  17343. "value": "130131"
  17344. }, {
  17345. "label": "元氏县",
  17346. "value": "130132"
  17347. }, {
  17348. "label": "赵县",
  17349. "value": "130133"
  17350. }, {
  17351. "label": "石家庄高新技术产业开发区",
  17352. "value": "130171"
  17353. }, {
  17354. "label": "石家庄循环化工园区",
  17355. "value": "130172"
  17356. }, {
  17357. "label": "辛集市",
  17358. "value": "130181"
  17359. }, {
  17360. "label": "晋州市",
  17361. "value": "130183"
  17362. }, {
  17363. "label": "新乐市",
  17364. "value": "130184"
  17365. }], [{
  17366. "label": "路南区",
  17367. "value": "130202"
  17368. }, {
  17369. "label": "路北区",
  17370. "value": "130203"
  17371. }, {
  17372. "label": "古冶区",
  17373. "value": "130204"
  17374. }, {
  17375. "label": "开平区",
  17376. "value": "130205"
  17377. }, {
  17378. "label": "丰南区",
  17379. "value": "130207"
  17380. }, {
  17381. "label": "丰润区",
  17382. "value": "130208"
  17383. }, {
  17384. "label": "曹妃甸区",
  17385. "value": "130209"
  17386. }, {
  17387. "label": "滦县",
  17388. "value": "130223"
  17389. }, {
  17390. "label": "滦南县",
  17391. "value": "130224"
  17392. }, {
  17393. "label": "乐亭县",
  17394. "value": "130225"
  17395. }, {
  17396. "label": "迁西县",
  17397. "value": "130227"
  17398. }, {
  17399. "label": "玉田县",
  17400. "value": "130229"
  17401. }, {
  17402. "label": "唐山市芦台经济技术开发区",
  17403. "value": "130271"
  17404. }, {
  17405. "label": "唐山市汉沽管理区",
  17406. "value": "130272"
  17407. }, {
  17408. "label": "唐山高新技术产业开发区",
  17409. "value": "130273"
  17410. }, {
  17411. "label": "河北唐山海港经济开发区",
  17412. "value": "130274"
  17413. }, {
  17414. "label": "遵化市",
  17415. "value": "130281"
  17416. }, {
  17417. "label": "迁安市",
  17418. "value": "130283"
  17419. }], [{
  17420. "label": "海港区",
  17421. "value": "130302"
  17422. }, {
  17423. "label": "山海关区",
  17424. "value": "130303"
  17425. }, {
  17426. "label": "北戴河区",
  17427. "value": "130304"
  17428. }, {
  17429. "label": "抚宁区",
  17430. "value": "130306"
  17431. }, {
  17432. "label": "青龙满族自治县",
  17433. "value": "130321"
  17434. }, {
  17435. "label": "昌黎县",
  17436. "value": "130322"
  17437. }, {
  17438. "label": "卢龙县",
  17439. "value": "130324"
  17440. }, {
  17441. "label": "秦皇岛市经济技术开发区",
  17442. "value": "130371"
  17443. }, {
  17444. "label": "北戴河新区",
  17445. "value": "130372"
  17446. }], [{
  17447. "label": "邯山区",
  17448. "value": "130402"
  17449. }, {
  17450. "label": "丛台区",
  17451. "value": "130403"
  17452. }, {
  17453. "label": "复兴区",
  17454. "value": "130404"
  17455. }, {
  17456. "label": "峰峰矿区",
  17457. "value": "130406"
  17458. }, {
  17459. "label": "肥乡区",
  17460. "value": "130407"
  17461. }, {
  17462. "label": "永年区",
  17463. "value": "130408"
  17464. }, {
  17465. "label": "临漳县",
  17466. "value": "130423"
  17467. }, {
  17468. "label": "成安县",
  17469. "value": "130424"
  17470. }, {
  17471. "label": "大名县",
  17472. "value": "130425"
  17473. }, {
  17474. "label": "涉县",
  17475. "value": "130426"
  17476. }, {
  17477. "label": "磁县",
  17478. "value": "130427"
  17479. }, {
  17480. "label": "邱县",
  17481. "value": "130430"
  17482. }, {
  17483. "label": "鸡泽县",
  17484. "value": "130431"
  17485. }, {
  17486. "label": "广平县",
  17487. "value": "130432"
  17488. }, {
  17489. "label": "馆陶县",
  17490. "value": "130433"
  17491. }, {
  17492. "label": "魏县",
  17493. "value": "130434"
  17494. }, {
  17495. "label": "曲周县",
  17496. "value": "130435"
  17497. }, {
  17498. "label": "邯郸经济技术开发区",
  17499. "value": "130471"
  17500. }, {
  17501. "label": "邯郸冀南新区",
  17502. "value": "130473"
  17503. }, {
  17504. "label": "武安市",
  17505. "value": "130481"
  17506. }], [{
  17507. "label": "桥东区",
  17508. "value": "130502"
  17509. }, {
  17510. "label": "桥西区",
  17511. "value": "130503"
  17512. }, {
  17513. "label": "邢台县",
  17514. "value": "130521"
  17515. }, {
  17516. "label": "临城县",
  17517. "value": "130522"
  17518. }, {
  17519. "label": "内丘县",
  17520. "value": "130523"
  17521. }, {
  17522. "label": "柏乡县",
  17523. "value": "130524"
  17524. }, {
  17525. "label": "隆尧县",
  17526. "value": "130525"
  17527. }, {
  17528. "label": "任县",
  17529. "value": "130526"
  17530. }, {
  17531. "label": "南和县",
  17532. "value": "130527"
  17533. }, {
  17534. "label": "宁晋县",
  17535. "value": "130528"
  17536. }, {
  17537. "label": "巨鹿县",
  17538. "value": "130529"
  17539. }, {
  17540. "label": "新河县",
  17541. "value": "130530"
  17542. }, {
  17543. "label": "广宗县",
  17544. "value": "130531"
  17545. }, {
  17546. "label": "平乡县",
  17547. "value": "130532"
  17548. }, {
  17549. "label": "威县",
  17550. "value": "130533"
  17551. }, {
  17552. "label": "清河县",
  17553. "value": "130534"
  17554. }, {
  17555. "label": "临西县",
  17556. "value": "130535"
  17557. }, {
  17558. "label": "河北邢台经济开发区",
  17559. "value": "130571"
  17560. }, {
  17561. "label": "南宫市",
  17562. "value": "130581"
  17563. }, {
  17564. "label": "沙河市",
  17565. "value": "130582"
  17566. }], [{
  17567. "label": "竞秀区",
  17568. "value": "130602"
  17569. }, {
  17570. "label": "莲池区",
  17571. "value": "130606"
  17572. }, {
  17573. "label": "满城区",
  17574. "value": "130607"
  17575. }, {
  17576. "label": "清苑区",
  17577. "value": "130608"
  17578. }, {
  17579. "label": "徐水区",
  17580. "value": "130609"
  17581. }, {
  17582. "label": "涞水县",
  17583. "value": "130623"
  17584. }, {
  17585. "label": "阜平县",
  17586. "value": "130624"
  17587. }, {
  17588. "label": "定兴县",
  17589. "value": "130626"
  17590. }, {
  17591. "label": "唐县",
  17592. "value": "130627"
  17593. }, {
  17594. "label": "高阳县",
  17595. "value": "130628"
  17596. }, {
  17597. "label": "容城县",
  17598. "value": "130629"
  17599. }, {
  17600. "label": "涞源县",
  17601. "value": "130630"
  17602. }, {
  17603. "label": "望都县",
  17604. "value": "130631"
  17605. }, {
  17606. "label": "安新县",
  17607. "value": "130632"
  17608. }, {
  17609. "label": "易县",
  17610. "value": "130633"
  17611. }, {
  17612. "label": "曲阳县",
  17613. "value": "130634"
  17614. }, {
  17615. "label": "蠡县",
  17616. "value": "130635"
  17617. }, {
  17618. "label": "顺平县",
  17619. "value": "130636"
  17620. }, {
  17621. "label": "博野县",
  17622. "value": "130637"
  17623. }, {
  17624. "label": "雄县",
  17625. "value": "130638"
  17626. }, {
  17627. "label": "保定高新技术产业开发区",
  17628. "value": "130671"
  17629. }, {
  17630. "label": "保定白沟新城",
  17631. "value": "130672"
  17632. }, {
  17633. "label": "涿州市",
  17634. "value": "130681"
  17635. }, {
  17636. "label": "定州市",
  17637. "value": "130682"
  17638. }, {
  17639. "label": "安国市",
  17640. "value": "130683"
  17641. }, {
  17642. "label": "高碑店市",
  17643. "value": "130684"
  17644. }], [{
  17645. "label": "桥东区",
  17646. "value": "130702"
  17647. }, {
  17648. "label": "桥西区",
  17649. "value": "130703"
  17650. }, {
  17651. "label": "宣化区",
  17652. "value": "130705"
  17653. }, {
  17654. "label": "下花园区",
  17655. "value": "130706"
  17656. }, {
  17657. "label": "万全区",
  17658. "value": "130708"
  17659. }, {
  17660. "label": "崇礼区",
  17661. "value": "130709"
  17662. }, {
  17663. "label": "张北县",
  17664. "value": "130722"
  17665. }, {
  17666. "label": "康保县",
  17667. "value": "130723"
  17668. }, {
  17669. "label": "沽源县",
  17670. "value": "130724"
  17671. }, {
  17672. "label": "尚义县",
  17673. "value": "130725"
  17674. }, {
  17675. "label": "蔚县",
  17676. "value": "130726"
  17677. }, {
  17678. "label": "阳原县",
  17679. "value": "130727"
  17680. }, {
  17681. "label": "怀安县",
  17682. "value": "130728"
  17683. }, {
  17684. "label": "怀来县",
  17685. "value": "130730"
  17686. }, {
  17687. "label": "涿鹿县",
  17688. "value": "130731"
  17689. }, {
  17690. "label": "赤城县",
  17691. "value": "130732"
  17692. }, {
  17693. "label": "张家口市高新技术产业开发区",
  17694. "value": "130771"
  17695. }, {
  17696. "label": "张家口市察北管理区",
  17697. "value": "130772"
  17698. }, {
  17699. "label": "张家口市塞北管理区",
  17700. "value": "130773"
  17701. }], [{
  17702. "label": "双桥区",
  17703. "value": "130802"
  17704. }, {
  17705. "label": "双滦区",
  17706. "value": "130803"
  17707. }, {
  17708. "label": "鹰手营子矿区",
  17709. "value": "130804"
  17710. }, {
  17711. "label": "承德县",
  17712. "value": "130821"
  17713. }, {
  17714. "label": "兴隆县",
  17715. "value": "130822"
  17716. }, {
  17717. "label": "滦平县",
  17718. "value": "130824"
  17719. }, {
  17720. "label": "隆化县",
  17721. "value": "130825"
  17722. }, {
  17723. "label": "丰宁满族自治县",
  17724. "value": "130826"
  17725. }, {
  17726. "label": "宽城满族自治县",
  17727. "value": "130827"
  17728. }, {
  17729. "label": "围场满族蒙古族自治县",
  17730. "value": "130828"
  17731. }, {
  17732. "label": "承德高新技术产业开发区",
  17733. "value": "130871"
  17734. }, {
  17735. "label": "平泉市",
  17736. "value": "130881"
  17737. }], [{
  17738. "label": "新华区",
  17739. "value": "130902"
  17740. }, {
  17741. "label": "运河区",
  17742. "value": "130903"
  17743. }, {
  17744. "label": "沧县",
  17745. "value": "130921"
  17746. }, {
  17747. "label": "青县",
  17748. "value": "130922"
  17749. }, {
  17750. "label": "东光县",
  17751. "value": "130923"
  17752. }, {
  17753. "label": "海兴县",
  17754. "value": "130924"
  17755. }, {
  17756. "label": "盐山县",
  17757. "value": "130925"
  17758. }, {
  17759. "label": "肃宁县",
  17760. "value": "130926"
  17761. }, {
  17762. "label": "南皮县",
  17763. "value": "130927"
  17764. }, {
  17765. "label": "吴桥县",
  17766. "value": "130928"
  17767. }, {
  17768. "label": "献县",
  17769. "value": "130929"
  17770. }, {
  17771. "label": "孟村回族自治县",
  17772. "value": "130930"
  17773. }, {
  17774. "label": "河北沧州经济开发区",
  17775. "value": "130971"
  17776. }, {
  17777. "label": "沧州高新技术产业开发区",
  17778. "value": "130972"
  17779. }, {
  17780. "label": "沧州渤海新区",
  17781. "value": "130973"
  17782. }, {
  17783. "label": "泊头市",
  17784. "value": "130981"
  17785. }, {
  17786. "label": "任丘市",
  17787. "value": "130982"
  17788. }, {
  17789. "label": "黄骅市",
  17790. "value": "130983"
  17791. }, {
  17792. "label": "河间市",
  17793. "value": "130984"
  17794. }], [{
  17795. "label": "安次区",
  17796. "value": "131002"
  17797. }, {
  17798. "label": "广阳区",
  17799. "value": "131003"
  17800. }, {
  17801. "label": "固安县",
  17802. "value": "131022"
  17803. }, {
  17804. "label": "永清县",
  17805. "value": "131023"
  17806. }, {
  17807. "label": "香河县",
  17808. "value": "131024"
  17809. }, {
  17810. "label": "大城县",
  17811. "value": "131025"
  17812. }, {
  17813. "label": "文安县",
  17814. "value": "131026"
  17815. }, {
  17816. "label": "大厂回族自治县",
  17817. "value": "131028"
  17818. }, {
  17819. "label": "廊坊经济技术开发区",
  17820. "value": "131071"
  17821. }, {
  17822. "label": "霸州市",
  17823. "value": "131081"
  17824. }, {
  17825. "label": "三河市",
  17826. "value": "131082"
  17827. }], [{
  17828. "label": "桃城区",
  17829. "value": "131102"
  17830. }, {
  17831. "label": "冀州区",
  17832. "value": "131103"
  17833. }, {
  17834. "label": "枣强县",
  17835. "value": "131121"
  17836. }, {
  17837. "label": "武邑县",
  17838. "value": "131122"
  17839. }, {
  17840. "label": "武强县",
  17841. "value": "131123"
  17842. }, {
  17843. "label": "饶阳县",
  17844. "value": "131124"
  17845. }, {
  17846. "label": "安平县",
  17847. "value": "131125"
  17848. }, {
  17849. "label": "故城县",
  17850. "value": "131126"
  17851. }, {
  17852. "label": "景县",
  17853. "value": "131127"
  17854. }, {
  17855. "label": "阜城县",
  17856. "value": "131128"
  17857. }, {
  17858. "label": "河北衡水经济开发区",
  17859. "value": "131171"
  17860. }, {
  17861. "label": "衡水滨湖新区",
  17862. "value": "131172"
  17863. }, {
  17864. "label": "深州市",
  17865. "value": "131182"
  17866. }]], [[{
  17867. "label": "小店区",
  17868. "value": "140105"
  17869. }, {
  17870. "label": "迎泽区",
  17871. "value": "140106"
  17872. }, {
  17873. "label": "杏花岭区",
  17874. "value": "140107"
  17875. }, {
  17876. "label": "尖草坪区",
  17877. "value": "140108"
  17878. }, {
  17879. "label": "万柏林区",
  17880. "value": "140109"
  17881. }, {
  17882. "label": "晋源区",
  17883. "value": "140110"
  17884. }, {
  17885. "label": "清徐县",
  17886. "value": "140121"
  17887. }, {
  17888. "label": "阳曲县",
  17889. "value": "140122"
  17890. }, {
  17891. "label": "娄烦县",
  17892. "value": "140123"
  17893. }, {
  17894. "label": "山西转型综合改革示范区",
  17895. "value": "140171"
  17896. }, {
  17897. "label": "古交市",
  17898. "value": "140181"
  17899. }], [{
  17900. "label": "城区",
  17901. "value": "140202"
  17902. }, {
  17903. "label": "矿区",
  17904. "value": "140203"
  17905. }, {
  17906. "label": "南郊区",
  17907. "value": "140211"
  17908. }, {
  17909. "label": "新荣区",
  17910. "value": "140212"
  17911. }, {
  17912. "label": "阳高县",
  17913. "value": "140221"
  17914. }, {
  17915. "label": "天镇县",
  17916. "value": "140222"
  17917. }, {
  17918. "label": "广灵县",
  17919. "value": "140223"
  17920. }, {
  17921. "label": "灵丘县",
  17922. "value": "140224"
  17923. }, {
  17924. "label": "浑源县",
  17925. "value": "140225"
  17926. }, {
  17927. "label": "左云县",
  17928. "value": "140226"
  17929. }, {
  17930. "label": "大同县",
  17931. "value": "140227"
  17932. }, {
  17933. "label": "山西大同经济开发区",
  17934. "value": "140271"
  17935. }], [{
  17936. "label": "城区",
  17937. "value": "140302"
  17938. }, {
  17939. "label": "矿区",
  17940. "value": "140303"
  17941. }, {
  17942. "label": "郊区",
  17943. "value": "140311"
  17944. }, {
  17945. "label": "平定县",
  17946. "value": "140321"
  17947. }, {
  17948. "label": "盂县",
  17949. "value": "140322"
  17950. }, {
  17951. "label": "山西阳泉经济开发区",
  17952. "value": "140371"
  17953. }], [{
  17954. "label": "城区",
  17955. "value": "140402"
  17956. }, {
  17957. "label": "郊区",
  17958. "value": "140411"
  17959. }, {
  17960. "label": "长治县",
  17961. "value": "140421"
  17962. }, {
  17963. "label": "襄垣县",
  17964. "value": "140423"
  17965. }, {
  17966. "label": "屯留县",
  17967. "value": "140424"
  17968. }, {
  17969. "label": "平顺县",
  17970. "value": "140425"
  17971. }, {
  17972. "label": "黎城县",
  17973. "value": "140426"
  17974. }, {
  17975. "label": "壶关县",
  17976. "value": "140427"
  17977. }, {
  17978. "label": "长子县",
  17979. "value": "140428"
  17980. }, {
  17981. "label": "武乡县",
  17982. "value": "140429"
  17983. }, {
  17984. "label": "沁县",
  17985. "value": "140430"
  17986. }, {
  17987. "label": "沁源县",
  17988. "value": "140431"
  17989. }, {
  17990. "label": "山西长治高新技术产业园区",
  17991. "value": "140471"
  17992. }, {
  17993. "label": "潞城市",
  17994. "value": "140481"
  17995. }], [{
  17996. "label": "城区",
  17997. "value": "140502"
  17998. }, {
  17999. "label": "沁水县",
  18000. "value": "140521"
  18001. }, {
  18002. "label": "阳城县",
  18003. "value": "140522"
  18004. }, {
  18005. "label": "陵川县",
  18006. "value": "140524"
  18007. }, {
  18008. "label": "泽州县",
  18009. "value": "140525"
  18010. }, {
  18011. "label": "高平市",
  18012. "value": "140581"
  18013. }], [{
  18014. "label": "朔城区",
  18015. "value": "140602"
  18016. }, {
  18017. "label": "平鲁区",
  18018. "value": "140603"
  18019. }, {
  18020. "label": "山阴县",
  18021. "value": "140621"
  18022. }, {
  18023. "label": "应县",
  18024. "value": "140622"
  18025. }, {
  18026. "label": "右玉县",
  18027. "value": "140623"
  18028. }, {
  18029. "label": "怀仁县",
  18030. "value": "140624"
  18031. }, {
  18032. "label": "山西朔州经济开发区",
  18033. "value": "140671"
  18034. }], [{
  18035. "label": "榆次区",
  18036. "value": "140702"
  18037. }, {
  18038. "label": "榆社县",
  18039. "value": "140721"
  18040. }, {
  18041. "label": "左权县",
  18042. "value": "140722"
  18043. }, {
  18044. "label": "和顺县",
  18045. "value": "140723"
  18046. }, {
  18047. "label": "昔阳县",
  18048. "value": "140724"
  18049. }, {
  18050. "label": "寿阳县",
  18051. "value": "140725"
  18052. }, {
  18053. "label": "太谷县",
  18054. "value": "140726"
  18055. }, {
  18056. "label": "祁县",
  18057. "value": "140727"
  18058. }, {
  18059. "label": "平遥县",
  18060. "value": "140728"
  18061. }, {
  18062. "label": "灵石县",
  18063. "value": "140729"
  18064. }, {
  18065. "label": "介休市",
  18066. "value": "140781"
  18067. }], [{
  18068. "label": "盐湖区",
  18069. "value": "140802"
  18070. }, {
  18071. "label": "临猗县",
  18072. "value": "140821"
  18073. }, {
  18074. "label": "万荣县",
  18075. "value": "140822"
  18076. }, {
  18077. "label": "闻喜县",
  18078. "value": "140823"
  18079. }, {
  18080. "label": "稷山县",
  18081. "value": "140824"
  18082. }, {
  18083. "label": "新绛县",
  18084. "value": "140825"
  18085. }, {
  18086. "label": "绛县",
  18087. "value": "140826"
  18088. }, {
  18089. "label": "垣曲县",
  18090. "value": "140827"
  18091. }, {
  18092. "label": "夏县",
  18093. "value": "140828"
  18094. }, {
  18095. "label": "平陆县",
  18096. "value": "140829"
  18097. }, {
  18098. "label": "芮城县",
  18099. "value": "140830"
  18100. }, {
  18101. "label": "永济市",
  18102. "value": "140881"
  18103. }, {
  18104. "label": "河津市",
  18105. "value": "140882"
  18106. }], [{
  18107. "label": "忻府区",
  18108. "value": "140902"
  18109. }, {
  18110. "label": "定襄县",
  18111. "value": "140921"
  18112. }, {
  18113. "label": "五台县",
  18114. "value": "140922"
  18115. }, {
  18116. "label": "代县",
  18117. "value": "140923"
  18118. }, {
  18119. "label": "繁峙县",
  18120. "value": "140924"
  18121. }, {
  18122. "label": "宁武县",
  18123. "value": "140925"
  18124. }, {
  18125. "label": "静乐县",
  18126. "value": "140926"
  18127. }, {
  18128. "label": "神池县",
  18129. "value": "140927"
  18130. }, {
  18131. "label": "五寨县",
  18132. "value": "140928"
  18133. }, {
  18134. "label": "岢岚县",
  18135. "value": "140929"
  18136. }, {
  18137. "label": "河曲县",
  18138. "value": "140930"
  18139. }, {
  18140. "label": "保德县",
  18141. "value": "140931"
  18142. }, {
  18143. "label": "偏关县",
  18144. "value": "140932"
  18145. }, {
  18146. "label": "五台山风景名胜区",
  18147. "value": "140971"
  18148. }, {
  18149. "label": "原平市",
  18150. "value": "140981"
  18151. }], [{
  18152. "label": "尧都区",
  18153. "value": "141002"
  18154. }, {
  18155. "label": "曲沃县",
  18156. "value": "141021"
  18157. }, {
  18158. "label": "翼城县",
  18159. "value": "141022"
  18160. }, {
  18161. "label": "襄汾县",
  18162. "value": "141023"
  18163. }, {
  18164. "label": "洪洞县",
  18165. "value": "141024"
  18166. }, {
  18167. "label": "古县",
  18168. "value": "141025"
  18169. }, {
  18170. "label": "安泽县",
  18171. "value": "141026"
  18172. }, {
  18173. "label": "浮山县",
  18174. "value": "141027"
  18175. }, {
  18176. "label": "吉县",
  18177. "value": "141028"
  18178. }, {
  18179. "label": "乡宁县",
  18180. "value": "141029"
  18181. }, {
  18182. "label": "大宁县",
  18183. "value": "141030"
  18184. }, {
  18185. "label": "隰县",
  18186. "value": "141031"
  18187. }, {
  18188. "label": "永和县",
  18189. "value": "141032"
  18190. }, {
  18191. "label": "蒲县",
  18192. "value": "141033"
  18193. }, {
  18194. "label": "汾西县",
  18195. "value": "141034"
  18196. }, {
  18197. "label": "侯马市",
  18198. "value": "141081"
  18199. }, {
  18200. "label": "霍州市",
  18201. "value": "141082"
  18202. }], [{
  18203. "label": "离石区",
  18204. "value": "141102"
  18205. }, {
  18206. "label": "文水县",
  18207. "value": "141121"
  18208. }, {
  18209. "label": "交城县",
  18210. "value": "141122"
  18211. }, {
  18212. "label": "兴县",
  18213. "value": "141123"
  18214. }, {
  18215. "label": "临县",
  18216. "value": "141124"
  18217. }, {
  18218. "label": "柳林县",
  18219. "value": "141125"
  18220. }, {
  18221. "label": "石楼县",
  18222. "value": "141126"
  18223. }, {
  18224. "label": "岚县",
  18225. "value": "141127"
  18226. }, {
  18227. "label": "方山县",
  18228. "value": "141128"
  18229. }, {
  18230. "label": "中阳县",
  18231. "value": "141129"
  18232. }, {
  18233. "label": "交口县",
  18234. "value": "141130"
  18235. }, {
  18236. "label": "孝义市",
  18237. "value": "141181"
  18238. }, {
  18239. "label": "汾阳市",
  18240. "value": "141182"
  18241. }]], [[{
  18242. "label": "新城区",
  18243. "value": "150102"
  18244. }, {
  18245. "label": "回民区",
  18246. "value": "150103"
  18247. }, {
  18248. "label": "玉泉区",
  18249. "value": "150104"
  18250. }, {
  18251. "label": "赛罕区",
  18252. "value": "150105"
  18253. }, {
  18254. "label": "土默特左旗",
  18255. "value": "150121"
  18256. }, {
  18257. "label": "托克托县",
  18258. "value": "150122"
  18259. }, {
  18260. "label": "和林格尔县",
  18261. "value": "150123"
  18262. }, {
  18263. "label": "清水河县",
  18264. "value": "150124"
  18265. }, {
  18266. "label": "武川县",
  18267. "value": "150125"
  18268. }, {
  18269. "label": "呼和浩特金海工业园区",
  18270. "value": "150171"
  18271. }, {
  18272. "label": "呼和浩特经济技术开发区",
  18273. "value": "150172"
  18274. }], [{
  18275. "label": "东河区",
  18276. "value": "150202"
  18277. }, {
  18278. "label": "昆都仑区",
  18279. "value": "150203"
  18280. }, {
  18281. "label": "青山区",
  18282. "value": "150204"
  18283. }, {
  18284. "label": "石拐区",
  18285. "value": "150205"
  18286. }, {
  18287. "label": "白云鄂博矿区",
  18288. "value": "150206"
  18289. }, {
  18290. "label": "九原区",
  18291. "value": "150207"
  18292. }, {
  18293. "label": "土默特右旗",
  18294. "value": "150221"
  18295. }, {
  18296. "label": "固阳县",
  18297. "value": "150222"
  18298. }, {
  18299. "label": "达尔罕茂明安联合旗",
  18300. "value": "150223"
  18301. }, {
  18302. "label": "包头稀土高新技术产业开发区",
  18303. "value": "150271"
  18304. }], [{
  18305. "label": "海勃湾区",
  18306. "value": "150302"
  18307. }, {
  18308. "label": "海南区",
  18309. "value": "150303"
  18310. }, {
  18311. "label": "乌达区",
  18312. "value": "150304"
  18313. }], [{
  18314. "label": "红山区",
  18315. "value": "150402"
  18316. }, {
  18317. "label": "元宝山区",
  18318. "value": "150403"
  18319. }, {
  18320. "label": "松山区",
  18321. "value": "150404"
  18322. }, {
  18323. "label": "阿鲁科尔沁旗",
  18324. "value": "150421"
  18325. }, {
  18326. "label": "巴林左旗",
  18327. "value": "150422"
  18328. }, {
  18329. "label": "巴林右旗",
  18330. "value": "150423"
  18331. }, {
  18332. "label": "林西县",
  18333. "value": "150424"
  18334. }, {
  18335. "label": "克什克腾旗",
  18336. "value": "150425"
  18337. }, {
  18338. "label": "翁牛特旗",
  18339. "value": "150426"
  18340. }, {
  18341. "label": "喀喇沁旗",
  18342. "value": "150428"
  18343. }, {
  18344. "label": "宁城县",
  18345. "value": "150429"
  18346. }, {
  18347. "label": "敖汉旗",
  18348. "value": "150430"
  18349. }], [{
  18350. "label": "科尔沁区",
  18351. "value": "150502"
  18352. }, {
  18353. "label": "科尔沁左翼中旗",
  18354. "value": "150521"
  18355. }, {
  18356. "label": "科尔沁左翼后旗",
  18357. "value": "150522"
  18358. }, {
  18359. "label": "开鲁县",
  18360. "value": "150523"
  18361. }, {
  18362. "label": "库伦旗",
  18363. "value": "150524"
  18364. }, {
  18365. "label": "奈曼旗",
  18366. "value": "150525"
  18367. }, {
  18368. "label": "扎鲁特旗",
  18369. "value": "150526"
  18370. }, {
  18371. "label": "通辽经济技术开发区",
  18372. "value": "150571"
  18373. }, {
  18374. "label": "霍林郭勒市",
  18375. "value": "150581"
  18376. }], [{
  18377. "label": "东胜区",
  18378. "value": "150602"
  18379. }, {
  18380. "label": "康巴什区",
  18381. "value": "150603"
  18382. }, {
  18383. "label": "达拉特旗",
  18384. "value": "150621"
  18385. }, {
  18386. "label": "准格尔旗",
  18387. "value": "150622"
  18388. }, {
  18389. "label": "鄂托克前旗",
  18390. "value": "150623"
  18391. }, {
  18392. "label": "鄂托克旗",
  18393. "value": "150624"
  18394. }, {
  18395. "label": "杭锦旗",
  18396. "value": "150625"
  18397. }, {
  18398. "label": "乌审旗",
  18399. "value": "150626"
  18400. }, {
  18401. "label": "伊金霍洛旗",
  18402. "value": "150627"
  18403. }], [{
  18404. "label": "海拉尔区",
  18405. "value": "150702"
  18406. }, {
  18407. "label": "扎赉诺尔区",
  18408. "value": "150703"
  18409. }, {
  18410. "label": "阿荣旗",
  18411. "value": "150721"
  18412. }, {
  18413. "label": "莫力达瓦达斡尔族自治旗",
  18414. "value": "150722"
  18415. }, {
  18416. "label": "鄂伦春自治旗",
  18417. "value": "150723"
  18418. }, {
  18419. "label": "鄂温克族自治旗",
  18420. "value": "150724"
  18421. }, {
  18422. "label": "陈巴尔虎旗",
  18423. "value": "150725"
  18424. }, {
  18425. "label": "新巴尔虎左旗",
  18426. "value": "150726"
  18427. }, {
  18428. "label": "新巴尔虎右旗",
  18429. "value": "150727"
  18430. }, {
  18431. "label": "满洲里市",
  18432. "value": "150781"
  18433. }, {
  18434. "label": "牙克石市",
  18435. "value": "150782"
  18436. }, {
  18437. "label": "扎兰屯市",
  18438. "value": "150783"
  18439. }, {
  18440. "label": "额尔古纳市",
  18441. "value": "150784"
  18442. }, {
  18443. "label": "根河市",
  18444. "value": "150785"
  18445. }], [{
  18446. "label": "临河区",
  18447. "value": "150802"
  18448. }, {
  18449. "label": "五原县",
  18450. "value": "150821"
  18451. }, {
  18452. "label": "磴口县",
  18453. "value": "150822"
  18454. }, {
  18455. "label": "乌拉特前旗",
  18456. "value": "150823"
  18457. }, {
  18458. "label": "乌拉特中旗",
  18459. "value": "150824"
  18460. }, {
  18461. "label": "乌拉特后旗",
  18462. "value": "150825"
  18463. }, {
  18464. "label": "杭锦后旗",
  18465. "value": "150826"
  18466. }], [{
  18467. "label": "集宁区",
  18468. "value": "150902"
  18469. }, {
  18470. "label": "卓资县",
  18471. "value": "150921"
  18472. }, {
  18473. "label": "化德县",
  18474. "value": "150922"
  18475. }, {
  18476. "label": "商都县",
  18477. "value": "150923"
  18478. }, {
  18479. "label": "兴和县",
  18480. "value": "150924"
  18481. }, {
  18482. "label": "凉城县",
  18483. "value": "150925"
  18484. }, {
  18485. "label": "察哈尔右翼前旗",
  18486. "value": "150926"
  18487. }, {
  18488. "label": "察哈尔右翼中旗",
  18489. "value": "150927"
  18490. }, {
  18491. "label": "察哈尔右翼后旗",
  18492. "value": "150928"
  18493. }, {
  18494. "label": "四子王旗",
  18495. "value": "150929"
  18496. }, {
  18497. "label": "丰镇市",
  18498. "value": "150981"
  18499. }], [{
  18500. "label": "乌兰浩特市",
  18501. "value": "152201"
  18502. }, {
  18503. "label": "阿尔山市",
  18504. "value": "152202"
  18505. }, {
  18506. "label": "科尔沁右翼前旗",
  18507. "value": "152221"
  18508. }, {
  18509. "label": "科尔沁右翼中旗",
  18510. "value": "152222"
  18511. }, {
  18512. "label": "扎赉特旗",
  18513. "value": "152223"
  18514. }, {
  18515. "label": "突泉县",
  18516. "value": "152224"
  18517. }], [{
  18518. "label": "二连浩特市",
  18519. "value": "152501"
  18520. }, {
  18521. "label": "锡林浩特市",
  18522. "value": "152502"
  18523. }, {
  18524. "label": "阿巴嘎旗",
  18525. "value": "152522"
  18526. }, {
  18527. "label": "苏尼特左旗",
  18528. "value": "152523"
  18529. }, {
  18530. "label": "苏尼特右旗",
  18531. "value": "152524"
  18532. }, {
  18533. "label": "东乌珠穆沁旗",
  18534. "value": "152525"
  18535. }, {
  18536. "label": "西乌珠穆沁旗",
  18537. "value": "152526"
  18538. }, {
  18539. "label": "太仆寺旗",
  18540. "value": "152527"
  18541. }, {
  18542. "label": "镶黄旗",
  18543. "value": "152528"
  18544. }, {
  18545. "label": "正镶白旗",
  18546. "value": "152529"
  18547. }, {
  18548. "label": "正蓝旗",
  18549. "value": "152530"
  18550. }, {
  18551. "label": "多伦县",
  18552. "value": "152531"
  18553. }, {
  18554. "label": "乌拉盖管委会",
  18555. "value": "152571"
  18556. }], [{
  18557. "label": "阿拉善左旗",
  18558. "value": "152921"
  18559. }, {
  18560. "label": "阿拉善右旗",
  18561. "value": "152922"
  18562. }, {
  18563. "label": "额济纳旗",
  18564. "value": "152923"
  18565. }, {
  18566. "label": "内蒙古阿拉善经济开发区",
  18567. "value": "152971"
  18568. }]], [[{
  18569. "label": "和平区",
  18570. "value": "210102"
  18571. }, {
  18572. "label": "沈河区",
  18573. "value": "210103"
  18574. }, {
  18575. "label": "大东区",
  18576. "value": "210104"
  18577. }, {
  18578. "label": "皇姑区",
  18579. "value": "210105"
  18580. }, {
  18581. "label": "铁西区",
  18582. "value": "210106"
  18583. }, {
  18584. "label": "苏家屯区",
  18585. "value": "210111"
  18586. }, {
  18587. "label": "浑南区",
  18588. "value": "210112"
  18589. }, {
  18590. "label": "沈北新区",
  18591. "value": "210113"
  18592. }, {
  18593. "label": "于洪区",
  18594. "value": "210114"
  18595. }, {
  18596. "label": "辽中区",
  18597. "value": "210115"
  18598. }, {
  18599. "label": "康平县",
  18600. "value": "210123"
  18601. }, {
  18602. "label": "法库县",
  18603. "value": "210124"
  18604. }, {
  18605. "label": "新民市",
  18606. "value": "210181"
  18607. }], [{
  18608. "label": "中山区",
  18609. "value": "210202"
  18610. }, {
  18611. "label": "西岗区",
  18612. "value": "210203"
  18613. }, {
  18614. "label": "沙河口区",
  18615. "value": "210204"
  18616. }, {
  18617. "label": "甘井子区",
  18618. "value": "210211"
  18619. }, {
  18620. "label": "旅顺口区",
  18621. "value": "210212"
  18622. }, {
  18623. "label": "金州区",
  18624. "value": "210213"
  18625. }, {
  18626. "label": "普兰店区",
  18627. "value": "210214"
  18628. }, {
  18629. "label": "长海县",
  18630. "value": "210224"
  18631. }, {
  18632. "label": "瓦房店市",
  18633. "value": "210281"
  18634. }, {
  18635. "label": "庄河市",
  18636. "value": "210283"
  18637. }], [{
  18638. "label": "铁东区",
  18639. "value": "210302"
  18640. }, {
  18641. "label": "铁西区",
  18642. "value": "210303"
  18643. }, {
  18644. "label": "立山区",
  18645. "value": "210304"
  18646. }, {
  18647. "label": "千山区",
  18648. "value": "210311"
  18649. }, {
  18650. "label": "台安县",
  18651. "value": "210321"
  18652. }, {
  18653. "label": "岫岩满族自治县",
  18654. "value": "210323"
  18655. }, {
  18656. "label": "海城市",
  18657. "value": "210381"
  18658. }], [{
  18659. "label": "新抚区",
  18660. "value": "210402"
  18661. }, {
  18662. "label": "东洲区",
  18663. "value": "210403"
  18664. }, {
  18665. "label": "望花区",
  18666. "value": "210404"
  18667. }, {
  18668. "label": "顺城区",
  18669. "value": "210411"
  18670. }, {
  18671. "label": "抚顺县",
  18672. "value": "210421"
  18673. }, {
  18674. "label": "新宾满族自治县",
  18675. "value": "210422"
  18676. }, {
  18677. "label": "清原满族自治县",
  18678. "value": "210423"
  18679. }], [{
  18680. "label": "平山区",
  18681. "value": "210502"
  18682. }, {
  18683. "label": "溪湖区",
  18684. "value": "210503"
  18685. }, {
  18686. "label": "明山区",
  18687. "value": "210504"
  18688. }, {
  18689. "label": "南芬区",
  18690. "value": "210505"
  18691. }, {
  18692. "label": "本溪满族自治县",
  18693. "value": "210521"
  18694. }, {
  18695. "label": "桓仁满族自治县",
  18696. "value": "210522"
  18697. }], [{
  18698. "label": "元宝区",
  18699. "value": "210602"
  18700. }, {
  18701. "label": "振兴区",
  18702. "value": "210603"
  18703. }, {
  18704. "label": "振安区",
  18705. "value": "210604"
  18706. }, {
  18707. "label": "宽甸满族自治县",
  18708. "value": "210624"
  18709. }, {
  18710. "label": "东港市",
  18711. "value": "210681"
  18712. }, {
  18713. "label": "凤城市",
  18714. "value": "210682"
  18715. }], [{
  18716. "label": "古塔区",
  18717. "value": "210702"
  18718. }, {
  18719. "label": "凌河区",
  18720. "value": "210703"
  18721. }, {
  18722. "label": "太和区",
  18723. "value": "210711"
  18724. }, {
  18725. "label": "黑山县",
  18726. "value": "210726"
  18727. }, {
  18728. "label": "义县",
  18729. "value": "210727"
  18730. }, {
  18731. "label": "凌海市",
  18732. "value": "210781"
  18733. }, {
  18734. "label": "北镇市",
  18735. "value": "210782"
  18736. }], [{
  18737. "label": "站前区",
  18738. "value": "210802"
  18739. }, {
  18740. "label": "西市区",
  18741. "value": "210803"
  18742. }, {
  18743. "label": "鲅鱼圈区",
  18744. "value": "210804"
  18745. }, {
  18746. "label": "老边区",
  18747. "value": "210811"
  18748. }, {
  18749. "label": "盖州市",
  18750. "value": "210881"
  18751. }, {
  18752. "label": "大石桥市",
  18753. "value": "210882"
  18754. }], [{
  18755. "label": "海州区",
  18756. "value": "210902"
  18757. }, {
  18758. "label": "新邱区",
  18759. "value": "210903"
  18760. }, {
  18761. "label": "太平区",
  18762. "value": "210904"
  18763. }, {
  18764. "label": "清河门区",
  18765. "value": "210905"
  18766. }, {
  18767. "label": "细河区",
  18768. "value": "210911"
  18769. }, {
  18770. "label": "阜新蒙古族自治县",
  18771. "value": "210921"
  18772. }, {
  18773. "label": "彰武县",
  18774. "value": "210922"
  18775. }], [{
  18776. "label": "白塔区",
  18777. "value": "211002"
  18778. }, {
  18779. "label": "文圣区",
  18780. "value": "211003"
  18781. }, {
  18782. "label": "宏伟区",
  18783. "value": "211004"
  18784. }, {
  18785. "label": "弓长岭区",
  18786. "value": "211005"
  18787. }, {
  18788. "label": "太子河区",
  18789. "value": "211011"
  18790. }, {
  18791. "label": "辽阳县",
  18792. "value": "211021"
  18793. }, {
  18794. "label": "灯塔市",
  18795. "value": "211081"
  18796. }], [{
  18797. "label": "双台子区",
  18798. "value": "211102"
  18799. }, {
  18800. "label": "兴隆台区",
  18801. "value": "211103"
  18802. }, {
  18803. "label": "大洼区",
  18804. "value": "211104"
  18805. }, {
  18806. "label": "盘山县",
  18807. "value": "211122"
  18808. }], [{
  18809. "label": "银州区",
  18810. "value": "211202"
  18811. }, {
  18812. "label": "清河区",
  18813. "value": "211204"
  18814. }, {
  18815. "label": "铁岭县",
  18816. "value": "211221"
  18817. }, {
  18818. "label": "西丰县",
  18819. "value": "211223"
  18820. }, {
  18821. "label": "昌图县",
  18822. "value": "211224"
  18823. }, {
  18824. "label": "调兵山市",
  18825. "value": "211281"
  18826. }, {
  18827. "label": "开原市",
  18828. "value": "211282"
  18829. }], [{
  18830. "label": "双塔区",
  18831. "value": "211302"
  18832. }, {
  18833. "label": "龙城区",
  18834. "value": "211303"
  18835. }, {
  18836. "label": "朝阳县",
  18837. "value": "211321"
  18838. }, {
  18839. "label": "建平县",
  18840. "value": "211322"
  18841. }, {
  18842. "label": "喀喇沁左翼蒙古族自治县",
  18843. "value": "211324"
  18844. }, {
  18845. "label": "北票市",
  18846. "value": "211381"
  18847. }, {
  18848. "label": "凌源市",
  18849. "value": "211382"
  18850. }], [{
  18851. "label": "连山区",
  18852. "value": "211402"
  18853. }, {
  18854. "label": "龙港区",
  18855. "value": "211403"
  18856. }, {
  18857. "label": "南票区",
  18858. "value": "211404"
  18859. }, {
  18860. "label": "绥中县",
  18861. "value": "211421"
  18862. }, {
  18863. "label": "建昌县",
  18864. "value": "211422"
  18865. }, {
  18866. "label": "兴城市",
  18867. "value": "211481"
  18868. }]], [[{
  18869. "label": "南关区",
  18870. "value": "220102"
  18871. }, {
  18872. "label": "宽城区",
  18873. "value": "220103"
  18874. }, {
  18875. "label": "朝阳区",
  18876. "value": "220104"
  18877. }, {
  18878. "label": "二道区",
  18879. "value": "220105"
  18880. }, {
  18881. "label": "绿园区",
  18882. "value": "220106"
  18883. }, {
  18884. "label": "双阳区",
  18885. "value": "220112"
  18886. }, {
  18887. "label": "九台区",
  18888. "value": "220113"
  18889. }, {
  18890. "label": "农安县",
  18891. "value": "220122"
  18892. }, {
  18893. "label": "长春经济技术开发区",
  18894. "value": "220171"
  18895. }, {
  18896. "label": "长春净月高新技术产业开发区",
  18897. "value": "220172"
  18898. }, {
  18899. "label": "长春高新技术产业开发区",
  18900. "value": "220173"
  18901. }, {
  18902. "label": "长春汽车经济技术开发区",
  18903. "value": "220174"
  18904. }, {
  18905. "label": "榆树市",
  18906. "value": "220182"
  18907. }, {
  18908. "label": "德惠市",
  18909. "value": "220183"
  18910. }], [{
  18911. "label": "昌邑区",
  18912. "value": "220202"
  18913. }, {
  18914. "label": "龙潭区",
  18915. "value": "220203"
  18916. }, {
  18917. "label": "船营区",
  18918. "value": "220204"
  18919. }, {
  18920. "label": "丰满区",
  18921. "value": "220211"
  18922. }, {
  18923. "label": "永吉县",
  18924. "value": "220221"
  18925. }, {
  18926. "label": "吉林经济开发区",
  18927. "value": "220271"
  18928. }, {
  18929. "label": "吉林高新技术产业开发区",
  18930. "value": "220272"
  18931. }, {
  18932. "label": "吉林中国新加坡食品区",
  18933. "value": "220273"
  18934. }, {
  18935. "label": "蛟河市",
  18936. "value": "220281"
  18937. }, {
  18938. "label": "桦甸市",
  18939. "value": "220282"
  18940. }, {
  18941. "label": "舒兰市",
  18942. "value": "220283"
  18943. }, {
  18944. "label": "磐石市",
  18945. "value": "220284"
  18946. }], [{
  18947. "label": "铁西区",
  18948. "value": "220302"
  18949. }, {
  18950. "label": "铁东区",
  18951. "value": "220303"
  18952. }, {
  18953. "label": "梨树县",
  18954. "value": "220322"
  18955. }, {
  18956. "label": "伊通满族自治县",
  18957. "value": "220323"
  18958. }, {
  18959. "label": "公主岭市",
  18960. "value": "220381"
  18961. }, {
  18962. "label": "双辽市",
  18963. "value": "220382"
  18964. }], [{
  18965. "label": "龙山区",
  18966. "value": "220402"
  18967. }, {
  18968. "label": "西安区",
  18969. "value": "220403"
  18970. }, {
  18971. "label": "东丰县",
  18972. "value": "220421"
  18973. }, {
  18974. "label": "东辽县",
  18975. "value": "220422"
  18976. }], [{
  18977. "label": "东昌区",
  18978. "value": "220502"
  18979. }, {
  18980. "label": "二道江区",
  18981. "value": "220503"
  18982. }, {
  18983. "label": "通化县",
  18984. "value": "220521"
  18985. }, {
  18986. "label": "辉南县",
  18987. "value": "220523"
  18988. }, {
  18989. "label": "柳河县",
  18990. "value": "220524"
  18991. }, {
  18992. "label": "梅河口市",
  18993. "value": "220581"
  18994. }, {
  18995. "label": "集安市",
  18996. "value": "220582"
  18997. }], [{
  18998. "label": "浑江区",
  18999. "value": "220602"
  19000. }, {
  19001. "label": "江源区",
  19002. "value": "220605"
  19003. }, {
  19004. "label": "抚松县",
  19005. "value": "220621"
  19006. }, {
  19007. "label": "靖宇县",
  19008. "value": "220622"
  19009. }, {
  19010. "label": "长白朝鲜族自治县",
  19011. "value": "220623"
  19012. }, {
  19013. "label": "临江市",
  19014. "value": "220681"
  19015. }], [{
  19016. "label": "宁江区",
  19017. "value": "220702"
  19018. }, {
  19019. "label": "前郭尔罗斯蒙古族自治县",
  19020. "value": "220721"
  19021. }, {
  19022. "label": "长岭县",
  19023. "value": "220722"
  19024. }, {
  19025. "label": "乾安县",
  19026. "value": "220723"
  19027. }, {
  19028. "label": "吉林松原经济开发区",
  19029. "value": "220771"
  19030. }, {
  19031. "label": "扶余市",
  19032. "value": "220781"
  19033. }], [{
  19034. "label": "洮北区",
  19035. "value": "220802"
  19036. }, {
  19037. "label": "镇赉县",
  19038. "value": "220821"
  19039. }, {
  19040. "label": "通榆县",
  19041. "value": "220822"
  19042. }, {
  19043. "label": "吉林白城经济开发区",
  19044. "value": "220871"
  19045. }, {
  19046. "label": "洮南市",
  19047. "value": "220881"
  19048. }, {
  19049. "label": "大安市",
  19050. "value": "220882"
  19051. }], [{
  19052. "label": "延吉市",
  19053. "value": "222401"
  19054. }, {
  19055. "label": "图们市",
  19056. "value": "222402"
  19057. }, {
  19058. "label": "敦化市",
  19059. "value": "222403"
  19060. }, {
  19061. "label": "珲春市",
  19062. "value": "222404"
  19063. }, {
  19064. "label": "龙井市",
  19065. "value": "222405"
  19066. }, {
  19067. "label": "和龙市",
  19068. "value": "222406"
  19069. }, {
  19070. "label": "汪清县",
  19071. "value": "222424"
  19072. }, {
  19073. "label": "安图县",
  19074. "value": "222426"
  19075. }]], [[{
  19076. "label": "道里区",
  19077. "value": "230102"
  19078. }, {
  19079. "label": "南岗区",
  19080. "value": "230103"
  19081. }, {
  19082. "label": "道外区",
  19083. "value": "230104"
  19084. }, {
  19085. "label": "平房区",
  19086. "value": "230108"
  19087. }, {
  19088. "label": "松北区",
  19089. "value": "230109"
  19090. }, {
  19091. "label": "香坊区",
  19092. "value": "230110"
  19093. }, {
  19094. "label": "呼兰区",
  19095. "value": "230111"
  19096. }, {
  19097. "label": "阿城区",
  19098. "value": "230112"
  19099. }, {
  19100. "label": "双城区",
  19101. "value": "230113"
  19102. }, {
  19103. "label": "依兰县",
  19104. "value": "230123"
  19105. }, {
  19106. "label": "方正县",
  19107. "value": "230124"
  19108. }, {
  19109. "label": "宾县",
  19110. "value": "230125"
  19111. }, {
  19112. "label": "巴彦县",
  19113. "value": "230126"
  19114. }, {
  19115. "label": "木兰县",
  19116. "value": "230127"
  19117. }, {
  19118. "label": "通河县",
  19119. "value": "230128"
  19120. }, {
  19121. "label": "延寿县",
  19122. "value": "230129"
  19123. }, {
  19124. "label": "尚志市",
  19125. "value": "230183"
  19126. }, {
  19127. "label": "五常市",
  19128. "value": "230184"
  19129. }], [{
  19130. "label": "龙沙区",
  19131. "value": "230202"
  19132. }, {
  19133. "label": "建华区",
  19134. "value": "230203"
  19135. }, {
  19136. "label": "铁锋区",
  19137. "value": "230204"
  19138. }, {
  19139. "label": "昂昂溪区",
  19140. "value": "230205"
  19141. }, {
  19142. "label": "富拉尔基区",
  19143. "value": "230206"
  19144. }, {
  19145. "label": "碾子山区",
  19146. "value": "230207"
  19147. }, {
  19148. "label": "梅里斯达斡尔族区",
  19149. "value": "230208"
  19150. }, {
  19151. "label": "龙江县",
  19152. "value": "230221"
  19153. }, {
  19154. "label": "依安县",
  19155. "value": "230223"
  19156. }, {
  19157. "label": "泰来县",
  19158. "value": "230224"
  19159. }, {
  19160. "label": "甘南县",
  19161. "value": "230225"
  19162. }, {
  19163. "label": "富裕县",
  19164. "value": "230227"
  19165. }, {
  19166. "label": "克山县",
  19167. "value": "230229"
  19168. }, {
  19169. "label": "克东县",
  19170. "value": "230230"
  19171. }, {
  19172. "label": "拜泉县",
  19173. "value": "230231"
  19174. }, {
  19175. "label": "讷河市",
  19176. "value": "230281"
  19177. }], [{
  19178. "label": "鸡冠区",
  19179. "value": "230302"
  19180. }, {
  19181. "label": "恒山区",
  19182. "value": "230303"
  19183. }, {
  19184. "label": "滴道区",
  19185. "value": "230304"
  19186. }, {
  19187. "label": "梨树区",
  19188. "value": "230305"
  19189. }, {
  19190. "label": "城子河区",
  19191. "value": "230306"
  19192. }, {
  19193. "label": "麻山区",
  19194. "value": "230307"
  19195. }, {
  19196. "label": "鸡东县",
  19197. "value": "230321"
  19198. }, {
  19199. "label": "虎林市",
  19200. "value": "230381"
  19201. }, {
  19202. "label": "密山市",
  19203. "value": "230382"
  19204. }], [{
  19205. "label": "向阳区",
  19206. "value": "230402"
  19207. }, {
  19208. "label": "工农区",
  19209. "value": "230403"
  19210. }, {
  19211. "label": "南山区",
  19212. "value": "230404"
  19213. }, {
  19214. "label": "兴安区",
  19215. "value": "230405"
  19216. }, {
  19217. "label": "东山区",
  19218. "value": "230406"
  19219. }, {
  19220. "label": "兴山区",
  19221. "value": "230407"
  19222. }, {
  19223. "label": "萝北县",
  19224. "value": "230421"
  19225. }, {
  19226. "label": "绥滨县",
  19227. "value": "230422"
  19228. }], [{
  19229. "label": "尖山区",
  19230. "value": "230502"
  19231. }, {
  19232. "label": "岭东区",
  19233. "value": "230503"
  19234. }, {
  19235. "label": "四方台区",
  19236. "value": "230505"
  19237. }, {
  19238. "label": "宝山区",
  19239. "value": "230506"
  19240. }, {
  19241. "label": "集贤县",
  19242. "value": "230521"
  19243. }, {
  19244. "label": "友谊县",
  19245. "value": "230522"
  19246. }, {
  19247. "label": "宝清县",
  19248. "value": "230523"
  19249. }, {
  19250. "label": "饶河县",
  19251. "value": "230524"
  19252. }], [{
  19253. "label": "萨尔图区",
  19254. "value": "230602"
  19255. }, {
  19256. "label": "龙凤区",
  19257. "value": "230603"
  19258. }, {
  19259. "label": "让胡路区",
  19260. "value": "230604"
  19261. }, {
  19262. "label": "红岗区",
  19263. "value": "230605"
  19264. }, {
  19265. "label": "大同区",
  19266. "value": "230606"
  19267. }, {
  19268. "label": "肇州县",
  19269. "value": "230621"
  19270. }, {
  19271. "label": "肇源县",
  19272. "value": "230622"
  19273. }, {
  19274. "label": "林甸县",
  19275. "value": "230623"
  19276. }, {
  19277. "label": "杜尔伯特蒙古族自治县",
  19278. "value": "230624"
  19279. }, {
  19280. "label": "大庆高新技术产业开发区",
  19281. "value": "230671"
  19282. }], [{
  19283. "label": "伊春区",
  19284. "value": "230702"
  19285. }, {
  19286. "label": "南岔区",
  19287. "value": "230703"
  19288. }, {
  19289. "label": "友好区",
  19290. "value": "230704"
  19291. }, {
  19292. "label": "西林区",
  19293. "value": "230705"
  19294. }, {
  19295. "label": "翠峦区",
  19296. "value": "230706"
  19297. }, {
  19298. "label": "新青区",
  19299. "value": "230707"
  19300. }, {
  19301. "label": "美溪区",
  19302. "value": "230708"
  19303. }, {
  19304. "label": "金山屯区",
  19305. "value": "230709"
  19306. }, {
  19307. "label": "五营区",
  19308. "value": "230710"
  19309. }, {
  19310. "label": "乌马河区",
  19311. "value": "230711"
  19312. }, {
  19313. "label": "汤旺河区",
  19314. "value": "230712"
  19315. }, {
  19316. "label": "带岭区",
  19317. "value": "230713"
  19318. }, {
  19319. "label": "乌伊岭区",
  19320. "value": "230714"
  19321. }, {
  19322. "label": "红星区",
  19323. "value": "230715"
  19324. }, {
  19325. "label": "上甘岭区",
  19326. "value": "230716"
  19327. }, {
  19328. "label": "嘉荫县",
  19329. "value": "230722"
  19330. }, {
  19331. "label": "铁力市",
  19332. "value": "230781"
  19333. }], [{
  19334. "label": "向阳区",
  19335. "value": "230803"
  19336. }, {
  19337. "label": "前进区",
  19338. "value": "230804"
  19339. }, {
  19340. "label": "东风区",
  19341. "value": "230805"
  19342. }, {
  19343. "label": "郊区",
  19344. "value": "230811"
  19345. }, {
  19346. "label": "桦南县",
  19347. "value": "230822"
  19348. }, {
  19349. "label": "桦川县",
  19350. "value": "230826"
  19351. }, {
  19352. "label": "汤原县",
  19353. "value": "230828"
  19354. }, {
  19355. "label": "同江市",
  19356. "value": "230881"
  19357. }, {
  19358. "label": "富锦市",
  19359. "value": "230882"
  19360. }, {
  19361. "label": "抚远市",
  19362. "value": "230883"
  19363. }], [{
  19364. "label": "新兴区",
  19365. "value": "230902"
  19366. }, {
  19367. "label": "桃山区",
  19368. "value": "230903"
  19369. }, {
  19370. "label": "茄子河区",
  19371. "value": "230904"
  19372. }, {
  19373. "label": "勃利县",
  19374. "value": "230921"
  19375. }], [{
  19376. "label": "东安区",
  19377. "value": "231002"
  19378. }, {
  19379. "label": "阳明区",
  19380. "value": "231003"
  19381. }, {
  19382. "label": "爱民区",
  19383. "value": "231004"
  19384. }, {
  19385. "label": "西安区",
  19386. "value": "231005"
  19387. }, {
  19388. "label": "林口县",
  19389. "value": "231025"
  19390. }, {
  19391. "label": "牡丹江经济技术开发区",
  19392. "value": "231071"
  19393. }, {
  19394. "label": "绥芬河市",
  19395. "value": "231081"
  19396. }, {
  19397. "label": "海林市",
  19398. "value": "231083"
  19399. }, {
  19400. "label": "宁安市",
  19401. "value": "231084"
  19402. }, {
  19403. "label": "穆棱市",
  19404. "value": "231085"
  19405. }, {
  19406. "label": "东宁市",
  19407. "value": "231086"
  19408. }], [{
  19409. "label": "爱辉区",
  19410. "value": "231102"
  19411. }, {
  19412. "label": "嫩江县",
  19413. "value": "231121"
  19414. }, {
  19415. "label": "逊克县",
  19416. "value": "231123"
  19417. }, {
  19418. "label": "孙吴县",
  19419. "value": "231124"
  19420. }, {
  19421. "label": "北安市",
  19422. "value": "231181"
  19423. }, {
  19424. "label": "五大连池市",
  19425. "value": "231182"
  19426. }], [{
  19427. "label": "北林区",
  19428. "value": "231202"
  19429. }, {
  19430. "label": "望奎县",
  19431. "value": "231221"
  19432. }, {
  19433. "label": "兰西县",
  19434. "value": "231222"
  19435. }, {
  19436. "label": "青冈县",
  19437. "value": "231223"
  19438. }, {
  19439. "label": "庆安县",
  19440. "value": "231224"
  19441. }, {
  19442. "label": "明水县",
  19443. "value": "231225"
  19444. }, {
  19445. "label": "绥棱县",
  19446. "value": "231226"
  19447. }, {
  19448. "label": "安达市",
  19449. "value": "231281"
  19450. }, {
  19451. "label": "肇东市",
  19452. "value": "231282"
  19453. }, {
  19454. "label": "海伦市",
  19455. "value": "231283"
  19456. }], [{
  19457. "label": "加格达奇区",
  19458. "value": "232701"
  19459. }, {
  19460. "label": "松岭区",
  19461. "value": "232702"
  19462. }, {
  19463. "label": "新林区",
  19464. "value": "232703"
  19465. }, {
  19466. "label": "呼中区",
  19467. "value": "232704"
  19468. }, {
  19469. "label": "呼玛县",
  19470. "value": "232721"
  19471. }, {
  19472. "label": "塔河县",
  19473. "value": "232722"
  19474. }, {
  19475. "label": "漠河县",
  19476. "value": "232723"
  19477. }]], [[{
  19478. "label": "黄浦区",
  19479. "value": "310101"
  19480. }, {
  19481. "label": "徐汇区",
  19482. "value": "310104"
  19483. }, {
  19484. "label": "长宁区",
  19485. "value": "310105"
  19486. }, {
  19487. "label": "静安区",
  19488. "value": "310106"
  19489. }, {
  19490. "label": "普陀区",
  19491. "value": "310107"
  19492. }, {
  19493. "label": "虹口区",
  19494. "value": "310109"
  19495. }, {
  19496. "label": "杨浦区",
  19497. "value": "310110"
  19498. }, {
  19499. "label": "闵行区",
  19500. "value": "310112"
  19501. }, {
  19502. "label": "宝山区",
  19503. "value": "310113"
  19504. }, {
  19505. "label": "嘉定区",
  19506. "value": "310114"
  19507. }, {
  19508. "label": "浦东新区",
  19509. "value": "310115"
  19510. }, {
  19511. "label": "金山区",
  19512. "value": "310116"
  19513. }, {
  19514. "label": "松江区",
  19515. "value": "310117"
  19516. }, {
  19517. "label": "青浦区",
  19518. "value": "310118"
  19519. }, {
  19520. "label": "奉贤区",
  19521. "value": "310120"
  19522. }, {
  19523. "label": "崇明区",
  19524. "value": "310151"
  19525. }]], [[{
  19526. "label": "玄武区",
  19527. "value": "320102"
  19528. }, {
  19529. "label": "秦淮区",
  19530. "value": "320104"
  19531. }, {
  19532. "label": "建邺区",
  19533. "value": "320105"
  19534. }, {
  19535. "label": "鼓楼区",
  19536. "value": "320106"
  19537. }, {
  19538. "label": "浦口区",
  19539. "value": "320111"
  19540. }, {
  19541. "label": "栖霞区",
  19542. "value": "320113"
  19543. }, {
  19544. "label": "雨花台区",
  19545. "value": "320114"
  19546. }, {
  19547. "label": "江宁区",
  19548. "value": "320115"
  19549. }, {
  19550. "label": "六合区",
  19551. "value": "320116"
  19552. }, {
  19553. "label": "溧水区",
  19554. "value": "320117"
  19555. }, {
  19556. "label": "高淳区",
  19557. "value": "320118"
  19558. }], [{
  19559. "label": "锡山区",
  19560. "value": "320205"
  19561. }, {
  19562. "label": "惠山区",
  19563. "value": "320206"
  19564. }, {
  19565. "label": "滨湖区",
  19566. "value": "320211"
  19567. }, {
  19568. "label": "梁溪区",
  19569. "value": "320213"
  19570. }, {
  19571. "label": "新吴区",
  19572. "value": "320214"
  19573. }, {
  19574. "label": "江阴市",
  19575. "value": "320281"
  19576. }, {
  19577. "label": "宜兴市",
  19578. "value": "320282"
  19579. }], [{
  19580. "label": "鼓楼区",
  19581. "value": "320302"
  19582. }, {
  19583. "label": "云龙区",
  19584. "value": "320303"
  19585. }, {
  19586. "label": "贾汪区",
  19587. "value": "320305"
  19588. }, {
  19589. "label": "泉山区",
  19590. "value": "320311"
  19591. }, {
  19592. "label": "铜山区",
  19593. "value": "320312"
  19594. }, {
  19595. "label": "丰县",
  19596. "value": "320321"
  19597. }, {
  19598. "label": "沛县",
  19599. "value": "320322"
  19600. }, {
  19601. "label": "睢宁县",
  19602. "value": "320324"
  19603. }, {
  19604. "label": "徐州经济技术开发区",
  19605. "value": "320371"
  19606. }, {
  19607. "label": "新沂市",
  19608. "value": "320381"
  19609. }, {
  19610. "label": "邳州市",
  19611. "value": "320382"
  19612. }], [{
  19613. "label": "天宁区",
  19614. "value": "320402"
  19615. }, {
  19616. "label": "钟楼区",
  19617. "value": "320404"
  19618. }, {
  19619. "label": "新北区",
  19620. "value": "320411"
  19621. }, {
  19622. "label": "武进区",
  19623. "value": "320412"
  19624. }, {
  19625. "label": "金坛区",
  19626. "value": "320413"
  19627. }, {
  19628. "label": "溧阳市",
  19629. "value": "320481"
  19630. }], [{
  19631. "label": "虎丘区",
  19632. "value": "320505"
  19633. }, {
  19634. "label": "吴中区",
  19635. "value": "320506"
  19636. }, {
  19637. "label": "相城区",
  19638. "value": "320507"
  19639. }, {
  19640. "label": "姑苏区",
  19641. "value": "320508"
  19642. }, {
  19643. "label": "吴江区",
  19644. "value": "320509"
  19645. }, {
  19646. "label": "苏州工业园区",
  19647. "value": "320571"
  19648. }, {
  19649. "label": "常熟市",
  19650. "value": "320581"
  19651. }, {
  19652. "label": "张家港市",
  19653. "value": "320582"
  19654. }, {
  19655. "label": "昆山市",
  19656. "value": "320583"
  19657. }, {
  19658. "label": "太仓市",
  19659. "value": "320585"
  19660. }], [{
  19661. "label": "崇川区",
  19662. "value": "320602"
  19663. }, {
  19664. "label": "港闸区",
  19665. "value": "320611"
  19666. }, {
  19667. "label": "通州区",
  19668. "value": "320612"
  19669. }, {
  19670. "label": "海安县",
  19671. "value": "320621"
  19672. }, {
  19673. "label": "如东县",
  19674. "value": "320623"
  19675. }, {
  19676. "label": "南通经济技术开发区",
  19677. "value": "320671"
  19678. }, {
  19679. "label": "启东市",
  19680. "value": "320681"
  19681. }, {
  19682. "label": "如皋市",
  19683. "value": "320682"
  19684. }, {
  19685. "label": "海门市",
  19686. "value": "320684"
  19687. }], [{
  19688. "label": "连云区",
  19689. "value": "320703"
  19690. }, {
  19691. "label": "海州区",
  19692. "value": "320706"
  19693. }, {
  19694. "label": "赣榆区",
  19695. "value": "320707"
  19696. }, {
  19697. "label": "东海县",
  19698. "value": "320722"
  19699. }, {
  19700. "label": "灌云县",
  19701. "value": "320723"
  19702. }, {
  19703. "label": "灌南县",
  19704. "value": "320724"
  19705. }, {
  19706. "label": "连云港经济技术开发区",
  19707. "value": "320771"
  19708. }, {
  19709. "label": "连云港高新技术产业开发区",
  19710. "value": "320772"
  19711. }], [{
  19712. "label": "淮安区",
  19713. "value": "320803"
  19714. }, {
  19715. "label": "淮阴区",
  19716. "value": "320804"
  19717. }, {
  19718. "label": "清江浦区",
  19719. "value": "320812"
  19720. }, {
  19721. "label": "洪泽区",
  19722. "value": "320813"
  19723. }, {
  19724. "label": "涟水县",
  19725. "value": "320826"
  19726. }, {
  19727. "label": "盱眙县",
  19728. "value": "320830"
  19729. }, {
  19730. "label": "金湖县",
  19731. "value": "320831"
  19732. }, {
  19733. "label": "淮安经济技术开发区",
  19734. "value": "320871"
  19735. }], [{
  19736. "label": "亭湖区",
  19737. "value": "320902"
  19738. }, {
  19739. "label": "盐都区",
  19740. "value": "320903"
  19741. }, {
  19742. "label": "大丰区",
  19743. "value": "320904"
  19744. }, {
  19745. "label": "响水县",
  19746. "value": "320921"
  19747. }, {
  19748. "label": "滨海县",
  19749. "value": "320922"
  19750. }, {
  19751. "label": "阜宁县",
  19752. "value": "320923"
  19753. }, {
  19754. "label": "射阳县",
  19755. "value": "320924"
  19756. }, {
  19757. "label": "建湖县",
  19758. "value": "320925"
  19759. }, {
  19760. "label": "盐城经济技术开发区",
  19761. "value": "320971"
  19762. }, {
  19763. "label": "东台市",
  19764. "value": "320981"
  19765. }], [{
  19766. "label": "广陵区",
  19767. "value": "321002"
  19768. }, {
  19769. "label": "邗江区",
  19770. "value": "321003"
  19771. }, {
  19772. "label": "江都区",
  19773. "value": "321012"
  19774. }, {
  19775. "label": "宝应县",
  19776. "value": "321023"
  19777. }, {
  19778. "label": "扬州经济技术开发区",
  19779. "value": "321071"
  19780. }, {
  19781. "label": "仪征市",
  19782. "value": "321081"
  19783. }, {
  19784. "label": "高邮市",
  19785. "value": "321084"
  19786. }], [{
  19787. "label": "京口区",
  19788. "value": "321102"
  19789. }, {
  19790. "label": "润州区",
  19791. "value": "321111"
  19792. }, {
  19793. "label": "丹徒区",
  19794. "value": "321112"
  19795. }, {
  19796. "label": "镇江新区",
  19797. "value": "321171"
  19798. }, {
  19799. "label": "丹阳市",
  19800. "value": "321181"
  19801. }, {
  19802. "label": "扬中市",
  19803. "value": "321182"
  19804. }, {
  19805. "label": "句容市",
  19806. "value": "321183"
  19807. }], [{
  19808. "label": "海陵区",
  19809. "value": "321202"
  19810. }, {
  19811. "label": "高港区",
  19812. "value": "321203"
  19813. }, {
  19814. "label": "姜堰区",
  19815. "value": "321204"
  19816. }, {
  19817. "label": "泰州医药高新技术产业开发区",
  19818. "value": "321271"
  19819. }, {
  19820. "label": "兴化市",
  19821. "value": "321281"
  19822. }, {
  19823. "label": "靖江市",
  19824. "value": "321282"
  19825. }, {
  19826. "label": "泰兴市",
  19827. "value": "321283"
  19828. }], [{
  19829. "label": "宿城区",
  19830. "value": "321302"
  19831. }, {
  19832. "label": "宿豫区",
  19833. "value": "321311"
  19834. }, {
  19835. "label": "沭阳县",
  19836. "value": "321322"
  19837. }, {
  19838. "label": "泗阳县",
  19839. "value": "321323"
  19840. }, {
  19841. "label": "泗洪县",
  19842. "value": "321324"
  19843. }, {
  19844. "label": "宿迁经济技术开发区",
  19845. "value": "321371"
  19846. }]], [[{
  19847. "label": "上城区",
  19848. "value": "330102"
  19849. }, {
  19850. "label": "下城区",
  19851. "value": "330103"
  19852. }, {
  19853. "label": "江干区",
  19854. "value": "330104"
  19855. }, {
  19856. "label": "拱墅区",
  19857. "value": "330105"
  19858. }, {
  19859. "label": "西湖区",
  19860. "value": "330106"
  19861. }, {
  19862. "label": "滨江区",
  19863. "value": "330108"
  19864. }, {
  19865. "label": "萧山区",
  19866. "value": "330109"
  19867. }, {
  19868. "label": "余杭区",
  19869. "value": "330110"
  19870. }, {
  19871. "label": "富阳区",
  19872. "value": "330111"
  19873. }, {
  19874. "label": "临安区",
  19875. "value": "330112"
  19876. }, {
  19877. "label": "桐庐县",
  19878. "value": "330122"
  19879. }, {
  19880. "label": "淳安县",
  19881. "value": "330127"
  19882. }, {
  19883. "label": "建德市",
  19884. "value": "330182"
  19885. }], [{
  19886. "label": "海曙区",
  19887. "value": "330203"
  19888. }, {
  19889. "label": "江北区",
  19890. "value": "330205"
  19891. }, {
  19892. "label": "北仑区",
  19893. "value": "330206"
  19894. }, {
  19895. "label": "镇海区",
  19896. "value": "330211"
  19897. }, {
  19898. "label": "鄞州区",
  19899. "value": "330212"
  19900. }, {
  19901. "label": "奉化区",
  19902. "value": "330213"
  19903. }, {
  19904. "label": "象山县",
  19905. "value": "330225"
  19906. }, {
  19907. "label": "宁海县",
  19908. "value": "330226"
  19909. }, {
  19910. "label": "余姚市",
  19911. "value": "330281"
  19912. }, {
  19913. "label": "慈溪市",
  19914. "value": "330282"
  19915. }], [{
  19916. "label": "鹿城区",
  19917. "value": "330302"
  19918. }, {
  19919. "label": "龙湾区",
  19920. "value": "330303"
  19921. }, {
  19922. "label": "瓯海区",
  19923. "value": "330304"
  19924. }, {
  19925. "label": "洞头区",
  19926. "value": "330305"
  19927. }, {
  19928. "label": "永嘉县",
  19929. "value": "330324"
  19930. }, {
  19931. "label": "平阳县",
  19932. "value": "330326"
  19933. }, {
  19934. "label": "苍南县",
  19935. "value": "330327"
  19936. }, {
  19937. "label": "文成县",
  19938. "value": "330328"
  19939. }, {
  19940. "label": "泰顺县",
  19941. "value": "330329"
  19942. }, {
  19943. "label": "温州经济技术开发区",
  19944. "value": "330371"
  19945. }, {
  19946. "label": "瑞安市",
  19947. "value": "330381"
  19948. }, {
  19949. "label": "乐清市",
  19950. "value": "330382"
  19951. }], [{
  19952. "label": "南湖区",
  19953. "value": "330402"
  19954. }, {
  19955. "label": "秀洲区",
  19956. "value": "330411"
  19957. }, {
  19958. "label": "嘉善县",
  19959. "value": "330421"
  19960. }, {
  19961. "label": "海盐县",
  19962. "value": "330424"
  19963. }, {
  19964. "label": "海宁市",
  19965. "value": "330481"
  19966. }, {
  19967. "label": "平湖市",
  19968. "value": "330482"
  19969. }, {
  19970. "label": "桐乡市",
  19971. "value": "330483"
  19972. }], [{
  19973. "label": "吴兴区",
  19974. "value": "330502"
  19975. }, {
  19976. "label": "南浔区",
  19977. "value": "330503"
  19978. }, {
  19979. "label": "德清县",
  19980. "value": "330521"
  19981. }, {
  19982. "label": "长兴县",
  19983. "value": "330522"
  19984. }, {
  19985. "label": "安吉县",
  19986. "value": "330523"
  19987. }], [{
  19988. "label": "越城区",
  19989. "value": "330602"
  19990. }, {
  19991. "label": "柯桥区",
  19992. "value": "330603"
  19993. }, {
  19994. "label": "上虞区",
  19995. "value": "330604"
  19996. }, {
  19997. "label": "新昌县",
  19998. "value": "330624"
  19999. }, {
  20000. "label": "诸暨市",
  20001. "value": "330681"
  20002. }, {
  20003. "label": "嵊州市",
  20004. "value": "330683"
  20005. }], [{
  20006. "label": "婺城区",
  20007. "value": "330702"
  20008. }, {
  20009. "label": "金东区",
  20010. "value": "330703"
  20011. }, {
  20012. "label": "武义县",
  20013. "value": "330723"
  20014. }, {
  20015. "label": "浦江县",
  20016. "value": "330726"
  20017. }, {
  20018. "label": "磐安县",
  20019. "value": "330727"
  20020. }, {
  20021. "label": "兰溪市",
  20022. "value": "330781"
  20023. }, {
  20024. "label": "义乌市",
  20025. "value": "330782"
  20026. }, {
  20027. "label": "东阳市",
  20028. "value": "330783"
  20029. }, {
  20030. "label": "永康市",
  20031. "value": "330784"
  20032. }], [{
  20033. "label": "柯城区",
  20034. "value": "330802"
  20035. }, {
  20036. "label": "衢江区",
  20037. "value": "330803"
  20038. }, {
  20039. "label": "常山县",
  20040. "value": "330822"
  20041. }, {
  20042. "label": "开化县",
  20043. "value": "330824"
  20044. }, {
  20045. "label": "龙游县",
  20046. "value": "330825"
  20047. }, {
  20048. "label": "江山市",
  20049. "value": "330881"
  20050. }], [{
  20051. "label": "定海区",
  20052. "value": "330902"
  20053. }, {
  20054. "label": "普陀区",
  20055. "value": "330903"
  20056. }, {
  20057. "label": "岱山县",
  20058. "value": "330921"
  20059. }, {
  20060. "label": "嵊泗县",
  20061. "value": "330922"
  20062. }], [{
  20063. "label": "椒江区",
  20064. "value": "331002"
  20065. }, {
  20066. "label": "黄岩区",
  20067. "value": "331003"
  20068. }, {
  20069. "label": "路桥区",
  20070. "value": "331004"
  20071. }, {
  20072. "label": "三门县",
  20073. "value": "331022"
  20074. }, {
  20075. "label": "天台县",
  20076. "value": "331023"
  20077. }, {
  20078. "label": "仙居县",
  20079. "value": "331024"
  20080. }, {
  20081. "label": "温岭市",
  20082. "value": "331081"
  20083. }, {
  20084. "label": "临海市",
  20085. "value": "331082"
  20086. }, {
  20087. "label": "玉环市",
  20088. "value": "331083"
  20089. }], [{
  20090. "label": "莲都区",
  20091. "value": "331102"
  20092. }, {
  20093. "label": "青田县",
  20094. "value": "331121"
  20095. }, {
  20096. "label": "缙云县",
  20097. "value": "331122"
  20098. }, {
  20099. "label": "遂昌县",
  20100. "value": "331123"
  20101. }, {
  20102. "label": "松阳县",
  20103. "value": "331124"
  20104. }, {
  20105. "label": "云和县",
  20106. "value": "331125"
  20107. }, {
  20108. "label": "庆元县",
  20109. "value": "331126"
  20110. }, {
  20111. "label": "景宁畲族自治县",
  20112. "value": "331127"
  20113. }, {
  20114. "label": "龙泉市",
  20115. "value": "331181"
  20116. }]], [[{
  20117. "label": "瑶海区",
  20118. "value": "340102"
  20119. }, {
  20120. "label": "庐阳区",
  20121. "value": "340103"
  20122. }, {
  20123. "label": "蜀山区",
  20124. "value": "340104"
  20125. }, {
  20126. "label": "包河区",
  20127. "value": "340111"
  20128. }, {
  20129. "label": "长丰县",
  20130. "value": "340121"
  20131. }, {
  20132. "label": "肥东县",
  20133. "value": "340122"
  20134. }, {
  20135. "label": "肥西县",
  20136. "value": "340123"
  20137. }, {
  20138. "label": "庐江县",
  20139. "value": "340124"
  20140. }, {
  20141. "label": "合肥高新技术产业开发区",
  20142. "value": "340171"
  20143. }, {
  20144. "label": "合肥经济技术开发区",
  20145. "value": "340172"
  20146. }, {
  20147. "label": "合肥新站高新技术产业开发区",
  20148. "value": "340173"
  20149. }, {
  20150. "label": "巢湖市",
  20151. "value": "340181"
  20152. }], [{
  20153. "label": "镜湖区",
  20154. "value": "340202"
  20155. }, {
  20156. "label": "弋江区",
  20157. "value": "340203"
  20158. }, {
  20159. "label": "鸠江区",
  20160. "value": "340207"
  20161. }, {
  20162. "label": "三山区",
  20163. "value": "340208"
  20164. }, {
  20165. "label": "芜湖县",
  20166. "value": "340221"
  20167. }, {
  20168. "label": "繁昌县",
  20169. "value": "340222"
  20170. }, {
  20171. "label": "南陵县",
  20172. "value": "340223"
  20173. }, {
  20174. "label": "无为县",
  20175. "value": "340225"
  20176. }, {
  20177. "label": "芜湖经济技术开发区",
  20178. "value": "340271"
  20179. }, {
  20180. "label": "安徽芜湖长江大桥经济开发区",
  20181. "value": "340272"
  20182. }], [{
  20183. "label": "龙子湖区",
  20184. "value": "340302"
  20185. }, {
  20186. "label": "蚌山区",
  20187. "value": "340303"
  20188. }, {
  20189. "label": "禹会区",
  20190. "value": "340304"
  20191. }, {
  20192. "label": "淮上区",
  20193. "value": "340311"
  20194. }, {
  20195. "label": "怀远县",
  20196. "value": "340321"
  20197. }, {
  20198. "label": "五河县",
  20199. "value": "340322"
  20200. }, {
  20201. "label": "固镇县",
  20202. "value": "340323"
  20203. }, {
  20204. "label": "蚌埠市高新技术开发区",
  20205. "value": "340371"
  20206. }, {
  20207. "label": "蚌埠市经济开发区",
  20208. "value": "340372"
  20209. }], [{
  20210. "label": "大通区",
  20211. "value": "340402"
  20212. }, {
  20213. "label": "田家庵区",
  20214. "value": "340403"
  20215. }, {
  20216. "label": "谢家集区",
  20217. "value": "340404"
  20218. }, {
  20219. "label": "八公山区",
  20220. "value": "340405"
  20221. }, {
  20222. "label": "潘集区",
  20223. "value": "340406"
  20224. }, {
  20225. "label": "凤台县",
  20226. "value": "340421"
  20227. }, {
  20228. "label": "寿县",
  20229. "value": "340422"
  20230. }], [{
  20231. "label": "花山区",
  20232. "value": "340503"
  20233. }, {
  20234. "label": "雨山区",
  20235. "value": "340504"
  20236. }, {
  20237. "label": "博望区",
  20238. "value": "340506"
  20239. }, {
  20240. "label": "当涂县",
  20241. "value": "340521"
  20242. }, {
  20243. "label": "含山县",
  20244. "value": "340522"
  20245. }, {
  20246. "label": "和县",
  20247. "value": "340523"
  20248. }], [{
  20249. "label": "杜集区",
  20250. "value": "340602"
  20251. }, {
  20252. "label": "相山区",
  20253. "value": "340603"
  20254. }, {
  20255. "label": "烈山区",
  20256. "value": "340604"
  20257. }, {
  20258. "label": "濉溪县",
  20259. "value": "340621"
  20260. }], [{
  20261. "label": "铜官区",
  20262. "value": "340705"
  20263. }, {
  20264. "label": "义安区",
  20265. "value": "340706"
  20266. }, {
  20267. "label": "郊区",
  20268. "value": "340711"
  20269. }, {
  20270. "label": "枞阳县",
  20271. "value": "340722"
  20272. }], [{
  20273. "label": "迎江区",
  20274. "value": "340802"
  20275. }, {
  20276. "label": "大观区",
  20277. "value": "340803"
  20278. }, {
  20279. "label": "宜秀区",
  20280. "value": "340811"
  20281. }, {
  20282. "label": "怀宁县",
  20283. "value": "340822"
  20284. }, {
  20285. "label": "潜山县",
  20286. "value": "340824"
  20287. }, {
  20288. "label": "太湖县",
  20289. "value": "340825"
  20290. }, {
  20291. "label": "宿松县",
  20292. "value": "340826"
  20293. }, {
  20294. "label": "望江县",
  20295. "value": "340827"
  20296. }, {
  20297. "label": "岳西县",
  20298. "value": "340828"
  20299. }, {
  20300. "label": "安徽安庆经济开发区",
  20301. "value": "340871"
  20302. }, {
  20303. "label": "桐城市",
  20304. "value": "340881"
  20305. }], [{
  20306. "label": "屯溪区",
  20307. "value": "341002"
  20308. }, {
  20309. "label": "黄山区",
  20310. "value": "341003"
  20311. }, {
  20312. "label": "徽州区",
  20313. "value": "341004"
  20314. }, {
  20315. "label": "歙县",
  20316. "value": "341021"
  20317. }, {
  20318. "label": "休宁县",
  20319. "value": "341022"
  20320. }, {
  20321. "label": "黟县",
  20322. "value": "341023"
  20323. }, {
  20324. "label": "祁门县",
  20325. "value": "341024"
  20326. }], [{
  20327. "label": "琅琊区",
  20328. "value": "341102"
  20329. }, {
  20330. "label": "南谯区",
  20331. "value": "341103"
  20332. }, {
  20333. "label": "来安县",
  20334. "value": "341122"
  20335. }, {
  20336. "label": "全椒县",
  20337. "value": "341124"
  20338. }, {
  20339. "label": "定远县",
  20340. "value": "341125"
  20341. }, {
  20342. "label": "凤阳县",
  20343. "value": "341126"
  20344. }, {
  20345. "label": "苏滁现代产业园",
  20346. "value": "341171"
  20347. }, {
  20348. "label": "滁州经济技术开发区",
  20349. "value": "341172"
  20350. }, {
  20351. "label": "天长市",
  20352. "value": "341181"
  20353. }, {
  20354. "label": "明光市",
  20355. "value": "341182"
  20356. }], [{
  20357. "label": "颍州区",
  20358. "value": "341202"
  20359. }, {
  20360. "label": "颍东区",
  20361. "value": "341203"
  20362. }, {
  20363. "label": "颍泉区",
  20364. "value": "341204"
  20365. }, {
  20366. "label": "临泉县",
  20367. "value": "341221"
  20368. }, {
  20369. "label": "太和县",
  20370. "value": "341222"
  20371. }, {
  20372. "label": "阜南县",
  20373. "value": "341225"
  20374. }, {
  20375. "label": "颍上县",
  20376. "value": "341226"
  20377. }, {
  20378. "label": "阜阳合肥现代产业园区",
  20379. "value": "341271"
  20380. }, {
  20381. "label": "阜阳经济技术开发区",
  20382. "value": "341272"
  20383. }, {
  20384. "label": "界首市",
  20385. "value": "341282"
  20386. }], [{
  20387. "label": "埇桥区",
  20388. "value": "341302"
  20389. }, {
  20390. "label": "砀山县",
  20391. "value": "341321"
  20392. }, {
  20393. "label": "萧县",
  20394. "value": "341322"
  20395. }, {
  20396. "label": "灵璧县",
  20397. "value": "341323"
  20398. }, {
  20399. "label": "泗县",
  20400. "value": "341324"
  20401. }, {
  20402. "label": "宿州马鞍山现代产业园区",
  20403. "value": "341371"
  20404. }, {
  20405. "label": "宿州经济技术开发区",
  20406. "value": "341372"
  20407. }], [{
  20408. "label": "金安区",
  20409. "value": "341502"
  20410. }, {
  20411. "label": "裕安区",
  20412. "value": "341503"
  20413. }, {
  20414. "label": "叶集区",
  20415. "value": "341504"
  20416. }, {
  20417. "label": "霍邱县",
  20418. "value": "341522"
  20419. }, {
  20420. "label": "舒城县",
  20421. "value": "341523"
  20422. }, {
  20423. "label": "金寨县",
  20424. "value": "341524"
  20425. }, {
  20426. "label": "霍山县",
  20427. "value": "341525"
  20428. }], [{
  20429. "label": "谯城区",
  20430. "value": "341602"
  20431. }, {
  20432. "label": "涡阳县",
  20433. "value": "341621"
  20434. }, {
  20435. "label": "蒙城县",
  20436. "value": "341622"
  20437. }, {
  20438. "label": "利辛县",
  20439. "value": "341623"
  20440. }], [{
  20441. "label": "贵池区",
  20442. "value": "341702"
  20443. }, {
  20444. "label": "东至县",
  20445. "value": "341721"
  20446. }, {
  20447. "label": "石台县",
  20448. "value": "341722"
  20449. }, {
  20450. "label": "青阳县",
  20451. "value": "341723"
  20452. }], [{
  20453. "label": "宣州区",
  20454. "value": "341802"
  20455. }, {
  20456. "label": "郎溪县",
  20457. "value": "341821"
  20458. }, {
  20459. "label": "广德县",
  20460. "value": "341822"
  20461. }, {
  20462. "label": "泾县",
  20463. "value": "341823"
  20464. }, {
  20465. "label": "绩溪县",
  20466. "value": "341824"
  20467. }, {
  20468. "label": "旌德县",
  20469. "value": "341825"
  20470. }, {
  20471. "label": "宣城市经济开发区",
  20472. "value": "341871"
  20473. }, {
  20474. "label": "宁国市",
  20475. "value": "341881"
  20476. }]], [[{
  20477. "label": "鼓楼区",
  20478. "value": "350102"
  20479. }, {
  20480. "label": "台江区",
  20481. "value": "350103"
  20482. }, {
  20483. "label": "仓山区",
  20484. "value": "350104"
  20485. }, {
  20486. "label": "马尾区",
  20487. "value": "350105"
  20488. }, {
  20489. "label": "晋安区",
  20490. "value": "350111"
  20491. }, {
  20492. "label": "闽侯县",
  20493. "value": "350121"
  20494. }, {
  20495. "label": "连江县",
  20496. "value": "350122"
  20497. }, {
  20498. "label": "罗源县",
  20499. "value": "350123"
  20500. }, {
  20501. "label": "闽清县",
  20502. "value": "350124"
  20503. }, {
  20504. "label": "永泰县",
  20505. "value": "350125"
  20506. }, {
  20507. "label": "平潭县",
  20508. "value": "350128"
  20509. }, {
  20510. "label": "福清市",
  20511. "value": "350181"
  20512. }, {
  20513. "label": "长乐市",
  20514. "value": "350182"
  20515. }], [{
  20516. "label": "思明区",
  20517. "value": "350203"
  20518. }, {
  20519. "label": "海沧区",
  20520. "value": "350205"
  20521. }, {
  20522. "label": "湖里区",
  20523. "value": "350206"
  20524. }, {
  20525. "label": "集美区",
  20526. "value": "350211"
  20527. }, {
  20528. "label": "同安区",
  20529. "value": "350212"
  20530. }, {
  20531. "label": "翔安区",
  20532. "value": "350213"
  20533. }], [{
  20534. "label": "城厢区",
  20535. "value": "350302"
  20536. }, {
  20537. "label": "涵江区",
  20538. "value": "350303"
  20539. }, {
  20540. "label": "荔城区",
  20541. "value": "350304"
  20542. }, {
  20543. "label": "秀屿区",
  20544. "value": "350305"
  20545. }, {
  20546. "label": "仙游县",
  20547. "value": "350322"
  20548. }], [{
  20549. "label": "梅列区",
  20550. "value": "350402"
  20551. }, {
  20552. "label": "三元区",
  20553. "value": "350403"
  20554. }, {
  20555. "label": "明溪县",
  20556. "value": "350421"
  20557. }, {
  20558. "label": "清流县",
  20559. "value": "350423"
  20560. }, {
  20561. "label": "宁化县",
  20562. "value": "350424"
  20563. }, {
  20564. "label": "大田县",
  20565. "value": "350425"
  20566. }, {
  20567. "label": "尤溪县",
  20568. "value": "350426"
  20569. }, {
  20570. "label": "沙县",
  20571. "value": "350427"
  20572. }, {
  20573. "label": "将乐县",
  20574. "value": "350428"
  20575. }, {
  20576. "label": "泰宁县",
  20577. "value": "350429"
  20578. }, {
  20579. "label": "建宁县",
  20580. "value": "350430"
  20581. }, {
  20582. "label": "永安市",
  20583. "value": "350481"
  20584. }], [{
  20585. "label": "鲤城区",
  20586. "value": "350502"
  20587. }, {
  20588. "label": "丰泽区",
  20589. "value": "350503"
  20590. }, {
  20591. "label": "洛江区",
  20592. "value": "350504"
  20593. }, {
  20594. "label": "泉港区",
  20595. "value": "350505"
  20596. }, {
  20597. "label": "惠安县",
  20598. "value": "350521"
  20599. }, {
  20600. "label": "安溪县",
  20601. "value": "350524"
  20602. }, {
  20603. "label": "永春县",
  20604. "value": "350525"
  20605. }, {
  20606. "label": "德化县",
  20607. "value": "350526"
  20608. }, {
  20609. "label": "金门县",
  20610. "value": "350527"
  20611. }, {
  20612. "label": "石狮市",
  20613. "value": "350581"
  20614. }, {
  20615. "label": "晋江市",
  20616. "value": "350582"
  20617. }, {
  20618. "label": "南安市",
  20619. "value": "350583"
  20620. }], [{
  20621. "label": "芗城区",
  20622. "value": "350602"
  20623. }, {
  20624. "label": "龙文区",
  20625. "value": "350603"
  20626. }, {
  20627. "label": "云霄县",
  20628. "value": "350622"
  20629. }, {
  20630. "label": "漳浦县",
  20631. "value": "350623"
  20632. }, {
  20633. "label": "诏安县",
  20634. "value": "350624"
  20635. }, {
  20636. "label": "长泰县",
  20637. "value": "350625"
  20638. }, {
  20639. "label": "东山县",
  20640. "value": "350626"
  20641. }, {
  20642. "label": "南靖县",
  20643. "value": "350627"
  20644. }, {
  20645. "label": "平和县",
  20646. "value": "350628"
  20647. }, {
  20648. "label": "华安县",
  20649. "value": "350629"
  20650. }, {
  20651. "label": "龙海市",
  20652. "value": "350681"
  20653. }], [{
  20654. "label": "延平区",
  20655. "value": "350702"
  20656. }, {
  20657. "label": "建阳区",
  20658. "value": "350703"
  20659. }, {
  20660. "label": "顺昌县",
  20661. "value": "350721"
  20662. }, {
  20663. "label": "浦城县",
  20664. "value": "350722"
  20665. }, {
  20666. "label": "光泽县",
  20667. "value": "350723"
  20668. }, {
  20669. "label": "松溪县",
  20670. "value": "350724"
  20671. }, {
  20672. "label": "政和县",
  20673. "value": "350725"
  20674. }, {
  20675. "label": "邵武市",
  20676. "value": "350781"
  20677. }, {
  20678. "label": "武夷山市",
  20679. "value": "350782"
  20680. }, {
  20681. "label": "建瓯市",
  20682. "value": "350783"
  20683. }], [{
  20684. "label": "新罗区",
  20685. "value": "350802"
  20686. }, {
  20687. "label": "永定区",
  20688. "value": "350803"
  20689. }, {
  20690. "label": "长汀县",
  20691. "value": "350821"
  20692. }, {
  20693. "label": "上杭县",
  20694. "value": "350823"
  20695. }, {
  20696. "label": "武平县",
  20697. "value": "350824"
  20698. }, {
  20699. "label": "连城县",
  20700. "value": "350825"
  20701. }, {
  20702. "label": "漳平市",
  20703. "value": "350881"
  20704. }], [{
  20705. "label": "蕉城区",
  20706. "value": "350902"
  20707. }, {
  20708. "label": "霞浦县",
  20709. "value": "350921"
  20710. }, {
  20711. "label": "古田县",
  20712. "value": "350922"
  20713. }, {
  20714. "label": "屏南县",
  20715. "value": "350923"
  20716. }, {
  20717. "label": "寿宁县",
  20718. "value": "350924"
  20719. }, {
  20720. "label": "周宁县",
  20721. "value": "350925"
  20722. }, {
  20723. "label": "柘荣县",
  20724. "value": "350926"
  20725. }, {
  20726. "label": "福安市",
  20727. "value": "350981"
  20728. }, {
  20729. "label": "福鼎市",
  20730. "value": "350982"
  20731. }]], [[{
  20732. "label": "东湖区",
  20733. "value": "360102"
  20734. }, {
  20735. "label": "西湖区",
  20736. "value": "360103"
  20737. }, {
  20738. "label": "青云谱区",
  20739. "value": "360104"
  20740. }, {
  20741. "label": "湾里区",
  20742. "value": "360105"
  20743. }, {
  20744. "label": "青山湖区",
  20745. "value": "360111"
  20746. }, {
  20747. "label": "新建区",
  20748. "value": "360112"
  20749. }, {
  20750. "label": "南昌县",
  20751. "value": "360121"
  20752. }, {
  20753. "label": "安义县",
  20754. "value": "360123"
  20755. }, {
  20756. "label": "进贤县",
  20757. "value": "360124"
  20758. }], [{
  20759. "label": "昌江区",
  20760. "value": "360202"
  20761. }, {
  20762. "label": "珠山区",
  20763. "value": "360203"
  20764. }, {
  20765. "label": "浮梁县",
  20766. "value": "360222"
  20767. }, {
  20768. "label": "乐平市",
  20769. "value": "360281"
  20770. }], [{
  20771. "label": "安源区",
  20772. "value": "360302"
  20773. }, {
  20774. "label": "湘东区",
  20775. "value": "360313"
  20776. }, {
  20777. "label": "莲花县",
  20778. "value": "360321"
  20779. }, {
  20780. "label": "上栗县",
  20781. "value": "360322"
  20782. }, {
  20783. "label": "芦溪县",
  20784. "value": "360323"
  20785. }], [{
  20786. "label": "濂溪区",
  20787. "value": "360402"
  20788. }, {
  20789. "label": "浔阳区",
  20790. "value": "360403"
  20791. }, {
  20792. "label": "柴桑区",
  20793. "value": "360404"
  20794. }, {
  20795. "label": "武宁县",
  20796. "value": "360423"
  20797. }, {
  20798. "label": "修水县",
  20799. "value": "360424"
  20800. }, {
  20801. "label": "永修县",
  20802. "value": "360425"
  20803. }, {
  20804. "label": "德安县",
  20805. "value": "360426"
  20806. }, {
  20807. "label": "都昌县",
  20808. "value": "360428"
  20809. }, {
  20810. "label": "湖口县",
  20811. "value": "360429"
  20812. }, {
  20813. "label": "彭泽县",
  20814. "value": "360430"
  20815. }, {
  20816. "label": "瑞昌市",
  20817. "value": "360481"
  20818. }, {
  20819. "label": "共青城市",
  20820. "value": "360482"
  20821. }, {
  20822. "label": "庐山市",
  20823. "value": "360483"
  20824. }], [{
  20825. "label": "渝水区",
  20826. "value": "360502"
  20827. }, {
  20828. "label": "分宜县",
  20829. "value": "360521"
  20830. }], [{
  20831. "label": "月湖区",
  20832. "value": "360602"
  20833. }, {
  20834. "label": "余江县",
  20835. "value": "360622"
  20836. }, {
  20837. "label": "贵溪市",
  20838. "value": "360681"
  20839. }], [{
  20840. "label": "章贡区",
  20841. "value": "360702"
  20842. }, {
  20843. "label": "南康区",
  20844. "value": "360703"
  20845. }, {
  20846. "label": "赣县区",
  20847. "value": "360704"
  20848. }, {
  20849. "label": "信丰县",
  20850. "value": "360722"
  20851. }, {
  20852. "label": "大余县",
  20853. "value": "360723"
  20854. }, {
  20855. "label": "上犹县",
  20856. "value": "360724"
  20857. }, {
  20858. "label": "崇义县",
  20859. "value": "360725"
  20860. }, {
  20861. "label": "安远县",
  20862. "value": "360726"
  20863. }, {
  20864. "label": "龙南县",
  20865. "value": "360727"
  20866. }, {
  20867. "label": "定南县",
  20868. "value": "360728"
  20869. }, {
  20870. "label": "全南县",
  20871. "value": "360729"
  20872. }, {
  20873. "label": "宁都县",
  20874. "value": "360730"
  20875. }, {
  20876. "label": "于都县",
  20877. "value": "360731"
  20878. }, {
  20879. "label": "兴国县",
  20880. "value": "360732"
  20881. }, {
  20882. "label": "会昌县",
  20883. "value": "360733"
  20884. }, {
  20885. "label": "寻乌县",
  20886. "value": "360734"
  20887. }, {
  20888. "label": "石城县",
  20889. "value": "360735"
  20890. }, {
  20891. "label": "瑞金市",
  20892. "value": "360781"
  20893. }], [{
  20894. "label": "吉州区",
  20895. "value": "360802"
  20896. }, {
  20897. "label": "青原区",
  20898. "value": "360803"
  20899. }, {
  20900. "label": "吉安县",
  20901. "value": "360821"
  20902. }, {
  20903. "label": "吉水县",
  20904. "value": "360822"
  20905. }, {
  20906. "label": "峡江县",
  20907. "value": "360823"
  20908. }, {
  20909. "label": "新干县",
  20910. "value": "360824"
  20911. }, {
  20912. "label": "永丰县",
  20913. "value": "360825"
  20914. }, {
  20915. "label": "泰和县",
  20916. "value": "360826"
  20917. }, {
  20918. "label": "遂川县",
  20919. "value": "360827"
  20920. }, {
  20921. "label": "万安县",
  20922. "value": "360828"
  20923. }, {
  20924. "label": "安福县",
  20925. "value": "360829"
  20926. }, {
  20927. "label": "永新县",
  20928. "value": "360830"
  20929. }, {
  20930. "label": "井冈山市",
  20931. "value": "360881"
  20932. }], [{
  20933. "label": "袁州区",
  20934. "value": "360902"
  20935. }, {
  20936. "label": "奉新县",
  20937. "value": "360921"
  20938. }, {
  20939. "label": "万载县",
  20940. "value": "360922"
  20941. }, {
  20942. "label": "上高县",
  20943. "value": "360923"
  20944. }, {
  20945. "label": "宜丰县",
  20946. "value": "360924"
  20947. }, {
  20948. "label": "靖安县",
  20949. "value": "360925"
  20950. }, {
  20951. "label": "铜鼓县",
  20952. "value": "360926"
  20953. }, {
  20954. "label": "丰城市",
  20955. "value": "360981"
  20956. }, {
  20957. "label": "樟树市",
  20958. "value": "360982"
  20959. }, {
  20960. "label": "高安市",
  20961. "value": "360983"
  20962. }], [{
  20963. "label": "临川区",
  20964. "value": "361002"
  20965. }, {
  20966. "label": "东乡区",
  20967. "value": "361003"
  20968. }, {
  20969. "label": "南城县",
  20970. "value": "361021"
  20971. }, {
  20972. "label": "黎川县",
  20973. "value": "361022"
  20974. }, {
  20975. "label": "南丰县",
  20976. "value": "361023"
  20977. }, {
  20978. "label": "崇仁县",
  20979. "value": "361024"
  20980. }, {
  20981. "label": "乐安县",
  20982. "value": "361025"
  20983. }, {
  20984. "label": "宜黄县",
  20985. "value": "361026"
  20986. }, {
  20987. "label": "金溪县",
  20988. "value": "361027"
  20989. }, {
  20990. "label": "资溪县",
  20991. "value": "361028"
  20992. }, {
  20993. "label": "广昌县",
  20994. "value": "361030"
  20995. }], [{
  20996. "label": "信州区",
  20997. "value": "361102"
  20998. }, {
  20999. "label": "广丰区",
  21000. "value": "361103"
  21001. }, {
  21002. "label": "上饶县",
  21003. "value": "361121"
  21004. }, {
  21005. "label": "玉山县",
  21006. "value": "361123"
  21007. }, {
  21008. "label": "铅山县",
  21009. "value": "361124"
  21010. }, {
  21011. "label": "横峰县",
  21012. "value": "361125"
  21013. }, {
  21014. "label": "弋阳县",
  21015. "value": "361126"
  21016. }, {
  21017. "label": "余干县",
  21018. "value": "361127"
  21019. }, {
  21020. "label": "鄱阳县",
  21021. "value": "361128"
  21022. }, {
  21023. "label": "万年县",
  21024. "value": "361129"
  21025. }, {
  21026. "label": "婺源县",
  21027. "value": "361130"
  21028. }, {
  21029. "label": "德兴市",
  21030. "value": "361181"
  21031. }]], [[{
  21032. "label": "历下区",
  21033. "value": "370102"
  21034. }, {
  21035. "label": "市中区",
  21036. "value": "370103"
  21037. }, {
  21038. "label": "槐荫区",
  21039. "value": "370104"
  21040. }, {
  21041. "label": "天桥区",
  21042. "value": "370105"
  21043. }, {
  21044. "label": "历城区",
  21045. "value": "370112"
  21046. }, {
  21047. "label": "长清区",
  21048. "value": "370113"
  21049. }, {
  21050. "label": "章丘区",
  21051. "value": "370114"
  21052. }, {
  21053. "label": "平阴县",
  21054. "value": "370124"
  21055. }, {
  21056. "label": "济阳县",
  21057. "value": "370125"
  21058. }, {
  21059. "label": "商河县",
  21060. "value": "370126"
  21061. }, {
  21062. "label": "济南高新技术产业开发区",
  21063. "value": "370171"
  21064. }], [{
  21065. "label": "市南区",
  21066. "value": "370202"
  21067. }, {
  21068. "label": "市北区",
  21069. "value": "370203"
  21070. }, {
  21071. "label": "黄岛区",
  21072. "value": "370211"
  21073. }, {
  21074. "label": "崂山区",
  21075. "value": "370212"
  21076. }, {
  21077. "label": "李沧区",
  21078. "value": "370213"
  21079. }, {
  21080. "label": "城阳区",
  21081. "value": "370214"
  21082. }, {
  21083. "label": "即墨区",
  21084. "value": "370215"
  21085. }, {
  21086. "label": "青岛高新技术产业开发区",
  21087. "value": "370271"
  21088. }, {
  21089. "label": "胶州市",
  21090. "value": "370281"
  21091. }, {
  21092. "label": "平度市",
  21093. "value": "370283"
  21094. }, {
  21095. "label": "莱西市",
  21096. "value": "370285"
  21097. }], [{
  21098. "label": "淄川区",
  21099. "value": "370302"
  21100. }, {
  21101. "label": "张店区",
  21102. "value": "370303"
  21103. }, {
  21104. "label": "博山区",
  21105. "value": "370304"
  21106. }, {
  21107. "label": "临淄区",
  21108. "value": "370305"
  21109. }, {
  21110. "label": "周村区",
  21111. "value": "370306"
  21112. }, {
  21113. "label": "桓台县",
  21114. "value": "370321"
  21115. }, {
  21116. "label": "高青县",
  21117. "value": "370322"
  21118. }, {
  21119. "label": "沂源县",
  21120. "value": "370323"
  21121. }], [{
  21122. "label": "市中区",
  21123. "value": "370402"
  21124. }, {
  21125. "label": "薛城区",
  21126. "value": "370403"
  21127. }, {
  21128. "label": "峄城区",
  21129. "value": "370404"
  21130. }, {
  21131. "label": "台儿庄区",
  21132. "value": "370405"
  21133. }, {
  21134. "label": "山亭区",
  21135. "value": "370406"
  21136. }, {
  21137. "label": "滕州市",
  21138. "value": "370481"
  21139. }], [{
  21140. "label": "东营区",
  21141. "value": "370502"
  21142. }, {
  21143. "label": "河口区",
  21144. "value": "370503"
  21145. }, {
  21146. "label": "垦利区",
  21147. "value": "370505"
  21148. }, {
  21149. "label": "利津县",
  21150. "value": "370522"
  21151. }, {
  21152. "label": "广饶县",
  21153. "value": "370523"
  21154. }, {
  21155. "label": "东营经济技术开发区",
  21156. "value": "370571"
  21157. }, {
  21158. "label": "东营港经济开发区",
  21159. "value": "370572"
  21160. }], [{
  21161. "label": "芝罘区",
  21162. "value": "370602"
  21163. }, {
  21164. "label": "福山区",
  21165. "value": "370611"
  21166. }, {
  21167. "label": "牟平区",
  21168. "value": "370612"
  21169. }, {
  21170. "label": "莱山区",
  21171. "value": "370613"
  21172. }, {
  21173. "label": "长岛县",
  21174. "value": "370634"
  21175. }, {
  21176. "label": "烟台高新技术产业开发区",
  21177. "value": "370671"
  21178. }, {
  21179. "label": "烟台经济技术开发区",
  21180. "value": "370672"
  21181. }, {
  21182. "label": "龙口市",
  21183. "value": "370681"
  21184. }, {
  21185. "label": "莱阳市",
  21186. "value": "370682"
  21187. }, {
  21188. "label": "莱州市",
  21189. "value": "370683"
  21190. }, {
  21191. "label": "蓬莱市",
  21192. "value": "370684"
  21193. }, {
  21194. "label": "招远市",
  21195. "value": "370685"
  21196. }, {
  21197. "label": "栖霞市",
  21198. "value": "370686"
  21199. }, {
  21200. "label": "海阳市",
  21201. "value": "370687"
  21202. }], [{
  21203. "label": "潍城区",
  21204. "value": "370702"
  21205. }, {
  21206. "label": "寒亭区",
  21207. "value": "370703"
  21208. }, {
  21209. "label": "坊子区",
  21210. "value": "370704"
  21211. }, {
  21212. "label": "奎文区",
  21213. "value": "370705"
  21214. }, {
  21215. "label": "临朐县",
  21216. "value": "370724"
  21217. }, {
  21218. "label": "昌乐县",
  21219. "value": "370725"
  21220. }, {
  21221. "label": "潍坊滨海经济技术开发区",
  21222. "value": "370772"
  21223. }, {
  21224. "label": "青州市",
  21225. "value": "370781"
  21226. }, {
  21227. "label": "诸城市",
  21228. "value": "370782"
  21229. }, {
  21230. "label": "寿光市",
  21231. "value": "370783"
  21232. }, {
  21233. "label": "安丘市",
  21234. "value": "370784"
  21235. }, {
  21236. "label": "高密市",
  21237. "value": "370785"
  21238. }, {
  21239. "label": "昌邑市",
  21240. "value": "370786"
  21241. }], [{
  21242. "label": "任城区",
  21243. "value": "370811"
  21244. }, {
  21245. "label": "兖州区",
  21246. "value": "370812"
  21247. }, {
  21248. "label": "微山县",
  21249. "value": "370826"
  21250. }, {
  21251. "label": "鱼台县",
  21252. "value": "370827"
  21253. }, {
  21254. "label": "金乡县",
  21255. "value": "370828"
  21256. }, {
  21257. "label": "嘉祥县",
  21258. "value": "370829"
  21259. }, {
  21260. "label": "汶上县",
  21261. "value": "370830"
  21262. }, {
  21263. "label": "泗水县",
  21264. "value": "370831"
  21265. }, {
  21266. "label": "梁山县",
  21267. "value": "370832"
  21268. }, {
  21269. "label": "济宁高新技术产业开发区",
  21270. "value": "370871"
  21271. }, {
  21272. "label": "曲阜市",
  21273. "value": "370881"
  21274. }, {
  21275. "label": "邹城市",
  21276. "value": "370883"
  21277. }], [{
  21278. "label": "泰山区",
  21279. "value": "370902"
  21280. }, {
  21281. "label": "岱岳区",
  21282. "value": "370911"
  21283. }, {
  21284. "label": "宁阳县",
  21285. "value": "370921"
  21286. }, {
  21287. "label": "东平县",
  21288. "value": "370923"
  21289. }, {
  21290. "label": "新泰市",
  21291. "value": "370982"
  21292. }, {
  21293. "label": "肥城市",
  21294. "value": "370983"
  21295. }], [{
  21296. "label": "环翠区",
  21297. "value": "371002"
  21298. }, {
  21299. "label": "文登区",
  21300. "value": "371003"
  21301. }, {
  21302. "label": "威海火炬高技术产业开发区",
  21303. "value": "371071"
  21304. }, {
  21305. "label": "威海经济技术开发区",
  21306. "value": "371072"
  21307. }, {
  21308. "label": "威海临港经济技术开发区",
  21309. "value": "371073"
  21310. }, {
  21311. "label": "荣成市",
  21312. "value": "371082"
  21313. }, {
  21314. "label": "乳山市",
  21315. "value": "371083"
  21316. }], [{
  21317. "label": "东港区",
  21318. "value": "371102"
  21319. }, {
  21320. "label": "岚山区",
  21321. "value": "371103"
  21322. }, {
  21323. "label": "五莲县",
  21324. "value": "371121"
  21325. }, {
  21326. "label": "莒县",
  21327. "value": "371122"
  21328. }, {
  21329. "label": "日照经济技术开发区",
  21330. "value": "371171"
  21331. }, {
  21332. "label": "日照国际海洋城",
  21333. "value": "371172"
  21334. }], [{
  21335. "label": "莱城区",
  21336. "value": "371202"
  21337. }, {
  21338. "label": "钢城区",
  21339. "value": "371203"
  21340. }], [{
  21341. "label": "兰山区",
  21342. "value": "371302"
  21343. }, {
  21344. "label": "罗庄区",
  21345. "value": "371311"
  21346. }, {
  21347. "label": "河东区",
  21348. "value": "371312"
  21349. }, {
  21350. "label": "沂南县",
  21351. "value": "371321"
  21352. }, {
  21353. "label": "郯城县",
  21354. "value": "371322"
  21355. }, {
  21356. "label": "沂水县",
  21357. "value": "371323"
  21358. }, {
  21359. "label": "兰陵县",
  21360. "value": "371324"
  21361. }, {
  21362. "label": "费县",
  21363. "value": "371325"
  21364. }, {
  21365. "label": "平邑县",
  21366. "value": "371326"
  21367. }, {
  21368. "label": "莒南县",
  21369. "value": "371327"
  21370. }, {
  21371. "label": "蒙阴县",
  21372. "value": "371328"
  21373. }, {
  21374. "label": "临沭县",
  21375. "value": "371329"
  21376. }, {
  21377. "label": "临沂高新技术产业开发区",
  21378. "value": "371371"
  21379. }, {
  21380. "label": "临沂经济技术开发区",
  21381. "value": "371372"
  21382. }, {
  21383. "label": "临沂临港经济开发区",
  21384. "value": "371373"
  21385. }], [{
  21386. "label": "德城区",
  21387. "value": "371402"
  21388. }, {
  21389. "label": "陵城区",
  21390. "value": "371403"
  21391. }, {
  21392. "label": "宁津县",
  21393. "value": "371422"
  21394. }, {
  21395. "label": "庆云县",
  21396. "value": "371423"
  21397. }, {
  21398. "label": "临邑县",
  21399. "value": "371424"
  21400. }, {
  21401. "label": "齐河县",
  21402. "value": "371425"
  21403. }, {
  21404. "label": "平原县",
  21405. "value": "371426"
  21406. }, {
  21407. "label": "夏津县",
  21408. "value": "371427"
  21409. }, {
  21410. "label": "武城县",
  21411. "value": "371428"
  21412. }, {
  21413. "label": "德州经济技术开发区",
  21414. "value": "371471"
  21415. }, {
  21416. "label": "德州运河经济开发区",
  21417. "value": "371472"
  21418. }, {
  21419. "label": "乐陵市",
  21420. "value": "371481"
  21421. }, {
  21422. "label": "禹城市",
  21423. "value": "371482"
  21424. }], [{
  21425. "label": "东昌府区",
  21426. "value": "371502"
  21427. }, {
  21428. "label": "阳谷县",
  21429. "value": "371521"
  21430. }, {
  21431. "label": "莘县",
  21432. "value": "371522"
  21433. }, {
  21434. "label": "茌平县",
  21435. "value": "371523"
  21436. }, {
  21437. "label": "东阿县",
  21438. "value": "371524"
  21439. }, {
  21440. "label": "冠县",
  21441. "value": "371525"
  21442. }, {
  21443. "label": "高唐县",
  21444. "value": "371526"
  21445. }, {
  21446. "label": "临清市",
  21447. "value": "371581"
  21448. }], [{
  21449. "label": "滨城区",
  21450. "value": "371602"
  21451. }, {
  21452. "label": "沾化区",
  21453. "value": "371603"
  21454. }, {
  21455. "label": "惠民县",
  21456. "value": "371621"
  21457. }, {
  21458. "label": "阳信县",
  21459. "value": "371622"
  21460. }, {
  21461. "label": "无棣县",
  21462. "value": "371623"
  21463. }, {
  21464. "label": "博兴县",
  21465. "value": "371625"
  21466. }, {
  21467. "label": "邹平县",
  21468. "value": "371626"
  21469. }], [{
  21470. "label": "牡丹区",
  21471. "value": "371702"
  21472. }, {
  21473. "label": "定陶区",
  21474. "value": "371703"
  21475. }, {
  21476. "label": "曹县",
  21477. "value": "371721"
  21478. }, {
  21479. "label": "单县",
  21480. "value": "371722"
  21481. }, {
  21482. "label": "成武县",
  21483. "value": "371723"
  21484. }, {
  21485. "label": "巨野县",
  21486. "value": "371724"
  21487. }, {
  21488. "label": "郓城县",
  21489. "value": "371725"
  21490. }, {
  21491. "label": "鄄城县",
  21492. "value": "371726"
  21493. }, {
  21494. "label": "东明县",
  21495. "value": "371728"
  21496. }, {
  21497. "label": "菏泽经济技术开发区",
  21498. "value": "371771"
  21499. }, {
  21500. "label": "菏泽高新技术开发区",
  21501. "value": "371772"
  21502. }]], [[{
  21503. "label": "中原区",
  21504. "value": "410102"
  21505. }, {
  21506. "label": "二七区",
  21507. "value": "410103"
  21508. }, {
  21509. "label": "管城回族区",
  21510. "value": "410104"
  21511. }, {
  21512. "label": "金水区",
  21513. "value": "410105"
  21514. }, {
  21515. "label": "上街区",
  21516. "value": "410106"
  21517. }, {
  21518. "label": "惠济区",
  21519. "value": "410108"
  21520. }, {
  21521. "label": "中牟县",
  21522. "value": "410122"
  21523. }, {
  21524. "label": "郑州经济技术开发区",
  21525. "value": "410171"
  21526. }, {
  21527. "label": "郑州高新技术产业开发区",
  21528. "value": "410172"
  21529. }, {
  21530. "label": "郑州航空港经济综合实验区",
  21531. "value": "410173"
  21532. }, {
  21533. "label": "巩义市",
  21534. "value": "410181"
  21535. }, {
  21536. "label": "荥阳市",
  21537. "value": "410182"
  21538. }, {
  21539. "label": "新密市",
  21540. "value": "410183"
  21541. }, {
  21542. "label": "新郑市",
  21543. "value": "410184"
  21544. }, {
  21545. "label": "登封市",
  21546. "value": "410185"
  21547. }], [{
  21548. "label": "龙亭区",
  21549. "value": "410202"
  21550. }, {
  21551. "label": "顺河回族区",
  21552. "value": "410203"
  21553. }, {
  21554. "label": "鼓楼区",
  21555. "value": "410204"
  21556. }, {
  21557. "label": "禹王台区",
  21558. "value": "410205"
  21559. }, {
  21560. "label": "祥符区",
  21561. "value": "410212"
  21562. }, {
  21563. "label": "杞县",
  21564. "value": "410221"
  21565. }, {
  21566. "label": "通许县",
  21567. "value": "410222"
  21568. }, {
  21569. "label": "尉氏县",
  21570. "value": "410223"
  21571. }, {
  21572. "label": "兰考县",
  21573. "value": "410225"
  21574. }], [{
  21575. "label": "老城区",
  21576. "value": "410302"
  21577. }, {
  21578. "label": "西工区",
  21579. "value": "410303"
  21580. }, {
  21581. "label": "瀍河回族区",
  21582. "value": "410304"
  21583. }, {
  21584. "label": "涧西区",
  21585. "value": "410305"
  21586. }, {
  21587. "label": "吉利区",
  21588. "value": "410306"
  21589. }, {
  21590. "label": "洛龙区",
  21591. "value": "410311"
  21592. }, {
  21593. "label": "孟津县",
  21594. "value": "410322"
  21595. }, {
  21596. "label": "新安县",
  21597. "value": "410323"
  21598. }, {
  21599. "label": "栾川县",
  21600. "value": "410324"
  21601. }, {
  21602. "label": "嵩县",
  21603. "value": "410325"
  21604. }, {
  21605. "label": "汝阳县",
  21606. "value": "410326"
  21607. }, {
  21608. "label": "宜阳县",
  21609. "value": "410327"
  21610. }, {
  21611. "label": "洛宁县",
  21612. "value": "410328"
  21613. }, {
  21614. "label": "伊川县",
  21615. "value": "410329"
  21616. }, {
  21617. "label": "洛阳高新技术产业开发区",
  21618. "value": "410371"
  21619. }, {
  21620. "label": "偃师市",
  21621. "value": "410381"
  21622. }], [{
  21623. "label": "新华区",
  21624. "value": "410402"
  21625. }, {
  21626. "label": "卫东区",
  21627. "value": "410403"
  21628. }, {
  21629. "label": "石龙区",
  21630. "value": "410404"
  21631. }, {
  21632. "label": "湛河区",
  21633. "value": "410411"
  21634. }, {
  21635. "label": "宝丰县",
  21636. "value": "410421"
  21637. }, {
  21638. "label": "叶县",
  21639. "value": "410422"
  21640. }, {
  21641. "label": "鲁山县",
  21642. "value": "410423"
  21643. }, {
  21644. "label": "郏县",
  21645. "value": "410425"
  21646. }, {
  21647. "label": "平顶山高新技术产业开发区",
  21648. "value": "410471"
  21649. }, {
  21650. "label": "平顶山市新城区",
  21651. "value": "410472"
  21652. }, {
  21653. "label": "舞钢市",
  21654. "value": "410481"
  21655. }, {
  21656. "label": "汝州市",
  21657. "value": "410482"
  21658. }], [{
  21659. "label": "文峰区",
  21660. "value": "410502"
  21661. }, {
  21662. "label": "北关区",
  21663. "value": "410503"
  21664. }, {
  21665. "label": "殷都区",
  21666. "value": "410505"
  21667. }, {
  21668. "label": "龙安区",
  21669. "value": "410506"
  21670. }, {
  21671. "label": "安阳县",
  21672. "value": "410522"
  21673. }, {
  21674. "label": "汤阴县",
  21675. "value": "410523"
  21676. }, {
  21677. "label": "滑县",
  21678. "value": "410526"
  21679. }, {
  21680. "label": "内黄县",
  21681. "value": "410527"
  21682. }, {
  21683. "label": "安阳高新技术产业开发区",
  21684. "value": "410571"
  21685. }, {
  21686. "label": "林州市",
  21687. "value": "410581"
  21688. }], [{
  21689. "label": "鹤山区",
  21690. "value": "410602"
  21691. }, {
  21692. "label": "山城区",
  21693. "value": "410603"
  21694. }, {
  21695. "label": "淇滨区",
  21696. "value": "410611"
  21697. }, {
  21698. "label": "浚县",
  21699. "value": "410621"
  21700. }, {
  21701. "label": "淇县",
  21702. "value": "410622"
  21703. }, {
  21704. "label": "鹤壁经济技术开发区",
  21705. "value": "410671"
  21706. }], [{
  21707. "label": "红旗区",
  21708. "value": "410702"
  21709. }, {
  21710. "label": "卫滨区",
  21711. "value": "410703"
  21712. }, {
  21713. "label": "凤泉区",
  21714. "value": "410704"
  21715. }, {
  21716. "label": "牧野区",
  21717. "value": "410711"
  21718. }, {
  21719. "label": "新乡县",
  21720. "value": "410721"
  21721. }, {
  21722. "label": "获嘉县",
  21723. "value": "410724"
  21724. }, {
  21725. "label": "原阳县",
  21726. "value": "410725"
  21727. }, {
  21728. "label": "延津县",
  21729. "value": "410726"
  21730. }, {
  21731. "label": "封丘县",
  21732. "value": "410727"
  21733. }, {
  21734. "label": "长垣县",
  21735. "value": "410728"
  21736. }, {
  21737. "label": "新乡高新技术产业开发区",
  21738. "value": "410771"
  21739. }, {
  21740. "label": "新乡经济技术开发区",
  21741. "value": "410772"
  21742. }, {
  21743. "label": "新乡市平原城乡一体化示范区",
  21744. "value": "410773"
  21745. }, {
  21746. "label": "卫辉市",
  21747. "value": "410781"
  21748. }, {
  21749. "label": "辉县市",
  21750. "value": "410782"
  21751. }], [{
  21752. "label": "解放区",
  21753. "value": "410802"
  21754. }, {
  21755. "label": "中站区",
  21756. "value": "410803"
  21757. }, {
  21758. "label": "马村区",
  21759. "value": "410804"
  21760. }, {
  21761. "label": "山阳区",
  21762. "value": "410811"
  21763. }, {
  21764. "label": "修武县",
  21765. "value": "410821"
  21766. }, {
  21767. "label": "博爱县",
  21768. "value": "410822"
  21769. }, {
  21770. "label": "武陟县",
  21771. "value": "410823"
  21772. }, {
  21773. "label": "温县",
  21774. "value": "410825"
  21775. }, {
  21776. "label": "焦作城乡一体化示范区",
  21777. "value": "410871"
  21778. }, {
  21779. "label": "沁阳市",
  21780. "value": "410882"
  21781. }, {
  21782. "label": "孟州市",
  21783. "value": "410883"
  21784. }], [{
  21785. "label": "华龙区",
  21786. "value": "410902"
  21787. }, {
  21788. "label": "清丰县",
  21789. "value": "410922"
  21790. }, {
  21791. "label": "南乐县",
  21792. "value": "410923"
  21793. }, {
  21794. "label": "范县",
  21795. "value": "410926"
  21796. }, {
  21797. "label": "台前县",
  21798. "value": "410927"
  21799. }, {
  21800. "label": "濮阳县",
  21801. "value": "410928"
  21802. }, {
  21803. "label": "河南濮阳工业园区",
  21804. "value": "410971"
  21805. }, {
  21806. "label": "濮阳经济技术开发区",
  21807. "value": "410972"
  21808. }], [{
  21809. "label": "魏都区",
  21810. "value": "411002"
  21811. }, {
  21812. "label": "建安区",
  21813. "value": "411003"
  21814. }, {
  21815. "label": "鄢陵县",
  21816. "value": "411024"
  21817. }, {
  21818. "label": "襄城县",
  21819. "value": "411025"
  21820. }, {
  21821. "label": "许昌经济技术开发区",
  21822. "value": "411071"
  21823. }, {
  21824. "label": "禹州市",
  21825. "value": "411081"
  21826. }, {
  21827. "label": "长葛市",
  21828. "value": "411082"
  21829. }], [{
  21830. "label": "源汇区",
  21831. "value": "411102"
  21832. }, {
  21833. "label": "郾城区",
  21834. "value": "411103"
  21835. }, {
  21836. "label": "召陵区",
  21837. "value": "411104"
  21838. }, {
  21839. "label": "舞阳县",
  21840. "value": "411121"
  21841. }, {
  21842. "label": "临颍县",
  21843. "value": "411122"
  21844. }, {
  21845. "label": "漯河经济技术开发区",
  21846. "value": "411171"
  21847. }], [{
  21848. "label": "湖滨区",
  21849. "value": "411202"
  21850. }, {
  21851. "label": "陕州区",
  21852. "value": "411203"
  21853. }, {
  21854. "label": "渑池县",
  21855. "value": "411221"
  21856. }, {
  21857. "label": "卢氏县",
  21858. "value": "411224"
  21859. }, {
  21860. "label": "河南三门峡经济开发区",
  21861. "value": "411271"
  21862. }, {
  21863. "label": "义马市",
  21864. "value": "411281"
  21865. }, {
  21866. "label": "灵宝市",
  21867. "value": "411282"
  21868. }], [{
  21869. "label": "宛城区",
  21870. "value": "411302"
  21871. }, {
  21872. "label": "卧龙区",
  21873. "value": "411303"
  21874. }, {
  21875. "label": "南召县",
  21876. "value": "411321"
  21877. }, {
  21878. "label": "方城县",
  21879. "value": "411322"
  21880. }, {
  21881. "label": "西峡县",
  21882. "value": "411323"
  21883. }, {
  21884. "label": "镇平县",
  21885. "value": "411324"
  21886. }, {
  21887. "label": "内乡县",
  21888. "value": "411325"
  21889. }, {
  21890. "label": "淅川县",
  21891. "value": "411326"
  21892. }, {
  21893. "label": "社旗县",
  21894. "value": "411327"
  21895. }, {
  21896. "label": "唐河县",
  21897. "value": "411328"
  21898. }, {
  21899. "label": "新野县",
  21900. "value": "411329"
  21901. }, {
  21902. "label": "桐柏县",
  21903. "value": "411330"
  21904. }, {
  21905. "label": "南阳高新技术产业开发区",
  21906. "value": "411371"
  21907. }, {
  21908. "label": "南阳市城乡一体化示范区",
  21909. "value": "411372"
  21910. }, {
  21911. "label": "邓州市",
  21912. "value": "411381"
  21913. }], [{
  21914. "label": "梁园区",
  21915. "value": "411402"
  21916. }, {
  21917. "label": "睢阳区",
  21918. "value": "411403"
  21919. }, {
  21920. "label": "民权县",
  21921. "value": "411421"
  21922. }, {
  21923. "label": "睢县",
  21924. "value": "411422"
  21925. }, {
  21926. "label": "宁陵县",
  21927. "value": "411423"
  21928. }, {
  21929. "label": "柘城县",
  21930. "value": "411424"
  21931. }, {
  21932. "label": "虞城县",
  21933. "value": "411425"
  21934. }, {
  21935. "label": "夏邑县",
  21936. "value": "411426"
  21937. }, {
  21938. "label": "豫东综合物流产业聚集区",
  21939. "value": "411471"
  21940. }, {
  21941. "label": "河南商丘经济开发区",
  21942. "value": "411472"
  21943. }, {
  21944. "label": "永城市",
  21945. "value": "411481"
  21946. }], [{
  21947. "label": "浉河区",
  21948. "value": "411502"
  21949. }, {
  21950. "label": "平桥区",
  21951. "value": "411503"
  21952. }, {
  21953. "label": "罗山县",
  21954. "value": "411521"
  21955. }, {
  21956. "label": "光山县",
  21957. "value": "411522"
  21958. }, {
  21959. "label": "新县",
  21960. "value": "411523"
  21961. }, {
  21962. "label": "商城县",
  21963. "value": "411524"
  21964. }, {
  21965. "label": "固始县",
  21966. "value": "411525"
  21967. }, {
  21968. "label": "潢川县",
  21969. "value": "411526"
  21970. }, {
  21971. "label": "淮滨县",
  21972. "value": "411527"
  21973. }, {
  21974. "label": "息县",
  21975. "value": "411528"
  21976. }, {
  21977. "label": "信阳高新技术产业开发区",
  21978. "value": "411571"
  21979. }], [{
  21980. "label": "川汇区",
  21981. "value": "411602"
  21982. }, {
  21983. "label": "扶沟县",
  21984. "value": "411621"
  21985. }, {
  21986. "label": "西华县",
  21987. "value": "411622"
  21988. }, {
  21989. "label": "商水县",
  21990. "value": "411623"
  21991. }, {
  21992. "label": "沈丘县",
  21993. "value": "411624"
  21994. }, {
  21995. "label": "郸城县",
  21996. "value": "411625"
  21997. }, {
  21998. "label": "淮阳县",
  21999. "value": "411626"
  22000. }, {
  22001. "label": "太康县",
  22002. "value": "411627"
  22003. }, {
  22004. "label": "鹿邑县",
  22005. "value": "411628"
  22006. }, {
  22007. "label": "河南周口经济开发区",
  22008. "value": "411671"
  22009. }, {
  22010. "label": "项城市",
  22011. "value": "411681"
  22012. }], [{
  22013. "label": "驿城区",
  22014. "value": "411702"
  22015. }, {
  22016. "label": "西平县",
  22017. "value": "411721"
  22018. }, {
  22019. "label": "上蔡县",
  22020. "value": "411722"
  22021. }, {
  22022. "label": "平舆县",
  22023. "value": "411723"
  22024. }, {
  22025. "label": "正阳县",
  22026. "value": "411724"
  22027. }, {
  22028. "label": "确山县",
  22029. "value": "411725"
  22030. }, {
  22031. "label": "泌阳县",
  22032. "value": "411726"
  22033. }, {
  22034. "label": "汝南县",
  22035. "value": "411727"
  22036. }, {
  22037. "label": "遂平县",
  22038. "value": "411728"
  22039. }, {
  22040. "label": "新蔡县",
  22041. "value": "411729"
  22042. }, {
  22043. "label": "河南驻马店经济开发区",
  22044. "value": "411771"
  22045. }], [{
  22046. "label": "济源市",
  22047. "value": "419001"
  22048. }]], [[{
  22049. "label": "江岸区",
  22050. "value": "420102"
  22051. }, {
  22052. "label": "江汉区",
  22053. "value": "420103"
  22054. }, {
  22055. "label": "硚口区",
  22056. "value": "420104"
  22057. }, {
  22058. "label": "汉阳区",
  22059. "value": "420105"
  22060. }, {
  22061. "label": "武昌区",
  22062. "value": "420106"
  22063. }, {
  22064. "label": "青山区",
  22065. "value": "420107"
  22066. }, {
  22067. "label": "洪山区",
  22068. "value": "420111"
  22069. }, {
  22070. "label": "东西湖区",
  22071. "value": "420112"
  22072. }, {
  22073. "label": "汉南区",
  22074. "value": "420113"
  22075. }, {
  22076. "label": "蔡甸区",
  22077. "value": "420114"
  22078. }, {
  22079. "label": "江夏区",
  22080. "value": "420115"
  22081. }, {
  22082. "label": "黄陂区",
  22083. "value": "420116"
  22084. }, {
  22085. "label": "新洲区",
  22086. "value": "420117"
  22087. }], [{
  22088. "label": "黄石港区",
  22089. "value": "420202"
  22090. }, {
  22091. "label": "西塞山区",
  22092. "value": "420203"
  22093. }, {
  22094. "label": "下陆区",
  22095. "value": "420204"
  22096. }, {
  22097. "label": "铁山区",
  22098. "value": "420205"
  22099. }, {
  22100. "label": "阳新县",
  22101. "value": "420222"
  22102. }, {
  22103. "label": "大冶市",
  22104. "value": "420281"
  22105. }], [{
  22106. "label": "茅箭区",
  22107. "value": "420302"
  22108. }, {
  22109. "label": "张湾区",
  22110. "value": "420303"
  22111. }, {
  22112. "label": "郧阳区",
  22113. "value": "420304"
  22114. }, {
  22115. "label": "郧西县",
  22116. "value": "420322"
  22117. }, {
  22118. "label": "竹山县",
  22119. "value": "420323"
  22120. }, {
  22121. "label": "竹溪县",
  22122. "value": "420324"
  22123. }, {
  22124. "label": "房县",
  22125. "value": "420325"
  22126. }, {
  22127. "label": "丹江口市",
  22128. "value": "420381"
  22129. }], [{
  22130. "label": "西陵区",
  22131. "value": "420502"
  22132. }, {
  22133. "label": "伍家岗区",
  22134. "value": "420503"
  22135. }, {
  22136. "label": "点军区",
  22137. "value": "420504"
  22138. }, {
  22139. "label": "猇亭区",
  22140. "value": "420505"
  22141. }, {
  22142. "label": "夷陵区",
  22143. "value": "420506"
  22144. }, {
  22145. "label": "远安县",
  22146. "value": "420525"
  22147. }, {
  22148. "label": "兴山县",
  22149. "value": "420526"
  22150. }, {
  22151. "label": "秭归县",
  22152. "value": "420527"
  22153. }, {
  22154. "label": "长阳土家族自治县",
  22155. "value": "420528"
  22156. }, {
  22157. "label": "五峰土家族自治县",
  22158. "value": "420529"
  22159. }, {
  22160. "label": "宜都市",
  22161. "value": "420581"
  22162. }, {
  22163. "label": "当阳市",
  22164. "value": "420582"
  22165. }, {
  22166. "label": "枝江市",
  22167. "value": "420583"
  22168. }], [{
  22169. "label": "襄城区",
  22170. "value": "420602"
  22171. }, {
  22172. "label": "樊城区",
  22173. "value": "420606"
  22174. }, {
  22175. "label": "襄州区",
  22176. "value": "420607"
  22177. }, {
  22178. "label": "南漳县",
  22179. "value": "420624"
  22180. }, {
  22181. "label": "谷城县",
  22182. "value": "420625"
  22183. }, {
  22184. "label": "保康县",
  22185. "value": "420626"
  22186. }, {
  22187. "label": "老河口市",
  22188. "value": "420682"
  22189. }, {
  22190. "label": "枣阳市",
  22191. "value": "420683"
  22192. }, {
  22193. "label": "宜城市",
  22194. "value": "420684"
  22195. }], [{
  22196. "label": "梁子湖区",
  22197. "value": "420702"
  22198. }, {
  22199. "label": "华容区",
  22200. "value": "420703"
  22201. }, {
  22202. "label": "鄂城区",
  22203. "value": "420704"
  22204. }], [{
  22205. "label": "东宝区",
  22206. "value": "420802"
  22207. }, {
  22208. "label": "掇刀区",
  22209. "value": "420804"
  22210. }, {
  22211. "label": "京山县",
  22212. "value": "420821"
  22213. }, {
  22214. "label": "沙洋县",
  22215. "value": "420822"
  22216. }, {
  22217. "label": "钟祥市",
  22218. "value": "420881"
  22219. }], [{
  22220. "label": "孝南区",
  22221. "value": "420902"
  22222. }, {
  22223. "label": "孝昌县",
  22224. "value": "420921"
  22225. }, {
  22226. "label": "大悟县",
  22227. "value": "420922"
  22228. }, {
  22229. "label": "云梦县",
  22230. "value": "420923"
  22231. }, {
  22232. "label": "应城市",
  22233. "value": "420981"
  22234. }, {
  22235. "label": "安陆市",
  22236. "value": "420982"
  22237. }, {
  22238. "label": "汉川市",
  22239. "value": "420984"
  22240. }], [{
  22241. "label": "沙市区",
  22242. "value": "421002"
  22243. }, {
  22244. "label": "荆州区",
  22245. "value": "421003"
  22246. }, {
  22247. "label": "公安县",
  22248. "value": "421022"
  22249. }, {
  22250. "label": "监利县",
  22251. "value": "421023"
  22252. }, {
  22253. "label": "江陵县",
  22254. "value": "421024"
  22255. }, {
  22256. "label": "荆州经济技术开发区",
  22257. "value": "421071"
  22258. }, {
  22259. "label": "石首市",
  22260. "value": "421081"
  22261. }, {
  22262. "label": "洪湖市",
  22263. "value": "421083"
  22264. }, {
  22265. "label": "松滋市",
  22266. "value": "421087"
  22267. }], [{
  22268. "label": "黄州区",
  22269. "value": "421102"
  22270. }, {
  22271. "label": "团风县",
  22272. "value": "421121"
  22273. }, {
  22274. "label": "红安县",
  22275. "value": "421122"
  22276. }, {
  22277. "label": "罗田县",
  22278. "value": "421123"
  22279. }, {
  22280. "label": "英山县",
  22281. "value": "421124"
  22282. }, {
  22283. "label": "浠水县",
  22284. "value": "421125"
  22285. }, {
  22286. "label": "蕲春县",
  22287. "value": "421126"
  22288. }, {
  22289. "label": "黄梅县",
  22290. "value": "421127"
  22291. }, {
  22292. "label": "龙感湖管理区",
  22293. "value": "421171"
  22294. }, {
  22295. "label": "麻城市",
  22296. "value": "421181"
  22297. }, {
  22298. "label": "武穴市",
  22299. "value": "421182"
  22300. }], [{
  22301. "label": "咸安区",
  22302. "value": "421202"
  22303. }, {
  22304. "label": "嘉鱼县",
  22305. "value": "421221"
  22306. }, {
  22307. "label": "通城县",
  22308. "value": "421222"
  22309. }, {
  22310. "label": "崇阳县",
  22311. "value": "421223"
  22312. }, {
  22313. "label": "通山县",
  22314. "value": "421224"
  22315. }, {
  22316. "label": "赤壁市",
  22317. "value": "421281"
  22318. }], [{
  22319. "label": "曾都区",
  22320. "value": "421303"
  22321. }, {
  22322. "label": "随县",
  22323. "value": "421321"
  22324. }, {
  22325. "label": "广水市",
  22326. "value": "421381"
  22327. }], [{
  22328. "label": "恩施市",
  22329. "value": "422801"
  22330. }, {
  22331. "label": "利川市",
  22332. "value": "422802"
  22333. }, {
  22334. "label": "建始县",
  22335. "value": "422822"
  22336. }, {
  22337. "label": "巴东县",
  22338. "value": "422823"
  22339. }, {
  22340. "label": "宣恩县",
  22341. "value": "422825"
  22342. }, {
  22343. "label": "咸丰县",
  22344. "value": "422826"
  22345. }, {
  22346. "label": "来凤县",
  22347. "value": "422827"
  22348. }, {
  22349. "label": "鹤峰县",
  22350. "value": "422828"
  22351. }], [{
  22352. "label": "仙桃市",
  22353. "value": "429004"
  22354. }, {
  22355. "label": "潜江市",
  22356. "value": "429005"
  22357. }, {
  22358. "label": "天门市",
  22359. "value": "429006"
  22360. }, {
  22361. "label": "神农架林区",
  22362. "value": "429021"
  22363. }]], [[{
  22364. "label": "芙蓉区",
  22365. "value": "430102"
  22366. }, {
  22367. "label": "天心区",
  22368. "value": "430103"
  22369. }, {
  22370. "label": "岳麓区",
  22371. "value": "430104"
  22372. }, {
  22373. "label": "开福区",
  22374. "value": "430105"
  22375. }, {
  22376. "label": "雨花区",
  22377. "value": "430111"
  22378. }, {
  22379. "label": "望城区",
  22380. "value": "430112"
  22381. }, {
  22382. "label": "长沙县",
  22383. "value": "430121"
  22384. }, {
  22385. "label": "浏阳市",
  22386. "value": "430181"
  22387. }, {
  22388. "label": "宁乡市",
  22389. "value": "430182"
  22390. }], [{
  22391. "label": "荷塘区",
  22392. "value": "430202"
  22393. }, {
  22394. "label": "芦淞区",
  22395. "value": "430203"
  22396. }, {
  22397. "label": "石峰区",
  22398. "value": "430204"
  22399. }, {
  22400. "label": "天元区",
  22401. "value": "430211"
  22402. }, {
  22403. "label": "株洲县",
  22404. "value": "430221"
  22405. }, {
  22406. "label": "攸县",
  22407. "value": "430223"
  22408. }, {
  22409. "label": "茶陵县",
  22410. "value": "430224"
  22411. }, {
  22412. "label": "炎陵县",
  22413. "value": "430225"
  22414. }, {
  22415. "label": "云龙示范区",
  22416. "value": "430271"
  22417. }, {
  22418. "label": "醴陵市",
  22419. "value": "430281"
  22420. }], [{
  22421. "label": "雨湖区",
  22422. "value": "430302"
  22423. }, {
  22424. "label": "岳塘区",
  22425. "value": "430304"
  22426. }, {
  22427. "label": "湘潭县",
  22428. "value": "430321"
  22429. }, {
  22430. "label": "湖南湘潭高新技术产业园区",
  22431. "value": "430371"
  22432. }, {
  22433. "label": "湘潭昭山示范区",
  22434. "value": "430372"
  22435. }, {
  22436. "label": "湘潭九华示范区",
  22437. "value": "430373"
  22438. }, {
  22439. "label": "湘乡市",
  22440. "value": "430381"
  22441. }, {
  22442. "label": "韶山市",
  22443. "value": "430382"
  22444. }], [{
  22445. "label": "珠晖区",
  22446. "value": "430405"
  22447. }, {
  22448. "label": "雁峰区",
  22449. "value": "430406"
  22450. }, {
  22451. "label": "石鼓区",
  22452. "value": "430407"
  22453. }, {
  22454. "label": "蒸湘区",
  22455. "value": "430408"
  22456. }, {
  22457. "label": "南岳区",
  22458. "value": "430412"
  22459. }, {
  22460. "label": "衡阳县",
  22461. "value": "430421"
  22462. }, {
  22463. "label": "衡南县",
  22464. "value": "430422"
  22465. }, {
  22466. "label": "衡山县",
  22467. "value": "430423"
  22468. }, {
  22469. "label": "衡东县",
  22470. "value": "430424"
  22471. }, {
  22472. "label": "祁东县",
  22473. "value": "430426"
  22474. }, {
  22475. "label": "衡阳综合保税区",
  22476. "value": "430471"
  22477. }, {
  22478. "label": "湖南衡阳高新技术产业园区",
  22479. "value": "430472"
  22480. }, {
  22481. "label": "湖南衡阳松木经济开发区",
  22482. "value": "430473"
  22483. }, {
  22484. "label": "耒阳市",
  22485. "value": "430481"
  22486. }, {
  22487. "label": "常宁市",
  22488. "value": "430482"
  22489. }], [{
  22490. "label": "双清区",
  22491. "value": "430502"
  22492. }, {
  22493. "label": "大祥区",
  22494. "value": "430503"
  22495. }, {
  22496. "label": "北塔区",
  22497. "value": "430511"
  22498. }, {
  22499. "label": "邵东县",
  22500. "value": "430521"
  22501. }, {
  22502. "label": "新邵县",
  22503. "value": "430522"
  22504. }, {
  22505. "label": "邵阳县",
  22506. "value": "430523"
  22507. }, {
  22508. "label": "隆回县",
  22509. "value": "430524"
  22510. }, {
  22511. "label": "洞口县",
  22512. "value": "430525"
  22513. }, {
  22514. "label": "绥宁县",
  22515. "value": "430527"
  22516. }, {
  22517. "label": "新宁县",
  22518. "value": "430528"
  22519. }, {
  22520. "label": "城步苗族自治县",
  22521. "value": "430529"
  22522. }, {
  22523. "label": "武冈市",
  22524. "value": "430581"
  22525. }], [{
  22526. "label": "岳阳楼区",
  22527. "value": "430602"
  22528. }, {
  22529. "label": "云溪区",
  22530. "value": "430603"
  22531. }, {
  22532. "label": "君山区",
  22533. "value": "430611"
  22534. }, {
  22535. "label": "岳阳县",
  22536. "value": "430621"
  22537. }, {
  22538. "label": "华容县",
  22539. "value": "430623"
  22540. }, {
  22541. "label": "湘阴县",
  22542. "value": "430624"
  22543. }, {
  22544. "label": "平江县",
  22545. "value": "430626"
  22546. }, {
  22547. "label": "岳阳市屈原管理区",
  22548. "value": "430671"
  22549. }, {
  22550. "label": "汨罗市",
  22551. "value": "430681"
  22552. }, {
  22553. "label": "临湘市",
  22554. "value": "430682"
  22555. }], [{
  22556. "label": "武陵区",
  22557. "value": "430702"
  22558. }, {
  22559. "label": "鼎城区",
  22560. "value": "430703"
  22561. }, {
  22562. "label": "安乡县",
  22563. "value": "430721"
  22564. }, {
  22565. "label": "汉寿县",
  22566. "value": "430722"
  22567. }, {
  22568. "label": "澧县",
  22569. "value": "430723"
  22570. }, {
  22571. "label": "临澧县",
  22572. "value": "430724"
  22573. }, {
  22574. "label": "桃源县",
  22575. "value": "430725"
  22576. }, {
  22577. "label": "石门县",
  22578. "value": "430726"
  22579. }, {
  22580. "label": "常德市西洞庭管理区",
  22581. "value": "430771"
  22582. }, {
  22583. "label": "津市市",
  22584. "value": "430781"
  22585. }], [{
  22586. "label": "永定区",
  22587. "value": "430802"
  22588. }, {
  22589. "label": "武陵源区",
  22590. "value": "430811"
  22591. }, {
  22592. "label": "慈利县",
  22593. "value": "430821"
  22594. }, {
  22595. "label": "桑植县",
  22596. "value": "430822"
  22597. }], [{
  22598. "label": "资阳区",
  22599. "value": "430902"
  22600. }, {
  22601. "label": "赫山区",
  22602. "value": "430903"
  22603. }, {
  22604. "label": "南县",
  22605. "value": "430921"
  22606. }, {
  22607. "label": "桃江县",
  22608. "value": "430922"
  22609. }, {
  22610. "label": "安化县",
  22611. "value": "430923"
  22612. }, {
  22613. "label": "益阳市大通湖管理区",
  22614. "value": "430971"
  22615. }, {
  22616. "label": "湖南益阳高新技术产业园区",
  22617. "value": "430972"
  22618. }, {
  22619. "label": "沅江市",
  22620. "value": "430981"
  22621. }], [{
  22622. "label": "北湖区",
  22623. "value": "431002"
  22624. }, {
  22625. "label": "苏仙区",
  22626. "value": "431003"
  22627. }, {
  22628. "label": "桂阳县",
  22629. "value": "431021"
  22630. }, {
  22631. "label": "宜章县",
  22632. "value": "431022"
  22633. }, {
  22634. "label": "永兴县",
  22635. "value": "431023"
  22636. }, {
  22637. "label": "嘉禾县",
  22638. "value": "431024"
  22639. }, {
  22640. "label": "临武县",
  22641. "value": "431025"
  22642. }, {
  22643. "label": "汝城县",
  22644. "value": "431026"
  22645. }, {
  22646. "label": "桂东县",
  22647. "value": "431027"
  22648. }, {
  22649. "label": "安仁县",
  22650. "value": "431028"
  22651. }, {
  22652. "label": "资兴市",
  22653. "value": "431081"
  22654. }], [{
  22655. "label": "零陵区",
  22656. "value": "431102"
  22657. }, {
  22658. "label": "冷水滩区",
  22659. "value": "431103"
  22660. }, {
  22661. "label": "祁阳县",
  22662. "value": "431121"
  22663. }, {
  22664. "label": "东安县",
  22665. "value": "431122"
  22666. }, {
  22667. "label": "双牌县",
  22668. "value": "431123"
  22669. }, {
  22670. "label": "道县",
  22671. "value": "431124"
  22672. }, {
  22673. "label": "江永县",
  22674. "value": "431125"
  22675. }, {
  22676. "label": "宁远县",
  22677. "value": "431126"
  22678. }, {
  22679. "label": "蓝山县",
  22680. "value": "431127"
  22681. }, {
  22682. "label": "新田县",
  22683. "value": "431128"
  22684. }, {
  22685. "label": "江华瑶族自治县",
  22686. "value": "431129"
  22687. }, {
  22688. "label": "永州经济技术开发区",
  22689. "value": "431171"
  22690. }, {
  22691. "label": "永州市金洞管理区",
  22692. "value": "431172"
  22693. }, {
  22694. "label": "永州市回龙圩管理区",
  22695. "value": "431173"
  22696. }], [{
  22697. "label": "鹤城区",
  22698. "value": "431202"
  22699. }, {
  22700. "label": "中方县",
  22701. "value": "431221"
  22702. }, {
  22703. "label": "沅陵县",
  22704. "value": "431222"
  22705. }, {
  22706. "label": "辰溪县",
  22707. "value": "431223"
  22708. }, {
  22709. "label": "溆浦县",
  22710. "value": "431224"
  22711. }, {
  22712. "label": "会同县",
  22713. "value": "431225"
  22714. }, {
  22715. "label": "麻阳苗族自治县",
  22716. "value": "431226"
  22717. }, {
  22718. "label": "新晃侗族自治县",
  22719. "value": "431227"
  22720. }, {
  22721. "label": "芷江侗族自治县",
  22722. "value": "431228"
  22723. }, {
  22724. "label": "靖州苗族侗族自治县",
  22725. "value": "431229"
  22726. }, {
  22727. "label": "通道侗族自治县",
  22728. "value": "431230"
  22729. }, {
  22730. "label": "怀化市洪江管理区",
  22731. "value": "431271"
  22732. }, {
  22733. "label": "洪江市",
  22734. "value": "431281"
  22735. }], [{
  22736. "label": "娄星区",
  22737. "value": "431302"
  22738. }, {
  22739. "label": "双峰县",
  22740. "value": "431321"
  22741. }, {
  22742. "label": "新化县",
  22743. "value": "431322"
  22744. }, {
  22745. "label": "冷水江市",
  22746. "value": "431381"
  22747. }, {
  22748. "label": "涟源市",
  22749. "value": "431382"
  22750. }], [{
  22751. "label": "吉首市",
  22752. "value": "433101"
  22753. }, {
  22754. "label": "泸溪县",
  22755. "value": "433122"
  22756. }, {
  22757. "label": "凤凰县",
  22758. "value": "433123"
  22759. }, {
  22760. "label": "花垣县",
  22761. "value": "433124"
  22762. }, {
  22763. "label": "保靖县",
  22764. "value": "433125"
  22765. }, {
  22766. "label": "古丈县",
  22767. "value": "433126"
  22768. }, {
  22769. "label": "永顺县",
  22770. "value": "433127"
  22771. }, {
  22772. "label": "龙山县",
  22773. "value": "433130"
  22774. }, {
  22775. "label": "湖南吉首经济开发区",
  22776. "value": "433172"
  22777. }, {
  22778. "label": "湖南永顺经济开发区",
  22779. "value": "433173"
  22780. }]], [[{
  22781. "label": "荔湾区",
  22782. "value": "440103"
  22783. }, {
  22784. "label": "越秀区",
  22785. "value": "440104"
  22786. }, {
  22787. "label": "海珠区",
  22788. "value": "440105"
  22789. }, {
  22790. "label": "天河区",
  22791. "value": "440106"
  22792. }, {
  22793. "label": "白云区",
  22794. "value": "440111"
  22795. }, {
  22796. "label": "黄埔区",
  22797. "value": "440112"
  22798. }, {
  22799. "label": "番禺区",
  22800. "value": "440113"
  22801. }, {
  22802. "label": "花都区",
  22803. "value": "440114"
  22804. }, {
  22805. "label": "南沙区",
  22806. "value": "440115"
  22807. }, {
  22808. "label": "从化区",
  22809. "value": "440117"
  22810. }, {
  22811. "label": "增城区",
  22812. "value": "440118"
  22813. }], [{
  22814. "label": "武江区",
  22815. "value": "440203"
  22816. }, {
  22817. "label": "浈江区",
  22818. "value": "440204"
  22819. }, {
  22820. "label": "曲江区",
  22821. "value": "440205"
  22822. }, {
  22823. "label": "始兴县",
  22824. "value": "440222"
  22825. }, {
  22826. "label": "仁化县",
  22827. "value": "440224"
  22828. }, {
  22829. "label": "翁源县",
  22830. "value": "440229"
  22831. }, {
  22832. "label": "乳源瑶族自治县",
  22833. "value": "440232"
  22834. }, {
  22835. "label": "新丰县",
  22836. "value": "440233"
  22837. }, {
  22838. "label": "乐昌市",
  22839. "value": "440281"
  22840. }, {
  22841. "label": "南雄市",
  22842. "value": "440282"
  22843. }], [{
  22844. "label": "罗湖区",
  22845. "value": "440303"
  22846. }, {
  22847. "label": "福田区",
  22848. "value": "440304"
  22849. }, {
  22850. "label": "南山区",
  22851. "value": "440305"
  22852. }, {
  22853. "label": "宝安区",
  22854. "value": "440306"
  22855. }, {
  22856. "label": "龙岗区",
  22857. "value": "440307"
  22858. }, {
  22859. "label": "盐田区",
  22860. "value": "440308"
  22861. }, {
  22862. "label": "龙华区",
  22863. "value": "440309"
  22864. }, {
  22865. "label": "坪山区",
  22866. "value": "440310"
  22867. }], [{
  22868. "label": "香洲区",
  22869. "value": "440402"
  22870. }, {
  22871. "label": "斗门区",
  22872. "value": "440403"
  22873. }, {
  22874. "label": "金湾区",
  22875. "value": "440404"
  22876. }], [{
  22877. "label": "龙湖区",
  22878. "value": "440507"
  22879. }, {
  22880. "label": "金平区",
  22881. "value": "440511"
  22882. }, {
  22883. "label": "濠江区",
  22884. "value": "440512"
  22885. }, {
  22886. "label": "潮阳区",
  22887. "value": "440513"
  22888. }, {
  22889. "label": "潮南区",
  22890. "value": "440514"
  22891. }, {
  22892. "label": "澄海区",
  22893. "value": "440515"
  22894. }, {
  22895. "label": "南澳县",
  22896. "value": "440523"
  22897. }], [{
  22898. "label": "禅城区",
  22899. "value": "440604"
  22900. }, {
  22901. "label": "南海区",
  22902. "value": "440605"
  22903. }, {
  22904. "label": "顺德区",
  22905. "value": "440606"
  22906. }, {
  22907. "label": "三水区",
  22908. "value": "440607"
  22909. }, {
  22910. "label": "高明区",
  22911. "value": "440608"
  22912. }], [{
  22913. "label": "蓬江区",
  22914. "value": "440703"
  22915. }, {
  22916. "label": "江海区",
  22917. "value": "440704"
  22918. }, {
  22919. "label": "新会区",
  22920. "value": "440705"
  22921. }, {
  22922. "label": "台山市",
  22923. "value": "440781"
  22924. }, {
  22925. "label": "开平市",
  22926. "value": "440783"
  22927. }, {
  22928. "label": "鹤山市",
  22929. "value": "440784"
  22930. }, {
  22931. "label": "恩平市",
  22932. "value": "440785"
  22933. }], [{
  22934. "label": "赤坎区",
  22935. "value": "440802"
  22936. }, {
  22937. "label": "霞山区",
  22938. "value": "440803"
  22939. }, {
  22940. "label": "坡头区",
  22941. "value": "440804"
  22942. }, {
  22943. "label": "麻章区",
  22944. "value": "440811"
  22945. }, {
  22946. "label": "遂溪县",
  22947. "value": "440823"
  22948. }, {
  22949. "label": "徐闻县",
  22950. "value": "440825"
  22951. }, {
  22952. "label": "廉江市",
  22953. "value": "440881"
  22954. }, {
  22955. "label": "雷州市",
  22956. "value": "440882"
  22957. }, {
  22958. "label": "吴川市",
  22959. "value": "440883"
  22960. }], [{
  22961. "label": "茂南区",
  22962. "value": "440902"
  22963. }, {
  22964. "label": "电白区",
  22965. "value": "440904"
  22966. }, {
  22967. "label": "高州市",
  22968. "value": "440981"
  22969. }, {
  22970. "label": "化州市",
  22971. "value": "440982"
  22972. }, {
  22973. "label": "信宜市",
  22974. "value": "440983"
  22975. }], [{
  22976. "label": "端州区",
  22977. "value": "441202"
  22978. }, {
  22979. "label": "鼎湖区",
  22980. "value": "441203"
  22981. }, {
  22982. "label": "高要区",
  22983. "value": "441204"
  22984. }, {
  22985. "label": "广宁县",
  22986. "value": "441223"
  22987. }, {
  22988. "label": "怀集县",
  22989. "value": "441224"
  22990. }, {
  22991. "label": "封开县",
  22992. "value": "441225"
  22993. }, {
  22994. "label": "德庆县",
  22995. "value": "441226"
  22996. }, {
  22997. "label": "四会市",
  22998. "value": "441284"
  22999. }], [{
  23000. "label": "惠城区",
  23001. "value": "441302"
  23002. }, {
  23003. "label": "惠阳区",
  23004. "value": "441303"
  23005. }, {
  23006. "label": "博罗县",
  23007. "value": "441322"
  23008. }, {
  23009. "label": "惠东县",
  23010. "value": "441323"
  23011. }, {
  23012. "label": "龙门县",
  23013. "value": "441324"
  23014. }], [{
  23015. "label": "梅江区",
  23016. "value": "441402"
  23017. }, {
  23018. "label": "梅县区",
  23019. "value": "441403"
  23020. }, {
  23021. "label": "大埔县",
  23022. "value": "441422"
  23023. }, {
  23024. "label": "丰顺县",
  23025. "value": "441423"
  23026. }, {
  23027. "label": "五华县",
  23028. "value": "441424"
  23029. }, {
  23030. "label": "平远县",
  23031. "value": "441426"
  23032. }, {
  23033. "label": "蕉岭县",
  23034. "value": "441427"
  23035. }, {
  23036. "label": "兴宁市",
  23037. "value": "441481"
  23038. }], [{
  23039. "label": "城区",
  23040. "value": "441502"
  23041. }, {
  23042. "label": "海丰县",
  23043. "value": "441521"
  23044. }, {
  23045. "label": "陆河县",
  23046. "value": "441523"
  23047. }, {
  23048. "label": "陆丰市",
  23049. "value": "441581"
  23050. }], [{
  23051. "label": "源城区",
  23052. "value": "441602"
  23053. }, {
  23054. "label": "紫金县",
  23055. "value": "441621"
  23056. }, {
  23057. "label": "龙川县",
  23058. "value": "441622"
  23059. }, {
  23060. "label": "连平县",
  23061. "value": "441623"
  23062. }, {
  23063. "label": "和平县",
  23064. "value": "441624"
  23065. }, {
  23066. "label": "东源县",
  23067. "value": "441625"
  23068. }], [{
  23069. "label": "江城区",
  23070. "value": "441702"
  23071. }, {
  23072. "label": "阳东区",
  23073. "value": "441704"
  23074. }, {
  23075. "label": "阳西县",
  23076. "value": "441721"
  23077. }, {
  23078. "label": "阳春市",
  23079. "value": "441781"
  23080. }], [{
  23081. "label": "清城区",
  23082. "value": "441802"
  23083. }, {
  23084. "label": "清新区",
  23085. "value": "441803"
  23086. }, {
  23087. "label": "佛冈县",
  23088. "value": "441821"
  23089. }, {
  23090. "label": "阳山县",
  23091. "value": "441823"
  23092. }, {
  23093. "label": "连山壮族瑶族自治县",
  23094. "value": "441825"
  23095. }, {
  23096. "label": "连南瑶族自治县",
  23097. "value": "441826"
  23098. }, {
  23099. "label": "英德市",
  23100. "value": "441881"
  23101. }, {
  23102. "label": "连州市",
  23103. "value": "441882"
  23104. }], [{
  23105. "label": "东莞市",
  23106. "value": "441900"
  23107. }], [{
  23108. "label": "中山市",
  23109. "value": "442000"
  23110. }], [{
  23111. "label": "湘桥区",
  23112. "value": "445102"
  23113. }, {
  23114. "label": "潮安区",
  23115. "value": "445103"
  23116. }, {
  23117. "label": "饶平县",
  23118. "value": "445122"
  23119. }], [{
  23120. "label": "榕城区",
  23121. "value": "445202"
  23122. }, {
  23123. "label": "揭东区",
  23124. "value": "445203"
  23125. }, {
  23126. "label": "揭西县",
  23127. "value": "445222"
  23128. }, {
  23129. "label": "惠来县",
  23130. "value": "445224"
  23131. }, {
  23132. "label": "普宁市",
  23133. "value": "445281"
  23134. }], [{
  23135. "label": "云城区",
  23136. "value": "445302"
  23137. }, {
  23138. "label": "云安区",
  23139. "value": "445303"
  23140. }, {
  23141. "label": "新兴县",
  23142. "value": "445321"
  23143. }, {
  23144. "label": "郁南县",
  23145. "value": "445322"
  23146. }, {
  23147. "label": "罗定市",
  23148. "value": "445381"
  23149. }]], [[{
  23150. "label": "兴宁区",
  23151. "value": "450102"
  23152. }, {
  23153. "label": "青秀区",
  23154. "value": "450103"
  23155. }, {
  23156. "label": "江南区",
  23157. "value": "450105"
  23158. }, {
  23159. "label": "西乡塘区",
  23160. "value": "450107"
  23161. }, {
  23162. "label": "良庆区",
  23163. "value": "450108"
  23164. }, {
  23165. "label": "邕宁区",
  23166. "value": "450109"
  23167. }, {
  23168. "label": "武鸣区",
  23169. "value": "450110"
  23170. }, {
  23171. "label": "隆安县",
  23172. "value": "450123"
  23173. }, {
  23174. "label": "马山县",
  23175. "value": "450124"
  23176. }, {
  23177. "label": "上林县",
  23178. "value": "450125"
  23179. }, {
  23180. "label": "宾阳县",
  23181. "value": "450126"
  23182. }, {
  23183. "label": "横县",
  23184. "value": "450127"
  23185. }], [{
  23186. "label": "城中区",
  23187. "value": "450202"
  23188. }, {
  23189. "label": "鱼峰区",
  23190. "value": "450203"
  23191. }, {
  23192. "label": "柳南区",
  23193. "value": "450204"
  23194. }, {
  23195. "label": "柳北区",
  23196. "value": "450205"
  23197. }, {
  23198. "label": "柳江区",
  23199. "value": "450206"
  23200. }, {
  23201. "label": "柳城县",
  23202. "value": "450222"
  23203. }, {
  23204. "label": "鹿寨县",
  23205. "value": "450223"
  23206. }, {
  23207. "label": "融安县",
  23208. "value": "450224"
  23209. }, {
  23210. "label": "融水苗族自治县",
  23211. "value": "450225"
  23212. }, {
  23213. "label": "三江侗族自治县",
  23214. "value": "450226"
  23215. }], [{
  23216. "label": "秀峰区",
  23217. "value": "450302"
  23218. }, {
  23219. "label": "叠彩区",
  23220. "value": "450303"
  23221. }, {
  23222. "label": "象山区",
  23223. "value": "450304"
  23224. }, {
  23225. "label": "七星区",
  23226. "value": "450305"
  23227. }, {
  23228. "label": "雁山区",
  23229. "value": "450311"
  23230. }, {
  23231. "label": "临桂区",
  23232. "value": "450312"
  23233. }, {
  23234. "label": "阳朔县",
  23235. "value": "450321"
  23236. }, {
  23237. "label": "灵川县",
  23238. "value": "450323"
  23239. }, {
  23240. "label": "全州县",
  23241. "value": "450324"
  23242. }, {
  23243. "label": "兴安县",
  23244. "value": "450325"
  23245. }, {
  23246. "label": "永福县",
  23247. "value": "450326"
  23248. }, {
  23249. "label": "灌阳县",
  23250. "value": "450327"
  23251. }, {
  23252. "label": "龙胜各族自治县",
  23253. "value": "450328"
  23254. }, {
  23255. "label": "资源县",
  23256. "value": "450329"
  23257. }, {
  23258. "label": "平乐县",
  23259. "value": "450330"
  23260. }, {
  23261. "label": "荔浦县",
  23262. "value": "450331"
  23263. }, {
  23264. "label": "恭城瑶族自治县",
  23265. "value": "450332"
  23266. }], [{
  23267. "label": "万秀区",
  23268. "value": "450403"
  23269. }, {
  23270. "label": "长洲区",
  23271. "value": "450405"
  23272. }, {
  23273. "label": "龙圩区",
  23274. "value": "450406"
  23275. }, {
  23276. "label": "苍梧县",
  23277. "value": "450421"
  23278. }, {
  23279. "label": "藤县",
  23280. "value": "450422"
  23281. }, {
  23282. "label": "蒙山县",
  23283. "value": "450423"
  23284. }, {
  23285. "label": "岑溪市",
  23286. "value": "450481"
  23287. }], [{
  23288. "label": "海城区",
  23289. "value": "450502"
  23290. }, {
  23291. "label": "银海区",
  23292. "value": "450503"
  23293. }, {
  23294. "label": "铁山港区",
  23295. "value": "450512"
  23296. }, {
  23297. "label": "合浦县",
  23298. "value": "450521"
  23299. }], [{
  23300. "label": "港口区",
  23301. "value": "450602"
  23302. }, {
  23303. "label": "防城区",
  23304. "value": "450603"
  23305. }, {
  23306. "label": "上思县",
  23307. "value": "450621"
  23308. }, {
  23309. "label": "东兴市",
  23310. "value": "450681"
  23311. }], [{
  23312. "label": "钦南区",
  23313. "value": "450702"
  23314. }, {
  23315. "label": "钦北区",
  23316. "value": "450703"
  23317. }, {
  23318. "label": "灵山县",
  23319. "value": "450721"
  23320. }, {
  23321. "label": "浦北县",
  23322. "value": "450722"
  23323. }], [{
  23324. "label": "港北区",
  23325. "value": "450802"
  23326. }, {
  23327. "label": "港南区",
  23328. "value": "450803"
  23329. }, {
  23330. "label": "覃塘区",
  23331. "value": "450804"
  23332. }, {
  23333. "label": "平南县",
  23334. "value": "450821"
  23335. }, {
  23336. "label": "桂平市",
  23337. "value": "450881"
  23338. }], [{
  23339. "label": "玉州区",
  23340. "value": "450902"
  23341. }, {
  23342. "label": "福绵区",
  23343. "value": "450903"
  23344. }, {
  23345. "label": "容县",
  23346. "value": "450921"
  23347. }, {
  23348. "label": "陆川县",
  23349. "value": "450922"
  23350. }, {
  23351. "label": "博白县",
  23352. "value": "450923"
  23353. }, {
  23354. "label": "兴业县",
  23355. "value": "450924"
  23356. }, {
  23357. "label": "北流市",
  23358. "value": "450981"
  23359. }], [{
  23360. "label": "右江区",
  23361. "value": "451002"
  23362. }, {
  23363. "label": "田阳县",
  23364. "value": "451021"
  23365. }, {
  23366. "label": "田东县",
  23367. "value": "451022"
  23368. }, {
  23369. "label": "平果县",
  23370. "value": "451023"
  23371. }, {
  23372. "label": "德保县",
  23373. "value": "451024"
  23374. }, {
  23375. "label": "那坡县",
  23376. "value": "451026"
  23377. }, {
  23378. "label": "凌云县",
  23379. "value": "451027"
  23380. }, {
  23381. "label": "乐业县",
  23382. "value": "451028"
  23383. }, {
  23384. "label": "田林县",
  23385. "value": "451029"
  23386. }, {
  23387. "label": "西林县",
  23388. "value": "451030"
  23389. }, {
  23390. "label": "隆林各族自治县",
  23391. "value": "451031"
  23392. }, {
  23393. "label": "靖西市",
  23394. "value": "451081"
  23395. }], [{
  23396. "label": "八步区",
  23397. "value": "451102"
  23398. }, {
  23399. "label": "平桂区",
  23400. "value": "451103"
  23401. }, {
  23402. "label": "昭平县",
  23403. "value": "451121"
  23404. }, {
  23405. "label": "钟山县",
  23406. "value": "451122"
  23407. }, {
  23408. "label": "富川瑶族自治县",
  23409. "value": "451123"
  23410. }], [{
  23411. "label": "金城江区",
  23412. "value": "451202"
  23413. }, {
  23414. "label": "宜州区",
  23415. "value": "451203"
  23416. }, {
  23417. "label": "南丹县",
  23418. "value": "451221"
  23419. }, {
  23420. "label": "天峨县",
  23421. "value": "451222"
  23422. }, {
  23423. "label": "凤山县",
  23424. "value": "451223"
  23425. }, {
  23426. "label": "东兰县",
  23427. "value": "451224"
  23428. }, {
  23429. "label": "罗城仫佬族自治县",
  23430. "value": "451225"
  23431. }, {
  23432. "label": "环江毛南族自治县",
  23433. "value": "451226"
  23434. }, {
  23435. "label": "巴马瑶族自治县",
  23436. "value": "451227"
  23437. }, {
  23438. "label": "都安瑶族自治县",
  23439. "value": "451228"
  23440. }, {
  23441. "label": "大化瑶族自治县",
  23442. "value": "451229"
  23443. }], [{
  23444. "label": "兴宾区",
  23445. "value": "451302"
  23446. }, {
  23447. "label": "忻城县",
  23448. "value": "451321"
  23449. }, {
  23450. "label": "象州县",
  23451. "value": "451322"
  23452. }, {
  23453. "label": "武宣县",
  23454. "value": "451323"
  23455. }, {
  23456. "label": "金秀瑶族自治县",
  23457. "value": "451324"
  23458. }, {
  23459. "label": "合山市",
  23460. "value": "451381"
  23461. }], [{
  23462. "label": "江州区",
  23463. "value": "451402"
  23464. }, {
  23465. "label": "扶绥县",
  23466. "value": "451421"
  23467. }, {
  23468. "label": "宁明县",
  23469. "value": "451422"
  23470. }, {
  23471. "label": "龙州县",
  23472. "value": "451423"
  23473. }, {
  23474. "label": "大新县",
  23475. "value": "451424"
  23476. }, {
  23477. "label": "天等县",
  23478. "value": "451425"
  23479. }, {
  23480. "label": "凭祥市",
  23481. "value": "451481"
  23482. }]], [[{
  23483. "label": "秀英区",
  23484. "value": "460105"
  23485. }, {
  23486. "label": "龙华区",
  23487. "value": "460106"
  23488. }, {
  23489. "label": "琼山区",
  23490. "value": "460107"
  23491. }, {
  23492. "label": "美兰区",
  23493. "value": "460108"
  23494. }], [{
  23495. "label": "海棠区",
  23496. "value": "460202"
  23497. }, {
  23498. "label": "吉阳区",
  23499. "value": "460203"
  23500. }, {
  23501. "label": "天涯区",
  23502. "value": "460204"
  23503. }, {
  23504. "label": "崖州区",
  23505. "value": "460205"
  23506. }], [{
  23507. "label": "西沙群岛",
  23508. "value": "460321"
  23509. }, {
  23510. "label": "南沙群岛",
  23511. "value": "460322"
  23512. }, {
  23513. "label": "中沙群岛的岛礁及其海域",
  23514. "value": "460323"
  23515. }], [{
  23516. "label": "儋州市",
  23517. "value": "460400"
  23518. }], [{
  23519. "label": "五指山市",
  23520. "value": "469001"
  23521. }, {
  23522. "label": "琼海市",
  23523. "value": "469002"
  23524. }, {
  23525. "label": "文昌市",
  23526. "value": "469005"
  23527. }, {
  23528. "label": "万宁市",
  23529. "value": "469006"
  23530. }, {
  23531. "label": "东方市",
  23532. "value": "469007"
  23533. }, {
  23534. "label": "定安县",
  23535. "value": "469021"
  23536. }, {
  23537. "label": "屯昌县",
  23538. "value": "469022"
  23539. }, {
  23540. "label": "澄迈县",
  23541. "value": "469023"
  23542. }, {
  23543. "label": "临高县",
  23544. "value": "469024"
  23545. }, {
  23546. "label": "白沙黎族自治县",
  23547. "value": "469025"
  23548. }, {
  23549. "label": "昌江黎族自治县",
  23550. "value": "469026"
  23551. }, {
  23552. "label": "乐东黎族自治县",
  23553. "value": "469027"
  23554. }, {
  23555. "label": "陵水黎族自治县",
  23556. "value": "469028"
  23557. }, {
  23558. "label": "保亭黎族苗族自治县",
  23559. "value": "469029"
  23560. }, {
  23561. "label": "琼中黎族苗族自治县",
  23562. "value": "469030"
  23563. }]], [[{
  23564. "label": "万州区",
  23565. "value": "500101"
  23566. }, {
  23567. "label": "涪陵区",
  23568. "value": "500102"
  23569. }, {
  23570. "label": "渝中区",
  23571. "value": "500103"
  23572. }, {
  23573. "label": "大渡口区",
  23574. "value": "500104"
  23575. }, {
  23576. "label": "江北区",
  23577. "value": "500105"
  23578. }, {
  23579. "label": "沙坪坝区",
  23580. "value": "500106"
  23581. }, {
  23582. "label": "九龙坡区",
  23583. "value": "500107"
  23584. }, {
  23585. "label": "南岸区",
  23586. "value": "500108"
  23587. }, {
  23588. "label": "北碚区",
  23589. "value": "500109"
  23590. }, {
  23591. "label": "綦江区",
  23592. "value": "500110"
  23593. }, {
  23594. "label": "大足区",
  23595. "value": "500111"
  23596. }, {
  23597. "label": "渝北区",
  23598. "value": "500112"
  23599. }, {
  23600. "label": "巴南区",
  23601. "value": "500113"
  23602. }, {
  23603. "label": "黔江区",
  23604. "value": "500114"
  23605. }, {
  23606. "label": "长寿区",
  23607. "value": "500115"
  23608. }, {
  23609. "label": "江津区",
  23610. "value": "500116"
  23611. }, {
  23612. "label": "合川区",
  23613. "value": "500117"
  23614. }, {
  23615. "label": "永川区",
  23616. "value": "500118"
  23617. }, {
  23618. "label": "南川区",
  23619. "value": "500119"
  23620. }, {
  23621. "label": "璧山区",
  23622. "value": "500120"
  23623. }, {
  23624. "label": "铜梁区",
  23625. "value": "500151"
  23626. }, {
  23627. "label": "潼南区",
  23628. "value": "500152"
  23629. }, {
  23630. "label": "荣昌区",
  23631. "value": "500153"
  23632. }, {
  23633. "label": "开州区",
  23634. "value": "500154"
  23635. }, {
  23636. "label": "梁平区",
  23637. "value": "500155"
  23638. }, {
  23639. "label": "武隆区",
  23640. "value": "500156"
  23641. }], [{
  23642. "label": "城口县",
  23643. "value": "500229"
  23644. }, {
  23645. "label": "丰都县",
  23646. "value": "500230"
  23647. }, {
  23648. "label": "垫江县",
  23649. "value": "500231"
  23650. }, {
  23651. "label": "忠县",
  23652. "value": "500233"
  23653. }, {
  23654. "label": "云阳县",
  23655. "value": "500235"
  23656. }, {
  23657. "label": "奉节县",
  23658. "value": "500236"
  23659. }, {
  23660. "label": "巫山县",
  23661. "value": "500237"
  23662. }, {
  23663. "label": "巫溪县",
  23664. "value": "500238"
  23665. }, {
  23666. "label": "石柱土家族自治县",
  23667. "value": "500240"
  23668. }, {
  23669. "label": "秀山土家族苗族自治县",
  23670. "value": "500241"
  23671. }, {
  23672. "label": "酉阳土家族苗族自治县",
  23673. "value": "500242"
  23674. }, {
  23675. "label": "彭水苗族土家族自治县",
  23676. "value": "500243"
  23677. }]], [[{
  23678. "label": "锦江区",
  23679. "value": "510104"
  23680. }, {
  23681. "label": "青羊区",
  23682. "value": "510105"
  23683. }, {
  23684. "label": "金牛区",
  23685. "value": "510106"
  23686. }, {
  23687. "label": "武侯区",
  23688. "value": "510107"
  23689. }, {
  23690. "label": "成华区",
  23691. "value": "510108"
  23692. }, {
  23693. "label": "龙泉驿区",
  23694. "value": "510112"
  23695. }, {
  23696. "label": "青白江区",
  23697. "value": "510113"
  23698. }, {
  23699. "label": "新都区",
  23700. "value": "510114"
  23701. }, {
  23702. "label": "温江区",
  23703. "value": "510115"
  23704. }, {
  23705. "label": "双流区",
  23706. "value": "510116"
  23707. }, {
  23708. "label": "郫都区",
  23709. "value": "510117"
  23710. }, {
  23711. "label": "金堂县",
  23712. "value": "510121"
  23713. }, {
  23714. "label": "大邑县",
  23715. "value": "510129"
  23716. }, {
  23717. "label": "蒲江县",
  23718. "value": "510131"
  23719. }, {
  23720. "label": "新津县",
  23721. "value": "510132"
  23722. }, {
  23723. "label": "都江堰市",
  23724. "value": "510181"
  23725. }, {
  23726. "label": "彭州市",
  23727. "value": "510182"
  23728. }, {
  23729. "label": "邛崃市",
  23730. "value": "510183"
  23731. }, {
  23732. "label": "崇州市",
  23733. "value": "510184"
  23734. }, {
  23735. "label": "简阳市",
  23736. "value": "510185"
  23737. }], [{
  23738. "label": "自流井区",
  23739. "value": "510302"
  23740. }, {
  23741. "label": "贡井区",
  23742. "value": "510303"
  23743. }, {
  23744. "label": "大安区",
  23745. "value": "510304"
  23746. }, {
  23747. "label": "沿滩区",
  23748. "value": "510311"
  23749. }, {
  23750. "label": "荣县",
  23751. "value": "510321"
  23752. }, {
  23753. "label": "富顺县",
  23754. "value": "510322"
  23755. }], [{
  23756. "label": "东区",
  23757. "value": "510402"
  23758. }, {
  23759. "label": "西区",
  23760. "value": "510403"
  23761. }, {
  23762. "label": "仁和区",
  23763. "value": "510411"
  23764. }, {
  23765. "label": "米易县",
  23766. "value": "510421"
  23767. }, {
  23768. "label": "盐边县",
  23769. "value": "510422"
  23770. }], [{
  23771. "label": "江阳区",
  23772. "value": "510502"
  23773. }, {
  23774. "label": "纳溪区",
  23775. "value": "510503"
  23776. }, {
  23777. "label": "龙马潭区",
  23778. "value": "510504"
  23779. }, {
  23780. "label": "泸县",
  23781. "value": "510521"
  23782. }, {
  23783. "label": "合江县",
  23784. "value": "510522"
  23785. }, {
  23786. "label": "叙永县",
  23787. "value": "510524"
  23788. }, {
  23789. "label": "古蔺县",
  23790. "value": "510525"
  23791. }], [{
  23792. "label": "旌阳区",
  23793. "value": "510603"
  23794. }, {
  23795. "label": "罗江区",
  23796. "value": "510604"
  23797. }, {
  23798. "label": "中江县",
  23799. "value": "510623"
  23800. }, {
  23801. "label": "广汉市",
  23802. "value": "510681"
  23803. }, {
  23804. "label": "什邡市",
  23805. "value": "510682"
  23806. }, {
  23807. "label": "绵竹市",
  23808. "value": "510683"
  23809. }], [{
  23810. "label": "涪城区",
  23811. "value": "510703"
  23812. }, {
  23813. "label": "游仙区",
  23814. "value": "510704"
  23815. }, {
  23816. "label": "安州区",
  23817. "value": "510705"
  23818. }, {
  23819. "label": "三台县",
  23820. "value": "510722"
  23821. }, {
  23822. "label": "盐亭县",
  23823. "value": "510723"
  23824. }, {
  23825. "label": "梓潼县",
  23826. "value": "510725"
  23827. }, {
  23828. "label": "北川羌族自治县",
  23829. "value": "510726"
  23830. }, {
  23831. "label": "平武县",
  23832. "value": "510727"
  23833. }, {
  23834. "label": "江油市",
  23835. "value": "510781"
  23836. }], [{
  23837. "label": "利州区",
  23838. "value": "510802"
  23839. }, {
  23840. "label": "昭化区",
  23841. "value": "510811"
  23842. }, {
  23843. "label": "朝天区",
  23844. "value": "510812"
  23845. }, {
  23846. "label": "旺苍县",
  23847. "value": "510821"
  23848. }, {
  23849. "label": "青川县",
  23850. "value": "510822"
  23851. }, {
  23852. "label": "剑阁县",
  23853. "value": "510823"
  23854. }, {
  23855. "label": "苍溪县",
  23856. "value": "510824"
  23857. }], [{
  23858. "label": "船山区",
  23859. "value": "510903"
  23860. }, {
  23861. "label": "安居区",
  23862. "value": "510904"
  23863. }, {
  23864. "label": "蓬溪县",
  23865. "value": "510921"
  23866. }, {
  23867. "label": "射洪县",
  23868. "value": "510922"
  23869. }, {
  23870. "label": "大英县",
  23871. "value": "510923"
  23872. }], [{
  23873. "label": "市中区",
  23874. "value": "511002"
  23875. }, {
  23876. "label": "东兴区",
  23877. "value": "511011"
  23878. }, {
  23879. "label": "威远县",
  23880. "value": "511024"
  23881. }, {
  23882. "label": "资中县",
  23883. "value": "511025"
  23884. }, {
  23885. "label": "内江经济开发区",
  23886. "value": "511071"
  23887. }, {
  23888. "label": "隆昌市",
  23889. "value": "511083"
  23890. }], [{
  23891. "label": "市中区",
  23892. "value": "511102"
  23893. }, {
  23894. "label": "沙湾区",
  23895. "value": "511111"
  23896. }, {
  23897. "label": "五通桥区",
  23898. "value": "511112"
  23899. }, {
  23900. "label": "金口河区",
  23901. "value": "511113"
  23902. }, {
  23903. "label": "犍为县",
  23904. "value": "511123"
  23905. }, {
  23906. "label": "井研县",
  23907. "value": "511124"
  23908. }, {
  23909. "label": "夹江县",
  23910. "value": "511126"
  23911. }, {
  23912. "label": "沐川县",
  23913. "value": "511129"
  23914. }, {
  23915. "label": "峨边彝族自治县",
  23916. "value": "511132"
  23917. }, {
  23918. "label": "马边彝族自治县",
  23919. "value": "511133"
  23920. }, {
  23921. "label": "峨眉山市",
  23922. "value": "511181"
  23923. }], [{
  23924. "label": "顺庆区",
  23925. "value": "511302"
  23926. }, {
  23927. "label": "高坪区",
  23928. "value": "511303"
  23929. }, {
  23930. "label": "嘉陵区",
  23931. "value": "511304"
  23932. }, {
  23933. "label": "南部县",
  23934. "value": "511321"
  23935. }, {
  23936. "label": "营山县",
  23937. "value": "511322"
  23938. }, {
  23939. "label": "蓬安县",
  23940. "value": "511323"
  23941. }, {
  23942. "label": "仪陇县",
  23943. "value": "511324"
  23944. }, {
  23945. "label": "西充县",
  23946. "value": "511325"
  23947. }, {
  23948. "label": "阆中市",
  23949. "value": "511381"
  23950. }], [{
  23951. "label": "东坡区",
  23952. "value": "511402"
  23953. }, {
  23954. "label": "彭山区",
  23955. "value": "511403"
  23956. }, {
  23957. "label": "仁寿县",
  23958. "value": "511421"
  23959. }, {
  23960. "label": "洪雅县",
  23961. "value": "511423"
  23962. }, {
  23963. "label": "丹棱县",
  23964. "value": "511424"
  23965. }, {
  23966. "label": "青神县",
  23967. "value": "511425"
  23968. }], [{
  23969. "label": "翠屏区",
  23970. "value": "511502"
  23971. }, {
  23972. "label": "南溪区",
  23973. "value": "511503"
  23974. }, {
  23975. "label": "宜宾县",
  23976. "value": "511521"
  23977. }, {
  23978. "label": "江安县",
  23979. "value": "511523"
  23980. }, {
  23981. "label": "长宁县",
  23982. "value": "511524"
  23983. }, {
  23984. "label": "高县",
  23985. "value": "511525"
  23986. }, {
  23987. "label": "珙县",
  23988. "value": "511526"
  23989. }, {
  23990. "label": "筠连县",
  23991. "value": "511527"
  23992. }, {
  23993. "label": "兴文县",
  23994. "value": "511528"
  23995. }, {
  23996. "label": "屏山县",
  23997. "value": "511529"
  23998. }], [{
  23999. "label": "广安区",
  24000. "value": "511602"
  24001. }, {
  24002. "label": "前锋区",
  24003. "value": "511603"
  24004. }, {
  24005. "label": "岳池县",
  24006. "value": "511621"
  24007. }, {
  24008. "label": "武胜县",
  24009. "value": "511622"
  24010. }, {
  24011. "label": "邻水县",
  24012. "value": "511623"
  24013. }, {
  24014. "label": "华蓥市",
  24015. "value": "511681"
  24016. }], [{
  24017. "label": "通川区",
  24018. "value": "511702"
  24019. }, {
  24020. "label": "达川区",
  24021. "value": "511703"
  24022. }, {
  24023. "label": "宣汉县",
  24024. "value": "511722"
  24025. }, {
  24026. "label": "开江县",
  24027. "value": "511723"
  24028. }, {
  24029. "label": "大竹县",
  24030. "value": "511724"
  24031. }, {
  24032. "label": "渠县",
  24033. "value": "511725"
  24034. }, {
  24035. "label": "达州经济开发区",
  24036. "value": "511771"
  24037. }, {
  24038. "label": "万源市",
  24039. "value": "511781"
  24040. }], [{
  24041. "label": "雨城区",
  24042. "value": "511802"
  24043. }, {
  24044. "label": "名山区",
  24045. "value": "511803"
  24046. }, {
  24047. "label": "荥经县",
  24048. "value": "511822"
  24049. }, {
  24050. "label": "汉源县",
  24051. "value": "511823"
  24052. }, {
  24053. "label": "石棉县",
  24054. "value": "511824"
  24055. }, {
  24056. "label": "天全县",
  24057. "value": "511825"
  24058. }, {
  24059. "label": "芦山县",
  24060. "value": "511826"
  24061. }, {
  24062. "label": "宝兴县",
  24063. "value": "511827"
  24064. }], [{
  24065. "label": "巴州区",
  24066. "value": "511902"
  24067. }, {
  24068. "label": "恩阳区",
  24069. "value": "511903"
  24070. }, {
  24071. "label": "通江县",
  24072. "value": "511921"
  24073. }, {
  24074. "label": "南江县",
  24075. "value": "511922"
  24076. }, {
  24077. "label": "平昌县",
  24078. "value": "511923"
  24079. }, {
  24080. "label": "巴中经济开发区",
  24081. "value": "511971"
  24082. }], [{
  24083. "label": "雁江区",
  24084. "value": "512002"
  24085. }, {
  24086. "label": "安岳县",
  24087. "value": "512021"
  24088. }, {
  24089. "label": "乐至县",
  24090. "value": "512022"
  24091. }], [{
  24092. "label": "马尔康市",
  24093. "value": "513201"
  24094. }, {
  24095. "label": "汶川县",
  24096. "value": "513221"
  24097. }, {
  24098. "label": "理县",
  24099. "value": "513222"
  24100. }, {
  24101. "label": "茂县",
  24102. "value": "513223"
  24103. }, {
  24104. "label": "松潘县",
  24105. "value": "513224"
  24106. }, {
  24107. "label": "九寨沟县",
  24108. "value": "513225"
  24109. }, {
  24110. "label": "金川县",
  24111. "value": "513226"
  24112. }, {
  24113. "label": "小金县",
  24114. "value": "513227"
  24115. }, {
  24116. "label": "黑水县",
  24117. "value": "513228"
  24118. }, {
  24119. "label": "壤塘县",
  24120. "value": "513230"
  24121. }, {
  24122. "label": "阿坝县",
  24123. "value": "513231"
  24124. }, {
  24125. "label": "若尔盖县",
  24126. "value": "513232"
  24127. }, {
  24128. "label": "红原县",
  24129. "value": "513233"
  24130. }], [{
  24131. "label": "康定市",
  24132. "value": "513301"
  24133. }, {
  24134. "label": "泸定县",
  24135. "value": "513322"
  24136. }, {
  24137. "label": "丹巴县",
  24138. "value": "513323"
  24139. }, {
  24140. "label": "九龙县",
  24141. "value": "513324"
  24142. }, {
  24143. "label": "雅江县",
  24144. "value": "513325"
  24145. }, {
  24146. "label": "道孚县",
  24147. "value": "513326"
  24148. }, {
  24149. "label": "炉霍县",
  24150. "value": "513327"
  24151. }, {
  24152. "label": "甘孜县",
  24153. "value": "513328"
  24154. }, {
  24155. "label": "新龙县",
  24156. "value": "513329"
  24157. }, {
  24158. "label": "德格县",
  24159. "value": "513330"
  24160. }, {
  24161. "label": "白玉县",
  24162. "value": "513331"
  24163. }, {
  24164. "label": "石渠县",
  24165. "value": "513332"
  24166. }, {
  24167. "label": "色达县",
  24168. "value": "513333"
  24169. }, {
  24170. "label": "理塘县",
  24171. "value": "513334"
  24172. }, {
  24173. "label": "巴塘县",
  24174. "value": "513335"
  24175. }, {
  24176. "label": "乡城县",
  24177. "value": "513336"
  24178. }, {
  24179. "label": "稻城县",
  24180. "value": "513337"
  24181. }, {
  24182. "label": "得荣县",
  24183. "value": "513338"
  24184. }], [{
  24185. "label": "西昌市",
  24186. "value": "513401"
  24187. }, {
  24188. "label": "木里藏族自治县",
  24189. "value": "513422"
  24190. }, {
  24191. "label": "盐源县",
  24192. "value": "513423"
  24193. }, {
  24194. "label": "德昌县",
  24195. "value": "513424"
  24196. }, {
  24197. "label": "会理县",
  24198. "value": "513425"
  24199. }, {
  24200. "label": "会东县",
  24201. "value": "513426"
  24202. }, {
  24203. "label": "宁南县",
  24204. "value": "513427"
  24205. }, {
  24206. "label": "普格县",
  24207. "value": "513428"
  24208. }, {
  24209. "label": "布拖县",
  24210. "value": "513429"
  24211. }, {
  24212. "label": "金阳县",
  24213. "value": "513430"
  24214. }, {
  24215. "label": "昭觉县",
  24216. "value": "513431"
  24217. }, {
  24218. "label": "喜德县",
  24219. "value": "513432"
  24220. }, {
  24221. "label": "冕宁县",
  24222. "value": "513433"
  24223. }, {
  24224. "label": "越西县",
  24225. "value": "513434"
  24226. }, {
  24227. "label": "甘洛县",
  24228. "value": "513435"
  24229. }, {
  24230. "label": "美姑县",
  24231. "value": "513436"
  24232. }, {
  24233. "label": "雷波县",
  24234. "value": "513437"
  24235. }]], [[{
  24236. "label": "南明区",
  24237. "value": "520102"
  24238. }, {
  24239. "label": "云岩区",
  24240. "value": "520103"
  24241. }, {
  24242. "label": "花溪区",
  24243. "value": "520111"
  24244. }, {
  24245. "label": "乌当区",
  24246. "value": "520112"
  24247. }, {
  24248. "label": "白云区",
  24249. "value": "520113"
  24250. }, {
  24251. "label": "观山湖区",
  24252. "value": "520115"
  24253. }, {
  24254. "label": "开阳县",
  24255. "value": "520121"
  24256. }, {
  24257. "label": "息烽县",
  24258. "value": "520122"
  24259. }, {
  24260. "label": "修文县",
  24261. "value": "520123"
  24262. }, {
  24263. "label": "清镇市",
  24264. "value": "520181"
  24265. }], [{
  24266. "label": "钟山区",
  24267. "value": "520201"
  24268. }, {
  24269. "label": "六枝特区",
  24270. "value": "520203"
  24271. }, {
  24272. "label": "水城县",
  24273. "value": "520221"
  24274. }, {
  24275. "label": "盘州市",
  24276. "value": "520281"
  24277. }], [{
  24278. "label": "红花岗区",
  24279. "value": "520302"
  24280. }, {
  24281. "label": "汇川区",
  24282. "value": "520303"
  24283. }, {
  24284. "label": "播州区",
  24285. "value": "520304"
  24286. }, {
  24287. "label": "桐梓县",
  24288. "value": "520322"
  24289. }, {
  24290. "label": "绥阳县",
  24291. "value": "520323"
  24292. }, {
  24293. "label": "正安县",
  24294. "value": "520324"
  24295. }, {
  24296. "label": "道真仡佬族苗族自治县",
  24297. "value": "520325"
  24298. }, {
  24299. "label": "务川仡佬族苗族自治县",
  24300. "value": "520326"
  24301. }, {
  24302. "label": "凤冈县",
  24303. "value": "520327"
  24304. }, {
  24305. "label": "湄潭县",
  24306. "value": "520328"
  24307. }, {
  24308. "label": "余庆县",
  24309. "value": "520329"
  24310. }, {
  24311. "label": "习水县",
  24312. "value": "520330"
  24313. }, {
  24314. "label": "赤水市",
  24315. "value": "520381"
  24316. }, {
  24317. "label": "仁怀市",
  24318. "value": "520382"
  24319. }], [{
  24320. "label": "西秀区",
  24321. "value": "520402"
  24322. }, {
  24323. "label": "平坝区",
  24324. "value": "520403"
  24325. }, {
  24326. "label": "普定县",
  24327. "value": "520422"
  24328. }, {
  24329. "label": "镇宁布依族苗族自治县",
  24330. "value": "520423"
  24331. }, {
  24332. "label": "关岭布依族苗族自治县",
  24333. "value": "520424"
  24334. }, {
  24335. "label": "紫云苗族布依族自治县",
  24336. "value": "520425"
  24337. }], [{
  24338. "label": "七星关区",
  24339. "value": "520502"
  24340. }, {
  24341. "label": "大方县",
  24342. "value": "520521"
  24343. }, {
  24344. "label": "黔西县",
  24345. "value": "520522"
  24346. }, {
  24347. "label": "金沙县",
  24348. "value": "520523"
  24349. }, {
  24350. "label": "织金县",
  24351. "value": "520524"
  24352. }, {
  24353. "label": "纳雍县",
  24354. "value": "520525"
  24355. }, {
  24356. "label": "威宁彝族回族苗族自治县",
  24357. "value": "520526"
  24358. }, {
  24359. "label": "赫章县",
  24360. "value": "520527"
  24361. }], [{
  24362. "label": "碧江区",
  24363. "value": "520602"
  24364. }, {
  24365. "label": "万山区",
  24366. "value": "520603"
  24367. }, {
  24368. "label": "江口县",
  24369. "value": "520621"
  24370. }, {
  24371. "label": "玉屏侗族自治县",
  24372. "value": "520622"
  24373. }, {
  24374. "label": "石阡县",
  24375. "value": "520623"
  24376. }, {
  24377. "label": "思南县",
  24378. "value": "520624"
  24379. }, {
  24380. "label": "印江土家族苗族自治县",
  24381. "value": "520625"
  24382. }, {
  24383. "label": "德江县",
  24384. "value": "520626"
  24385. }, {
  24386. "label": "沿河土家族自治县",
  24387. "value": "520627"
  24388. }, {
  24389. "label": "松桃苗族自治县",
  24390. "value": "520628"
  24391. }], [{
  24392. "label": "兴义市",
  24393. "value": "522301"
  24394. }, {
  24395. "label": "兴仁县",
  24396. "value": "522322"
  24397. }, {
  24398. "label": "普安县",
  24399. "value": "522323"
  24400. }, {
  24401. "label": "晴隆县",
  24402. "value": "522324"
  24403. }, {
  24404. "label": "贞丰县",
  24405. "value": "522325"
  24406. }, {
  24407. "label": "望谟县",
  24408. "value": "522326"
  24409. }, {
  24410. "label": "册亨县",
  24411. "value": "522327"
  24412. }, {
  24413. "label": "安龙县",
  24414. "value": "522328"
  24415. }], [{
  24416. "label": "凯里市",
  24417. "value": "522601"
  24418. }, {
  24419. "label": "黄平县",
  24420. "value": "522622"
  24421. }, {
  24422. "label": "施秉县",
  24423. "value": "522623"
  24424. }, {
  24425. "label": "三穗县",
  24426. "value": "522624"
  24427. }, {
  24428. "label": "镇远县",
  24429. "value": "522625"
  24430. }, {
  24431. "label": "岑巩县",
  24432. "value": "522626"
  24433. }, {
  24434. "label": "天柱县",
  24435. "value": "522627"
  24436. }, {
  24437. "label": "锦屏县",
  24438. "value": "522628"
  24439. }, {
  24440. "label": "剑河县",
  24441. "value": "522629"
  24442. }, {
  24443. "label": "台江县",
  24444. "value": "522630"
  24445. }, {
  24446. "label": "黎平县",
  24447. "value": "522631"
  24448. }, {
  24449. "label": "榕江县",
  24450. "value": "522632"
  24451. }, {
  24452. "label": "从江县",
  24453. "value": "522633"
  24454. }, {
  24455. "label": "雷山县",
  24456. "value": "522634"
  24457. }, {
  24458. "label": "麻江县",
  24459. "value": "522635"
  24460. }, {
  24461. "label": "丹寨县",
  24462. "value": "522636"
  24463. }], [{
  24464. "label": "都匀市",
  24465. "value": "522701"
  24466. }, {
  24467. "label": "福泉市",
  24468. "value": "522702"
  24469. }, {
  24470. "label": "荔波县",
  24471. "value": "522722"
  24472. }, {
  24473. "label": "贵定县",
  24474. "value": "522723"
  24475. }, {
  24476. "label": "瓮安县",
  24477. "value": "522725"
  24478. }, {
  24479. "label": "独山县",
  24480. "value": "522726"
  24481. }, {
  24482. "label": "平塘县",
  24483. "value": "522727"
  24484. }, {
  24485. "label": "罗甸县",
  24486. "value": "522728"
  24487. }, {
  24488. "label": "长顺县",
  24489. "value": "522729"
  24490. }, {
  24491. "label": "龙里县",
  24492. "value": "522730"
  24493. }, {
  24494. "label": "惠水县",
  24495. "value": "522731"
  24496. }, {
  24497. "label": "三都水族自治县",
  24498. "value": "522732"
  24499. }]], [[{
  24500. "label": "五华区",
  24501. "value": "530102"
  24502. }, {
  24503. "label": "盘龙区",
  24504. "value": "530103"
  24505. }, {
  24506. "label": "官渡区",
  24507. "value": "530111"
  24508. }, {
  24509. "label": "西山区",
  24510. "value": "530112"
  24511. }, {
  24512. "label": "东川区",
  24513. "value": "530113"
  24514. }, {
  24515. "label": "呈贡区",
  24516. "value": "530114"
  24517. }, {
  24518. "label": "晋宁区",
  24519. "value": "530115"
  24520. }, {
  24521. "label": "富民县",
  24522. "value": "530124"
  24523. }, {
  24524. "label": "宜良县",
  24525. "value": "530125"
  24526. }, {
  24527. "label": "石林彝族自治县",
  24528. "value": "530126"
  24529. }, {
  24530. "label": "嵩明县",
  24531. "value": "530127"
  24532. }, {
  24533. "label": "禄劝彝族苗族自治县",
  24534. "value": "530128"
  24535. }, {
  24536. "label": "寻甸回族彝族自治县",
  24537. "value": "530129"
  24538. }, {
  24539. "label": "安宁市",
  24540. "value": "530181"
  24541. }], [{
  24542. "label": "麒麟区",
  24543. "value": "530302"
  24544. }, {
  24545. "label": "沾益区",
  24546. "value": "530303"
  24547. }, {
  24548. "label": "马龙县",
  24549. "value": "530321"
  24550. }, {
  24551. "label": "陆良县",
  24552. "value": "530322"
  24553. }, {
  24554. "label": "师宗县",
  24555. "value": "530323"
  24556. }, {
  24557. "label": "罗平县",
  24558. "value": "530324"
  24559. }, {
  24560. "label": "富源县",
  24561. "value": "530325"
  24562. }, {
  24563. "label": "会泽县",
  24564. "value": "530326"
  24565. }, {
  24566. "label": "宣威市",
  24567. "value": "530381"
  24568. }], [{
  24569. "label": "红塔区",
  24570. "value": "530402"
  24571. }, {
  24572. "label": "江川区",
  24573. "value": "530403"
  24574. }, {
  24575. "label": "澄江县",
  24576. "value": "530422"
  24577. }, {
  24578. "label": "通海县",
  24579. "value": "530423"
  24580. }, {
  24581. "label": "华宁县",
  24582. "value": "530424"
  24583. }, {
  24584. "label": "易门县",
  24585. "value": "530425"
  24586. }, {
  24587. "label": "峨山彝族自治县",
  24588. "value": "530426"
  24589. }, {
  24590. "label": "新平彝族傣族自治县",
  24591. "value": "530427"
  24592. }, {
  24593. "label": "元江哈尼族彝族傣族自治县",
  24594. "value": "530428"
  24595. }], [{
  24596. "label": "隆阳区",
  24597. "value": "530502"
  24598. }, {
  24599. "label": "施甸县",
  24600. "value": "530521"
  24601. }, {
  24602. "label": "龙陵县",
  24603. "value": "530523"
  24604. }, {
  24605. "label": "昌宁县",
  24606. "value": "530524"
  24607. }, {
  24608. "label": "腾冲市",
  24609. "value": "530581"
  24610. }], [{
  24611. "label": "昭阳区",
  24612. "value": "530602"
  24613. }, {
  24614. "label": "鲁甸县",
  24615. "value": "530621"
  24616. }, {
  24617. "label": "巧家县",
  24618. "value": "530622"
  24619. }, {
  24620. "label": "盐津县",
  24621. "value": "530623"
  24622. }, {
  24623. "label": "大关县",
  24624. "value": "530624"
  24625. }, {
  24626. "label": "永善县",
  24627. "value": "530625"
  24628. }, {
  24629. "label": "绥江县",
  24630. "value": "530626"
  24631. }, {
  24632. "label": "镇雄县",
  24633. "value": "530627"
  24634. }, {
  24635. "label": "彝良县",
  24636. "value": "530628"
  24637. }, {
  24638. "label": "威信县",
  24639. "value": "530629"
  24640. }, {
  24641. "label": "水富县",
  24642. "value": "530630"
  24643. }], [{
  24644. "label": "古城区",
  24645. "value": "530702"
  24646. }, {
  24647. "label": "玉龙纳西族自治县",
  24648. "value": "530721"
  24649. }, {
  24650. "label": "永胜县",
  24651. "value": "530722"
  24652. }, {
  24653. "label": "华坪县",
  24654. "value": "530723"
  24655. }, {
  24656. "label": "宁蒗彝族自治县",
  24657. "value": "530724"
  24658. }], [{
  24659. "label": "思茅区",
  24660. "value": "530802"
  24661. }, {
  24662. "label": "宁洱哈尼族彝族自治县",
  24663. "value": "530821"
  24664. }, {
  24665. "label": "墨江哈尼族自治县",
  24666. "value": "530822"
  24667. }, {
  24668. "label": "景东彝族自治县",
  24669. "value": "530823"
  24670. }, {
  24671. "label": "景谷傣族彝族自治县",
  24672. "value": "530824"
  24673. }, {
  24674. "label": "镇沅彝族哈尼族拉祜族自治县",
  24675. "value": "530825"
  24676. }, {
  24677. "label": "江城哈尼族彝族自治县",
  24678. "value": "530826"
  24679. }, {
  24680. "label": "孟连傣族拉祜族佤族自治县",
  24681. "value": "530827"
  24682. }, {
  24683. "label": "澜沧拉祜族自治县",
  24684. "value": "530828"
  24685. }, {
  24686. "label": "西盟佤族自治县",
  24687. "value": "530829"
  24688. }], [{
  24689. "label": "临翔区",
  24690. "value": "530902"
  24691. }, {
  24692. "label": "凤庆县",
  24693. "value": "530921"
  24694. }, {
  24695. "label": "云县",
  24696. "value": "530922"
  24697. }, {
  24698. "label": "永德县",
  24699. "value": "530923"
  24700. }, {
  24701. "label": "镇康县",
  24702. "value": "530924"
  24703. }, {
  24704. "label": "双江拉祜族佤族布朗族傣族自治县",
  24705. "value": "530925"
  24706. }, {
  24707. "label": "耿马傣族佤族自治县",
  24708. "value": "530926"
  24709. }, {
  24710. "label": "沧源佤族自治县",
  24711. "value": "530927"
  24712. }], [{
  24713. "label": "楚雄市",
  24714. "value": "532301"
  24715. }, {
  24716. "label": "双柏县",
  24717. "value": "532322"
  24718. }, {
  24719. "label": "牟定县",
  24720. "value": "532323"
  24721. }, {
  24722. "label": "南华县",
  24723. "value": "532324"
  24724. }, {
  24725. "label": "姚安县",
  24726. "value": "532325"
  24727. }, {
  24728. "label": "大姚县",
  24729. "value": "532326"
  24730. }, {
  24731. "label": "永仁县",
  24732. "value": "532327"
  24733. }, {
  24734. "label": "元谋县",
  24735. "value": "532328"
  24736. }, {
  24737. "label": "武定县",
  24738. "value": "532329"
  24739. }, {
  24740. "label": "禄丰县",
  24741. "value": "532331"
  24742. }], [{
  24743. "label": "个旧市",
  24744. "value": "532501"
  24745. }, {
  24746. "label": "开远市",
  24747. "value": "532502"
  24748. }, {
  24749. "label": "蒙自市",
  24750. "value": "532503"
  24751. }, {
  24752. "label": "弥勒市",
  24753. "value": "532504"
  24754. }, {
  24755. "label": "屏边苗族自治县",
  24756. "value": "532523"
  24757. }, {
  24758. "label": "建水县",
  24759. "value": "532524"
  24760. }, {
  24761. "label": "石屏县",
  24762. "value": "532525"
  24763. }, {
  24764. "label": "泸西县",
  24765. "value": "532527"
  24766. }, {
  24767. "label": "元阳县",
  24768. "value": "532528"
  24769. }, {
  24770. "label": "红河县",
  24771. "value": "532529"
  24772. }, {
  24773. "label": "金平苗族瑶族傣族自治县",
  24774. "value": "532530"
  24775. }, {
  24776. "label": "绿春县",
  24777. "value": "532531"
  24778. }, {
  24779. "label": "河口瑶族自治县",
  24780. "value": "532532"
  24781. }], [{
  24782. "label": "文山市",
  24783. "value": "532601"
  24784. }, {
  24785. "label": "砚山县",
  24786. "value": "532622"
  24787. }, {
  24788. "label": "西畴县",
  24789. "value": "532623"
  24790. }, {
  24791. "label": "麻栗坡县",
  24792. "value": "532624"
  24793. }, {
  24794. "label": "马关县",
  24795. "value": "532625"
  24796. }, {
  24797. "label": "丘北县",
  24798. "value": "532626"
  24799. }, {
  24800. "label": "广南县",
  24801. "value": "532627"
  24802. }, {
  24803. "label": "富宁县",
  24804. "value": "532628"
  24805. }], [{
  24806. "label": "景洪市",
  24807. "value": "532801"
  24808. }, {
  24809. "label": "勐海县",
  24810. "value": "532822"
  24811. }, {
  24812. "label": "勐腊县",
  24813. "value": "532823"
  24814. }], [{
  24815. "label": "大理市",
  24816. "value": "532901"
  24817. }, {
  24818. "label": "漾濞彝族自治县",
  24819. "value": "532922"
  24820. }, {
  24821. "label": "祥云县",
  24822. "value": "532923"
  24823. }, {
  24824. "label": "宾川县",
  24825. "value": "532924"
  24826. }, {
  24827. "label": "弥渡县",
  24828. "value": "532925"
  24829. }, {
  24830. "label": "南涧彝族自治县",
  24831. "value": "532926"
  24832. }, {
  24833. "label": "巍山彝族回族自治县",
  24834. "value": "532927"
  24835. }, {
  24836. "label": "永平县",
  24837. "value": "532928"
  24838. }, {
  24839. "label": "云龙县",
  24840. "value": "532929"
  24841. }, {
  24842. "label": "洱源县",
  24843. "value": "532930"
  24844. }, {
  24845. "label": "剑川县",
  24846. "value": "532931"
  24847. }, {
  24848. "label": "鹤庆县",
  24849. "value": "532932"
  24850. }], [{
  24851. "label": "瑞丽市",
  24852. "value": "533102"
  24853. }, {
  24854. "label": "芒市",
  24855. "value": "533103"
  24856. }, {
  24857. "label": "梁河县",
  24858. "value": "533122"
  24859. }, {
  24860. "label": "盈江县",
  24861. "value": "533123"
  24862. }, {
  24863. "label": "陇川县",
  24864. "value": "533124"
  24865. }], [{
  24866. "label": "泸水市",
  24867. "value": "533301"
  24868. }, {
  24869. "label": "福贡县",
  24870. "value": "533323"
  24871. }, {
  24872. "label": "贡山独龙族怒族自治县",
  24873. "value": "533324"
  24874. }, {
  24875. "label": "兰坪白族普米族自治县",
  24876. "value": "533325"
  24877. }], [{
  24878. "label": "香格里拉市",
  24879. "value": "533401"
  24880. }, {
  24881. "label": "德钦县",
  24882. "value": "533422"
  24883. }, {
  24884. "label": "维西傈僳族自治县",
  24885. "value": "533423"
  24886. }]], [[{
  24887. "label": "城关区",
  24888. "value": "540102"
  24889. }, {
  24890. "label": "堆龙德庆区",
  24891. "value": "540103"
  24892. }, {
  24893. "label": "林周县",
  24894. "value": "540121"
  24895. }, {
  24896. "label": "当雄县",
  24897. "value": "540122"
  24898. }, {
  24899. "label": "尼木县",
  24900. "value": "540123"
  24901. }, {
  24902. "label": "曲水县",
  24903. "value": "540124"
  24904. }, {
  24905. "label": "达孜县",
  24906. "value": "540126"
  24907. }, {
  24908. "label": "墨竹工卡县",
  24909. "value": "540127"
  24910. }, {
  24911. "label": "格尔木藏青工业园区",
  24912. "value": "540171"
  24913. }, {
  24914. "label": "拉萨经济技术开发区",
  24915. "value": "540172"
  24916. }, {
  24917. "label": "西藏文化旅游创意园区",
  24918. "value": "540173"
  24919. }, {
  24920. "label": "达孜工业园区",
  24921. "value": "540174"
  24922. }], [{
  24923. "label": "桑珠孜区",
  24924. "value": "540202"
  24925. }, {
  24926. "label": "南木林县",
  24927. "value": "540221"
  24928. }, {
  24929. "label": "江孜县",
  24930. "value": "540222"
  24931. }, {
  24932. "label": "定日县",
  24933. "value": "540223"
  24934. }, {
  24935. "label": "萨迦县",
  24936. "value": "540224"
  24937. }, {
  24938. "label": "拉孜县",
  24939. "value": "540225"
  24940. }, {
  24941. "label": "昂仁县",
  24942. "value": "540226"
  24943. }, {
  24944. "label": "谢通门县",
  24945. "value": "540227"
  24946. }, {
  24947. "label": "白朗县",
  24948. "value": "540228"
  24949. }, {
  24950. "label": "仁布县",
  24951. "value": "540229"
  24952. }, {
  24953. "label": "康马县",
  24954. "value": "540230"
  24955. }, {
  24956. "label": "定结县",
  24957. "value": "540231"
  24958. }, {
  24959. "label": "仲巴县",
  24960. "value": "540232"
  24961. }, {
  24962. "label": "亚东县",
  24963. "value": "540233"
  24964. }, {
  24965. "label": "吉隆县",
  24966. "value": "540234"
  24967. }, {
  24968. "label": "聂拉木县",
  24969. "value": "540235"
  24970. }, {
  24971. "label": "萨嘎县",
  24972. "value": "540236"
  24973. }, {
  24974. "label": "岗巴县",
  24975. "value": "540237"
  24976. }], [{
  24977. "label": "卡若区",
  24978. "value": "540302"
  24979. }, {
  24980. "label": "江达县",
  24981. "value": "540321"
  24982. }, {
  24983. "label": "贡觉县",
  24984. "value": "540322"
  24985. }, {
  24986. "label": "类乌齐县",
  24987. "value": "540323"
  24988. }, {
  24989. "label": "丁青县",
  24990. "value": "540324"
  24991. }, {
  24992. "label": "察雅县",
  24993. "value": "540325"
  24994. }, {
  24995. "label": "八宿县",
  24996. "value": "540326"
  24997. }, {
  24998. "label": "左贡县",
  24999. "value": "540327"
  25000. }, {
  25001. "label": "芒康县",
  25002. "value": "540328"
  25003. }, {
  25004. "label": "洛隆县",
  25005. "value": "540329"
  25006. }, {
  25007. "label": "边坝县",
  25008. "value": "540330"
  25009. }], [{
  25010. "label": "巴宜区",
  25011. "value": "540402"
  25012. }, {
  25013. "label": "工布江达县",
  25014. "value": "540421"
  25015. }, {
  25016. "label": "米林县",
  25017. "value": "540422"
  25018. }, {
  25019. "label": "墨脱县",
  25020. "value": "540423"
  25021. }, {
  25022. "label": "波密县",
  25023. "value": "540424"
  25024. }, {
  25025. "label": "察隅县",
  25026. "value": "540425"
  25027. }, {
  25028. "label": "朗县",
  25029. "value": "540426"
  25030. }], [{
  25031. "label": "乃东区",
  25032. "value": "540502"
  25033. }, {
  25034. "label": "扎囊县",
  25035. "value": "540521"
  25036. }, {
  25037. "label": "贡嘎县",
  25038. "value": "540522"
  25039. }, {
  25040. "label": "桑日县",
  25041. "value": "540523"
  25042. }, {
  25043. "label": "琼结县",
  25044. "value": "540524"
  25045. }, {
  25046. "label": "曲松县",
  25047. "value": "540525"
  25048. }, {
  25049. "label": "措美县",
  25050. "value": "540526"
  25051. }, {
  25052. "label": "洛扎县",
  25053. "value": "540527"
  25054. }, {
  25055. "label": "加查县",
  25056. "value": "540528"
  25057. }, {
  25058. "label": "隆子县",
  25059. "value": "540529"
  25060. }, {
  25061. "label": "错那县",
  25062. "value": "540530"
  25063. }, {
  25064. "label": "浪卡子县",
  25065. "value": "540531"
  25066. }], [{
  25067. "label": "那曲县",
  25068. "value": "542421"
  25069. }, {
  25070. "label": "嘉黎县",
  25071. "value": "542422"
  25072. }, {
  25073. "label": "比如县",
  25074. "value": "542423"
  25075. }, {
  25076. "label": "聂荣县",
  25077. "value": "542424"
  25078. }, {
  25079. "label": "安多县",
  25080. "value": "542425"
  25081. }, {
  25082. "label": "申扎县",
  25083. "value": "542426"
  25084. }, {
  25085. "label": "索县",
  25086. "value": "542427"
  25087. }, {
  25088. "label": "班戈县",
  25089. "value": "542428"
  25090. }, {
  25091. "label": "巴青县",
  25092. "value": "542429"
  25093. }, {
  25094. "label": "尼玛县",
  25095. "value": "542430"
  25096. }, {
  25097. "label": "双湖县",
  25098. "value": "542431"
  25099. }], [{
  25100. "label": "普兰县",
  25101. "value": "542521"
  25102. }, {
  25103. "label": "札达县",
  25104. "value": "542522"
  25105. }, {
  25106. "label": "噶尔县",
  25107. "value": "542523"
  25108. }, {
  25109. "label": "日土县",
  25110. "value": "542524"
  25111. }, {
  25112. "label": "革吉县",
  25113. "value": "542525"
  25114. }, {
  25115. "label": "改则县",
  25116. "value": "542526"
  25117. }, {
  25118. "label": "措勤县",
  25119. "value": "542527"
  25120. }]], [[{
  25121. "label": "新城区",
  25122. "value": "610102"
  25123. }, {
  25124. "label": "碑林区",
  25125. "value": "610103"
  25126. }, {
  25127. "label": "莲湖区",
  25128. "value": "610104"
  25129. }, {
  25130. "label": "灞桥区",
  25131. "value": "610111"
  25132. }, {
  25133. "label": "未央区",
  25134. "value": "610112"
  25135. }, {
  25136. "label": "雁塔区",
  25137. "value": "610113"
  25138. }, {
  25139. "label": "阎良区",
  25140. "value": "610114"
  25141. }, {
  25142. "label": "临潼区",
  25143. "value": "610115"
  25144. }, {
  25145. "label": "长安区",
  25146. "value": "610116"
  25147. }, {
  25148. "label": "高陵区",
  25149. "value": "610117"
  25150. }, {
  25151. "label": "鄠邑区",
  25152. "value": "610118"
  25153. }, {
  25154. "label": "蓝田县",
  25155. "value": "610122"
  25156. }, {
  25157. "label": "周至县",
  25158. "value": "610124"
  25159. }], [{
  25160. "label": "王益区",
  25161. "value": "610202"
  25162. }, {
  25163. "label": "印台区",
  25164. "value": "610203"
  25165. }, {
  25166. "label": "耀州区",
  25167. "value": "610204"
  25168. }, {
  25169. "label": "宜君县",
  25170. "value": "610222"
  25171. }], [{
  25172. "label": "渭滨区",
  25173. "value": "610302"
  25174. }, {
  25175. "label": "金台区",
  25176. "value": "610303"
  25177. }, {
  25178. "label": "陈仓区",
  25179. "value": "610304"
  25180. }, {
  25181. "label": "凤翔县",
  25182. "value": "610322"
  25183. }, {
  25184. "label": "岐山县",
  25185. "value": "610323"
  25186. }, {
  25187. "label": "扶风县",
  25188. "value": "610324"
  25189. }, {
  25190. "label": "眉县",
  25191. "value": "610326"
  25192. }, {
  25193. "label": "陇县",
  25194. "value": "610327"
  25195. }, {
  25196. "label": "千阳县",
  25197. "value": "610328"
  25198. }, {
  25199. "label": "麟游县",
  25200. "value": "610329"
  25201. }, {
  25202. "label": "凤县",
  25203. "value": "610330"
  25204. }, {
  25205. "label": "太白县",
  25206. "value": "610331"
  25207. }], [{
  25208. "label": "秦都区",
  25209. "value": "610402"
  25210. }, {
  25211. "label": "杨陵区",
  25212. "value": "610403"
  25213. }, {
  25214. "label": "渭城区",
  25215. "value": "610404"
  25216. }, {
  25217. "label": "三原县",
  25218. "value": "610422"
  25219. }, {
  25220. "label": "泾阳县",
  25221. "value": "610423"
  25222. }, {
  25223. "label": "乾县",
  25224. "value": "610424"
  25225. }, {
  25226. "label": "礼泉县",
  25227. "value": "610425"
  25228. }, {
  25229. "label": "永寿县",
  25230. "value": "610426"
  25231. }, {
  25232. "label": "彬县",
  25233. "value": "610427"
  25234. }, {
  25235. "label": "长武县",
  25236. "value": "610428"
  25237. }, {
  25238. "label": "旬邑县",
  25239. "value": "610429"
  25240. }, {
  25241. "label": "淳化县",
  25242. "value": "610430"
  25243. }, {
  25244. "label": "武功县",
  25245. "value": "610431"
  25246. }, {
  25247. "label": "兴平市",
  25248. "value": "610481"
  25249. }], [{
  25250. "label": "临渭区",
  25251. "value": "610502"
  25252. }, {
  25253. "label": "华州区",
  25254. "value": "610503"
  25255. }, {
  25256. "label": "潼关县",
  25257. "value": "610522"
  25258. }, {
  25259. "label": "大荔县",
  25260. "value": "610523"
  25261. }, {
  25262. "label": "合阳县",
  25263. "value": "610524"
  25264. }, {
  25265. "label": "澄城县",
  25266. "value": "610525"
  25267. }, {
  25268. "label": "蒲城县",
  25269. "value": "610526"
  25270. }, {
  25271. "label": "白水县",
  25272. "value": "610527"
  25273. }, {
  25274. "label": "富平县",
  25275. "value": "610528"
  25276. }, {
  25277. "label": "韩城市",
  25278. "value": "610581"
  25279. }, {
  25280. "label": "华阴市",
  25281. "value": "610582"
  25282. }], [{
  25283. "label": "宝塔区",
  25284. "value": "610602"
  25285. }, {
  25286. "label": "安塞区",
  25287. "value": "610603"
  25288. }, {
  25289. "label": "延长县",
  25290. "value": "610621"
  25291. }, {
  25292. "label": "延川县",
  25293. "value": "610622"
  25294. }, {
  25295. "label": "子长县",
  25296. "value": "610623"
  25297. }, {
  25298. "label": "志丹县",
  25299. "value": "610625"
  25300. }, {
  25301. "label": "吴起县",
  25302. "value": "610626"
  25303. }, {
  25304. "label": "甘泉县",
  25305. "value": "610627"
  25306. }, {
  25307. "label": "富县",
  25308. "value": "610628"
  25309. }, {
  25310. "label": "洛川县",
  25311. "value": "610629"
  25312. }, {
  25313. "label": "宜川县",
  25314. "value": "610630"
  25315. }, {
  25316. "label": "黄龙县",
  25317. "value": "610631"
  25318. }, {
  25319. "label": "黄陵县",
  25320. "value": "610632"
  25321. }], [{
  25322. "label": "汉台区",
  25323. "value": "610702"
  25324. }, {
  25325. "label": "南郑区",
  25326. "value": "610703"
  25327. }, {
  25328. "label": "城固县",
  25329. "value": "610722"
  25330. }, {
  25331. "label": "洋县",
  25332. "value": "610723"
  25333. }, {
  25334. "label": "西乡县",
  25335. "value": "610724"
  25336. }, {
  25337. "label": "勉县",
  25338. "value": "610725"
  25339. }, {
  25340. "label": "宁强县",
  25341. "value": "610726"
  25342. }, {
  25343. "label": "略阳县",
  25344. "value": "610727"
  25345. }, {
  25346. "label": "镇巴县",
  25347. "value": "610728"
  25348. }, {
  25349. "label": "留坝县",
  25350. "value": "610729"
  25351. }, {
  25352. "label": "佛坪县",
  25353. "value": "610730"
  25354. }], [{
  25355. "label": "榆阳区",
  25356. "value": "610802"
  25357. }, {
  25358. "label": "横山区",
  25359. "value": "610803"
  25360. }, {
  25361. "label": "府谷县",
  25362. "value": "610822"
  25363. }, {
  25364. "label": "靖边县",
  25365. "value": "610824"
  25366. }, {
  25367. "label": "定边县",
  25368. "value": "610825"
  25369. }, {
  25370. "label": "绥德县",
  25371. "value": "610826"
  25372. }, {
  25373. "label": "米脂县",
  25374. "value": "610827"
  25375. }, {
  25376. "label": "佳县",
  25377. "value": "610828"
  25378. }, {
  25379. "label": "吴堡县",
  25380. "value": "610829"
  25381. }, {
  25382. "label": "清涧县",
  25383. "value": "610830"
  25384. }, {
  25385. "label": "子洲县",
  25386. "value": "610831"
  25387. }, {
  25388. "label": "神木市",
  25389. "value": "610881"
  25390. }], [{
  25391. "label": "汉滨区",
  25392. "value": "610902"
  25393. }, {
  25394. "label": "汉阴县",
  25395. "value": "610921"
  25396. }, {
  25397. "label": "石泉县",
  25398. "value": "610922"
  25399. }, {
  25400. "label": "宁陕县",
  25401. "value": "610923"
  25402. }, {
  25403. "label": "紫阳县",
  25404. "value": "610924"
  25405. }, {
  25406. "label": "岚皋县",
  25407. "value": "610925"
  25408. }, {
  25409. "label": "平利县",
  25410. "value": "610926"
  25411. }, {
  25412. "label": "镇坪县",
  25413. "value": "610927"
  25414. }, {
  25415. "label": "旬阳县",
  25416. "value": "610928"
  25417. }, {
  25418. "label": "白河县",
  25419. "value": "610929"
  25420. }], [{
  25421. "label": "商州区",
  25422. "value": "611002"
  25423. }, {
  25424. "label": "洛南县",
  25425. "value": "611021"
  25426. }, {
  25427. "label": "丹凤县",
  25428. "value": "611022"
  25429. }, {
  25430. "label": "商南县",
  25431. "value": "611023"
  25432. }, {
  25433. "label": "山阳县",
  25434. "value": "611024"
  25435. }, {
  25436. "label": "镇安县",
  25437. "value": "611025"
  25438. }, {
  25439. "label": "柞水县",
  25440. "value": "611026"
  25441. }]], [[{
  25442. "label": "城关区",
  25443. "value": "620102"
  25444. }, {
  25445. "label": "七里河区",
  25446. "value": "620103"
  25447. }, {
  25448. "label": "西固区",
  25449. "value": "620104"
  25450. }, {
  25451. "label": "安宁区",
  25452. "value": "620105"
  25453. }, {
  25454. "label": "红古区",
  25455. "value": "620111"
  25456. }, {
  25457. "label": "永登县",
  25458. "value": "620121"
  25459. }, {
  25460. "label": "皋兰县",
  25461. "value": "620122"
  25462. }, {
  25463. "label": "榆中县",
  25464. "value": "620123"
  25465. }, {
  25466. "label": "兰州新区",
  25467. "value": "620171"
  25468. }], [{
  25469. "label": "嘉峪关市",
  25470. "value": "620201"
  25471. }], [{
  25472. "label": "金川区",
  25473. "value": "620302"
  25474. }, {
  25475. "label": "永昌县",
  25476. "value": "620321"
  25477. }], [{
  25478. "label": "白银区",
  25479. "value": "620402"
  25480. }, {
  25481. "label": "平川区",
  25482. "value": "620403"
  25483. }, {
  25484. "label": "靖远县",
  25485. "value": "620421"
  25486. }, {
  25487. "label": "会宁县",
  25488. "value": "620422"
  25489. }, {
  25490. "label": "景泰县",
  25491. "value": "620423"
  25492. }], [{
  25493. "label": "秦州区",
  25494. "value": "620502"
  25495. }, {
  25496. "label": "麦积区",
  25497. "value": "620503"
  25498. }, {
  25499. "label": "清水县",
  25500. "value": "620521"
  25501. }, {
  25502. "label": "秦安县",
  25503. "value": "620522"
  25504. }, {
  25505. "label": "甘谷县",
  25506. "value": "620523"
  25507. }, {
  25508. "label": "武山县",
  25509. "value": "620524"
  25510. }, {
  25511. "label": "张家川回族自治县",
  25512. "value": "620525"
  25513. }], [{
  25514. "label": "凉州区",
  25515. "value": "620602"
  25516. }, {
  25517. "label": "民勤县",
  25518. "value": "620621"
  25519. }, {
  25520. "label": "古浪县",
  25521. "value": "620622"
  25522. }, {
  25523. "label": "天祝藏族自治县",
  25524. "value": "620623"
  25525. }], [{
  25526. "label": "甘州区",
  25527. "value": "620702"
  25528. }, {
  25529. "label": "肃南裕固族自治县",
  25530. "value": "620721"
  25531. }, {
  25532. "label": "民乐县",
  25533. "value": "620722"
  25534. }, {
  25535. "label": "临泽县",
  25536. "value": "620723"
  25537. }, {
  25538. "label": "高台县",
  25539. "value": "620724"
  25540. }, {
  25541. "label": "山丹县",
  25542. "value": "620725"
  25543. }], [{
  25544. "label": "崆峒区",
  25545. "value": "620802"
  25546. }, {
  25547. "label": "泾川县",
  25548. "value": "620821"
  25549. }, {
  25550. "label": "灵台县",
  25551. "value": "620822"
  25552. }, {
  25553. "label": "崇信县",
  25554. "value": "620823"
  25555. }, {
  25556. "label": "华亭县",
  25557. "value": "620824"
  25558. }, {
  25559. "label": "庄浪县",
  25560. "value": "620825"
  25561. }, {
  25562. "label": "静宁县",
  25563. "value": "620826"
  25564. }, {
  25565. "label": "平凉工业园区",
  25566. "value": "620871"
  25567. }], [{
  25568. "label": "肃州区",
  25569. "value": "620902"
  25570. }, {
  25571. "label": "金塔县",
  25572. "value": "620921"
  25573. }, {
  25574. "label": "瓜州县",
  25575. "value": "620922"
  25576. }, {
  25577. "label": "肃北蒙古族自治县",
  25578. "value": "620923"
  25579. }, {
  25580. "label": "阿克塞哈萨克族自治县",
  25581. "value": "620924"
  25582. }, {
  25583. "label": "玉门市",
  25584. "value": "620981"
  25585. }, {
  25586. "label": "敦煌市",
  25587. "value": "620982"
  25588. }], [{
  25589. "label": "西峰区",
  25590. "value": "621002"
  25591. }, {
  25592. "label": "庆城县",
  25593. "value": "621021"
  25594. }, {
  25595. "label": "环县",
  25596. "value": "621022"
  25597. }, {
  25598. "label": "华池县",
  25599. "value": "621023"
  25600. }, {
  25601. "label": "合水县",
  25602. "value": "621024"
  25603. }, {
  25604. "label": "正宁县",
  25605. "value": "621025"
  25606. }, {
  25607. "label": "宁县",
  25608. "value": "621026"
  25609. }, {
  25610. "label": "镇原县",
  25611. "value": "621027"
  25612. }], [{
  25613. "label": "安定区",
  25614. "value": "621102"
  25615. }, {
  25616. "label": "通渭县",
  25617. "value": "621121"
  25618. }, {
  25619. "label": "陇西县",
  25620. "value": "621122"
  25621. }, {
  25622. "label": "渭源县",
  25623. "value": "621123"
  25624. }, {
  25625. "label": "临洮县",
  25626. "value": "621124"
  25627. }, {
  25628. "label": "漳县",
  25629. "value": "621125"
  25630. }, {
  25631. "label": "岷县",
  25632. "value": "621126"
  25633. }], [{
  25634. "label": "武都区",
  25635. "value": "621202"
  25636. }, {
  25637. "label": "成县",
  25638. "value": "621221"
  25639. }, {
  25640. "label": "文县",
  25641. "value": "621222"
  25642. }, {
  25643. "label": "宕昌县",
  25644. "value": "621223"
  25645. }, {
  25646. "label": "康县",
  25647. "value": "621224"
  25648. }, {
  25649. "label": "西和县",
  25650. "value": "621225"
  25651. }, {
  25652. "label": "礼县",
  25653. "value": "621226"
  25654. }, {
  25655. "label": "徽县",
  25656. "value": "621227"
  25657. }, {
  25658. "label": "两当县",
  25659. "value": "621228"
  25660. }], [{
  25661. "label": "临夏市",
  25662. "value": "622901"
  25663. }, {
  25664. "label": "临夏县",
  25665. "value": "622921"
  25666. }, {
  25667. "label": "康乐县",
  25668. "value": "622922"
  25669. }, {
  25670. "label": "永靖县",
  25671. "value": "622923"
  25672. }, {
  25673. "label": "广河县",
  25674. "value": "622924"
  25675. }, {
  25676. "label": "和政县",
  25677. "value": "622925"
  25678. }, {
  25679. "label": "东乡族自治县",
  25680. "value": "622926"
  25681. }, {
  25682. "label": "积石山保安族东乡族撒拉族自治县",
  25683. "value": "622927"
  25684. }], [{
  25685. "label": "合作市",
  25686. "value": "623001"
  25687. }, {
  25688. "label": "临潭县",
  25689. "value": "623021"
  25690. }, {
  25691. "label": "卓尼县",
  25692. "value": "623022"
  25693. }, {
  25694. "label": "舟曲县",
  25695. "value": "623023"
  25696. }, {
  25697. "label": "迭部县",
  25698. "value": "623024"
  25699. }, {
  25700. "label": "玛曲县",
  25701. "value": "623025"
  25702. }, {
  25703. "label": "碌曲县",
  25704. "value": "623026"
  25705. }, {
  25706. "label": "夏河县",
  25707. "value": "623027"
  25708. }]], [[{
  25709. "label": "城东区",
  25710. "value": "630102"
  25711. }, {
  25712. "label": "城中区",
  25713. "value": "630103"
  25714. }, {
  25715. "label": "城西区",
  25716. "value": "630104"
  25717. }, {
  25718. "label": "城北区",
  25719. "value": "630105"
  25720. }, {
  25721. "label": "大通回族土族自治县",
  25722. "value": "630121"
  25723. }, {
  25724. "label": "湟中县",
  25725. "value": "630122"
  25726. }, {
  25727. "label": "湟源县",
  25728. "value": "630123"
  25729. }], [{
  25730. "label": "乐都区",
  25731. "value": "630202"
  25732. }, {
  25733. "label": "平安区",
  25734. "value": "630203"
  25735. }, {
  25736. "label": "民和回族土族自治县",
  25737. "value": "630222"
  25738. }, {
  25739. "label": "互助土族自治县",
  25740. "value": "630223"
  25741. }, {
  25742. "label": "化隆回族自治县",
  25743. "value": "630224"
  25744. }, {
  25745. "label": "循化撒拉族自治县",
  25746. "value": "630225"
  25747. }], [{
  25748. "label": "门源回族自治县",
  25749. "value": "632221"
  25750. }, {
  25751. "label": "祁连县",
  25752. "value": "632222"
  25753. }, {
  25754. "label": "海晏县",
  25755. "value": "632223"
  25756. }, {
  25757. "label": "刚察县",
  25758. "value": "632224"
  25759. }], [{
  25760. "label": "同仁县",
  25761. "value": "632321"
  25762. }, {
  25763. "label": "尖扎县",
  25764. "value": "632322"
  25765. }, {
  25766. "label": "泽库县",
  25767. "value": "632323"
  25768. }, {
  25769. "label": "河南蒙古族自治县",
  25770. "value": "632324"
  25771. }], [{
  25772. "label": "共和县",
  25773. "value": "632521"
  25774. }, {
  25775. "label": "同德县",
  25776. "value": "632522"
  25777. }, {
  25778. "label": "贵德县",
  25779. "value": "632523"
  25780. }, {
  25781. "label": "兴海县",
  25782. "value": "632524"
  25783. }, {
  25784. "label": "贵南县",
  25785. "value": "632525"
  25786. }], [{
  25787. "label": "玛沁县",
  25788. "value": "632621"
  25789. }, {
  25790. "label": "班玛县",
  25791. "value": "632622"
  25792. }, {
  25793. "label": "甘德县",
  25794. "value": "632623"
  25795. }, {
  25796. "label": "达日县",
  25797. "value": "632624"
  25798. }, {
  25799. "label": "久治县",
  25800. "value": "632625"
  25801. }, {
  25802. "label": "玛多县",
  25803. "value": "632626"
  25804. }], [{
  25805. "label": "玉树市",
  25806. "value": "632701"
  25807. }, {
  25808. "label": "杂多县",
  25809. "value": "632722"
  25810. }, {
  25811. "label": "称多县",
  25812. "value": "632723"
  25813. }, {
  25814. "label": "治多县",
  25815. "value": "632724"
  25816. }, {
  25817. "label": "囊谦县",
  25818. "value": "632725"
  25819. }, {
  25820. "label": "曲麻莱县",
  25821. "value": "632726"
  25822. }], [{
  25823. "label": "格尔木市",
  25824. "value": "632801"
  25825. }, {
  25826. "label": "德令哈市",
  25827. "value": "632802"
  25828. }, {
  25829. "label": "乌兰县",
  25830. "value": "632821"
  25831. }, {
  25832. "label": "都兰县",
  25833. "value": "632822"
  25834. }, {
  25835. "label": "天峻县",
  25836. "value": "632823"
  25837. }, {
  25838. "label": "大柴旦行政委员会",
  25839. "value": "632857"
  25840. }, {
  25841. "label": "冷湖行政委员会",
  25842. "value": "632858"
  25843. }, {
  25844. "label": "茫崖行政委员会",
  25845. "value": "632859"
  25846. }]], [[{
  25847. "label": "兴庆区",
  25848. "value": "640104"
  25849. }, {
  25850. "label": "西夏区",
  25851. "value": "640105"
  25852. }, {
  25853. "label": "金凤区",
  25854. "value": "640106"
  25855. }, {
  25856. "label": "永宁县",
  25857. "value": "640121"
  25858. }, {
  25859. "label": "贺兰县",
  25860. "value": "640122"
  25861. }, {
  25862. "label": "灵武市",
  25863. "value": "640181"
  25864. }], [{
  25865. "label": "大武口区",
  25866. "value": "640202"
  25867. }, {
  25868. "label": "惠农区",
  25869. "value": "640205"
  25870. }, {
  25871. "label": "平罗县",
  25872. "value": "640221"
  25873. }], [{
  25874. "label": "利通区",
  25875. "value": "640302"
  25876. }, {
  25877. "label": "红寺堡区",
  25878. "value": "640303"
  25879. }, {
  25880. "label": "盐池县",
  25881. "value": "640323"
  25882. }, {
  25883. "label": "同心县",
  25884. "value": "640324"
  25885. }, {
  25886. "label": "青铜峡市",
  25887. "value": "640381"
  25888. }], [{
  25889. "label": "原州区",
  25890. "value": "640402"
  25891. }, {
  25892. "label": "西吉县",
  25893. "value": "640422"
  25894. }, {
  25895. "label": "隆德县",
  25896. "value": "640423"
  25897. }, {
  25898. "label": "泾源县",
  25899. "value": "640424"
  25900. }, {
  25901. "label": "彭阳县",
  25902. "value": "640425"
  25903. }], [{
  25904. "label": "沙坡头区",
  25905. "value": "640502"
  25906. }, {
  25907. "label": "中宁县",
  25908. "value": "640521"
  25909. }, {
  25910. "label": "海原县",
  25911. "value": "640522"
  25912. }]], [[{
  25913. "label": "天山区",
  25914. "value": "650102"
  25915. }, {
  25916. "label": "沙依巴克区",
  25917. "value": "650103"
  25918. }, {
  25919. "label": "新市区",
  25920. "value": "650104"
  25921. }, {
  25922. "label": "水磨沟区",
  25923. "value": "650105"
  25924. }, {
  25925. "label": "头屯河区",
  25926. "value": "650106"
  25927. }, {
  25928. "label": "达坂城区",
  25929. "value": "650107"
  25930. }, {
  25931. "label": "米东区",
  25932. "value": "650109"
  25933. }, {
  25934. "label": "乌鲁木齐县",
  25935. "value": "650121"
  25936. }, {
  25937. "label": "乌鲁木齐经济技术开发区",
  25938. "value": "650171"
  25939. }, {
  25940. "label": "乌鲁木齐高新技术产业开发区",
  25941. "value": "650172"
  25942. }], [{
  25943. "label": "独山子区",
  25944. "value": "650202"
  25945. }, {
  25946. "label": "克拉玛依区",
  25947. "value": "650203"
  25948. }, {
  25949. "label": "白碱滩区",
  25950. "value": "650204"
  25951. }, {
  25952. "label": "乌尔禾区",
  25953. "value": "650205"
  25954. }], [{
  25955. "label": "高昌区",
  25956. "value": "650402"
  25957. }, {
  25958. "label": "鄯善县",
  25959. "value": "650421"
  25960. }, {
  25961. "label": "托克逊县",
  25962. "value": "650422"
  25963. }], [{
  25964. "label": "伊州区",
  25965. "value": "650502"
  25966. }, {
  25967. "label": "巴里坤哈萨克自治县",
  25968. "value": "650521"
  25969. }, {
  25970. "label": "伊吾县",
  25971. "value": "650522"
  25972. }], [{
  25973. "label": "昌吉市",
  25974. "value": "652301"
  25975. }, {
  25976. "label": "阜康市",
  25977. "value": "652302"
  25978. }, {
  25979. "label": "呼图壁县",
  25980. "value": "652323"
  25981. }, {
  25982. "label": "玛纳斯县",
  25983. "value": "652324"
  25984. }, {
  25985. "label": "奇台县",
  25986. "value": "652325"
  25987. }, {
  25988. "label": "吉木萨尔县",
  25989. "value": "652327"
  25990. }, {
  25991. "label": "木垒哈萨克自治县",
  25992. "value": "652328"
  25993. }], [{
  25994. "label": "博乐市",
  25995. "value": "652701"
  25996. }, {
  25997. "label": "阿拉山口市",
  25998. "value": "652702"
  25999. }, {
  26000. "label": "精河县",
  26001. "value": "652722"
  26002. }, {
  26003. "label": "温泉县",
  26004. "value": "652723"
  26005. }], [{
  26006. "label": "库尔勒市",
  26007. "value": "652801"
  26008. }, {
  26009. "label": "轮台县",
  26010. "value": "652822"
  26011. }, {
  26012. "label": "尉犁县",
  26013. "value": "652823"
  26014. }, {
  26015. "label": "若羌县",
  26016. "value": "652824"
  26017. }, {
  26018. "label": "且末县",
  26019. "value": "652825"
  26020. }, {
  26021. "label": "焉耆回族自治县",
  26022. "value": "652826"
  26023. }, {
  26024. "label": "和静县",
  26025. "value": "652827"
  26026. }, {
  26027. "label": "和硕县",
  26028. "value": "652828"
  26029. }, {
  26030. "label": "博湖县",
  26031. "value": "652829"
  26032. }, {
  26033. "label": "库尔勒经济技术开发区",
  26034. "value": "652871"
  26035. }], [{
  26036. "label": "阿克苏市",
  26037. "value": "652901"
  26038. }, {
  26039. "label": "温宿县",
  26040. "value": "652922"
  26041. }, {
  26042. "label": "库车县",
  26043. "value": "652923"
  26044. }, {
  26045. "label": "沙雅县",
  26046. "value": "652924"
  26047. }, {
  26048. "label": "新和县",
  26049. "value": "652925"
  26050. }, {
  26051. "label": "拜城县",
  26052. "value": "652926"
  26053. }, {
  26054. "label": "乌什县",
  26055. "value": "652927"
  26056. }, {
  26057. "label": "阿瓦提县",
  26058. "value": "652928"
  26059. }, {
  26060. "label": "柯坪县",
  26061. "value": "652929"
  26062. }], [{
  26063. "label": "阿图什市",
  26064. "value": "653001"
  26065. }, {
  26066. "label": "阿克陶县",
  26067. "value": "653022"
  26068. }, {
  26069. "label": "阿合奇县",
  26070. "value": "653023"
  26071. }, {
  26072. "label": "乌恰县",
  26073. "value": "653024"
  26074. }], [{
  26075. "label": "喀什市",
  26076. "value": "653101"
  26077. }, {
  26078. "label": "疏附县",
  26079. "value": "653121"
  26080. }, {
  26081. "label": "疏勒县",
  26082. "value": "653122"
  26083. }, {
  26084. "label": "英吉沙县",
  26085. "value": "653123"
  26086. }, {
  26087. "label": "泽普县",
  26088. "value": "653124"
  26089. }, {
  26090. "label": "莎车县",
  26091. "value": "653125"
  26092. }, {
  26093. "label": "叶城县",
  26094. "value": "653126"
  26095. }, {
  26096. "label": "麦盖提县",
  26097. "value": "653127"
  26098. }, {
  26099. "label": "岳普湖县",
  26100. "value": "653128"
  26101. }, {
  26102. "label": "伽师县",
  26103. "value": "653129"
  26104. }, {
  26105. "label": "巴楚县",
  26106. "value": "653130"
  26107. }, {
  26108. "label": "塔什库尔干塔吉克自治县",
  26109. "value": "653131"
  26110. }], [{
  26111. "label": "和田市",
  26112. "value": "653201"
  26113. }, {
  26114. "label": "和田县",
  26115. "value": "653221"
  26116. }, {
  26117. "label": "墨玉县",
  26118. "value": "653222"
  26119. }, {
  26120. "label": "皮山县",
  26121. "value": "653223"
  26122. }, {
  26123. "label": "洛浦县",
  26124. "value": "653224"
  26125. }, {
  26126. "label": "策勒县",
  26127. "value": "653225"
  26128. }, {
  26129. "label": "于田县",
  26130. "value": "653226"
  26131. }, {
  26132. "label": "民丰县",
  26133. "value": "653227"
  26134. }], [{
  26135. "label": "伊宁市",
  26136. "value": "654002"
  26137. }, {
  26138. "label": "奎屯市",
  26139. "value": "654003"
  26140. }, {
  26141. "label": "霍尔果斯市",
  26142. "value": "654004"
  26143. }, {
  26144. "label": "伊宁县",
  26145. "value": "654021"
  26146. }, {
  26147. "label": "察布查尔锡伯自治县",
  26148. "value": "654022"
  26149. }, {
  26150. "label": "霍城县",
  26151. "value": "654023"
  26152. }, {
  26153. "label": "巩留县",
  26154. "value": "654024"
  26155. }, {
  26156. "label": "新源县",
  26157. "value": "654025"
  26158. }, {
  26159. "label": "昭苏县",
  26160. "value": "654026"
  26161. }, {
  26162. "label": "特克斯县",
  26163. "value": "654027"
  26164. }, {
  26165. "label": "尼勒克县",
  26166. "value": "654028"
  26167. }], [{
  26168. "label": "塔城市",
  26169. "value": "654201"
  26170. }, {
  26171. "label": "乌苏市",
  26172. "value": "654202"
  26173. }, {
  26174. "label": "额敏县",
  26175. "value": "654221"
  26176. }, {
  26177. "label": "沙湾县",
  26178. "value": "654223"
  26179. }, {
  26180. "label": "托里县",
  26181. "value": "654224"
  26182. }, {
  26183. "label": "裕民县",
  26184. "value": "654225"
  26185. }, {
  26186. "label": "和布克赛尔蒙古自治县",
  26187. "value": "654226"
  26188. }], [{
  26189. "label": "阿勒泰市",
  26190. "value": "654301"
  26191. }, {
  26192. "label": "布尔津县",
  26193. "value": "654321"
  26194. }, {
  26195. "label": "富蕴县",
  26196. "value": "654322"
  26197. }, {
  26198. "label": "福海县",
  26199. "value": "654323"
  26200. }, {
  26201. "label": "哈巴河县",
  26202. "value": "654324"
  26203. }, {
  26204. "label": "青河县",
  26205. "value": "654325"
  26206. }, {
  26207. "label": "吉木乃县",
  26208. "value": "654326"
  26209. }], [{
  26210. "label": "石河子市",
  26211. "value": "659001"
  26212. }, {
  26213. "label": "阿拉尔市",
  26214. "value": "659002"
  26215. }, {
  26216. "label": "图木舒克市",
  26217. "value": "659003"
  26218. }, {
  26219. "label": "五家渠市",
  26220. "value": "659004"
  26221. }, {
  26222. "label": "铁门关市",
  26223. "value": "659006"
  26224. }]], [[{
  26225. "label": "台北",
  26226. "value": "660101"
  26227. }], [{
  26228. "label": "高雄",
  26229. "value": "660201"
  26230. }], [{
  26231. "label": "基隆",
  26232. "value": "660301"
  26233. }], [{
  26234. "label": "台中",
  26235. "value": "660401"
  26236. }], [{
  26237. "label": "台南",
  26238. "value": "660501"
  26239. }], [{
  26240. "label": "新竹",
  26241. "value": "660601"
  26242. }], [{
  26243. "label": "嘉义",
  26244. "value": "660701"
  26245. }], [{
  26246. "label": "宜兰",
  26247. "value": "660801"
  26248. }], [{
  26249. "label": "桃园",
  26250. "value": "660901"
  26251. }], [{
  26252. "label": "苗栗",
  26253. "value": "661001"
  26254. }], [{
  26255. "label": "彰化",
  26256. "value": "661101"
  26257. }], [{
  26258. "label": "南投",
  26259. "value": "661201"
  26260. }], [{
  26261. "label": "云林",
  26262. "value": "661301"
  26263. }], [{
  26264. "label": "屏东",
  26265. "value": "661401"
  26266. }], [{
  26267. "label": "台东",
  26268. "value": "661501"
  26269. }], [{
  26270. "label": "花莲",
  26271. "value": "661601"
  26272. }], [{
  26273. "label": "澎湖",
  26274. "value": "661701"
  26275. }]], [[{
  26276. "label": "香港岛",
  26277. "value": "670101"
  26278. }], [{
  26279. "label": "九龙",
  26280. "value": "670201"
  26281. }], [{
  26282. "label": "新界",
  26283. "value": "670301"
  26284. }]], [[{
  26285. "label": "澳门半岛",
  26286. "value": "680101"
  26287. }], [{
  26288. "label": "氹仔岛",
  26289. "value": "680201"
  26290. }], [{
  26291. "label": "路环岛",
  26292. "value": "680301"
  26293. }], [{
  26294. "label": "路氹城",
  26295. "value": "680401"
  26296. }]]];
  26297. var _default = areaData;
  26298. exports.default = _default;
  26299. /***/ }),
  26300. /***/ 48:
  26301. /*!*******************************************************************************!*\
  26302. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/queryParams.js ***!
  26303. \*******************************************************************************/
  26304. /*! no static exports found */
  26305. /***/ (function(module, exports, __webpack_require__) {
  26306. "use strict";
  26307. Object.defineProperty(exports, "__esModule", {
  26308. value: true
  26309. });
  26310. exports.default = void 0;
  26311. /**
  26312. * 对象转url参数
  26313. * @param {*} data,对象
  26314. * @param {*} isPrefix,是否自动加上"?"
  26315. */
  26316. function queryParams() {
  26317. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  26318. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  26319. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  26320. var prefix = isPrefix ? '?' : '';
  26321. var _result = [];
  26322. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  26323. var _loop = function _loop(key) {
  26324. var value = data[key];
  26325. // 去掉为空的参数
  26326. if (['', undefined, null].indexOf(value) >= 0) {
  26327. return "continue";
  26328. }
  26329. // 如果值为数组,另行处理
  26330. if (value.constructor === Array) {
  26331. // e.g. {ids: [1, 2, 3]}
  26332. switch (arrayFormat) {
  26333. case 'indices':
  26334. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  26335. for (var i = 0; i < value.length; i++) {
  26336. _result.push(key + '[' + i + ']=' + value[i]);
  26337. }
  26338. break;
  26339. case 'brackets':
  26340. // 结果: ids[]=1&ids[]=2&ids[]=3
  26341. value.forEach(function (_value) {
  26342. _result.push(key + '[]=' + _value);
  26343. });
  26344. break;
  26345. case 'repeat':
  26346. // 结果: ids=1&ids=2&ids=3
  26347. value.forEach(function (_value) {
  26348. _result.push(key + '=' + _value);
  26349. });
  26350. break;
  26351. case 'comma':
  26352. // 结果: ids=1,2,3
  26353. var commaStr = "";
  26354. value.forEach(function (_value) {
  26355. commaStr += (commaStr ? "," : "") + _value;
  26356. });
  26357. _result.push(key + '=' + commaStr);
  26358. break;
  26359. default:
  26360. value.forEach(function (_value) {
  26361. _result.push(key + '[]=' + _value);
  26362. });
  26363. }
  26364. } else {
  26365. _result.push(key + '=' + value);
  26366. }
  26367. };
  26368. for (var key in data) {
  26369. var _ret = _loop(key);
  26370. if (_ret === "continue") continue;
  26371. }
  26372. return _result.length ? prefix + _result.join('&') : '';
  26373. }
  26374. var _default = queryParams;
  26375. exports.default = _default;
  26376. /***/ }),
  26377. /***/ 49:
  26378. /*!*************************************************************************!*\
  26379. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/route.js ***!
  26380. \*************************************************************************/
  26381. /*! no static exports found */
  26382. /***/ (function(module, exports, __webpack_require__) {
  26383. "use strict";
  26384. /* WEBPACK VAR INJECTION */(function(uni) {
  26385. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26386. Object.defineProperty(exports, "__esModule", {
  26387. value: true
  26388. });
  26389. exports.default = void 0;
  26390. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26391. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26392. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26393. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26394. /**
  26395. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  26396. * 并且带有路由拦截功能
  26397. */
  26398. var Router = /*#__PURE__*/function () {
  26399. function Router() {
  26400. (0, _classCallCheck2.default)(this, Router);
  26401. // 原始属性定义
  26402. this.config = {
  26403. type: 'navigateTo',
  26404. url: '',
  26405. delta: 1,
  26406. // navigateBack页面后退时,回退的层数
  26407. params: {},
  26408. // 传递的参数
  26409. animationType: 'pop-in',
  26410. // 窗口动画,只在APP有效
  26411. animationDuration: 300,
  26412. // 窗口动画持续时间,单位毫秒,只在APP有效
  26413. intercept: false // 是否需要拦截
  26414. };
  26415. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  26416. // 这里在构造函数中进行this绑定
  26417. this.route = this.route.bind(this);
  26418. }
  26419. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  26420. (0, _createClass2.default)(Router, [{
  26421. key: "addRootPath",
  26422. value: function addRootPath(url) {
  26423. return url[0] === '/' ? url : "/".concat(url);
  26424. }
  26425. // 整合路由参数
  26426. }, {
  26427. key: "mixinParam",
  26428. value: function mixinParam(url, params) {
  26429. url = url && this.addRootPath(url);
  26430. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  26431. // 如果有url中有get参数,转换后无需带上"?"
  26432. var query = '';
  26433. if (/.*\/.*\?.*=.*/.test(url)) {
  26434. // object对象转为get类型的参数
  26435. query = uni.$u.queryParams(params, false);
  26436. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  26437. return url += "&" + query;
  26438. } else {
  26439. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  26440. query = uni.$u.queryParams(params);
  26441. return url += query;
  26442. }
  26443. }
  26444. // 对外的方法名称
  26445. }, {
  26446. key: "route",
  26447. value: function () {
  26448. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  26449. var options,
  26450. params,
  26451. mergeConfig,
  26452. isNext,
  26453. _args = arguments;
  26454. return _regenerator.default.wrap(function _callee$(_context) {
  26455. while (1) {
  26456. switch (_context.prev = _context.next) {
  26457. case 0:
  26458. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  26459. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  26460. // 合并用户的配置和内部的默认配置
  26461. mergeConfig = {};
  26462. if (typeof options === 'string') {
  26463. // 如果options为字符串,则为route(url, params)的形式
  26464. mergeConfig.url = this.mixinParam(options, params);
  26465. mergeConfig.type = 'navigateTo';
  26466. } else {
  26467. mergeConfig = uni.$u.deepClone(options, this.config);
  26468. // 否则正常使用mergeConfig中的url和params进行拼接
  26469. mergeConfig.url = this.mixinParam(options.url, options.params);
  26470. }
  26471. if (params.intercept) {
  26472. this.config.intercept = params.intercept;
  26473. }
  26474. // params参数也带给拦截器
  26475. mergeConfig.params = params;
  26476. // 合并内外部参数
  26477. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  26478. // 判断用户是否定义了拦截器
  26479. if (!(typeof uni.$u.routeIntercept === 'function')) {
  26480. _context.next = 14;
  26481. break;
  26482. }
  26483. _context.next = 10;
  26484. return new Promise(function (resolve, reject) {
  26485. uni.$u.routeIntercept(mergeConfig, resolve);
  26486. });
  26487. case 10:
  26488. isNext = _context.sent;
  26489. // 如果isNext为true,则执行路由跳转
  26490. isNext && this.openPage(mergeConfig);
  26491. _context.next = 15;
  26492. break;
  26493. case 14:
  26494. this.openPage(mergeConfig);
  26495. case 15:
  26496. case "end":
  26497. return _context.stop();
  26498. }
  26499. }
  26500. }, _callee, this);
  26501. }));
  26502. function route() {
  26503. return _route.apply(this, arguments);
  26504. }
  26505. return route;
  26506. }() // 执行路由跳转
  26507. }, {
  26508. key: "openPage",
  26509. value: function openPage(config) {
  26510. // 解构参数
  26511. var url = config.url,
  26512. type = config.type,
  26513. delta = config.delta,
  26514. animationType = config.animationType,
  26515. animationDuration = config.animationDuration;
  26516. if (config.type == 'navigateTo' || config.type == 'to') {
  26517. uni.navigateTo({
  26518. url: url,
  26519. animationType: animationType,
  26520. animationDuration: animationDuration
  26521. });
  26522. }
  26523. if (config.type == 'redirectTo' || config.type == 'redirect') {
  26524. uni.redirectTo({
  26525. url: url
  26526. });
  26527. }
  26528. if (config.type == 'switchTab' || config.type == 'tab') {
  26529. uni.switchTab({
  26530. url: url
  26531. });
  26532. }
  26533. if (config.type == 'reLaunch' || config.type == 'launch') {
  26534. uni.reLaunch({
  26535. url: url
  26536. });
  26537. }
  26538. if (config.type == 'navigateBack' || config.type == 'back') {
  26539. uni.navigateBack({
  26540. delta: delta
  26541. });
  26542. }
  26543. }
  26544. }]);
  26545. return Router;
  26546. }();
  26547. var _default = new Router().route;
  26548. exports.default = _default;
  26549. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  26550. /***/ }),
  26551. /***/ 494:
  26552. /*!************************************************************************************!*\
  26553. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  26554. \************************************************************************************/
  26555. /*! no static exports found */
  26556. /***/ (function(module, exports, __webpack_require__) {
  26557. "use strict";
  26558. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  26559. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  26560. Object.defineProperty(exports, "__esModule", {
  26561. value: true
  26562. });
  26563. exports.default = void 0;
  26564. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 50));
  26565. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 495));
  26566. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  26567. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  26568. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  26569. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 52));
  26570. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  26571. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 496));
  26572. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 497));
  26573. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 498));
  26574. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 499));
  26575. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  26576. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  26577. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  26578. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 501));
  26579. 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; } } }; }
  26580. 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); }
  26581. 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; }
  26582. 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; }
  26583. 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; }
  26584. 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); }; }
  26585. 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; } }
  26586. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  26587. function n(e) {
  26588. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  26589. }
  26590. function s(e, t, n) {
  26591. return e(n = {
  26592. path: t,
  26593. exports: {},
  26594. require: function require(e, t) {
  26595. return function () {
  26596. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  26597. }(null == t && n.path);
  26598. }
  26599. }, n.exports), n.exports;
  26600. }
  26601. var r = s(function (e, t) {
  26602. var n;
  26603. e.exports = (n = n || function (e, t) {
  26604. var n = Object.create || function () {
  26605. function e() {}
  26606. return function (t) {
  26607. var n;
  26608. return e.prototype = t, n = new e(), e.prototype = null, n;
  26609. };
  26610. }(),
  26611. s = {},
  26612. r = s.lib = {},
  26613. i = r.Base = {
  26614. extend: function extend(e) {
  26615. var t = n(this);
  26616. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  26617. t.$super.init.apply(this, arguments);
  26618. }), t.init.prototype = t, t.$super = this, t;
  26619. },
  26620. create: function create() {
  26621. var e = this.extend();
  26622. return e.init.apply(e, arguments), e;
  26623. },
  26624. init: function init() {},
  26625. mixIn: function mixIn(e) {
  26626. for (var t in e) {
  26627. e.hasOwnProperty(t) && (this[t] = e[t]);
  26628. }
  26629. e.hasOwnProperty("toString") && (this.toString = e.toString);
  26630. },
  26631. clone: function clone() {
  26632. return this.init.prototype.extend(this);
  26633. }
  26634. },
  26635. o = r.WordArray = i.extend({
  26636. init: function init(e, n) {
  26637. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  26638. },
  26639. toString: function toString(e) {
  26640. return (e || c).stringify(this);
  26641. },
  26642. concat: function concat(e) {
  26643. var t = this.words,
  26644. n = e.words,
  26645. s = this.sigBytes,
  26646. r = e.sigBytes;
  26647. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  26648. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  26649. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  26650. } else for (i = 0; i < r; i += 4) {
  26651. t[s + i >>> 2] = n[i >>> 2];
  26652. }
  26653. return this.sigBytes += r, this;
  26654. },
  26655. clamp: function clamp() {
  26656. var t = this.words,
  26657. n = this.sigBytes;
  26658. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  26659. },
  26660. clone: function clone() {
  26661. var e = i.clone.call(this);
  26662. return e.words = this.words.slice(0), e;
  26663. },
  26664. random: function random(t) {
  26665. for (var n, s = [], r = function r(t) {
  26666. t = t;
  26667. var n = 987654321,
  26668. s = 4294967295;
  26669. return function () {
  26670. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  26671. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  26672. };
  26673. }, i = 0; i < t; i += 4) {
  26674. var a = r(4294967296 * (n || e.random()));
  26675. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  26676. }
  26677. return new o.init(s, t);
  26678. }
  26679. }),
  26680. a = s.enc = {},
  26681. c = a.Hex = {
  26682. stringify: function stringify(e) {
  26683. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26684. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26685. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  26686. }
  26687. return s.join("");
  26688. },
  26689. parse: function parse(e) {
  26690. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  26691. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  26692. }
  26693. return new o.init(n, t / 2);
  26694. }
  26695. },
  26696. u = a.Latin1 = {
  26697. stringify: function stringify(e) {
  26698. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  26699. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  26700. s.push(String.fromCharCode(i));
  26701. }
  26702. return s.join("");
  26703. },
  26704. parse: function parse(e) {
  26705. for (var t = e.length, n = [], s = 0; s < t; s++) {
  26706. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  26707. }
  26708. return new o.init(n, t);
  26709. }
  26710. },
  26711. h = a.Utf8 = {
  26712. stringify: function stringify(e) {
  26713. try {
  26714. return decodeURIComponent(escape(u.stringify(e)));
  26715. } catch (e) {
  26716. throw new Error("Malformed UTF-8 data");
  26717. }
  26718. },
  26719. parse: function parse(e) {
  26720. return u.parse(unescape(encodeURIComponent(e)));
  26721. }
  26722. },
  26723. l = r.BufferedBlockAlgorithm = i.extend({
  26724. reset: function reset() {
  26725. this._data = new o.init(), this._nDataBytes = 0;
  26726. },
  26727. _append: function _append(e) {
  26728. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  26729. },
  26730. _process: function _process(t) {
  26731. var n = this._data,
  26732. s = n.words,
  26733. r = n.sigBytes,
  26734. i = this.blockSize,
  26735. a = r / (4 * i),
  26736. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  26737. u = e.min(4 * c, r);
  26738. if (c) {
  26739. for (var h = 0; h < c; h += i) {
  26740. this._doProcessBlock(s, h);
  26741. }
  26742. var l = s.splice(0, c);
  26743. n.sigBytes -= u;
  26744. }
  26745. return new o.init(l, u);
  26746. },
  26747. clone: function clone() {
  26748. var e = i.clone.call(this);
  26749. return e._data = this._data.clone(), e;
  26750. },
  26751. _minBufferSize: 0
  26752. });
  26753. r.Hasher = l.extend({
  26754. cfg: i.extend(),
  26755. init: function init(e) {
  26756. this.cfg = this.cfg.extend(e), this.reset();
  26757. },
  26758. reset: function reset() {
  26759. l.reset.call(this), this._doReset();
  26760. },
  26761. update: function update(e) {
  26762. return this._append(e), this._process(), this;
  26763. },
  26764. finalize: function finalize(e) {
  26765. return e && this._append(e), this._doFinalize();
  26766. },
  26767. blockSize: 16,
  26768. _createHelper: function _createHelper(e) {
  26769. return function (t, n) {
  26770. return new e.init(n).finalize(t);
  26771. };
  26772. },
  26773. _createHmacHelper: function _createHmacHelper(e) {
  26774. return function (t, n) {
  26775. return new d.HMAC.init(e, n).finalize(t);
  26776. };
  26777. }
  26778. });
  26779. var d = s.algo = {};
  26780. return s;
  26781. }(Math), n);
  26782. }),
  26783. i = r,
  26784. o = (s(function (e, t) {
  26785. var n;
  26786. e.exports = (n = i, function (e) {
  26787. var t = n,
  26788. s = t.lib,
  26789. r = s.WordArray,
  26790. i = s.Hasher,
  26791. o = t.algo,
  26792. a = [];
  26793. !function () {
  26794. for (var t = 0; t < 64; t++) {
  26795. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  26796. }
  26797. }();
  26798. var c = o.MD5 = i.extend({
  26799. _doReset: function _doReset() {
  26800. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  26801. },
  26802. _doProcessBlock: function _doProcessBlock(e, t) {
  26803. for (var n = 0; n < 16; n++) {
  26804. var s = t + n,
  26805. r = e[s];
  26806. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  26807. }
  26808. var i = this._hash.words,
  26809. o = e[t + 0],
  26810. c = e[t + 1],
  26811. p = e[t + 2],
  26812. f = e[t + 3],
  26813. g = e[t + 4],
  26814. m = e[t + 5],
  26815. y = e[t + 6],
  26816. _ = e[t + 7],
  26817. w = e[t + 8],
  26818. v = e[t + 9],
  26819. I = e[t + 10],
  26820. S = e[t + 11],
  26821. b = e[t + 12],
  26822. k = e[t + 13],
  26823. C = e[t + 14],
  26824. T = e[t + 15],
  26825. P = i[0],
  26826. A = i[1],
  26827. E = i[2],
  26828. O = i[3];
  26829. 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;
  26830. },
  26831. _doFinalize: function _doFinalize() {
  26832. var t = this._data,
  26833. n = t.words,
  26834. s = 8 * this._nDataBytes,
  26835. r = 8 * t.sigBytes;
  26836. n[r >>> 5] |= 128 << 24 - r % 32;
  26837. var i = e.floor(s / 4294967296),
  26838. o = s;
  26839. 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();
  26840. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  26841. var h = c[u];
  26842. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  26843. }
  26844. return a;
  26845. },
  26846. clone: function clone() {
  26847. var e = i.clone.call(this);
  26848. return e._hash = this._hash.clone(), e;
  26849. }
  26850. });
  26851. function u(e, t, n, s, r, i, o) {
  26852. var a = e + (t & n | ~t & s) + r + o;
  26853. return (a << i | a >>> 32 - i) + t;
  26854. }
  26855. function h(e, t, n, s, r, i, o) {
  26856. var a = e + (t & s | n & ~s) + r + o;
  26857. return (a << i | a >>> 32 - i) + t;
  26858. }
  26859. function l(e, t, n, s, r, i, o) {
  26860. var a = e + (t ^ n ^ s) + r + o;
  26861. return (a << i | a >>> 32 - i) + t;
  26862. }
  26863. function d(e, t, n, s, r, i, o) {
  26864. var a = e + (n ^ (t | ~s)) + r + o;
  26865. return (a << i | a >>> 32 - i) + t;
  26866. }
  26867. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  26868. }(Math), n.MD5);
  26869. }), s(function (e, t) {
  26870. var n;
  26871. e.exports = (n = i, void function () {
  26872. var e = n,
  26873. t = e.lib.Base,
  26874. s = e.enc.Utf8;
  26875. e.algo.HMAC = t.extend({
  26876. init: function init(e, t) {
  26877. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  26878. var n = e.blockSize,
  26879. r = 4 * n;
  26880. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  26881. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  26882. a[u] ^= 1549556828, c[u] ^= 909522486;
  26883. }
  26884. i.sigBytes = o.sigBytes = r, this.reset();
  26885. },
  26886. reset: function reset() {
  26887. var e = this._hasher;
  26888. e.reset(), e.update(this._iKey);
  26889. },
  26890. update: function update(e) {
  26891. return this._hasher.update(e), this;
  26892. },
  26893. finalize: function finalize(e) {
  26894. var t = this._hasher,
  26895. n = t.finalize(e);
  26896. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  26897. }
  26898. });
  26899. }());
  26900. }), s(function (e, t) {
  26901. e.exports = i.HmacMD5;
  26902. })),
  26903. a = s(function (e, t) {
  26904. e.exports = i.enc.Utf8;
  26905. }),
  26906. c = s(function (e, t) {
  26907. var n;
  26908. e.exports = (n = i, function () {
  26909. var e = n,
  26910. t = e.lib.WordArray;
  26911. function s(e, n, s) {
  26912. for (var r = [], i = 0, o = 0; o < n; o++) {
  26913. if (o % 4) {
  26914. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  26915. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  26916. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  26917. }
  26918. }
  26919. return t.create(r, i);
  26920. }
  26921. e.enc.Base64 = {
  26922. stringify: function stringify(e) {
  26923. var t = e.words,
  26924. n = e.sigBytes,
  26925. s = this._map;
  26926. e.clamp();
  26927. for (var r = [], i = 0; i < n; i += 3) {
  26928. 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++) {
  26929. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  26930. }
  26931. }
  26932. var c = s.charAt(64);
  26933. if (c) for (; r.length % 4;) {
  26934. r.push(c);
  26935. }
  26936. return r.join("");
  26937. },
  26938. parse: function parse(e) {
  26939. var t = e.length,
  26940. n = this._map,
  26941. r = this._reverseMap;
  26942. if (!r) {
  26943. r = this._reverseMap = [];
  26944. for (var i = 0; i < n.length; i++) {
  26945. r[n.charCodeAt(i)] = i;
  26946. }
  26947. }
  26948. var o = n.charAt(64);
  26949. if (o) {
  26950. var a = e.indexOf(o);
  26951. -1 !== a && (t = a);
  26952. }
  26953. return s(e, t, r);
  26954. },
  26955. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  26956. };
  26957. }(), n.enc.Base64);
  26958. });
  26959. var u = "FUNCTION",
  26960. h = "OBJECT",
  26961. l = "CLIENT_DB",
  26962. d = "pending",
  26963. p = "fullfilled",
  26964. f = "rejected";
  26965. function g(e) {
  26966. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  26967. }
  26968. function m(e) {
  26969. return "object" === g(e);
  26970. }
  26971. function y(e) {
  26972. return "function" == typeof e;
  26973. }
  26974. function _(e) {
  26975. return function () {
  26976. try {
  26977. return e.apply(e, arguments);
  26978. } catch (e) {
  26979. console.error(e);
  26980. }
  26981. };
  26982. }
  26983. var w = "REJECTED",
  26984. v = "NOT_PENDING";
  26985. var I = /*#__PURE__*/function () {
  26986. function I() {
  26987. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26988. e = _ref.createPromise,
  26989. _ref$retryRule = _ref.retryRule,
  26990. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  26991. (0, _classCallCheck2.default)(this, I);
  26992. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  26993. }
  26994. (0, _createClass2.default)(I, [{
  26995. key: "needRetry",
  26996. get: function get() {
  26997. if (!this.status) return !0;
  26998. switch (this.retryRule) {
  26999. case w:
  27000. return this.status === f;
  27001. case v:
  27002. return this.status !== d;
  27003. }
  27004. }
  27005. }, {
  27006. key: "exec",
  27007. value: function exec() {
  27008. var _this = this;
  27009. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  27010. return _this.status = p, Promise.resolve(e);
  27011. }, function (e) {
  27012. return _this.status = f, Promise.reject(e);
  27013. }), this.promise) : this.promise;
  27014. }
  27015. }]);
  27016. return I;
  27017. }();
  27018. function S(e) {
  27019. return e && "string" == typeof e ? JSON.parse(e) : e;
  27020. }
  27021. var b = "development" === "development",
  27022. k = "mp-weixin",
  27023. C = "true" === undefined || !0 === undefined,
  27024. T = S([]),
  27025. P = "h5" === k ? "web" : "app-plus" === k ? "app" : k,
  27026. A = S(undefined),
  27027. E = S(undefined) || [],
  27028. O = true;
  27029. var x = "";
  27030. try {
  27031. x = (__webpack_require__(/*! uni-stat-config */ 502).default || __webpack_require__(/*! uni-stat-config */ 502)).appid;
  27032. } catch (e) {}
  27033. var R = {};
  27034. function U(e) {
  27035. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27036. var n, s;
  27037. return n = R, s = e, Object.prototype.hasOwnProperty.call(n, s) || (R[e] = t), R[e];
  27038. }
  27039. "app" === P && (R = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  27040. var L = ["invoke", "success", "fail", "complete"],
  27041. N = U("_globalUniCloudInterceptor");
  27042. function D(e, t) {
  27043. N[e] || (N[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  27044. L.indexOf(n) > -1 && function (e, t, n) {
  27045. var s = N[e][t];
  27046. s || (s = N[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  27047. }(e, n, t[n]);
  27048. });
  27049. }
  27050. function F(e, t) {
  27051. N[e] || (N[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  27052. L.indexOf(n) > -1 && function (e, t, n) {
  27053. var s = N[e][t];
  27054. if (!s) return;
  27055. var r = s.indexOf(n);
  27056. r > -1 && s.splice(r, 1);
  27057. }(e, n, t[n]);
  27058. }) : delete N[e];
  27059. }
  27060. function q(e, t) {
  27061. return e && 0 !== e.length ? e.reduce(function (e, n) {
  27062. return e.then(function () {
  27063. return n(t);
  27064. });
  27065. }, Promise.resolve()) : Promise.resolve();
  27066. }
  27067. function M(e, t) {
  27068. return N[e] && N[e][t] || [];
  27069. }
  27070. function K(e) {
  27071. D("callObject", e);
  27072. }
  27073. var j = U("_globalUniCloudListener"),
  27074. B = "response",
  27075. $ = "needLogin",
  27076. W = "refreshToken",
  27077. z = "clientdb",
  27078. J = "cloudfunction",
  27079. H = "cloudobject";
  27080. function G(e) {
  27081. return j[e] || (j[e] = []), j[e];
  27082. }
  27083. function V(e, t) {
  27084. var n = G(e);
  27085. n.includes(t) || n.push(t);
  27086. }
  27087. function Y(e, t) {
  27088. var n = G(e),
  27089. s = n.indexOf(t);
  27090. -1 !== s && n.splice(s, 1);
  27091. }
  27092. function Q(e, t) {
  27093. var n = G(e);
  27094. for (var _e2 = 0; _e2 < n.length; _e2++) {
  27095. (0, n[_e2])(t);
  27096. }
  27097. }
  27098. var X,
  27099. Z = !1;
  27100. function ee() {
  27101. return X || (X = new Promise(function (e) {
  27102. Z && e(), function t() {
  27103. if ("function" == typeof getCurrentPages) {
  27104. var _t2 = getCurrentPages();
  27105. _t2 && _t2[0] && (Z = !0, e());
  27106. }
  27107. Z || setTimeout(function () {
  27108. t();
  27109. }, 30);
  27110. }();
  27111. }), X);
  27112. }
  27113. function te(e) {
  27114. var t = {};
  27115. for (var _n2 in e) {
  27116. var _s2 = e[_n2];
  27117. y(_s2) && (t[_n2] = _(_s2));
  27118. }
  27119. return t;
  27120. }
  27121. var ne = /*#__PURE__*/function (_Error) {
  27122. (0, _inherits2.default)(ne, _Error);
  27123. var _super = _createSuper(ne);
  27124. function ne(e) {
  27125. var _this2;
  27126. (0, _classCallCheck2.default)(this, ne);
  27127. _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;
  27128. return _this2;
  27129. }
  27130. (0, _createClass2.default)(ne, [{
  27131. key: "toJson",
  27132. value: function toJson() {
  27133. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  27134. if (!(e >= 10)) return e++, {
  27135. errCode: this.errCode,
  27136. errMsg: this.errMsg,
  27137. errSubject: this.errSubject,
  27138. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  27139. };
  27140. }
  27141. }]);
  27142. return ne;
  27143. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  27144. var se = {
  27145. request: function request(e) {
  27146. return uni.request(e);
  27147. },
  27148. uploadFile: function uploadFile(e) {
  27149. return uni.uploadFile(e);
  27150. },
  27151. setStorageSync: function setStorageSync(e, t) {
  27152. return uni.setStorageSync(e, t);
  27153. },
  27154. getStorageSync: function getStorageSync(e) {
  27155. return uni.getStorageSync(e);
  27156. },
  27157. removeStorageSync: function removeStorageSync(e) {
  27158. return uni.removeStorageSync(e);
  27159. },
  27160. clearStorageSync: function clearStorageSync() {
  27161. return uni.clearStorageSync();
  27162. }
  27163. };
  27164. function re() {
  27165. return {
  27166. token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"),
  27167. tokenExpired: se.getStorageSync("uni_id_token_expired")
  27168. };
  27169. }
  27170. function ie() {
  27171. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27172. e = _ref2.token,
  27173. t = _ref2.tokenExpired;
  27174. e && se.setStorageSync("uni_id_token", e), t && se.setStorageSync("uni_id_token_expired", t);
  27175. }
  27176. var oe, ae;
  27177. function ce() {
  27178. return oe || (oe = uni.getSystemInfoSync()), oe;
  27179. }
  27180. function ue() {
  27181. var e, t;
  27182. try {
  27183. if (uni.getLaunchOptionsSync) {
  27184. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  27185. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  27186. _n3 = _uni$getLaunchOptions.scene,
  27187. _s3 = _uni$getLaunchOptions.channel;
  27188. e = _s3, t = _n3;
  27189. }
  27190. } catch (e) {}
  27191. return {
  27192. channel: e,
  27193. scene: t
  27194. };
  27195. }
  27196. function he() {
  27197. var e = uni.getLocale && uni.getLocale() || "en";
  27198. if (ae) return _objectSpread(_objectSpread({}, ae), {}, {
  27199. locale: e,
  27200. LOCALE: e
  27201. });
  27202. var t = ce(),
  27203. n = t.deviceId,
  27204. s = t.osName,
  27205. r = t.uniPlatform,
  27206. i = t.appId,
  27207. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  27208. for (var _e3 = 0; _e3 < o.length; _e3++) {
  27209. delete t[o[_e3]];
  27210. }
  27211. return ae = _objectSpread(_objectSpread({
  27212. PLATFORM: r,
  27213. OS: s,
  27214. APPID: i,
  27215. DEVICEID: n
  27216. }, ue()), t), _objectSpread(_objectSpread({}, ae), {}, {
  27217. locale: e,
  27218. LOCALE: e
  27219. });
  27220. }
  27221. var le = {
  27222. sign: function sign(e, t) {
  27223. var n = "";
  27224. return Object.keys(e).sort().forEach(function (t) {
  27225. e[t] && (n = n + "&" + t + "=" + e[t]);
  27226. }), n = n.slice(1), o(n, t).toString();
  27227. },
  27228. wrappedRequest: function wrappedRequest(e, t) {
  27229. return new Promise(function (n, s) {
  27230. t(Object.assign(e, {
  27231. complete: function complete(e) {
  27232. 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");
  27233. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  27234. if (!e.statusCode || e.statusCode >= 400) return s(new ne({
  27235. code: "SYS_ERR",
  27236. message: e.errMsg || "request:fail",
  27237. requestId: t
  27238. }));
  27239. var r = e.data;
  27240. if (r.error) return s(new ne({
  27241. code: r.error.code,
  27242. message: r.error.message,
  27243. requestId: t
  27244. }));
  27245. r.result = r.data, r.requestId = t, delete r.data, n(r);
  27246. }
  27247. }));
  27248. });
  27249. },
  27250. toBase64: function toBase64(e) {
  27251. return c.stringify(a.parse(e));
  27252. }
  27253. },
  27254. de = {
  27255. "uniCloud.init.paramRequired": "{param} required",
  27256. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27257. };
  27258. var _e4 = (0, _uniI18n.initVueI18n)({
  27259. "zh-Hans": {
  27260. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27261. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27262. },
  27263. "zh-Hant": {
  27264. "uniCloud.init.paramRequired": "缺少参数:{param}",
  27265. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  27266. },
  27267. en: de,
  27268. fr: {
  27269. "uniCloud.init.paramRequired": "{param} required",
  27270. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27271. },
  27272. es: {
  27273. "uniCloud.init.paramRequired": "{param} required",
  27274. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  27275. },
  27276. ja: de
  27277. }, "zh-Hans"),
  27278. pe = _e4.t;
  27279. var fe = /*#__PURE__*/function () {
  27280. function fe(e) {
  27281. var _this3 = this;
  27282. (0, _classCallCheck2.default)(this, fe);
  27283. ["spaceId", "clientSecret"].forEach(function (t) {
  27284. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(pe("uniCloud.init.paramRequired", {
  27285. param: t
  27286. }));
  27287. }), this.config = Object.assign({}, {
  27288. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  27289. }, 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({
  27290. createPromise: function createPromise() {
  27291. return _this3.requestAuth(_this3.setupRequest({
  27292. method: "serverless.auth.user.anonymousAuthorize",
  27293. params: "{}"
  27294. }, "auth")).then(function (e) {
  27295. if (!e.result || !e.result.accessToken) throw new ne({
  27296. code: "AUTH_FAILED",
  27297. message: "获取accessToken失败"
  27298. });
  27299. _this3.setAccessToken(e.result.accessToken);
  27300. });
  27301. },
  27302. retryRule: v
  27303. });
  27304. }
  27305. (0, _createClass2.default)(fe, [{
  27306. key: "hasAccessToken",
  27307. get: function get() {
  27308. return !!this.accessToken;
  27309. }
  27310. }, {
  27311. key: "setAccessToken",
  27312. value: function setAccessToken(e) {
  27313. this.accessToken = e;
  27314. }
  27315. }, {
  27316. key: "requestWrapped",
  27317. value: function requestWrapped(e) {
  27318. return le.wrappedRequest(e, this.adapter.request);
  27319. }
  27320. }, {
  27321. key: "requestAuth",
  27322. value: function requestAuth(e) {
  27323. return this.requestWrapped(e);
  27324. }
  27325. }, {
  27326. key: "request",
  27327. value: function request(e, t) {
  27328. var _this4 = this;
  27329. return Promise.resolve().then(function () {
  27330. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  27331. return new Promise(function (e, n) {
  27332. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  27333. }).then(function () {
  27334. return _this4.getAccessToken();
  27335. }).then(function () {
  27336. var t = _this4.rebuildRequest(e);
  27337. return _this4.request(t, !0);
  27338. });
  27339. }) : _this4.getAccessToken().then(function () {
  27340. var t = _this4.rebuildRequest(e);
  27341. return _this4.request(t, !0);
  27342. });
  27343. });
  27344. }
  27345. }, {
  27346. key: "rebuildRequest",
  27347. value: function rebuildRequest(e) {
  27348. var t = Object.assign({}, e);
  27349. 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;
  27350. }
  27351. }, {
  27352. key: "setupRequest",
  27353. value: function setupRequest(e, t) {
  27354. var n = Object.assign({}, e, {
  27355. spaceId: this.config.spaceId,
  27356. timestamp: Date.now()
  27357. }),
  27358. s = {
  27359. "Content-Type": "application/json"
  27360. };
  27361. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  27362. url: this.config.requestUrl,
  27363. method: "POST",
  27364. data: n,
  27365. dataType: "json",
  27366. header: s
  27367. };
  27368. }
  27369. }, {
  27370. key: "getAccessToken",
  27371. value: function getAccessToken() {
  27372. return this._getAccessTokenPromiseHub.exec();
  27373. }
  27374. }, {
  27375. key: "authorize",
  27376. value: function () {
  27377. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  27378. return _regenerator.default.wrap(function _callee$(_context) {
  27379. while (1) {
  27380. switch (_context.prev = _context.next) {
  27381. case 0:
  27382. _context.next = 2;
  27383. return this.getAccessToken();
  27384. case 2:
  27385. case "end":
  27386. return _context.stop();
  27387. }
  27388. }
  27389. }, _callee, this);
  27390. }));
  27391. function authorize() {
  27392. return _authorize.apply(this, arguments);
  27393. }
  27394. return authorize;
  27395. }()
  27396. }, {
  27397. key: "callFunction",
  27398. value: function callFunction(e) {
  27399. var t = {
  27400. method: "serverless.function.runtime.invoke",
  27401. params: JSON.stringify({
  27402. functionTarget: e.name,
  27403. functionArgs: e.data || {}
  27404. })
  27405. };
  27406. return this.request(this.setupRequest(t));
  27407. }
  27408. }, {
  27409. key: "getOSSUploadOptionsFromPath",
  27410. value: function getOSSUploadOptionsFromPath(e) {
  27411. var t = {
  27412. method: "serverless.file.resource.generateProximalSign",
  27413. params: JSON.stringify(e)
  27414. };
  27415. return this.request(this.setupRequest(t));
  27416. }
  27417. }, {
  27418. key: "uploadFileToOSS",
  27419. value: function uploadFileToOSS(_ref3) {
  27420. var _this5 = this;
  27421. var e = _ref3.url,
  27422. t = _ref3.formData,
  27423. n = _ref3.name,
  27424. s = _ref3.filePath,
  27425. r = _ref3.fileType,
  27426. i = _ref3.onUploadProgress;
  27427. return new Promise(function (o, a) {
  27428. var c = _this5.adapter.uploadFile({
  27429. url: e,
  27430. formData: t,
  27431. name: n,
  27432. filePath: s,
  27433. fileType: r,
  27434. header: {
  27435. "X-OSS-server-side-encrpytion": "AES256"
  27436. },
  27437. success: function success(e) {
  27438. e && e.statusCode < 400 ? o(e) : a(new ne({
  27439. code: "UPLOAD_FAILED",
  27440. message: "文件上传失败"
  27441. }));
  27442. },
  27443. fail: function fail(e) {
  27444. a(new ne({
  27445. code: e.code || "UPLOAD_FAILED",
  27446. message: e.message || e.errMsg || "文件上传失败"
  27447. }));
  27448. }
  27449. });
  27450. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  27451. i({
  27452. loaded: e.totalBytesSent,
  27453. total: e.totalBytesExpectedToSend
  27454. });
  27455. });
  27456. });
  27457. }
  27458. }, {
  27459. key: "reportOSSUpload",
  27460. value: function reportOSSUpload(e) {
  27461. var t = {
  27462. method: "serverless.file.resource.report",
  27463. params: JSON.stringify(e)
  27464. };
  27465. return this.request(this.setupRequest(t));
  27466. }
  27467. }, {
  27468. key: "uploadFile",
  27469. value: function () {
  27470. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  27471. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _, _e5, w;
  27472. return _regenerator.default.wrap(function _callee2$(_context2) {
  27473. while (1) {
  27474. switch (_context2.prev = _context2.next) {
  27475. case 0:
  27476. 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;
  27477. if (!("string" !== g(t))) {
  27478. _context2.next = 3;
  27479. break;
  27480. }
  27481. throw new ne({
  27482. code: "INVALID_PARAM",
  27483. message: "cloudPath必须为字符串类型"
  27484. });
  27485. case 3:
  27486. if (t = t.trim()) {
  27487. _context2.next = 5;
  27488. break;
  27489. }
  27490. throw new ne({
  27491. code: "INVALID_PARAM",
  27492. message: "cloudPath不可为空"
  27493. });
  27494. case 5:
  27495. if (!/:\/\//.test(t)) {
  27496. _context2.next = 7;
  27497. break;
  27498. }
  27499. throw new ne({
  27500. code: "INVALID_PARAM",
  27501. message: "cloudPath不合法"
  27502. });
  27503. case 7:
  27504. o = i && i.envType || this.config.envType;
  27505. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  27506. _context2.next = 10;
  27507. break;
  27508. }
  27509. throw new ne({
  27510. code: "INVALID_PARAM",
  27511. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  27512. });
  27513. case 10:
  27514. _context2.next = 12;
  27515. return this.getOSSUploadOptionsFromPath({
  27516. env: o,
  27517. filename: s ? t.split("/").pop() : t,
  27518. fileId: s ? t : void 0
  27519. });
  27520. case 12:
  27521. a = _context2.sent.result;
  27522. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  27523. u = a.securityToken;
  27524. h = a.accessKeyId;
  27525. l = a.signature;
  27526. d = a.host;
  27527. p = a.ossPath;
  27528. f = a.id;
  27529. m = a.policy;
  27530. y = a.ossCallbackUrl;
  27531. _ = {
  27532. "Cache-Control": "max-age=2592000",
  27533. "Content-Disposition": "attachment",
  27534. OSSAccessKeyId: h,
  27535. Signature: l,
  27536. host: d,
  27537. id: f,
  27538. key: p,
  27539. policy: m,
  27540. success_action_status: 200
  27541. };
  27542. if (u && (_["x-oss-security-token"] = u), y) {
  27543. _e5 = JSON.stringify({
  27544. callbackUrl: y,
  27545. callbackBody: JSON.stringify({
  27546. fileId: f,
  27547. spaceId: this.config.spaceId
  27548. }),
  27549. callbackBodyType: "application/json"
  27550. });
  27551. _.callback = le.toBase64(_e5);
  27552. }
  27553. w = {
  27554. url: "https://" + a.host,
  27555. formData: _,
  27556. fileName: "file",
  27557. name: "file",
  27558. filePath: e,
  27559. fileType: n
  27560. };
  27561. _context2.next = 27;
  27562. return this.uploadFileToOSS(Object.assign({}, w, {
  27563. onUploadProgress: r
  27564. }));
  27565. case 27:
  27566. if (!y) {
  27567. _context2.next = 29;
  27568. break;
  27569. }
  27570. return _context2.abrupt("return", {
  27571. success: !0,
  27572. filePath: e,
  27573. fileID: c
  27574. });
  27575. case 29:
  27576. _context2.next = 31;
  27577. return this.reportOSSUpload({
  27578. id: f
  27579. });
  27580. case 31:
  27581. if (!_context2.sent.success) {
  27582. _context2.next = 33;
  27583. break;
  27584. }
  27585. return _context2.abrupt("return", {
  27586. success: !0,
  27587. filePath: e,
  27588. fileID: c
  27589. });
  27590. case 33:
  27591. throw new ne({
  27592. code: "UPLOAD_FAILED",
  27593. message: "文件上传失败"
  27594. });
  27595. case 34:
  27596. case "end":
  27597. return _context2.stop();
  27598. }
  27599. }
  27600. }, _callee2, this);
  27601. }));
  27602. function uploadFile(_x) {
  27603. return _uploadFile.apply(this, arguments);
  27604. }
  27605. return uploadFile;
  27606. }()
  27607. }, {
  27608. key: "getTempFileURL",
  27609. value: function getTempFileURL() {
  27610. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27611. e = _ref5.fileList;
  27612. return new Promise(function (t, n) {
  27613. Array.isArray(e) && 0 !== e.length || n(new ne({
  27614. code: "INVALID_PARAM",
  27615. message: "fileList的元素必须是非空的字符串"
  27616. })), t({
  27617. fileList: e.map(function (e) {
  27618. return {
  27619. fileID: e,
  27620. tempFileURL: e
  27621. };
  27622. })
  27623. });
  27624. });
  27625. }
  27626. }, {
  27627. key: "getFileInfo",
  27628. value: function () {
  27629. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  27630. var _ref6,
  27631. e,
  27632. t,
  27633. _args3 = arguments;
  27634. return _regenerator.default.wrap(function _callee3$(_context3) {
  27635. while (1) {
  27636. switch (_context3.prev = _context3.next) {
  27637. case 0:
  27638. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  27639. if (!(!Array.isArray(e) || 0 === e.length)) {
  27640. _context3.next = 3;
  27641. break;
  27642. }
  27643. throw new ne({
  27644. code: "INVALID_PARAM",
  27645. message: "fileList的元素必须是非空的字符串"
  27646. });
  27647. case 3:
  27648. t = {
  27649. method: "serverless.file.resource.info",
  27650. params: JSON.stringify({
  27651. id: e.map(function (e) {
  27652. return e.split("?")[0];
  27653. }).join(",")
  27654. })
  27655. };
  27656. _context3.next = 6;
  27657. return this.request(this.setupRequest(t));
  27658. case 6:
  27659. _context3.t0 = _context3.sent.result;
  27660. return _context3.abrupt("return", {
  27661. fileList: _context3.t0
  27662. });
  27663. case 8:
  27664. case "end":
  27665. return _context3.stop();
  27666. }
  27667. }
  27668. }, _callee3, this);
  27669. }));
  27670. function getFileInfo() {
  27671. return _getFileInfo.apply(this, arguments);
  27672. }
  27673. return getFileInfo;
  27674. }()
  27675. }]);
  27676. return fe;
  27677. }();
  27678. var ge = {
  27679. init: function init(e) {
  27680. var t = new fe(e),
  27681. n = {
  27682. signInAnonymously: function signInAnonymously() {
  27683. return t.authorize();
  27684. },
  27685. getLoginState: function getLoginState() {
  27686. return Promise.resolve(!1);
  27687. }
  27688. };
  27689. return t.auth = function () {
  27690. return n;
  27691. }, t.customAuth = t.auth, t;
  27692. }
  27693. };
  27694. var me = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  27695. var ye;
  27696. !function (e) {
  27697. e.local = "local", e.none = "none", e.session = "session";
  27698. }(ye || (ye = {}));
  27699. var _e = function _e() {};
  27700. var we = function we() {
  27701. var e;
  27702. if (!Promise) {
  27703. e = function e() {}, e.promise = {};
  27704. var _t3 = function _t3() {
  27705. throw new ne({
  27706. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  27707. });
  27708. };
  27709. return Object.defineProperty(e.promise, "then", {
  27710. get: _t3
  27711. }), Object.defineProperty(e.promise, "catch", {
  27712. get: _t3
  27713. }), e;
  27714. }
  27715. var t = new Promise(function (t, n) {
  27716. e = function e(_e6, s) {
  27717. return _e6 ? n(_e6) : t(s);
  27718. };
  27719. });
  27720. return e.promise = t, e;
  27721. };
  27722. function ve(e) {
  27723. return void 0 === e;
  27724. }
  27725. function Ie(e) {
  27726. return "[object Null]" === Object.prototype.toString.call(e);
  27727. }
  27728. var Se;
  27729. function be(e) {
  27730. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  27731. var n;
  27732. var _iterator = _createForOfIteratorHelper(t),
  27733. _step;
  27734. try {
  27735. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  27736. var _e7 = _step.value;
  27737. var _t4 = _e7.isMatch,
  27738. _n4 = _e7.genAdapter,
  27739. _s4 = _e7.runtime;
  27740. if (_t4()) return {
  27741. adapter: _n4(),
  27742. runtime: _s4
  27743. };
  27744. }
  27745. } catch (err) {
  27746. _iterator.e(err);
  27747. } finally {
  27748. _iterator.f();
  27749. }
  27750. }
  27751. !function (e) {
  27752. e.WEB = "web", e.WX_MP = "wx_mp";
  27753. }(Se || (Se = {}));
  27754. var ke = {
  27755. adapter: null,
  27756. runtime: void 0
  27757. },
  27758. Ce = ["anonymousUuidKey"];
  27759. var Te = /*#__PURE__*/function (_e8) {
  27760. (0, _inherits2.default)(Te, _e8);
  27761. var _super2 = _createSuper(Te);
  27762. function Te() {
  27763. var _this6;
  27764. (0, _classCallCheck2.default)(this, Te);
  27765. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  27766. return _this6;
  27767. }
  27768. (0, _createClass2.default)(Te, [{
  27769. key: "setItem",
  27770. value: function setItem(e, t) {
  27771. ke.adapter.root.tcbObject[e] = t;
  27772. }
  27773. }, {
  27774. key: "getItem",
  27775. value: function getItem(e) {
  27776. return ke.adapter.root.tcbObject[e];
  27777. }
  27778. }, {
  27779. key: "removeItem",
  27780. value: function removeItem(e) {
  27781. delete ke.adapter.root.tcbObject[e];
  27782. }
  27783. }, {
  27784. key: "clear",
  27785. value: function clear() {
  27786. delete ke.adapter.root.tcbObject;
  27787. }
  27788. }]);
  27789. return Te;
  27790. }(_e);
  27791. function Pe(e, t) {
  27792. switch (e) {
  27793. case "local":
  27794. return t.localStorage || new Te();
  27795. case "none":
  27796. return new Te();
  27797. default:
  27798. return t.sessionStorage || new Te();
  27799. }
  27800. }
  27801. var Ae = /*#__PURE__*/function () {
  27802. function Ae(e) {
  27803. (0, _classCallCheck2.default)(this, Ae);
  27804. if (!this._storage) {
  27805. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Pe(this._persistence, ke.adapter);
  27806. var _t5 = "access_token_".concat(e.env),
  27807. _n5 = "access_token_expire_".concat(e.env),
  27808. _s5 = "refresh_token_".concat(e.env),
  27809. _r = "anonymous_uuid_".concat(e.env),
  27810. _i = "login_type_".concat(e.env),
  27811. _o = "user_info_".concat(e.env);
  27812. this.keys = {
  27813. accessTokenKey: _t5,
  27814. accessTokenExpireKey: _n5,
  27815. refreshTokenKey: _s5,
  27816. anonymousUuidKey: _r,
  27817. loginTypeKey: _i,
  27818. userInfoKey: _o
  27819. };
  27820. }
  27821. }
  27822. (0, _createClass2.default)(Ae, [{
  27823. key: "updatePersistence",
  27824. value: function updatePersistence(e) {
  27825. if (e === this._persistence) return;
  27826. var t = "local" === this._persistence;
  27827. this._persistence = e;
  27828. var n = Pe(e, ke.adapter);
  27829. for (var _e9 in this.keys) {
  27830. var _s6 = this.keys[_e9];
  27831. if (t && Ce.includes(_e9)) continue;
  27832. var _r2 = this._storage.getItem(_s6);
  27833. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  27834. }
  27835. this._storage = n;
  27836. }
  27837. }, {
  27838. key: "setStore",
  27839. value: function setStore(e, t, n) {
  27840. if (!this._storage) return;
  27841. var s = {
  27842. version: n || "localCachev1",
  27843. content: t
  27844. },
  27845. r = JSON.stringify(s);
  27846. try {
  27847. this._storage.setItem(e, r);
  27848. } catch (e) {
  27849. throw e;
  27850. }
  27851. }
  27852. }, {
  27853. key: "getStore",
  27854. value: function getStore(e, t) {
  27855. try {
  27856. if (!this._storage) return;
  27857. } catch (e) {
  27858. return "";
  27859. }
  27860. t = t || "localCachev1";
  27861. var n = this._storage.getItem(e);
  27862. if (!n) return "";
  27863. if (n.indexOf(t) >= 0) {
  27864. return JSON.parse(n).content;
  27865. }
  27866. return "";
  27867. }
  27868. }, {
  27869. key: "removeStore",
  27870. value: function removeStore(e) {
  27871. this._storage.removeItem(e);
  27872. }
  27873. }]);
  27874. return Ae;
  27875. }();
  27876. var Ee = {},
  27877. Oe = {};
  27878. function xe(e) {
  27879. return Ee[e];
  27880. }
  27881. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  27882. (0, _classCallCheck2.default)(this, Re);
  27883. this.data = t || null, this.name = e;
  27884. });
  27885. var Ue = /*#__PURE__*/function (_Re) {
  27886. (0, _inherits2.default)(Ue, _Re);
  27887. var _super3 = _createSuper(Ue);
  27888. function Ue(e, t) {
  27889. var _this7;
  27890. (0, _classCallCheck2.default)(this, Ue);
  27891. _this7 = _super3.call(this, "error", {
  27892. error: e,
  27893. data: t
  27894. }), _this7.error = e;
  27895. return _this7;
  27896. }
  27897. return (0, _createClass2.default)(Ue);
  27898. }(Re);
  27899. var Le = new ( /*#__PURE__*/function () {
  27900. function _class() {
  27901. (0, _classCallCheck2.default)(this, _class);
  27902. this._listeners = {};
  27903. }
  27904. (0, _createClass2.default)(_class, [{
  27905. key: "on",
  27906. value: function on(e, t) {
  27907. return function (e, t, n) {
  27908. n[e] = n[e] || [], n[e].push(t);
  27909. }(e, t, this._listeners), this;
  27910. }
  27911. }, {
  27912. key: "off",
  27913. value: function off(e, t) {
  27914. return function (e, t, n) {
  27915. if (n && n[e]) {
  27916. var _s7 = n[e].indexOf(t);
  27917. -1 !== _s7 && n[e].splice(_s7, 1);
  27918. }
  27919. }(e, t, this._listeners), this;
  27920. }
  27921. }, {
  27922. key: "fire",
  27923. value: function fire(e, t) {
  27924. if (e instanceof Ue) return console.error(e.error), this;
  27925. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  27926. var s = n.name;
  27927. if (this._listens(s)) {
  27928. n.target = this;
  27929. var _e10 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  27930. var _iterator2 = _createForOfIteratorHelper(_e10),
  27931. _step2;
  27932. try {
  27933. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  27934. var _t6 = _step2.value;
  27935. _t6.call(this, n);
  27936. }
  27937. } catch (err) {
  27938. _iterator2.e(err);
  27939. } finally {
  27940. _iterator2.f();
  27941. }
  27942. }
  27943. return this;
  27944. }
  27945. }, {
  27946. key: "_listens",
  27947. value: function _listens(e) {
  27948. return this._listeners[e] && this._listeners[e].length > 0;
  27949. }
  27950. }]);
  27951. return _class;
  27952. }())();
  27953. function Ne(e, t) {
  27954. Le.on(e, t);
  27955. }
  27956. function De(e) {
  27957. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27958. Le.fire(e, t);
  27959. }
  27960. function Fe(e, t) {
  27961. Le.off(e, t);
  27962. }
  27963. var qe = "loginStateChanged",
  27964. Me = "loginStateExpire",
  27965. Ke = "loginTypeChanged",
  27966. je = "anonymousConverted",
  27967. Be = "refreshAccessToken";
  27968. var $e;
  27969. !function (e) {
  27970. 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";
  27971. }($e || ($e = {}));
  27972. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  27973. ze = {
  27974. "X-SDK-Version": "1.3.5"
  27975. };
  27976. function Je(e, t, n) {
  27977. var s = e[t];
  27978. e[t] = function (t) {
  27979. var r = {},
  27980. i = {};
  27981. n.forEach(function (n) {
  27982. var _n$call = n.call(e, t),
  27983. s = _n$call.data,
  27984. o = _n$call.headers;
  27985. Object.assign(r, s), Object.assign(i, o);
  27986. });
  27987. var o = t.data;
  27988. return o && function () {
  27989. var e;
  27990. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e11 in r) {
  27991. o.append(_e11, r[_e11]);
  27992. }
  27993. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  27994. };
  27995. }
  27996. function He() {
  27997. var e = Math.random().toString(16).slice(2);
  27998. return {
  27999. data: {
  28000. seqId: e
  28001. },
  28002. headers: _objectSpread(_objectSpread({}, ze), {}, {
  28003. "x-seqid": e
  28004. })
  28005. };
  28006. }
  28007. var Ge = /*#__PURE__*/function () {
  28008. function Ge() {
  28009. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  28010. (0, _classCallCheck2.default)(this, Ge);
  28011. var t;
  28012. this.config = e, this._reqClass = new ke.adapter.reqClass({
  28013. timeout: this.config.timeout,
  28014. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  28015. restrictedMethods: ["post"]
  28016. }), 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]);
  28017. }
  28018. (0, _createClass2.default)(Ge, [{
  28019. key: "post",
  28020. value: function () {
  28021. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  28022. return _regenerator.default.wrap(function _callee4$(_context4) {
  28023. while (1) {
  28024. switch (_context4.prev = _context4.next) {
  28025. case 0:
  28026. _context4.next = 2;
  28027. return this._reqClass.post(e);
  28028. case 2:
  28029. return _context4.abrupt("return", _context4.sent);
  28030. case 3:
  28031. case "end":
  28032. return _context4.stop();
  28033. }
  28034. }
  28035. }, _callee4, this);
  28036. }));
  28037. function post(_x2) {
  28038. return _post.apply(this, arguments);
  28039. }
  28040. return post;
  28041. }()
  28042. }, {
  28043. key: "upload",
  28044. value: function () {
  28045. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  28046. return _regenerator.default.wrap(function _callee5$(_context5) {
  28047. while (1) {
  28048. switch (_context5.prev = _context5.next) {
  28049. case 0:
  28050. _context5.next = 2;
  28051. return this._reqClass.upload(e);
  28052. case 2:
  28053. return _context5.abrupt("return", _context5.sent);
  28054. case 3:
  28055. case "end":
  28056. return _context5.stop();
  28057. }
  28058. }
  28059. }, _callee5, this);
  28060. }));
  28061. function upload(_x3) {
  28062. return _upload.apply(this, arguments);
  28063. }
  28064. return upload;
  28065. }()
  28066. }, {
  28067. key: "download",
  28068. value: function () {
  28069. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  28070. return _regenerator.default.wrap(function _callee6$(_context6) {
  28071. while (1) {
  28072. switch (_context6.prev = _context6.next) {
  28073. case 0:
  28074. _context6.next = 2;
  28075. return this._reqClass.download(e);
  28076. case 2:
  28077. return _context6.abrupt("return", _context6.sent);
  28078. case 3:
  28079. case "end":
  28080. return _context6.stop();
  28081. }
  28082. }
  28083. }, _callee6, this);
  28084. }));
  28085. function download(_x4) {
  28086. return _download.apply(this, arguments);
  28087. }
  28088. return download;
  28089. }()
  28090. }, {
  28091. key: "refreshAccessToken",
  28092. value: function () {
  28093. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  28094. var e, t;
  28095. return _regenerator.default.wrap(function _callee7$(_context7) {
  28096. while (1) {
  28097. switch (_context7.prev = _context7.next) {
  28098. case 0:
  28099. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  28100. _context7.prev = 1;
  28101. _context7.next = 4;
  28102. return this._refreshAccessTokenPromise;
  28103. case 4:
  28104. e = _context7.sent;
  28105. _context7.next = 10;
  28106. break;
  28107. case 7:
  28108. _context7.prev = 7;
  28109. _context7.t0 = _context7["catch"](1);
  28110. t = _context7.t0;
  28111. case 10:
  28112. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  28113. _context7.next = 12;
  28114. break;
  28115. }
  28116. throw t;
  28117. case 12:
  28118. return _context7.abrupt("return", e);
  28119. case 13:
  28120. case "end":
  28121. return _context7.stop();
  28122. }
  28123. }
  28124. }, _callee7, this, [[1, 7]]);
  28125. }));
  28126. function refreshAccessToken() {
  28127. return _refreshAccessToken2.apply(this, arguments);
  28128. }
  28129. return refreshAccessToken;
  28130. }()
  28131. }, {
  28132. key: "_refreshAccessToken",
  28133. value: function () {
  28134. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  28135. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e12, _e13, _t7, _s8;
  28136. return _regenerator.default.wrap(function _callee8$(_context8) {
  28137. while (1) {
  28138. switch (_context8.prev = _context8.next) {
  28139. case 0:
  28140. _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;
  28141. this._cache.removeStore(e), this._cache.removeStore(t);
  28142. i = this._cache.getStore(n);
  28143. if (i) {
  28144. _context8.next = 5;
  28145. break;
  28146. }
  28147. throw new ne({
  28148. message: "未登录CloudBase"
  28149. });
  28150. case 5:
  28151. o = {
  28152. refresh_token: i
  28153. };
  28154. _context8.next = 8;
  28155. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  28156. case 8:
  28157. a = _context8.sent;
  28158. if (!a.data.code) {
  28159. _context8.next = 21;
  28160. break;
  28161. }
  28162. _e12 = a.data.code;
  28163. if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {
  28164. _context8.next = 20;
  28165. break;
  28166. }
  28167. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {
  28168. _context8.next = 19;
  28169. break;
  28170. }
  28171. _e13 = this._cache.getStore(r);
  28172. _t7 = this._cache.getStore(n);
  28173. _context8.next = 17;
  28174. return this.send("auth.signInAnonymously", {
  28175. anonymous_uuid: _e13,
  28176. refresh_token: _t7
  28177. });
  28178. case 17:
  28179. _s8 = _context8.sent;
  28180. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  28181. case 19:
  28182. De(Me), this._cache.removeStore(n);
  28183. case 20:
  28184. throw new ne({
  28185. code: a.data.code,
  28186. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  28187. });
  28188. case 21:
  28189. if (!a.data.access_token) {
  28190. _context8.next = 23;
  28191. break;
  28192. }
  28193. 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()), {
  28194. accessToken: a.data.access_token,
  28195. accessTokenExpire: a.data.access_token_expire
  28196. }));
  28197. case 23:
  28198. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  28199. case 24:
  28200. case "end":
  28201. return _context8.stop();
  28202. }
  28203. }
  28204. }, _callee8, this);
  28205. }));
  28206. function _refreshAccessToken() {
  28207. return _refreshAccessToken3.apply(this, arguments);
  28208. }
  28209. return _refreshAccessToken;
  28210. }()
  28211. }, {
  28212. key: "getAccessToken",
  28213. value: function () {
  28214. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  28215. var _this$_cache$keys2, e, t, n, s, r, i;
  28216. return _regenerator.default.wrap(function _callee9$(_context9) {
  28217. while (1) {
  28218. switch (_context9.prev = _context9.next) {
  28219. case 0:
  28220. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  28221. if (this._cache.getStore(n)) {
  28222. _context9.next = 3;
  28223. break;
  28224. }
  28225. throw new ne({
  28226. message: "refresh token不存在,登录状态异常"
  28227. });
  28228. case 3:
  28229. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  28230. _context9.t0 = this._shouldRefreshAccessTokenHook;
  28231. if (!_context9.t0) {
  28232. _context9.next = 9;
  28233. break;
  28234. }
  28235. _context9.next = 8;
  28236. return this._shouldRefreshAccessTokenHook(s, r);
  28237. case 8:
  28238. _context9.t0 = !_context9.sent;
  28239. case 9:
  28240. _context9.t1 = _context9.t0;
  28241. if (!_context9.t1) {
  28242. _context9.next = 12;
  28243. break;
  28244. }
  28245. i = !1;
  28246. case 12:
  28247. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  28248. accessToken: s,
  28249. accessTokenExpire: r
  28250. });
  28251. case 13:
  28252. case "end":
  28253. return _context9.stop();
  28254. }
  28255. }
  28256. }, _callee9, this);
  28257. }));
  28258. function getAccessToken() {
  28259. return _getAccessToken.apply(this, arguments);
  28260. }
  28261. return getAccessToken;
  28262. }()
  28263. }, {
  28264. key: "request",
  28265. value: function () {
  28266. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  28267. var s, r, i, _e14, o, _e15, _e16, a, c, u, h, l, d, p, f, g;
  28268. return _regenerator.default.wrap(function _callee10$(_context10) {
  28269. while (1) {
  28270. switch (_context10.prev = _context10.next) {
  28271. case 0:
  28272. s = "x-tcb-trace_".concat(this.config.env);
  28273. r = "application/x-www-form-urlencoded";
  28274. i = _objectSpread({
  28275. action: e,
  28276. env: this.config.env,
  28277. dataVersion: "2019-08-16"
  28278. }, t);
  28279. if (!(-1 === We.indexOf(e))) {
  28280. _context10.next = 10;
  28281. break;
  28282. }
  28283. _e14 = this._cache.keys.refreshTokenKey;
  28284. _context10.t0 = this._cache.getStore(_e14);
  28285. if (!_context10.t0) {
  28286. _context10.next = 10;
  28287. break;
  28288. }
  28289. _context10.next = 9;
  28290. return this.getAccessToken();
  28291. case 9:
  28292. i.access_token = _context10.sent.accessToken;
  28293. case 10:
  28294. if ("storage.uploadFile" === e) {
  28295. o = new FormData();
  28296. for (_e15 in o) {
  28297. o.hasOwnProperty(_e15) && void 0 !== o[_e15] && o.append(_e15, i[_e15]);
  28298. }
  28299. r = "multipart/form-data";
  28300. } else {
  28301. r = "application/json", o = {};
  28302. for (_e16 in i) {
  28303. void 0 !== i[_e16] && (o[_e16] = i[_e16]);
  28304. }
  28305. }
  28306. a = {
  28307. headers: {
  28308. "content-type": r
  28309. }
  28310. };
  28311. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  28312. c = this._localCache.getStore(s);
  28313. c && (a.headers["X-TCB-Trace"] = c);
  28314. u = t.parse, h = t.inQuery, l = t.search;
  28315. d = {
  28316. env: this.config.env
  28317. };
  28318. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  28319. p = function (e, t) {
  28320. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  28321. var s = /\?/.test(t);
  28322. var r = "";
  28323. for (var _e17 in n) {
  28324. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));
  28325. }
  28326. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  28327. }(me, "//tcb-api.tencentcloudapi.com/web", d);
  28328. l && (p += l);
  28329. _context10.next = 22;
  28330. return this.post(_objectSpread({
  28331. url: p,
  28332. data: o
  28333. }, a));
  28334. case 22:
  28335. f = _context10.sent;
  28336. g = f.header && f.header["x-tcb-trace"];
  28337. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  28338. _context10.next = 26;
  28339. break;
  28340. }
  28341. throw new ne({
  28342. code: "NETWORK_ERROR",
  28343. message: "network request error"
  28344. });
  28345. case 26:
  28346. return _context10.abrupt("return", f);
  28347. case 27:
  28348. case "end":
  28349. return _context10.stop();
  28350. }
  28351. }
  28352. }, _callee10, this);
  28353. }));
  28354. function request(_x5, _x6, _x7) {
  28355. return _request.apply(this, arguments);
  28356. }
  28357. return request;
  28358. }()
  28359. }, {
  28360. key: "send",
  28361. value: function () {
  28362. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  28363. var t,
  28364. n,
  28365. _n6,
  28366. _args11 = arguments;
  28367. return _regenerator.default.wrap(function _callee11$(_context11) {
  28368. while (1) {
  28369. switch (_context11.prev = _context11.next) {
  28370. case 0:
  28371. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  28372. _context11.next = 3;
  28373. return this.request(e, t, {
  28374. onUploadProgress: t.onUploadProgress
  28375. });
  28376. case 3:
  28377. n = _context11.sent;
  28378. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  28379. _context11.next = 13;
  28380. break;
  28381. }
  28382. _context11.next = 7;
  28383. return this.refreshAccessToken();
  28384. case 7:
  28385. _context11.next = 9;
  28386. return this.request(e, t, {
  28387. onUploadProgress: t.onUploadProgress
  28388. });
  28389. case 9:
  28390. _n6 = _context11.sent;
  28391. if (!_n6.data.code) {
  28392. _context11.next = 12;
  28393. break;
  28394. }
  28395. throw new ne({
  28396. code: _n6.data.code,
  28397. message: _n6.data.message
  28398. });
  28399. case 12:
  28400. return _context11.abrupt("return", _n6.data);
  28401. case 13:
  28402. if (!n.data.code) {
  28403. _context11.next = 15;
  28404. break;
  28405. }
  28406. throw new ne({
  28407. code: n.data.code,
  28408. message: n.data.message
  28409. });
  28410. case 15:
  28411. return _context11.abrupt("return", n.data);
  28412. case 16:
  28413. case "end":
  28414. return _context11.stop();
  28415. }
  28416. }
  28417. }, _callee11, this);
  28418. }));
  28419. function send(_x8) {
  28420. return _send.apply(this, arguments);
  28421. }
  28422. return send;
  28423. }()
  28424. }, {
  28425. key: "setRefreshToken",
  28426. value: function setRefreshToken(e) {
  28427. var _this$_cache$keys3 = this._cache.keys,
  28428. t = _this$_cache$keys3.accessTokenKey,
  28429. n = _this$_cache$keys3.accessTokenExpireKey,
  28430. s = _this$_cache$keys3.refreshTokenKey;
  28431. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28432. }
  28433. }]);
  28434. return Ge;
  28435. }();
  28436. var Ve = {};
  28437. function Ye(e) {
  28438. return Ve[e];
  28439. }
  28440. var Qe = /*#__PURE__*/function () {
  28441. function Qe(e) {
  28442. (0, _classCallCheck2.default)(this, Qe);
  28443. this.config = e, this._cache = xe(e.env), this._request = Ye(e.env);
  28444. }
  28445. (0, _createClass2.default)(Qe, [{
  28446. key: "setRefreshToken",
  28447. value: function setRefreshToken(e) {
  28448. var _this$_cache$keys4 = this._cache.keys,
  28449. t = _this$_cache$keys4.accessTokenKey,
  28450. n = _this$_cache$keys4.accessTokenExpireKey,
  28451. s = _this$_cache$keys4.refreshTokenKey;
  28452. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  28453. }
  28454. }, {
  28455. key: "setAccessToken",
  28456. value: function setAccessToken(e, t) {
  28457. var _this$_cache$keys5 = this._cache.keys,
  28458. n = _this$_cache$keys5.accessTokenKey,
  28459. s = _this$_cache$keys5.accessTokenExpireKey;
  28460. this._cache.setStore(n, e), this._cache.setStore(s, t);
  28461. }
  28462. }, {
  28463. key: "refreshUserInfo",
  28464. value: function () {
  28465. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  28466. var _yield$this$_request$, e;
  28467. return _regenerator.default.wrap(function _callee12$(_context12) {
  28468. while (1) {
  28469. switch (_context12.prev = _context12.next) {
  28470. case 0:
  28471. _context12.next = 2;
  28472. return this._request.send("auth.getUserInfo", {});
  28473. case 2:
  28474. _yield$this$_request$ = _context12.sent;
  28475. e = _yield$this$_request$.data;
  28476. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  28477. case 5:
  28478. case "end":
  28479. return _context12.stop();
  28480. }
  28481. }
  28482. }, _callee12, this);
  28483. }));
  28484. function refreshUserInfo() {
  28485. return _refreshUserInfo.apply(this, arguments);
  28486. }
  28487. return refreshUserInfo;
  28488. }()
  28489. }, {
  28490. key: "setLocalUserInfo",
  28491. value: function setLocalUserInfo(e) {
  28492. var t = this._cache.keys.userInfoKey;
  28493. this._cache.setStore(t, e);
  28494. }
  28495. }]);
  28496. return Qe;
  28497. }();
  28498. var Xe = /*#__PURE__*/function () {
  28499. function Xe(e) {
  28500. (0, _classCallCheck2.default)(this, Xe);
  28501. if (!e) throw new ne({
  28502. code: "PARAM_ERROR",
  28503. message: "envId is not defined"
  28504. });
  28505. this._envId = e, this._cache = xe(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  28506. }
  28507. (0, _createClass2.default)(Xe, [{
  28508. key: "linkWithTicket",
  28509. value: function linkWithTicket(e) {
  28510. if ("string" != typeof e) throw new ne({
  28511. code: "PARAM_ERROR",
  28512. message: "ticket must be string"
  28513. });
  28514. return this._request.send("auth.linkWithTicket", {
  28515. ticket: e
  28516. });
  28517. }
  28518. }, {
  28519. key: "linkWithRedirect",
  28520. value: function linkWithRedirect(e) {
  28521. e.signInWithRedirect();
  28522. }
  28523. }, {
  28524. key: "updatePassword",
  28525. value: function updatePassword(e, t) {
  28526. return this._request.send("auth.updatePassword", {
  28527. oldPassword: t,
  28528. newPassword: e
  28529. });
  28530. }
  28531. }, {
  28532. key: "updateEmail",
  28533. value: function updateEmail(e) {
  28534. return this._request.send("auth.updateEmail", {
  28535. newEmail: e
  28536. });
  28537. }
  28538. }, {
  28539. key: "updateUsername",
  28540. value: function updateUsername(e) {
  28541. if ("string" != typeof e) throw new ne({
  28542. code: "PARAM_ERROR",
  28543. message: "username must be a string"
  28544. });
  28545. return this._request.send("auth.updateUsername", {
  28546. username: e
  28547. });
  28548. }
  28549. }, {
  28550. key: "getLinkedUidList",
  28551. value: function () {
  28552. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  28553. var _yield$this$_request$2, e, t, n;
  28554. return _regenerator.default.wrap(function _callee13$(_context13) {
  28555. while (1) {
  28556. switch (_context13.prev = _context13.next) {
  28557. case 0:
  28558. _context13.next = 2;
  28559. return this._request.send("auth.getLinkedUidList", {});
  28560. case 2:
  28561. _yield$this$_request$2 = _context13.sent;
  28562. e = _yield$this$_request$2.data;
  28563. t = !1;
  28564. n = e.users;
  28565. return _context13.abrupt("return", (n.forEach(function (e) {
  28566. e.wxOpenId && e.wxPublicId && (t = !0);
  28567. }), {
  28568. users: n,
  28569. hasPrimaryUid: t
  28570. }));
  28571. case 7:
  28572. case "end":
  28573. return _context13.stop();
  28574. }
  28575. }
  28576. }, _callee13, this);
  28577. }));
  28578. function getLinkedUidList() {
  28579. return _getLinkedUidList.apply(this, arguments);
  28580. }
  28581. return getLinkedUidList;
  28582. }()
  28583. }, {
  28584. key: "setPrimaryUid",
  28585. value: function setPrimaryUid(e) {
  28586. return this._request.send("auth.setPrimaryUid", {
  28587. uid: e
  28588. });
  28589. }
  28590. }, {
  28591. key: "unlink",
  28592. value: function unlink(e) {
  28593. return this._request.send("auth.unlink", {
  28594. platform: e
  28595. });
  28596. }
  28597. }, {
  28598. key: "update",
  28599. value: function () {
  28600. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  28601. var t, n, s, r, i, o, _yield$this$_request$3, a;
  28602. return _regenerator.default.wrap(function _callee14$(_context14) {
  28603. while (1) {
  28604. switch (_context14.prev = _context14.next) {
  28605. case 0:
  28606. t = e.nickName;
  28607. n = e.gender;
  28608. s = e.avatarUrl;
  28609. r = e.province;
  28610. i = e.country;
  28611. o = e.city;
  28612. _context14.next = 8;
  28613. return this._request.send("auth.updateUserInfo", {
  28614. nickName: t,
  28615. gender: n,
  28616. avatarUrl: s,
  28617. province: r,
  28618. country: i,
  28619. city: o
  28620. });
  28621. case 8:
  28622. _yield$this$_request$3 = _context14.sent;
  28623. a = _yield$this$_request$3.data;
  28624. this.setLocalUserInfo(a);
  28625. case 11:
  28626. case "end":
  28627. return _context14.stop();
  28628. }
  28629. }
  28630. }, _callee14, this);
  28631. }));
  28632. function update(_x9) {
  28633. return _update.apply(this, arguments);
  28634. }
  28635. return update;
  28636. }()
  28637. }, {
  28638. key: "refresh",
  28639. value: function () {
  28640. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  28641. var _yield$this$_request$4, e;
  28642. return _regenerator.default.wrap(function _callee15$(_context15) {
  28643. while (1) {
  28644. switch (_context15.prev = _context15.next) {
  28645. case 0:
  28646. _context15.next = 2;
  28647. return this._request.send("auth.getUserInfo", {});
  28648. case 2:
  28649. _yield$this$_request$4 = _context15.sent;
  28650. e = _yield$this$_request$4.data;
  28651. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  28652. case 5:
  28653. case "end":
  28654. return _context15.stop();
  28655. }
  28656. }
  28657. }, _callee15, this);
  28658. }));
  28659. function refresh() {
  28660. return _refresh.apply(this, arguments);
  28661. }
  28662. return refresh;
  28663. }()
  28664. }, {
  28665. key: "setUserInfo",
  28666. value: function setUserInfo() {
  28667. var _this8 = this;
  28668. var e = this._cache.keys.userInfoKey,
  28669. t = this._cache.getStore(e);
  28670. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  28671. _this8[e] = t[e];
  28672. }), this.location = {
  28673. country: t.country,
  28674. province: t.province,
  28675. city: t.city
  28676. };
  28677. }
  28678. }, {
  28679. key: "setLocalUserInfo",
  28680. value: function setLocalUserInfo(e) {
  28681. var t = this._cache.keys.userInfoKey;
  28682. this._cache.setStore(t, e), this.setUserInfo();
  28683. }
  28684. }]);
  28685. return Xe;
  28686. }();
  28687. var Ze = /*#__PURE__*/function () {
  28688. function Ze(e) {
  28689. (0, _classCallCheck2.default)(this, Ze);
  28690. if (!e) throw new ne({
  28691. code: "PARAM_ERROR",
  28692. message: "envId is not defined"
  28693. });
  28694. this._cache = xe(e);
  28695. var _this$_cache$keys6 = this._cache.keys,
  28696. t = _this$_cache$keys6.refreshTokenKey,
  28697. n = _this$_cache$keys6.accessTokenKey,
  28698. s = _this$_cache$keys6.accessTokenExpireKey,
  28699. r = this._cache.getStore(t),
  28700. i = this._cache.getStore(n),
  28701. o = this._cache.getStore(s);
  28702. this.credential = {
  28703. refreshToken: r,
  28704. accessToken: i,
  28705. accessTokenExpire: o
  28706. }, this.user = new Xe(e);
  28707. }
  28708. (0, _createClass2.default)(Ze, [{
  28709. key: "isAnonymousAuth",
  28710. get: function get() {
  28711. return this.loginType === $e.ANONYMOUS;
  28712. }
  28713. }, {
  28714. key: "isCustomAuth",
  28715. get: function get() {
  28716. return this.loginType === $e.CUSTOM;
  28717. }
  28718. }, {
  28719. key: "isWeixinAuth",
  28720. get: function get() {
  28721. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  28722. }
  28723. }, {
  28724. key: "loginType",
  28725. get: function get() {
  28726. return this._cache.getStore(this._cache.keys.loginTypeKey);
  28727. }
  28728. }]);
  28729. return Ze;
  28730. }();
  28731. var et = /*#__PURE__*/function (_Qe) {
  28732. (0, _inherits2.default)(et, _Qe);
  28733. var _super4 = _createSuper(et);
  28734. function et() {
  28735. (0, _classCallCheck2.default)(this, et);
  28736. return _super4.apply(this, arguments);
  28737. }
  28738. (0, _createClass2.default)(et, [{
  28739. key: "signIn",
  28740. value: function () {
  28741. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  28742. var _this$_cache$keys7, e, t, n, s, r, _e18;
  28743. return _regenerator.default.wrap(function _callee16$(_context16) {
  28744. while (1) {
  28745. switch (_context16.prev = _context16.next) {
  28746. case 0:
  28747. this._cache.updatePersistence("local");
  28748. _this$_cache$keys7 = this._cache.keys;
  28749. e = _this$_cache$keys7.anonymousUuidKey;
  28750. t = _this$_cache$keys7.refreshTokenKey;
  28751. n = this._cache.getStore(e) || void 0;
  28752. s = this._cache.getStore(t) || void 0;
  28753. _context16.next = 8;
  28754. return this._request.send("auth.signInAnonymously", {
  28755. anonymous_uuid: n,
  28756. refresh_token: s
  28757. });
  28758. case 8:
  28759. r = _context16.sent;
  28760. if (!(r.uuid && r.refresh_token)) {
  28761. _context16.next = 20;
  28762. break;
  28763. }
  28764. this._setAnonymousUUID(r.uuid);
  28765. this.setRefreshToken(r.refresh_token);
  28766. _context16.next = 14;
  28767. return this._request.refreshAccessToken();
  28768. case 14:
  28769. De(qe);
  28770. De(Ke, {
  28771. env: this.config.env,
  28772. loginType: $e.ANONYMOUS,
  28773. persistence: "local"
  28774. });
  28775. _e18 = new Ze(this.config.env);
  28776. _context16.next = 19;
  28777. return _e18.user.refresh();
  28778. case 19:
  28779. return _context16.abrupt("return", _e18);
  28780. case 20:
  28781. throw new ne({
  28782. message: "匿名登录失败"
  28783. });
  28784. case 21:
  28785. case "end":
  28786. return _context16.stop();
  28787. }
  28788. }
  28789. }, _callee16, this);
  28790. }));
  28791. function signIn() {
  28792. return _signIn.apply(this, arguments);
  28793. }
  28794. return signIn;
  28795. }()
  28796. }, {
  28797. key: "linkAndRetrieveDataWithTicket",
  28798. value: function () {
  28799. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  28800. var _this$_cache$keys8, t, n, s, r, i;
  28801. return _regenerator.default.wrap(function _callee17$(_context17) {
  28802. while (1) {
  28803. switch (_context17.prev = _context17.next) {
  28804. case 0:
  28805. _this$_cache$keys8 = this._cache.keys;
  28806. t = _this$_cache$keys8.anonymousUuidKey;
  28807. n = _this$_cache$keys8.refreshTokenKey;
  28808. s = this._cache.getStore(t);
  28809. r = this._cache.getStore(n);
  28810. _context17.next = 7;
  28811. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  28812. anonymous_uuid: s,
  28813. refresh_token: r,
  28814. ticket: e
  28815. });
  28816. case 7:
  28817. i = _context17.sent;
  28818. if (!i.refresh_token) {
  28819. _context17.next = 16;
  28820. break;
  28821. }
  28822. this._clearAnonymousUUID();
  28823. this.setRefreshToken(i.refresh_token);
  28824. _context17.next = 13;
  28825. return this._request.refreshAccessToken();
  28826. case 13:
  28827. De(je, {
  28828. env: this.config.env
  28829. });
  28830. De(Ke, {
  28831. loginType: $e.CUSTOM,
  28832. persistence: "local"
  28833. });
  28834. return _context17.abrupt("return", {
  28835. credential: {
  28836. refreshToken: i.refresh_token
  28837. }
  28838. });
  28839. case 16:
  28840. throw new ne({
  28841. message: "匿名转化失败"
  28842. });
  28843. case 17:
  28844. case "end":
  28845. return _context17.stop();
  28846. }
  28847. }
  28848. }, _callee17, this);
  28849. }));
  28850. function linkAndRetrieveDataWithTicket(_x10) {
  28851. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  28852. }
  28853. return linkAndRetrieveDataWithTicket;
  28854. }()
  28855. }, {
  28856. key: "_setAnonymousUUID",
  28857. value: function _setAnonymousUUID(e) {
  28858. var _this$_cache$keys9 = this._cache.keys,
  28859. t = _this$_cache$keys9.anonymousUuidKey,
  28860. n = _this$_cache$keys9.loginTypeKey;
  28861. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  28862. }
  28863. }, {
  28864. key: "_clearAnonymousUUID",
  28865. value: function _clearAnonymousUUID() {
  28866. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  28867. }
  28868. }]);
  28869. return et;
  28870. }(Qe);
  28871. var tt = /*#__PURE__*/function (_Qe2) {
  28872. (0, _inherits2.default)(tt, _Qe2);
  28873. var _super5 = _createSuper(tt);
  28874. function tt() {
  28875. (0, _classCallCheck2.default)(this, tt);
  28876. return _super5.apply(this, arguments);
  28877. }
  28878. (0, _createClass2.default)(tt, [{
  28879. key: "signIn",
  28880. value: function () {
  28881. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  28882. var t, n;
  28883. return _regenerator.default.wrap(function _callee18$(_context18) {
  28884. while (1) {
  28885. switch (_context18.prev = _context18.next) {
  28886. case 0:
  28887. if (!("string" != typeof e)) {
  28888. _context18.next = 2;
  28889. break;
  28890. }
  28891. throw new ne({
  28892. code: "PARAM_ERROR",
  28893. message: "ticket must be a string"
  28894. });
  28895. case 2:
  28896. t = this._cache.keys.refreshTokenKey;
  28897. _context18.next = 5;
  28898. return this._request.send("auth.signInWithTicket", {
  28899. ticket: e,
  28900. refresh_token: this._cache.getStore(t) || ""
  28901. });
  28902. case 5:
  28903. n = _context18.sent;
  28904. if (!n.refresh_token) {
  28905. _context18.next = 15;
  28906. break;
  28907. }
  28908. this.setRefreshToken(n.refresh_token);
  28909. _context18.next = 10;
  28910. return this._request.refreshAccessToken();
  28911. case 10:
  28912. De(qe);
  28913. De(Ke, {
  28914. env: this.config.env,
  28915. loginType: $e.CUSTOM,
  28916. persistence: this.config.persistence
  28917. });
  28918. _context18.next = 14;
  28919. return this.refreshUserInfo();
  28920. case 14:
  28921. return _context18.abrupt("return", new Ze(this.config.env));
  28922. case 15:
  28923. throw new ne({
  28924. message: "自定义登录失败"
  28925. });
  28926. case 16:
  28927. case "end":
  28928. return _context18.stop();
  28929. }
  28930. }
  28931. }, _callee18, this);
  28932. }));
  28933. function signIn(_x11) {
  28934. return _signIn2.apply(this, arguments);
  28935. }
  28936. return signIn;
  28937. }()
  28938. }]);
  28939. return tt;
  28940. }(Qe);
  28941. var nt = /*#__PURE__*/function (_Qe3) {
  28942. (0, _inherits2.default)(nt, _Qe3);
  28943. var _super6 = _createSuper(nt);
  28944. function nt() {
  28945. (0, _classCallCheck2.default)(this, nt);
  28946. return _super6.apply(this, arguments);
  28947. }
  28948. (0, _createClass2.default)(nt, [{
  28949. key: "signIn",
  28950. value: function () {
  28951. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  28952. var n, s, r, i, o;
  28953. return _regenerator.default.wrap(function _callee19$(_context19) {
  28954. while (1) {
  28955. switch (_context19.prev = _context19.next) {
  28956. case 0:
  28957. if (!("string" != typeof e)) {
  28958. _context19.next = 2;
  28959. break;
  28960. }
  28961. throw new ne({
  28962. code: "PARAM_ERROR",
  28963. message: "email must be a string"
  28964. });
  28965. case 2:
  28966. n = this._cache.keys.refreshTokenKey;
  28967. _context19.next = 5;
  28968. return this._request.send("auth.signIn", {
  28969. loginType: "EMAIL",
  28970. email: e,
  28971. password: t,
  28972. refresh_token: this._cache.getStore(n) || ""
  28973. });
  28974. case 5:
  28975. s = _context19.sent;
  28976. r = s.refresh_token;
  28977. i = s.access_token;
  28978. o = s.access_token_expire;
  28979. if (!r) {
  28980. _context19.next = 22;
  28981. break;
  28982. }
  28983. this.setRefreshToken(r);
  28984. if (!(i && o)) {
  28985. _context19.next = 15;
  28986. break;
  28987. }
  28988. this.setAccessToken(i, o);
  28989. _context19.next = 17;
  28990. break;
  28991. case 15:
  28992. _context19.next = 17;
  28993. return this._request.refreshAccessToken();
  28994. case 17:
  28995. _context19.next = 19;
  28996. return this.refreshUserInfo();
  28997. case 19:
  28998. De(qe);
  28999. De(Ke, {
  29000. env: this.config.env,
  29001. loginType: $e.EMAIL,
  29002. persistence: this.config.persistence
  29003. });
  29004. return _context19.abrupt("return", new Ze(this.config.env));
  29005. case 22:
  29006. throw s.code ? new ne({
  29007. code: s.code,
  29008. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29009. }) : new ne({
  29010. message: "邮箱登录失败"
  29011. });
  29012. case 23:
  29013. case "end":
  29014. return _context19.stop();
  29015. }
  29016. }
  29017. }, _callee19, this);
  29018. }));
  29019. function signIn(_x12, _x13) {
  29020. return _signIn3.apply(this, arguments);
  29021. }
  29022. return signIn;
  29023. }()
  29024. }, {
  29025. key: "activate",
  29026. value: function () {
  29027. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  29028. return _regenerator.default.wrap(function _callee20$(_context20) {
  29029. while (1) {
  29030. switch (_context20.prev = _context20.next) {
  29031. case 0:
  29032. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  29033. token: e
  29034. }));
  29035. case 1:
  29036. case "end":
  29037. return _context20.stop();
  29038. }
  29039. }
  29040. }, _callee20, this);
  29041. }));
  29042. function activate(_x14) {
  29043. return _activate.apply(this, arguments);
  29044. }
  29045. return activate;
  29046. }()
  29047. }, {
  29048. key: "resetPasswordWithToken",
  29049. value: function () {
  29050. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  29051. return _regenerator.default.wrap(function _callee21$(_context21) {
  29052. while (1) {
  29053. switch (_context21.prev = _context21.next) {
  29054. case 0:
  29055. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  29056. token: e,
  29057. newPassword: t
  29058. }));
  29059. case 1:
  29060. case "end":
  29061. return _context21.stop();
  29062. }
  29063. }
  29064. }, _callee21, this);
  29065. }));
  29066. function resetPasswordWithToken(_x15, _x16) {
  29067. return _resetPasswordWithToken.apply(this, arguments);
  29068. }
  29069. return resetPasswordWithToken;
  29070. }()
  29071. }]);
  29072. return nt;
  29073. }(Qe);
  29074. var st = /*#__PURE__*/function (_Qe4) {
  29075. (0, _inherits2.default)(st, _Qe4);
  29076. var _super7 = _createSuper(st);
  29077. function st() {
  29078. (0, _classCallCheck2.default)(this, st);
  29079. return _super7.apply(this, arguments);
  29080. }
  29081. (0, _createClass2.default)(st, [{
  29082. key: "signIn",
  29083. value: function () {
  29084. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  29085. var n, s, r, i, o;
  29086. return _regenerator.default.wrap(function _callee22$(_context22) {
  29087. while (1) {
  29088. switch (_context22.prev = _context22.next) {
  29089. case 0:
  29090. if (!("string" != typeof e)) {
  29091. _context22.next = 2;
  29092. break;
  29093. }
  29094. throw new ne({
  29095. code: "PARAM_ERROR",
  29096. message: "username must be a string"
  29097. });
  29098. case 2:
  29099. "string" != typeof t && (t = "", console.warn("password is empty"));
  29100. n = this._cache.keys.refreshTokenKey;
  29101. _context22.next = 6;
  29102. return this._request.send("auth.signIn", {
  29103. loginType: $e.USERNAME,
  29104. username: e,
  29105. password: t,
  29106. refresh_token: this._cache.getStore(n) || ""
  29107. });
  29108. case 6:
  29109. s = _context22.sent;
  29110. r = s.refresh_token;
  29111. i = s.access_token_expire;
  29112. o = s.access_token;
  29113. if (!r) {
  29114. _context22.next = 23;
  29115. break;
  29116. }
  29117. this.setRefreshToken(r);
  29118. if (!(o && i)) {
  29119. _context22.next = 16;
  29120. break;
  29121. }
  29122. this.setAccessToken(o, i);
  29123. _context22.next = 18;
  29124. break;
  29125. case 16:
  29126. _context22.next = 18;
  29127. return this._request.refreshAccessToken();
  29128. case 18:
  29129. _context22.next = 20;
  29130. return this.refreshUserInfo();
  29131. case 20:
  29132. De(qe);
  29133. De(Ke, {
  29134. env: this.config.env,
  29135. loginType: $e.USERNAME,
  29136. persistence: this.config.persistence
  29137. });
  29138. return _context22.abrupt("return", new Ze(this.config.env));
  29139. case 23:
  29140. throw s.code ? new ne({
  29141. code: s.code,
  29142. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  29143. }) : new ne({
  29144. message: "用户名密码登录失败"
  29145. });
  29146. case 24:
  29147. case "end":
  29148. return _context22.stop();
  29149. }
  29150. }
  29151. }, _callee22, this);
  29152. }));
  29153. function signIn(_x17, _x18) {
  29154. return _signIn4.apply(this, arguments);
  29155. }
  29156. return signIn;
  29157. }()
  29158. }]);
  29159. return st;
  29160. }(Qe);
  29161. var rt = /*#__PURE__*/function () {
  29162. function rt(e) {
  29163. (0, _classCallCheck2.default)(this, rt);
  29164. 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);
  29165. }
  29166. (0, _createClass2.default)(rt, [{
  29167. key: "currentUser",
  29168. get: function get() {
  29169. var e = this.hasLoginState();
  29170. return e && e.user || null;
  29171. }
  29172. }, {
  29173. key: "loginType",
  29174. get: function get() {
  29175. return this._cache.getStore(this._cache.keys.loginTypeKey);
  29176. }
  29177. }, {
  29178. key: "anonymousAuthProvider",
  29179. value: function anonymousAuthProvider() {
  29180. return new et(this.config);
  29181. }
  29182. }, {
  29183. key: "customAuthProvider",
  29184. value: function customAuthProvider() {
  29185. return new tt(this.config);
  29186. }
  29187. }, {
  29188. key: "emailAuthProvider",
  29189. value: function emailAuthProvider() {
  29190. return new nt(this.config);
  29191. }
  29192. }, {
  29193. key: "usernameAuthProvider",
  29194. value: function usernameAuthProvider() {
  29195. return new st(this.config);
  29196. }
  29197. }, {
  29198. key: "signInAnonymously",
  29199. value: function () {
  29200. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  29201. return _regenerator.default.wrap(function _callee23$(_context23) {
  29202. while (1) {
  29203. switch (_context23.prev = _context23.next) {
  29204. case 0:
  29205. return _context23.abrupt("return", new et(this.config).signIn());
  29206. case 1:
  29207. case "end":
  29208. return _context23.stop();
  29209. }
  29210. }
  29211. }, _callee23, this);
  29212. }));
  29213. function signInAnonymously() {
  29214. return _signInAnonymously.apply(this, arguments);
  29215. }
  29216. return signInAnonymously;
  29217. }()
  29218. }, {
  29219. key: "signInWithEmailAndPassword",
  29220. value: function () {
  29221. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  29222. return _regenerator.default.wrap(function _callee24$(_context24) {
  29223. while (1) {
  29224. switch (_context24.prev = _context24.next) {
  29225. case 0:
  29226. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  29227. case 1:
  29228. case "end":
  29229. return _context24.stop();
  29230. }
  29231. }
  29232. }, _callee24, this);
  29233. }));
  29234. function signInWithEmailAndPassword(_x19, _x20) {
  29235. return _signInWithEmailAndPassword.apply(this, arguments);
  29236. }
  29237. return signInWithEmailAndPassword;
  29238. }()
  29239. }, {
  29240. key: "signInWithUsernameAndPassword",
  29241. value: function signInWithUsernameAndPassword(e, t) {
  29242. return new st(this.config).signIn(e, t);
  29243. }
  29244. }, {
  29245. key: "linkAndRetrieveDataWithTicket",
  29246. value: function () {
  29247. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  29248. return _regenerator.default.wrap(function _callee25$(_context25) {
  29249. while (1) {
  29250. switch (_context25.prev = _context25.next) {
  29251. case 0:
  29252. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  29253. _context25.next = 3;
  29254. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  29255. case 3:
  29256. return _context25.abrupt("return", _context25.sent);
  29257. case 4:
  29258. case "end":
  29259. return _context25.stop();
  29260. }
  29261. }
  29262. }, _callee25, this);
  29263. }));
  29264. function linkAndRetrieveDataWithTicket(_x21) {
  29265. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  29266. }
  29267. return linkAndRetrieveDataWithTicket;
  29268. }()
  29269. }, {
  29270. key: "signOut",
  29271. value: function () {
  29272. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  29273. var _this$_cache$keys10, e, t, n, s, r;
  29274. return _regenerator.default.wrap(function _callee26$(_context26) {
  29275. while (1) {
  29276. switch (_context26.prev = _context26.next) {
  29277. case 0:
  29278. if (!(this.loginType === $e.ANONYMOUS)) {
  29279. _context26.next = 2;
  29280. break;
  29281. }
  29282. throw new ne({
  29283. message: "匿名用户不支持登出操作"
  29284. });
  29285. case 2:
  29286. _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);
  29287. if (s) {
  29288. _context26.next = 5;
  29289. break;
  29290. }
  29291. return _context26.abrupt("return");
  29292. case 5:
  29293. _context26.next = 7;
  29294. return this._request.send("auth.logout", {
  29295. refresh_token: s
  29296. });
  29297. case 7:
  29298. r = _context26.sent;
  29299. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  29300. env: this.config.env,
  29301. loginType: $e.NULL,
  29302. persistence: this.config.persistence
  29303. }), r));
  29304. case 9:
  29305. case "end":
  29306. return _context26.stop();
  29307. }
  29308. }
  29309. }, _callee26, this);
  29310. }));
  29311. function signOut() {
  29312. return _signOut.apply(this, arguments);
  29313. }
  29314. return signOut;
  29315. }()
  29316. }, {
  29317. key: "signUpWithEmailAndPassword",
  29318. value: function () {
  29319. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  29320. return _regenerator.default.wrap(function _callee27$(_context27) {
  29321. while (1) {
  29322. switch (_context27.prev = _context27.next) {
  29323. case 0:
  29324. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  29325. email: e,
  29326. password: t
  29327. }));
  29328. case 1:
  29329. case "end":
  29330. return _context27.stop();
  29331. }
  29332. }
  29333. }, _callee27, this);
  29334. }));
  29335. function signUpWithEmailAndPassword(_x22, _x23) {
  29336. return _signUpWithEmailAndPassword.apply(this, arguments);
  29337. }
  29338. return signUpWithEmailAndPassword;
  29339. }()
  29340. }, {
  29341. key: "sendPasswordResetEmail",
  29342. value: function () {
  29343. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  29344. return _regenerator.default.wrap(function _callee28$(_context28) {
  29345. while (1) {
  29346. switch (_context28.prev = _context28.next) {
  29347. case 0:
  29348. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  29349. email: e
  29350. }));
  29351. case 1:
  29352. case "end":
  29353. return _context28.stop();
  29354. }
  29355. }
  29356. }, _callee28, this);
  29357. }));
  29358. function sendPasswordResetEmail(_x24) {
  29359. return _sendPasswordResetEmail.apply(this, arguments);
  29360. }
  29361. return sendPasswordResetEmail;
  29362. }()
  29363. }, {
  29364. key: "onLoginStateChanged",
  29365. value: function onLoginStateChanged(e) {
  29366. var _this9 = this;
  29367. Ne(qe, function () {
  29368. var t = _this9.hasLoginState();
  29369. e.call(_this9, t);
  29370. });
  29371. var t = this.hasLoginState();
  29372. e.call(this, t);
  29373. }
  29374. }, {
  29375. key: "onLoginStateExpired",
  29376. value: function onLoginStateExpired(e) {
  29377. Ne(Me, e.bind(this));
  29378. }
  29379. }, {
  29380. key: "onAccessTokenRefreshed",
  29381. value: function onAccessTokenRefreshed(e) {
  29382. Ne(Be, e.bind(this));
  29383. }
  29384. }, {
  29385. key: "onAnonymousConverted",
  29386. value: function onAnonymousConverted(e) {
  29387. Ne(je, e.bind(this));
  29388. }
  29389. }, {
  29390. key: "onLoginTypeChanged",
  29391. value: function onLoginTypeChanged(e) {
  29392. var _this10 = this;
  29393. Ne(Ke, function () {
  29394. var t = _this10.hasLoginState();
  29395. e.call(_this10, t);
  29396. });
  29397. }
  29398. }, {
  29399. key: "getAccessToken",
  29400. value: function () {
  29401. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  29402. return _regenerator.default.wrap(function _callee29$(_context29) {
  29403. while (1) {
  29404. switch (_context29.prev = _context29.next) {
  29405. case 0:
  29406. _context29.next = 2;
  29407. return this._request.getAccessToken();
  29408. case 2:
  29409. _context29.t0 = _context29.sent.accessToken;
  29410. _context29.t1 = this.config.env;
  29411. return _context29.abrupt("return", {
  29412. accessToken: _context29.t0,
  29413. env: _context29.t1
  29414. });
  29415. case 5:
  29416. case "end":
  29417. return _context29.stop();
  29418. }
  29419. }
  29420. }, _callee29, this);
  29421. }));
  29422. function getAccessToken() {
  29423. return _getAccessToken2.apply(this, arguments);
  29424. }
  29425. return getAccessToken;
  29426. }()
  29427. }, {
  29428. key: "hasLoginState",
  29429. value: function hasLoginState() {
  29430. var e = this._cache.keys.refreshTokenKey;
  29431. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  29432. }
  29433. }, {
  29434. key: "isUsernameRegistered",
  29435. value: function () {
  29436. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  29437. var _yield$this$_request$5, t;
  29438. return _regenerator.default.wrap(function _callee30$(_context30) {
  29439. while (1) {
  29440. switch (_context30.prev = _context30.next) {
  29441. case 0:
  29442. if (!("string" != typeof e)) {
  29443. _context30.next = 2;
  29444. break;
  29445. }
  29446. throw new ne({
  29447. code: "PARAM_ERROR",
  29448. message: "username must be a string"
  29449. });
  29450. case 2:
  29451. _context30.next = 4;
  29452. return this._request.send("auth.isUsernameRegistered", {
  29453. username: e
  29454. });
  29455. case 4:
  29456. _yield$this$_request$5 = _context30.sent;
  29457. t = _yield$this$_request$5.data;
  29458. return _context30.abrupt("return", t && t.isRegistered);
  29459. case 7:
  29460. case "end":
  29461. return _context30.stop();
  29462. }
  29463. }
  29464. }, _callee30, this);
  29465. }));
  29466. function isUsernameRegistered(_x25) {
  29467. return _isUsernameRegistered.apply(this, arguments);
  29468. }
  29469. return isUsernameRegistered;
  29470. }()
  29471. }, {
  29472. key: "getLoginState",
  29473. value: function getLoginState() {
  29474. return Promise.resolve(this.hasLoginState());
  29475. }
  29476. }, {
  29477. key: "signInWithTicket",
  29478. value: function () {
  29479. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  29480. return _regenerator.default.wrap(function _callee31$(_context31) {
  29481. while (1) {
  29482. switch (_context31.prev = _context31.next) {
  29483. case 0:
  29484. return _context31.abrupt("return", new tt(this.config).signIn(e));
  29485. case 1:
  29486. case "end":
  29487. return _context31.stop();
  29488. }
  29489. }
  29490. }, _callee31, this);
  29491. }));
  29492. function signInWithTicket(_x26) {
  29493. return _signInWithTicket.apply(this, arguments);
  29494. }
  29495. return signInWithTicket;
  29496. }()
  29497. }, {
  29498. key: "shouldRefreshAccessToken",
  29499. value: function shouldRefreshAccessToken(e) {
  29500. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  29501. }
  29502. }, {
  29503. key: "getUserInfo",
  29504. value: function getUserInfo() {
  29505. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  29506. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  29507. requestId: e.seqId
  29508. });
  29509. });
  29510. }
  29511. }, {
  29512. key: "getAuthHeader",
  29513. value: function getAuthHeader() {
  29514. var _this$_cache$keys11 = this._cache.keys,
  29515. e = _this$_cache$keys11.refreshTokenKey,
  29516. t = _this$_cache$keys11.accessTokenKey,
  29517. n = this._cache.getStore(e);
  29518. return {
  29519. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  29520. };
  29521. }
  29522. }, {
  29523. key: "_onAnonymousConverted",
  29524. value: function _onAnonymousConverted(e) {
  29525. var t = e.data.env;
  29526. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  29527. }
  29528. }, {
  29529. key: "_onLoginTypeChanged",
  29530. value: function _onLoginTypeChanged(e) {
  29531. var _e$data = e.data,
  29532. t = _e$data.loginType,
  29533. n = _e$data.persistence,
  29534. s = _e$data.env;
  29535. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  29536. }
  29537. }]);
  29538. return rt;
  29539. }();
  29540. var it = function it(e, t) {
  29541. t = t || we();
  29542. var n = Ye(this.config.env),
  29543. s = e.cloudPath,
  29544. r = e.filePath,
  29545. i = e.onUploadProgress,
  29546. _e$fileType = e.fileType,
  29547. o = _e$fileType === void 0 ? "image" : _e$fileType;
  29548. return n.send("storage.getUploadMetadata", {
  29549. path: s
  29550. }).then(function (e) {
  29551. var _e$data2 = e.data,
  29552. a = _e$data2.url,
  29553. c = _e$data2.authorization,
  29554. u = _e$data2.token,
  29555. h = _e$data2.fileId,
  29556. l = _e$data2.cosFileId,
  29557. d = e.requestId,
  29558. p = {
  29559. key: s,
  29560. signature: c,
  29561. "x-cos-meta-fileid": l,
  29562. success_action_status: "201",
  29563. "x-cos-security-token": u
  29564. };
  29565. n.upload({
  29566. url: a,
  29567. data: p,
  29568. file: r,
  29569. name: s,
  29570. fileType: o,
  29571. onUploadProgress: i
  29572. }).then(function (e) {
  29573. 201 === e.statusCode ? t(null, {
  29574. fileID: h,
  29575. requestId: d
  29576. }) : t(new ne({
  29577. code: "STORAGE_REQUEST_FAIL",
  29578. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  29579. }));
  29580. }).catch(function (e) {
  29581. t(e);
  29582. });
  29583. }).catch(function (e) {
  29584. t(e);
  29585. }), t.promise;
  29586. },
  29587. ot = function ot(e, t) {
  29588. t = t || we();
  29589. var n = Ye(this.config.env),
  29590. s = e.cloudPath;
  29591. return n.send("storage.getUploadMetadata", {
  29592. path: s
  29593. }).then(function (e) {
  29594. t(null, e);
  29595. }).catch(function (e) {
  29596. t(e);
  29597. }), t.promise;
  29598. },
  29599. at = function at(_ref7, t) {
  29600. var e = _ref7.fileList;
  29601. if (t = t || we(), !e || !Array.isArray(e)) return {
  29602. code: "INVALID_PARAM",
  29603. message: "fileList必须是非空的数组"
  29604. };
  29605. var _iterator3 = _createForOfIteratorHelper(e),
  29606. _step3;
  29607. try {
  29608. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  29609. var _t8 = _step3.value;
  29610. if (!_t8 || "string" != typeof _t8) return {
  29611. code: "INVALID_PARAM",
  29612. message: "fileList的元素必须是非空的字符串"
  29613. };
  29614. }
  29615. } catch (err) {
  29616. _iterator3.e(err);
  29617. } finally {
  29618. _iterator3.f();
  29619. }
  29620. var n = {
  29621. fileid_list: e
  29622. };
  29623. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  29624. e.code ? t(null, e) : t(null, {
  29625. fileList: e.data.delete_list,
  29626. requestId: e.requestId
  29627. });
  29628. }).catch(function (e) {
  29629. t(e);
  29630. }), t.promise;
  29631. },
  29632. ct = function ct(_ref8, t) {
  29633. var e = _ref8.fileList;
  29634. t = t || we(), e && Array.isArray(e) || t(null, {
  29635. code: "INVALID_PARAM",
  29636. message: "fileList必须是非空的数组"
  29637. });
  29638. var n = [];
  29639. var _iterator4 = _createForOfIteratorHelper(e),
  29640. _step4;
  29641. try {
  29642. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  29643. var _s9 = _step4.value;
  29644. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  29645. code: "INVALID_PARAM",
  29646. message: "fileList的元素必须是包含fileID和maxAge的对象"
  29647. }), n.push({
  29648. fileid: _s9.fileID,
  29649. max_age: _s9.maxAge
  29650. })) : "string" == typeof _s9 ? n.push({
  29651. fileid: _s9
  29652. }) : t(null, {
  29653. code: "INVALID_PARAM",
  29654. message: "fileList的元素必须是字符串"
  29655. });
  29656. }
  29657. } catch (err) {
  29658. _iterator4.e(err);
  29659. } finally {
  29660. _iterator4.f();
  29661. }
  29662. var s = {
  29663. file_list: n
  29664. };
  29665. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  29666. e.code ? t(null, e) : t(null, {
  29667. fileList: e.data.download_list,
  29668. requestId: e.requestId
  29669. });
  29670. }).catch(function (e) {
  29671. t(e);
  29672. }), t.promise;
  29673. },
  29674. ut = /*#__PURE__*/function () {
  29675. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  29676. var e, n, s, r;
  29677. return _regenerator.default.wrap(function _callee32$(_context32) {
  29678. while (1) {
  29679. switch (_context32.prev = _context32.next) {
  29680. case 0:
  29681. e = _ref9.fileID;
  29682. _context32.next = 3;
  29683. return ct.call(this, {
  29684. fileList: [{
  29685. fileID: e,
  29686. maxAge: 600
  29687. }]
  29688. });
  29689. case 3:
  29690. n = _context32.sent.fileList[0];
  29691. if (!("SUCCESS" !== n.code)) {
  29692. _context32.next = 6;
  29693. break;
  29694. }
  29695. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  29696. e(n);
  29697. }));
  29698. case 6:
  29699. s = Ye(this.config.env);
  29700. r = n.download_url;
  29701. if (!(r = encodeURI(r), !t)) {
  29702. _context32.next = 10;
  29703. break;
  29704. }
  29705. return _context32.abrupt("return", s.download({
  29706. url: r
  29707. }));
  29708. case 10:
  29709. _context32.t0 = t;
  29710. _context32.next = 13;
  29711. return s.download({
  29712. url: r
  29713. });
  29714. case 13:
  29715. _context32.t1 = _context32.sent;
  29716. (0, _context32.t0)(_context32.t1);
  29717. case 15:
  29718. case "end":
  29719. return _context32.stop();
  29720. }
  29721. }
  29722. }, _callee32, this);
  29723. }));
  29724. return function ut(_x27, _x28) {
  29725. return _ref10.apply(this, arguments);
  29726. };
  29727. }(),
  29728. ht = function ht(_ref11, i) {
  29729. var e = _ref11.name,
  29730. t = _ref11.data,
  29731. n = _ref11.query,
  29732. s = _ref11.parse,
  29733. r = _ref11.search;
  29734. var o = i || we();
  29735. var a;
  29736. try {
  29737. a = t ? JSON.stringify(t) : "";
  29738. } catch (e) {
  29739. return Promise.reject(e);
  29740. }
  29741. if (!e) return Promise.reject(new ne({
  29742. code: "PARAM_ERROR",
  29743. message: "函数名不能为空"
  29744. }));
  29745. var c = {
  29746. inQuery: n,
  29747. parse: s,
  29748. search: r,
  29749. function_name: e,
  29750. request_data: a
  29751. };
  29752. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  29753. if (e.code) o(null, e);else {
  29754. var _t9 = e.data.response_data;
  29755. if (s) o(null, {
  29756. result: _t9,
  29757. requestId: e.requestId
  29758. });else try {
  29759. _t9 = JSON.parse(e.data.response_data), o(null, {
  29760. result: _t9,
  29761. requestId: e.requestId
  29762. });
  29763. } catch (e) {
  29764. o(new ne({
  29765. message: "response data must be json"
  29766. }));
  29767. }
  29768. }
  29769. return o.promise;
  29770. }).catch(function (e) {
  29771. o(e);
  29772. }), o.promise;
  29773. },
  29774. lt = {
  29775. timeout: 15e3,
  29776. persistence: "session"
  29777. },
  29778. dt = {};
  29779. var pt = /*#__PURE__*/function () {
  29780. function pt(e) {
  29781. (0, _classCallCheck2.default)(this, pt);
  29782. this.config = e || this.config, this.authObj = void 0;
  29783. }
  29784. (0, _createClass2.default)(pt, [{
  29785. key: "init",
  29786. value: function init(e) {
  29787. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  29788. timeout: e.timeout || 5e3,
  29789. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  29790. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  29791. case this.config.timeout > 6e5:
  29792. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  29793. break;
  29794. case this.config.timeout < 100:
  29795. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  29796. }
  29797. return new pt(this.config);
  29798. }
  29799. }, {
  29800. key: "auth",
  29801. value: function auth() {
  29802. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  29803. e = _ref12.persistence;
  29804. if (this.authObj) return this.authObj;
  29805. var t = e || ke.adapter.primaryStorage || lt.persistence;
  29806. var n;
  29807. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  29808. var t = e.env;
  29809. Ee[t] = new Ae(e), Oe[t] = new Ae(_objectSpread(_objectSpread({}, e), {}, {
  29810. persistence: "local"
  29811. }));
  29812. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  29813. }
  29814. }, {
  29815. key: "on",
  29816. value: function on(e, t) {
  29817. return Ne.apply(this, [e, t]);
  29818. }
  29819. }, {
  29820. key: "off",
  29821. value: function off(e, t) {
  29822. return Fe.apply(this, [e, t]);
  29823. }
  29824. }, {
  29825. key: "callFunction",
  29826. value: function callFunction(e, t) {
  29827. return ht.apply(this, [e, t]);
  29828. }
  29829. }, {
  29830. key: "deleteFile",
  29831. value: function deleteFile(e, t) {
  29832. return at.apply(this, [e, t]);
  29833. }
  29834. }, {
  29835. key: "getTempFileURL",
  29836. value: function getTempFileURL(e, t) {
  29837. return ct.apply(this, [e, t]);
  29838. }
  29839. }, {
  29840. key: "downloadFile",
  29841. value: function downloadFile(e, t) {
  29842. return ut.apply(this, [e, t]);
  29843. }
  29844. }, {
  29845. key: "uploadFile",
  29846. value: function uploadFile(e, t) {
  29847. return it.apply(this, [e, t]);
  29848. }
  29849. }, {
  29850. key: "getUploadMetadata",
  29851. value: function getUploadMetadata(e, t) {
  29852. return ot.apply(this, [e, t]);
  29853. }
  29854. }, {
  29855. key: "registerExtension",
  29856. value: function registerExtension(e) {
  29857. dt[e.name] = e;
  29858. }
  29859. }, {
  29860. key: "invokeExtension",
  29861. value: function () {
  29862. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  29863. var n;
  29864. return _regenerator.default.wrap(function _callee33$(_context33) {
  29865. while (1) {
  29866. switch (_context33.prev = _context33.next) {
  29867. case 0:
  29868. n = dt[e];
  29869. if (n) {
  29870. _context33.next = 3;
  29871. break;
  29872. }
  29873. throw new ne({
  29874. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  29875. });
  29876. case 3:
  29877. _context33.next = 5;
  29878. return n.invoke(t, this);
  29879. case 5:
  29880. return _context33.abrupt("return", _context33.sent);
  29881. case 6:
  29882. case "end":
  29883. return _context33.stop();
  29884. }
  29885. }
  29886. }, _callee33, this);
  29887. }));
  29888. function invokeExtension(_x29, _x30) {
  29889. return _invokeExtension.apply(this, arguments);
  29890. }
  29891. return invokeExtension;
  29892. }()
  29893. }, {
  29894. key: "useAdapters",
  29895. value: function useAdapters(e) {
  29896. var _ref13 = be(e) || {},
  29897. t = _ref13.adapter,
  29898. n = _ref13.runtime;
  29899. t && (ke.adapter = t), n && (ke.runtime = n);
  29900. }
  29901. }]);
  29902. return pt;
  29903. }();
  29904. var ft = new pt();
  29905. function gt(e, t, n) {
  29906. void 0 === n && (n = {});
  29907. var s = /\?/.test(t),
  29908. r = "";
  29909. for (var i in n) {
  29910. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  29911. }
  29912. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  29913. }
  29914. var mt = /*#__PURE__*/function () {
  29915. function mt() {
  29916. (0, _classCallCheck2.default)(this, mt);
  29917. }
  29918. (0, _createClass2.default)(mt, [{
  29919. key: "post",
  29920. value: function post(e) {
  29921. var t = e.url,
  29922. n = e.data,
  29923. s = e.headers;
  29924. return new Promise(function (e, r) {
  29925. se.request({
  29926. url: gt("https:", t),
  29927. data: n,
  29928. method: "POST",
  29929. header: s,
  29930. success: function success(t) {
  29931. e(t);
  29932. },
  29933. fail: function fail(e) {
  29934. r(e);
  29935. }
  29936. });
  29937. });
  29938. }
  29939. }, {
  29940. key: "upload",
  29941. value: function upload(e) {
  29942. return new Promise(function (t, n) {
  29943. var s = e.url,
  29944. r = e.file,
  29945. i = e.data,
  29946. o = e.headers,
  29947. a = e.fileType,
  29948. c = se.uploadFile({
  29949. url: gt("https:", s),
  29950. name: "file",
  29951. formData: Object.assign({}, i),
  29952. filePath: r,
  29953. fileType: a,
  29954. header: o,
  29955. success: function success(e) {
  29956. var n = {
  29957. statusCode: e.statusCode,
  29958. data: e.data || {}
  29959. };
  29960. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  29961. },
  29962. fail: function fail(e) {
  29963. n(new Error(e.errMsg || "uploadFile:fail"));
  29964. }
  29965. });
  29966. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  29967. e.onUploadProgress({
  29968. loaded: t.totalBytesSent,
  29969. total: t.totalBytesExpectedToSend
  29970. });
  29971. });
  29972. });
  29973. }
  29974. }]);
  29975. return mt;
  29976. }();
  29977. var yt = {
  29978. setItem: function setItem(e, t) {
  29979. se.setStorageSync(e, t);
  29980. },
  29981. getItem: function getItem(e) {
  29982. return se.getStorageSync(e);
  29983. },
  29984. removeItem: function removeItem(e) {
  29985. se.removeStorageSync(e);
  29986. },
  29987. clear: function clear() {
  29988. se.clearStorageSync();
  29989. }
  29990. };
  29991. var _t = {
  29992. genAdapter: function genAdapter() {
  29993. return {
  29994. root: {},
  29995. reqClass: mt,
  29996. localStorage: yt,
  29997. primaryStorage: "local"
  29998. };
  29999. },
  30000. isMatch: function isMatch() {
  30001. return !0;
  30002. },
  30003. runtime: "uni_app"
  30004. };
  30005. ft.useAdapters(_t);
  30006. var wt = ft,
  30007. vt = wt.init;
  30008. wt.init = function (e) {
  30009. e.env = e.spaceId;
  30010. var t = vt.call(this, e);
  30011. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  30012. var n = t.auth;
  30013. return t.auth = function (e) {
  30014. var t = n.call(this, e);
  30015. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  30016. var n;
  30017. t[e] = (n = t[e], function (e) {
  30018. e = e || {};
  30019. var _te = te(e),
  30020. t = _te.success,
  30021. s = _te.fail,
  30022. r = _te.complete;
  30023. if (!(t || s || r)) return n.call(this, e);
  30024. n.call(this, e).then(function (e) {
  30025. t && t(e), r && r(e);
  30026. }, function (e) {
  30027. s && s(e), r && r(e);
  30028. });
  30029. }).bind(t);
  30030. }), t;
  30031. }, t.customAuth = t.auth, t;
  30032. };
  30033. var It = wt;
  30034. var St = /*#__PURE__*/function (_fe) {
  30035. (0, _inherits2.default)(St, _fe);
  30036. var _super8 = _createSuper(St);
  30037. function St() {
  30038. (0, _classCallCheck2.default)(this, St);
  30039. return _super8.apply(this, arguments);
  30040. }
  30041. (0, _createClass2.default)(St, [{
  30042. key: "getAccessToken",
  30043. value: function getAccessToken() {
  30044. var _this11 = this;
  30045. return new Promise(function (e, t) {
  30046. var n = "Anonymous_Access_token";
  30047. _this11.setAccessToken(n), e(n);
  30048. });
  30049. }
  30050. }, {
  30051. key: "setupRequest",
  30052. value: function setupRequest(e, t) {
  30053. var n = Object.assign({}, e, {
  30054. spaceId: this.config.spaceId,
  30055. timestamp: Date.now()
  30056. }),
  30057. s = {
  30058. "Content-Type": "application/json"
  30059. };
  30060. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  30061. var r = he();
  30062. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  30063. var _re = re(),
  30064. i = _re.token;
  30065. return s["x-client-token"] = i, {
  30066. url: this.config.requestUrl,
  30067. method: "POST",
  30068. data: n,
  30069. dataType: "json",
  30070. header: JSON.parse(JSON.stringify(s))
  30071. };
  30072. }
  30073. }, {
  30074. key: "uploadFileToOSS",
  30075. value: function uploadFileToOSS(_ref14) {
  30076. var _this12 = this;
  30077. var e = _ref14.url,
  30078. t = _ref14.formData,
  30079. n = _ref14.name,
  30080. s = _ref14.filePath,
  30081. r = _ref14.fileType,
  30082. i = _ref14.onUploadProgress;
  30083. return new Promise(function (o, a) {
  30084. var c = _this12.adapter.uploadFile({
  30085. url: e,
  30086. formData: t,
  30087. name: n,
  30088. filePath: s,
  30089. fileType: r,
  30090. success: function success(e) {
  30091. e && e.statusCode < 400 ? o(e) : a(new ne({
  30092. code: "UPLOAD_FAILED",
  30093. message: "文件上传失败"
  30094. }));
  30095. },
  30096. fail: function fail(e) {
  30097. a(new ne({
  30098. code: e.code || "UPLOAD_FAILED",
  30099. message: e.message || e.errMsg || "文件上传失败"
  30100. }));
  30101. }
  30102. });
  30103. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  30104. i({
  30105. loaded: e.totalBytesSent,
  30106. total: e.totalBytesExpectedToSend
  30107. });
  30108. });
  30109. });
  30110. }
  30111. }, {
  30112. key: "uploadFile",
  30113. value: function uploadFile(_ref15) {
  30114. var _this13 = this;
  30115. var e = _ref15.filePath,
  30116. t = _ref15.cloudPath,
  30117. _ref15$fileType = _ref15.fileType,
  30118. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  30119. s = _ref15.onUploadProgress;
  30120. if (!t) throw new ne({
  30121. code: "CLOUDPATH_REQUIRED",
  30122. message: "cloudPath不可为空"
  30123. });
  30124. var r;
  30125. return this.getOSSUploadOptionsFromPath({
  30126. cloudPath: t
  30127. }).then(function (t) {
  30128. var _t$result = t.result,
  30129. i = _t$result.url,
  30130. o = _t$result.formData,
  30131. a = _t$result.name;
  30132. r = t.result.fileUrl;
  30133. var c = {
  30134. url: i,
  30135. formData: o,
  30136. name: a,
  30137. filePath: e,
  30138. fileType: n
  30139. };
  30140. return _this13.uploadFileToOSS(Object.assign({}, c, {
  30141. onUploadProgress: s
  30142. }));
  30143. }).then(function () {
  30144. return _this13.reportOSSUpload({
  30145. cloudPath: t
  30146. });
  30147. }).then(function (t) {
  30148. return new Promise(function (n, s) {
  30149. t.success ? n({
  30150. success: !0,
  30151. filePath: e,
  30152. fileID: r
  30153. }) : s(new ne({
  30154. code: "UPLOAD_FAILED",
  30155. message: "文件上传失败"
  30156. }));
  30157. });
  30158. });
  30159. }
  30160. }, {
  30161. key: "deleteFile",
  30162. value: function deleteFile(_ref16) {
  30163. var e = _ref16.fileList;
  30164. var t = {
  30165. method: "serverless.file.resource.delete",
  30166. params: JSON.stringify({
  30167. fileList: e
  30168. })
  30169. };
  30170. return this.request(this.setupRequest(t)).then(function (e) {
  30171. if (e.success) return e.result;
  30172. throw new ne({
  30173. code: "DELETE_FILE_FAILED",
  30174. message: "删除文件失败"
  30175. });
  30176. });
  30177. }
  30178. }, {
  30179. key: "getTempFileURL",
  30180. value: function getTempFileURL() {
  30181. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30182. e = _ref17.fileList;
  30183. if (!Array.isArray(e) || 0 === e.length) throw new ne({
  30184. code: "INVALID_PARAM",
  30185. message: "fileList的元素必须是非空的字符串"
  30186. });
  30187. var t = {
  30188. method: "serverless.file.resource.getTempFileURL",
  30189. params: JSON.stringify({
  30190. fileList: e
  30191. })
  30192. };
  30193. return this.request(this.setupRequest(t)).then(function (e) {
  30194. if (e.success) return {
  30195. fileList: e.result.fileList.map(function (e) {
  30196. return {
  30197. fileID: e.fileID,
  30198. tempFileURL: e.tempFileURL
  30199. };
  30200. })
  30201. };
  30202. throw new ne({
  30203. code: "GET_TEMP_FILE_URL_FAILED",
  30204. message: "获取临时文件链接失败"
  30205. });
  30206. });
  30207. }
  30208. }]);
  30209. return St;
  30210. }(fe);
  30211. var bt = {
  30212. init: function init(e) {
  30213. var t = new St(e),
  30214. n = {
  30215. signInAnonymously: function signInAnonymously() {
  30216. return t.authorize();
  30217. },
  30218. getLoginState: function getLoginState() {
  30219. return Promise.resolve(!1);
  30220. }
  30221. };
  30222. return t.auth = function () {
  30223. return n;
  30224. }, t.customAuth = t.auth, t;
  30225. }
  30226. };
  30227. function kt(_ref18) {
  30228. var e = _ref18.data;
  30229. var t;
  30230. t = he();
  30231. var n = JSON.parse(JSON.stringify(e || {}));
  30232. if (Object.assign(n, {
  30233. clientInfo: t
  30234. }), !n.uniIdToken) {
  30235. var _re2 = re(),
  30236. _e19 = _re2.token;
  30237. _e19 && (n.uniIdToken = _e19);
  30238. }
  30239. return n;
  30240. }
  30241. function Ct() {
  30242. return _Ct.apply(this, arguments);
  30243. }
  30244. function _Ct() {
  30245. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  30246. var _this26 = this;
  30247. var _ref60,
  30248. e,
  30249. t,
  30250. _this$__dev__,
  30251. n,
  30252. s,
  30253. r,
  30254. i,
  30255. o,
  30256. a,
  30257. _args6 = arguments;
  30258. return _regenerator.default.wrap(function _callee54$(_context54) {
  30259. while (1) {
  30260. switch (_context54.prev = _context54.next) {
  30261. case 0:
  30262. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  30263. _context54.next = 3;
  30264. return this.__dev__.initLocalNetwork();
  30265. case 3:
  30266. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  30267. aliyun: "aliyun",
  30268. tencent: "tcb"
  30269. }[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);
  30270. return _context54.abrupt("return", new Promise(function (t, n) {
  30271. se.request({
  30272. method: "POST",
  30273. url: o,
  30274. data: {
  30275. name: e,
  30276. platform: P,
  30277. provider: r,
  30278. spaceId: i
  30279. },
  30280. timeout: 3e3,
  30281. success: function success(e) {
  30282. t(e);
  30283. },
  30284. fail: function fail() {
  30285. t({
  30286. data: {
  30287. code: "NETWORK_ERROR",
  30288. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  30289. }
  30290. });
  30291. }
  30292. });
  30293. }).then(function () {
  30294. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30295. e = _ref61.data;
  30296. var _ref62 = e || {},
  30297. t = _ref62.code,
  30298. n = _ref62.message;
  30299. return {
  30300. code: 0 === t ? 0 : t || "SYS_ERR",
  30301. message: n || "SYS_ERR"
  30302. };
  30303. }).then(function (_ref63) {
  30304. var n = _ref63.code,
  30305. s = _ref63.message;
  30306. if (0 !== n) {
  30307. switch (n) {
  30308. case "MODULE_ENCRYPTED":
  30309. 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"));
  30310. break;
  30311. case "FUNCTION_ENCRYPTED":
  30312. 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"));
  30313. break;
  30314. case "ACTION_ENCRYPTED":
  30315. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  30316. break;
  30317. case "NETWORK_ERROR":
  30318. {
  30319. var _e31 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  30320. throw console.error(_e31), new Error(_e31);
  30321. }
  30322. case "SWITCH_TO_CLOUD":
  30323. break;
  30324. default:
  30325. {
  30326. 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");
  30327. throw console.error(_e32), new Error(_e32);
  30328. }
  30329. }
  30330. return _this26._callCloudFunction({
  30331. name: e,
  30332. data: t
  30333. });
  30334. }
  30335. return new Promise(function (e, n) {
  30336. var s = kt.call(_this26, {
  30337. data: t
  30338. });
  30339. se.request({
  30340. method: "POST",
  30341. url: a,
  30342. data: {
  30343. provider: r,
  30344. platform: P,
  30345. param: s
  30346. },
  30347. success: function success() {
  30348. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30349. t = _ref64.statusCode,
  30350. s = _ref64.data;
  30351. return !t || t >= 400 ? n(new ne({
  30352. code: s.code || "SYS_ERR",
  30353. message: s.message || "request:fail"
  30354. })) : e({
  30355. result: s
  30356. });
  30357. },
  30358. fail: function fail(e) {
  30359. n(new ne({
  30360. code: e.code || e.errCode || "SYS_ERR",
  30361. message: e.message || e.errMsg || "request:fail"
  30362. }));
  30363. }
  30364. });
  30365. });
  30366. }));
  30367. case 5:
  30368. case "end":
  30369. return _context54.stop();
  30370. }
  30371. }
  30372. }, _callee54, this);
  30373. }));
  30374. return _Ct.apply(this, arguments);
  30375. }
  30376. var Tt = [{
  30377. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  30378. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  30379. mode: "append"
  30380. }];
  30381. var Pt = /[\\^$.*+?()[\]{}|]/g,
  30382. At = RegExp(Pt.source);
  30383. function Et(e, t, n) {
  30384. return e.replace(new RegExp((s = t) && At.test(s) ? s.replace(Pt, "\\$&") : s, "g"), n);
  30385. var s;
  30386. }
  30387. var Ot = "none",
  30388. xt = "request",
  30389. Rt = "response",
  30390. Ut = "both";
  30391. var Lt = /*#__PURE__*/function () {
  30392. function Lt() {
  30393. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  30394. e = _ref19.secretType,
  30395. t = _ref19.uniCloudIns;
  30396. (0, _classCallCheck2.default)(this, Lt);
  30397. this.clientType = "", this.secretType = e || Ot, this.uniCloudIns = t;
  30398. var _this$uniCloudIns$con = this.uniCloudIns.config,
  30399. n = _this$uniCloudIns$con.provider,
  30400. s = _this$uniCloudIns$con.spaceId;
  30401. var r;
  30402. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  30403. }
  30404. (0, _createClass2.default)(Lt, [{
  30405. key: "getSystemInfo",
  30406. value: function getSystemInfo() {
  30407. return this._systemInfo || (this._systemInfo = ce()), this._systemInfo;
  30408. }
  30409. }, {
  30410. key: "appId",
  30411. get: function get() {
  30412. return this.getSystemInfo().appId;
  30413. }
  30414. }, {
  30415. key: "deviceId",
  30416. get: function get() {
  30417. return this.getSystemInfo().deviceId;
  30418. }
  30419. }, {
  30420. key: "encryptData",
  30421. value: function () {
  30422. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  30423. return _regenerator.default.wrap(function _callee34$(_context34) {
  30424. while (1) {
  30425. switch (_context34.prev = _context34.next) {
  30426. case 0:
  30427. return _context34.abrupt("return", this.secretType === Ot ? e : this.platformEncryptData(e));
  30428. case 1:
  30429. case "end":
  30430. return _context34.stop();
  30431. }
  30432. }
  30433. }, _callee34, this);
  30434. }));
  30435. function encryptData(_x31) {
  30436. return _encryptData.apply(this, arguments);
  30437. }
  30438. return encryptData;
  30439. }()
  30440. }, {
  30441. key: "decryptResult",
  30442. value: function () {
  30443. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  30444. var _ref20, t, n;
  30445. return _regenerator.default.wrap(function _callee35$(_context35) {
  30446. while (1) {
  30447. switch (_context35.prev = _context35.next) {
  30448. case 0:
  30449. if (!(this.secretType === Ot)) {
  30450. _context35.next = 2;
  30451. break;
  30452. }
  30453. return _context35.abrupt("return", e);
  30454. case 2:
  30455. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  30456. return _context35.abrupt("return", t || !n ? e : this.secretType === xt ? n : this.platformDecryptResult(e));
  30457. case 4:
  30458. case "end":
  30459. return _context35.stop();
  30460. }
  30461. }
  30462. }, _callee35, this);
  30463. }));
  30464. function decryptResult(_x32) {
  30465. return _decryptResult.apply(this, arguments);
  30466. }
  30467. return decryptResult;
  30468. }()
  30469. }, {
  30470. key: "wrapVerifyClientCallFunction",
  30471. value: function wrapVerifyClientCallFunction(e) {
  30472. var t = this;
  30473. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  30474. var _ref22,
  30475. n,
  30476. _ref22$data,
  30477. s,
  30478. r,
  30479. _args36 = arguments;
  30480. return _regenerator.default.wrap(function _callee36$(_context36) {
  30481. while (1) {
  30482. switch (_context36.prev = _context36.next) {
  30483. case 0:
  30484. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  30485. _context36.next = 3;
  30486. return t.prepare();
  30487. case 3:
  30488. _context36.next = 5;
  30489. return t.platformGetSignOption();
  30490. case 5:
  30491. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  30492. _context36.next = 8;
  30493. return e({
  30494. name: n,
  30495. data: s
  30496. });
  30497. case 8:
  30498. r = _context36.sent;
  30499. _context36.t0 = t.isClientKeyNotFound(r);
  30500. if (!_context36.t0) {
  30501. _context36.next = 19;
  30502. break;
  30503. }
  30504. _context36.next = 13;
  30505. return t.prepare({
  30506. forceUpdate: !0
  30507. });
  30508. case 13:
  30509. _context36.next = 15;
  30510. return t.platformGetSignOption();
  30511. case 15:
  30512. s._uniCloudOptions = _context36.sent;
  30513. _context36.next = 18;
  30514. return e({
  30515. name: n,
  30516. data: s
  30517. });
  30518. case 18:
  30519. r = _context36.sent;
  30520. case 19:
  30521. return _context36.abrupt("return", r);
  30522. case 20:
  30523. case "end":
  30524. return _context36.stop();
  30525. }
  30526. }
  30527. }, _callee36);
  30528. }));
  30529. }
  30530. }, {
  30531. key: "wrapEncryptDataCallFunction",
  30532. value: function wrapEncryptDataCallFunction(e) {
  30533. var t = this;
  30534. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  30535. var _ref24,
  30536. n,
  30537. _ref24$data,
  30538. s,
  30539. r,
  30540. i,
  30541. _r3,
  30542. _args37 = arguments;
  30543. return _regenerator.default.wrap(function _callee37$(_context37) {
  30544. while (1) {
  30545. switch (_context37.prev = _context37.next) {
  30546. case 0:
  30547. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  30548. _context37.next = 3;
  30549. return t.prepare();
  30550. case 3:
  30551. _context37.next = 5;
  30552. return t.encryptData(s);
  30553. case 5:
  30554. r = _context37.sent;
  30555. _context37.next = 8;
  30556. return e({
  30557. name: n,
  30558. data: r
  30559. });
  30560. case 8:
  30561. i = _context37.sent;
  30562. if (!t.isClientKeyNotFound(i)) {
  30563. _context37.next = 21;
  30564. break;
  30565. }
  30566. _context37.next = 12;
  30567. return t.prepare({
  30568. forceUpdate: !0
  30569. });
  30570. case 12:
  30571. _context37.next = 14;
  30572. return t.encryptData(s);
  30573. case 14:
  30574. _r3 = _context37.sent;
  30575. _context37.next = 17;
  30576. return t.platformGetSignOption();
  30577. case 17:
  30578. s._uniCloudOptions = _context37.sent;
  30579. _context37.next = 20;
  30580. return e({
  30581. name: n,
  30582. data: _r3
  30583. });
  30584. case 20:
  30585. i = _context37.sent;
  30586. case 21:
  30587. _context37.next = 23;
  30588. return t.decryptResult(i.result);
  30589. case 23:
  30590. i.result = _context37.sent;
  30591. return _context37.abrupt("return", i);
  30592. case 25:
  30593. case "end":
  30594. return _context37.stop();
  30595. }
  30596. }
  30597. }, _callee37);
  30598. }));
  30599. }
  30600. }]);
  30601. return Lt;
  30602. }();
  30603. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  30604. function Nt(e) {
  30605. return parseInt(e) === e;
  30606. }
  30607. function Dt(e) {
  30608. if (!Nt(e.length)) return !1;
  30609. for (var t = 0; t < e.length; t++) {
  30610. if (!Nt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  30611. }
  30612. return !0;
  30613. }
  30614. function Ft(e, t) {
  30615. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  30616. if (Array.isArray(e)) {
  30617. if (!Dt(e)) throw new Error("Array contains invalid value: " + e);
  30618. return new Uint8Array(e);
  30619. }
  30620. if (Nt(e.length) && Dt(e)) return new Uint8Array(e);
  30621. throw new Error("unsupported array-like object");
  30622. }
  30623. function qt(e) {
  30624. return new Uint8Array(e);
  30625. }
  30626. function Mt(e, t, n, s, r) {
  30627. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  30628. }
  30629. var Kt,
  30630. jt = {
  30631. toBytes: function toBytes(e) {
  30632. var t = [],
  30633. n = 0;
  30634. for (e = encodeURI(e); n < e.length;) {
  30635. var s = e.charCodeAt(n++);
  30636. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  30637. }
  30638. return Ft(t);
  30639. },
  30640. fromBytes: function fromBytes(e) {
  30641. for (var t = [], n = 0; n < e.length;) {
  30642. var s = e[n];
  30643. 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);
  30644. }
  30645. return t.join("");
  30646. }
  30647. },
  30648. Bt = (Kt = "0123456789abcdef", {
  30649. toBytes: function toBytes(e) {
  30650. for (var t = [], n = 0; n < e.length; n += 2) {
  30651. t.push(parseInt(e.substr(n, 2), 16));
  30652. }
  30653. return t;
  30654. },
  30655. fromBytes: function fromBytes(e) {
  30656. for (var t = [], n = 0; n < e.length; n++) {
  30657. var s = e[n];
  30658. t.push(Kt[(240 & s) >> 4] + Kt[15 & s]);
  30659. }
  30660. return t.join("");
  30661. }
  30662. }),
  30663. $t = {
  30664. 16: 10,
  30665. 24: 12,
  30666. 32: 14
  30667. },
  30668. 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],
  30669. 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],
  30670. 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],
  30671. 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],
  30672. 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],
  30673. 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],
  30674. 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],
  30675. 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],
  30676. 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],
  30677. 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],
  30678. 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],
  30679. 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],
  30680. 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],
  30681. 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],
  30682. 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];
  30683. function on(e) {
  30684. for (var t = [], n = 0; n < e.length; n += 4) {
  30685. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  30686. }
  30687. return t;
  30688. }
  30689. var an = /*#__PURE__*/function () {
  30690. function an(e) {
  30691. (0, _classCallCheck2.default)(this, an);
  30692. if (!(this instanceof an)) throw Error("AES must be instanitated with `new`");
  30693. Object.defineProperty(this, "key", {
  30694. value: Ft(e, !0)
  30695. }), this._prepare();
  30696. }
  30697. (0, _createClass2.default)(an, [{
  30698. key: "_prepare",
  30699. value: function _prepare() {
  30700. var e = $t[this.key.length];
  30701. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  30702. this._Ke = [], this._Kd = [];
  30703. for (var t = 0; t <= e; t++) {
  30704. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  30705. }
  30706. var n,
  30707. s = 4 * (e + 1),
  30708. r = this.key.length / 4,
  30709. i = on(this.key);
  30710. for (t = 0; t < r; t++) {
  30711. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  30712. }
  30713. for (var o, a = 0, c = r; c < s;) {
  30714. 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++) {
  30715. i[t] ^= i[t - 1];
  30716. } else {
  30717. for (t = 1; t < r / 2; t++) {
  30718. i[t] ^= i[t - 1];
  30719. }
  30720. 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;
  30721. for (t = r / 2 + 1; t < r; t++) {
  30722. i[t] ^= i[t - 1];
  30723. }
  30724. }
  30725. for (t = 0; t < r && c < s;) {
  30726. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  30727. }
  30728. }
  30729. for (var u = 1; u < e; u++) {
  30730. for (var h = 0; h < 4; h++) {
  30731. o = this._Kd[u][h], this._Kd[u][h] = tn[o >> 24 & 255] ^ nn[o >> 16 & 255] ^ sn[o >> 8 & 255] ^ rn[255 & o];
  30732. }
  30733. }
  30734. }
  30735. }, {
  30736. key: "encrypt",
  30737. value: function encrypt(e) {
  30738. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  30739. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30740. s[r] ^= this._Ke[0][r];
  30741. }
  30742. for (var i = 1; i < t; i++) {
  30743. for (r = 0; r < 4; r++) {
  30744. 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];
  30745. }
  30746. s = n.slice();
  30747. }
  30748. var o,
  30749. a = qt(16);
  30750. for (r = 0; r < 4; r++) {
  30751. 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);
  30752. }
  30753. return a;
  30754. }
  30755. }, {
  30756. key: "decrypt",
  30757. value: function decrypt(e) {
  30758. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  30759. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = on(e), r = 0; r < 4; r++) {
  30760. s[r] ^= this._Kd[0][r];
  30761. }
  30762. for (var i = 1; i < t; i++) {
  30763. for (r = 0; r < 4; r++) {
  30764. 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];
  30765. }
  30766. s = n.slice();
  30767. }
  30768. var o,
  30769. a = qt(16);
  30770. for (r = 0; r < 4; r++) {
  30771. 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);
  30772. }
  30773. return a;
  30774. }
  30775. }]);
  30776. return an;
  30777. }();
  30778. var cn = /*#__PURE__*/function () {
  30779. function cn(e) {
  30780. (0, _classCallCheck2.default)(this, cn);
  30781. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  30782. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new an(e);
  30783. }
  30784. (0, _createClass2.default)(cn, [{
  30785. key: "encrypt",
  30786. value: function encrypt(e) {
  30787. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30788. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30789. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.encrypt(n), t, s);
  30790. }
  30791. return t;
  30792. }
  30793. }, {
  30794. key: "decrypt",
  30795. value: function decrypt(e) {
  30796. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  30797. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30798. Mt(e, n, 0, s, s + 16), Mt(n = this._aes.decrypt(n), t, s);
  30799. }
  30800. return t;
  30801. }
  30802. }]);
  30803. return cn;
  30804. }();
  30805. var un = /*#__PURE__*/function () {
  30806. function un(e, t) {
  30807. (0, _classCallCheck2.default)(this, un);
  30808. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  30809. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  30810. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30811. } else t = qt(16);
  30812. this._lastCipherblock = Ft(t, !0), this._aes = new an(e);
  30813. }
  30814. (0, _createClass2.default)(un, [{
  30815. key: "encrypt",
  30816. value: function encrypt(e) {
  30817. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  30818. for (var t = qt(e.length), n = qt(16), s = 0; s < e.length; s += 16) {
  30819. Mt(e, n, 0, s, s + 16);
  30820. for (var r = 0; r < 16; r++) {
  30821. n[r] ^= this._lastCipherblock[r];
  30822. }
  30823. this._lastCipherblock = this._aes.encrypt(n), Mt(this._lastCipherblock, t, s);
  30824. }
  30825. return t;
  30826. }
  30827. }, {
  30828. key: "decrypt",
  30829. value: function decrypt(e) {
  30830. if ((e = Ft(e)).length % 16 != 0) throw new Error("invalid ciphertext 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), n = this._aes.decrypt(n);
  30833. for (var r = 0; r < 16; r++) {
  30834. t[s + r] = n[r] ^ this._lastCipherblock[r];
  30835. }
  30836. Mt(e, this._lastCipherblock, 0, s, s + 16);
  30837. }
  30838. return t;
  30839. }
  30840. }]);
  30841. return un;
  30842. }();
  30843. var hn = /*#__PURE__*/function () {
  30844. function hn(e, t, n) {
  30845. (0, _classCallCheck2.default)(this, hn);
  30846. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  30847. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  30848. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  30849. } else t = qt(16);
  30850. n || (n = 1), this.segmentSize = n, this._shiftRegister = Ft(t, !0), this._aes = new an(e);
  30851. }
  30852. (0, _createClass2.default)(hn, [{
  30853. key: "encrypt",
  30854. value: function encrypt(e) {
  30855. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  30856. for (var t, n = Ft(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  30857. t = this._aes.encrypt(this._shiftRegister);
  30858. for (var r = 0; r < this.segmentSize; r++) {
  30859. n[s + r] ^= t[r];
  30860. }
  30861. Mt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Mt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30862. }
  30863. return n;
  30864. }
  30865. }, {
  30866. key: "decrypt",
  30867. value: function decrypt(e) {
  30868. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext 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(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  30875. }
  30876. return n;
  30877. }
  30878. }]);
  30879. return hn;
  30880. }();
  30881. var ln = /*#__PURE__*/function () {
  30882. function ln(e, t) {
  30883. (0, _classCallCheck2.default)(this, ln);
  30884. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  30885. if (this.description = "Output Feedback", this.name = "ofb", t) {
  30886. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  30887. } else t = qt(16);
  30888. this._lastPrecipher = Ft(t, !0), this._lastPrecipherIndex = 16, this._aes = new an(e);
  30889. }
  30890. (0, _createClass2.default)(ln, [{
  30891. key: "encrypt",
  30892. value: function encrypt(e) {
  30893. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30894. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  30895. }
  30896. return t;
  30897. }
  30898. }, {
  30899. key: "decrypt",
  30900. value: function decrypt(e) {
  30901. return this.encrypt(e);
  30902. }
  30903. }]);
  30904. return ln;
  30905. }();
  30906. var dn = /*#__PURE__*/function () {
  30907. function dn(e) {
  30908. (0, _classCallCheck2.default)(this, dn);
  30909. if (!(this instanceof dn)) throw Error("Counter must be instanitated with `new`");
  30910. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = qt(16), this.setValue(e)) : this.setBytes(e);
  30911. }
  30912. (0, _createClass2.default)(dn, [{
  30913. key: "setValue",
  30914. value: function setValue(e) {
  30915. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  30916. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  30917. for (var t = 15; t >= 0; --t) {
  30918. this._counter[t] = e % 256, e = parseInt(e / 256);
  30919. }
  30920. }
  30921. }, {
  30922. key: "setBytes",
  30923. value: function setBytes(e) {
  30924. if (16 != (e = Ft(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  30925. this._counter = e;
  30926. }
  30927. }, {
  30928. key: "increment",
  30929. value: function increment() {
  30930. for (var e = 15; e >= 0; e--) {
  30931. if (255 !== this._counter[e]) {
  30932. this._counter[e]++;
  30933. break;
  30934. }
  30935. this._counter[e] = 0;
  30936. }
  30937. }
  30938. }]);
  30939. return dn;
  30940. }();
  30941. var pn = /*#__PURE__*/function () {
  30942. function pn(e, t) {
  30943. (0, _classCallCheck2.default)(this, pn);
  30944. if (!(this instanceof pn)) throw Error("AES must be instanitated with `new`");
  30945. 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);
  30946. }
  30947. (0, _createClass2.default)(pn, [{
  30948. key: "encrypt",
  30949. value: function encrypt(e) {
  30950. for (var t = Ft(e, !0), n = 0; n < t.length; n++) {
  30951. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  30952. }
  30953. return t;
  30954. }
  30955. }, {
  30956. key: "decrypt",
  30957. value: function decrypt(e) {
  30958. return this.encrypt(e);
  30959. }
  30960. }]);
  30961. return pn;
  30962. }();
  30963. var fn = {
  30964. AES: an,
  30965. Counter: dn,
  30966. ModeOfOperation: {
  30967. ecb: cn,
  30968. cbc: un,
  30969. cfb: hn,
  30970. ofb: ln,
  30971. ctr: pn
  30972. },
  30973. utils: {
  30974. hex: Bt,
  30975. utf8: jt
  30976. },
  30977. padding: {
  30978. pkcs7: {
  30979. pad: function pad(e) {
  30980. var t = 16 - (e = Ft(e, !0)).length % 16,
  30981. n = qt(e.length + t);
  30982. Mt(e, n);
  30983. for (var s = e.length; s < n.length; s++) {
  30984. n[s] = t;
  30985. }
  30986. return n;
  30987. },
  30988. strip: function strip(e) {
  30989. if ((e = Ft(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  30990. var t = e[e.length - 1];
  30991. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  30992. for (var n = e.length - t, s = 0; s < t; s++) {
  30993. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  30994. }
  30995. var r = qt(n);
  30996. return Mt(e, r, 0, 0, n), r;
  30997. }
  30998. }
  30999. },
  31000. _arrayTest: {
  31001. coerceArray: Ft,
  31002. createArray: qt,
  31003. copyArray: Mt
  31004. }
  31005. };
  31006. function gn(e, t, n) {
  31007. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31008. r = fn.utils.utf8.toBytes(n),
  31009. i = fn.utils.utf8.toBytes(e),
  31010. o = new fn.ModeOfOperation.cbc(s, r),
  31011. a = fn.padding.pkcs7.pad(i),
  31012. c = o.encrypt(a);
  31013. return uni.arrayBufferToBase64(c);
  31014. }
  31015. var mn = {
  31016. code: 2e4,
  31017. message: "System error"
  31018. },
  31019. yn = {
  31020. code: 20101,
  31021. message: "Invalid client"
  31022. },
  31023. _n = {
  31024. code: 20102,
  31025. message: "Get encrypt key failed"
  31026. },
  31027. wn = {
  31028. 10001: "Secure network is not supported on current playground or unimpsdk",
  31029. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  31030. 10009: "Encrypt payload failed",
  31031. 10010: "Decrypt response failed"
  31032. };
  31033. function vn(e) {
  31034. var _ref25 = e || {},
  31035. t = _ref25.errSubject,
  31036. n = _ref25.subject,
  31037. s = _ref25.errCode,
  31038. r = _ref25.errMsg,
  31039. i = _ref25.code,
  31040. o = _ref25.message,
  31041. a = _ref25.cause;
  31042. return new ne({
  31043. subject: t || n || "uni-secure-network",
  31044. code: s || i || mn.code,
  31045. message: r || o,
  31046. cause: a
  31047. });
  31048. }
  31049. var In,
  31050. Sn,
  31051. bn = null;
  31052. var kn = /*#__PURE__*/function (_Lt) {
  31053. (0, _inherits2.default)(kn, _Lt);
  31054. var _super9 = _createSuper(kn);
  31055. function kn(e) {
  31056. var _this14;
  31057. (0, _classCallCheck2.default)(this, kn);
  31058. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  31059. return _this14;
  31060. }
  31061. (0, _createClass2.default)(kn, [{
  31062. key: "isLogin",
  31063. value: function isLogin() {
  31064. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  31065. }
  31066. }, {
  31067. key: "prepare",
  31068. value: function () {
  31069. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  31070. return _regenerator.default.wrap(function _callee38$(_context38) {
  31071. while (1) {
  31072. switch (_context38.prev = _context38.next) {
  31073. case 0:
  31074. if (this.isLogin()) {
  31075. _context38.next = 7;
  31076. break;
  31077. }
  31078. if (this.scopedGlobalCache.initPromise) {
  31079. _context38.next = 3;
  31080. break;
  31081. }
  31082. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  31083. case 3:
  31084. _context38.next = 5;
  31085. return this.scopedGlobalCache.initPromise;
  31086. case 5:
  31087. if (this.isLogin()) {
  31088. _context38.next = 7;
  31089. break;
  31090. }
  31091. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  31092. case 7:
  31093. case "end":
  31094. return _context38.stop();
  31095. }
  31096. }
  31097. }, _callee38, this);
  31098. }));
  31099. function prepare() {
  31100. return _prepare2.apply(this, arguments);
  31101. }
  31102. return prepare;
  31103. }()
  31104. }, {
  31105. key: "getUserEncryptKey",
  31106. value: function () {
  31107. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  31108. var _this15 = this;
  31109. var e;
  31110. return _regenerator.default.wrap(function _callee39$(_context39) {
  31111. while (1) {
  31112. switch (_context39.prev = _context39.next) {
  31113. case 0:
  31114. if (!this.userEncryptKey) {
  31115. _context39.next = 2;
  31116. break;
  31117. }
  31118. return _context39.abrupt("return", this.userEncryptKey);
  31119. case 2:
  31120. if (!(bn && bn.expireTime)) {
  31121. _context39.next = 6;
  31122. break;
  31123. }
  31124. e = Date.now();
  31125. if (!(bn.expireTime - e > 0)) {
  31126. _context39.next = 6;
  31127. break;
  31128. }
  31129. return _context39.abrupt("return", (this.userEncryptKey = bn, this.userEncryptKey));
  31130. case 6:
  31131. return _context39.abrupt("return", new Promise(function (e, t) {
  31132. uni.getUserCryptoManager().getLatestUserKey({
  31133. success: function success(t) {
  31134. bn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  31135. },
  31136. fail: function fail(e) {
  31137. t(vn(_objectSpread(_objectSpread({}, _n), {}, {
  31138. cause: e
  31139. })));
  31140. }
  31141. });
  31142. }));
  31143. case 7:
  31144. case "end":
  31145. return _context39.stop();
  31146. }
  31147. }
  31148. }, _callee39, this);
  31149. }));
  31150. function getUserEncryptKey() {
  31151. return _getUserEncryptKey.apply(this, arguments);
  31152. }
  31153. return getUserEncryptKey;
  31154. }()
  31155. }, {
  31156. key: "getWxAppId",
  31157. value: function getWxAppId() {
  31158. return wx.getAccountInfoSync().miniProgram.appId;
  31159. }
  31160. }, {
  31161. key: "platformGetSignOption",
  31162. value: function () {
  31163. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  31164. var _yield$this$getUserEn, e, t, n;
  31165. return _regenerator.default.wrap(function _callee40$(_context40) {
  31166. while (1) {
  31167. switch (_context40.prev = _context40.next) {
  31168. case 0:
  31169. _context40.next = 2;
  31170. return this.getUserEncryptKey();
  31171. case 2:
  31172. _yield$this$getUserEn = _context40.sent;
  31173. e = _yield$this$getUserEn.encryptKey;
  31174. t = _yield$this$getUserEn.iv;
  31175. n = _yield$this$getUserEn.version;
  31176. return _context40.abrupt("return", {
  31177. verifyClientSign: gn(JSON.stringify({
  31178. data: JSON.stringify({}),
  31179. appId: this.appId,
  31180. deviceId: this.deviceId,
  31181. wxAppId: this.getWxAppId(),
  31182. simulator: "devtools" === ce().platform,
  31183. timestamp: Date.now()
  31184. }), e, t),
  31185. encryptKeyId: n,
  31186. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31187. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31188. });
  31189. case 7:
  31190. case "end":
  31191. return _context40.stop();
  31192. }
  31193. }
  31194. }, _callee40, this);
  31195. }));
  31196. function platformGetSignOption() {
  31197. return _platformGetSignOption.apply(this, arguments);
  31198. }
  31199. return platformGetSignOption;
  31200. }()
  31201. }, {
  31202. key: "platformEncryptData",
  31203. value: function () {
  31204. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  31205. var _yield$this$getUserEn2, t, n, s, r;
  31206. return _regenerator.default.wrap(function _callee41$(_context41) {
  31207. while (1) {
  31208. switch (_context41.prev = _context41.next) {
  31209. case 0:
  31210. _context41.next = 2;
  31211. return this.getUserEncryptKey();
  31212. case 2:
  31213. _yield$this$getUserEn2 = _context41.sent;
  31214. t = _yield$this$getUserEn2.encryptKey;
  31215. n = _yield$this$getUserEn2.iv;
  31216. s = _yield$this$getUserEn2.version;
  31217. r = {
  31218. secretType: this.secretType,
  31219. encryptKeyId: s,
  31220. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  31221. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  31222. };
  31223. return _context41.abrupt("return", this.secretType === Rt ? {
  31224. content: e,
  31225. _uniCloudOptions: r
  31226. } : {
  31227. content: gn(JSON.stringify({
  31228. data: JSON.stringify(e),
  31229. appId: this.appId,
  31230. deviceId: this.deviceId,
  31231. wxAppId: this.getWxAppId(),
  31232. simulator: "devtools" === ce().platform,
  31233. timestamp: Date.now()
  31234. }), t, n),
  31235. _uniCloudOptions: r
  31236. });
  31237. case 8:
  31238. case "end":
  31239. return _context41.stop();
  31240. }
  31241. }
  31242. }, _callee41, this);
  31243. }));
  31244. function platformEncryptData(_x33) {
  31245. return _platformEncryptData.apply(this, arguments);
  31246. }
  31247. return platformEncryptData;
  31248. }()
  31249. }, {
  31250. key: "platformDecryptResult",
  31251. value: function () {
  31252. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  31253. var t, _yield$this$getUserEn3, n, s;
  31254. return _regenerator.default.wrap(function _callee42$(_context42) {
  31255. while (1) {
  31256. switch (_context42.prev = _context42.next) {
  31257. case 0:
  31258. t = e.content;
  31259. _context42.next = 3;
  31260. return this.getUserEncryptKey();
  31261. case 3:
  31262. _yield$this$getUserEn3 = _context42.sent;
  31263. n = _yield$this$getUserEn3.encryptKey;
  31264. s = _yield$this$getUserEn3.iv;
  31265. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  31266. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  31267. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  31268. i = fn.utils.utf8.toBytes(n),
  31269. o = new fn.ModeOfOperation.cbc(r, i),
  31270. a = fn.padding.pkcs7.strip(o.decrypt(s));
  31271. return fn.utils.utf8.fromBytes(a);
  31272. }(t, n, s)));
  31273. case 7:
  31274. case "end":
  31275. return _context42.stop();
  31276. }
  31277. }
  31278. }, _callee42, this);
  31279. }));
  31280. function platformDecryptResult(_x34) {
  31281. return _platformDecryptResult.apply(this, arguments);
  31282. }
  31283. return platformDecryptResult;
  31284. }()
  31285. }, {
  31286. key: "isClientKeyNotFound",
  31287. value: function isClientKeyNotFound() {
  31288. return !1;
  31289. }
  31290. }]);
  31291. return kn;
  31292. }(Lt);
  31293. function Cn(e) {
  31294. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  31295. n = {};
  31296. var _loop = function _loop(_s10) {
  31297. var r = t[_s10];
  31298. n[r] = function () {
  31299. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  31300. t[_key] = arguments[_key];
  31301. }
  31302. return new Promise(function (n, s) {
  31303. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  31304. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31305. e = _ref26.type,
  31306. t = _ref26.data,
  31307. r = _ref26.errCode,
  31308. i = _ref26.errMsg,
  31309. o = _ref26.errSubject,
  31310. a = _ref26.message;
  31311. "success" === e ? n(t) : s(vn({
  31312. errCode: r,
  31313. errMsg: wn[r] || i || a,
  31314. errSubject: o
  31315. }));
  31316. }])) : s(vn({
  31317. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  31318. }));
  31319. });
  31320. };
  31321. };
  31322. for (var _s10 = 0; _s10 < t.length; _s10++) {
  31323. _loop(_s10);
  31324. }
  31325. return n;
  31326. }
  31327. var Tn = /*#__PURE__*/function (_Lt2) {
  31328. (0, _inherits2.default)(Tn, _Lt2);
  31329. var _super10 = _createSuper(Tn);
  31330. function Tn(e) {
  31331. var _this16;
  31332. (0, _classCallCheck2.default)(this, Tn);
  31333. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ce());
  31334. return _this16;
  31335. }
  31336. (0, _createClass2.default)(Tn, [{
  31337. key: "hasClientKey",
  31338. value: function () {
  31339. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  31340. return _regenerator.default.wrap(function _callee43$(_context43) {
  31341. while (1) {
  31342. switch (_context43.prev = _context43.next) {
  31343. case 0:
  31344. _context43.next = 2;
  31345. return this.appUtils.hasClientKey({
  31346. provider: this.provider,
  31347. spaceId: this.spaceId
  31348. });
  31349. case 2:
  31350. this._hasClientKey = _context43.sent;
  31351. return _context43.abrupt("return", this._hasClientKey);
  31352. case 4:
  31353. case "end":
  31354. return _context43.stop();
  31355. }
  31356. }
  31357. }, _callee43, this);
  31358. }));
  31359. function hasClientKey() {
  31360. return _hasClientKey.apply(this, arguments);
  31361. }
  31362. return hasClientKey;
  31363. }()
  31364. }, {
  31365. key: "getAppClientKey",
  31366. value: function () {
  31367. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  31368. var _yield$this$appUtils$, e, t, n, s, r;
  31369. return _regenerator.default.wrap(function _callee44$(_context44) {
  31370. while (1) {
  31371. switch (_context44.prev = _context44.next) {
  31372. case 0:
  31373. _context44.next = 2;
  31374. return this.appUtils.encryptGetClientKeyPayload({
  31375. data: JSON.stringify({})
  31376. });
  31377. case 2:
  31378. _yield$this$appUtils$ = _context44.sent;
  31379. e = _yield$this$appUtils$.data;
  31380. t = _yield$this$appUtils$.key;
  31381. _context44.next = 7;
  31382. return this.uniCloudIns.callFunction({
  31383. name: "DCloud-clientDB",
  31384. data: {
  31385. redirectTo: "encryption",
  31386. action: "getAppClientKey",
  31387. data: e,
  31388. key: t
  31389. }
  31390. });
  31391. case 7:
  31392. _context44.t0 = _context44.sent.result;
  31393. if (_context44.t0) {
  31394. _context44.next = 10;
  31395. break;
  31396. }
  31397. _context44.t0 = {};
  31398. case 10:
  31399. n = _context44.t0;
  31400. if (!(0 !== n.errCode)) {
  31401. _context44.next = 13;
  31402. break;
  31403. }
  31404. throw function (e) {
  31405. return new ne({
  31406. subject: e.errSubject || "uni-secure-network",
  31407. code: e.errCode || e.code || mn.code,
  31408. message: e.errMsg || e.message
  31409. });
  31410. }(n);
  31411. case 13:
  31412. s = n.clientKey, r = n.key;
  31413. _context44.next = 16;
  31414. return this.appUtils.setClientKey({
  31415. provider: this.provider,
  31416. spaceId: this.spaceId,
  31417. clientKey: s,
  31418. key: r
  31419. });
  31420. case 16:
  31421. case "end":
  31422. return _context44.stop();
  31423. }
  31424. }
  31425. }, _callee44, this);
  31426. }));
  31427. function getAppClientKey() {
  31428. return _getAppClientKey.apply(this, arguments);
  31429. }
  31430. return getAppClientKey;
  31431. }()
  31432. }, {
  31433. key: "ensureClientKey",
  31434. value: function () {
  31435. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  31436. var _this17 = this;
  31437. var _ref27,
  31438. _ref27$forceUpdate,
  31439. e,
  31440. _args45 = arguments;
  31441. return _regenerator.default.wrap(function _callee45$(_context45) {
  31442. while (1) {
  31443. switch (_context45.prev = _context45.next) {
  31444. case 0:
  31445. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  31446. _context45.t1 = !0;
  31447. _context45.next = 4;
  31448. return this.hasClientKey();
  31449. case 4:
  31450. _context45.t2 = _context45.sent;
  31451. _context45.t0 = _context45.t1 !== _context45.t2;
  31452. if (_context45.t0) {
  31453. _context45.next = 8;
  31454. break;
  31455. }
  31456. _context45.t0 = e;
  31457. case 8:
  31458. if (!_context45.t0) {
  31459. _context45.next = 10;
  31460. break;
  31461. }
  31462. 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) {
  31463. _this17.scopedGlobalCache.initStatus = p;
  31464. }).catch(function (e) {
  31465. throw _this17.scopedGlobalCache.initStatus = f, e;
  31466. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  31467. case 10:
  31468. case "end":
  31469. return _context45.stop();
  31470. }
  31471. }
  31472. }, _callee45, this);
  31473. }));
  31474. function ensureClientKey() {
  31475. return _ensureClientKey.apply(this, arguments);
  31476. }
  31477. return ensureClientKey;
  31478. }()
  31479. }, {
  31480. key: "prepare",
  31481. value: function () {
  31482. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  31483. var _ref28,
  31484. _ref28$forceUpdate,
  31485. e,
  31486. _args46 = arguments;
  31487. return _regenerator.default.wrap(function _callee46$(_context46) {
  31488. while (1) {
  31489. switch (_context46.prev = _context46.next) {
  31490. case 0:
  31491. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  31492. _context46.next = 3;
  31493. return this.ensureClientKey({
  31494. forceUpdate: e
  31495. });
  31496. case 3:
  31497. case "end":
  31498. return _context46.stop();
  31499. }
  31500. }
  31501. }, _callee46, this);
  31502. }));
  31503. function prepare() {
  31504. return _prepare3.apply(this, arguments);
  31505. }
  31506. return prepare;
  31507. }()
  31508. }, {
  31509. key: "platformGetSignOption",
  31510. value: function () {
  31511. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  31512. var _yield$this$appUtils$2, e, t;
  31513. return _regenerator.default.wrap(function _callee47$(_context47) {
  31514. while (1) {
  31515. switch (_context47.prev = _context47.next) {
  31516. case 0:
  31517. _context47.next = 2;
  31518. return this.appUtils.encrypt({
  31519. provider: this.provider,
  31520. spaceId: this.spaceId,
  31521. data: JSON.stringify({})
  31522. });
  31523. case 2:
  31524. _yield$this$appUtils$2 = _context47.sent;
  31525. e = _yield$this$appUtils$2.data;
  31526. t = _yield$this$appUtils$2.key;
  31527. return _context47.abrupt("return", {
  31528. verifyClientSign: e,
  31529. encryptKeyId: t
  31530. });
  31531. case 6:
  31532. case "end":
  31533. return _context47.stop();
  31534. }
  31535. }
  31536. }, _callee47, this);
  31537. }));
  31538. function platformGetSignOption() {
  31539. return _platformGetSignOption2.apply(this, arguments);
  31540. }
  31541. return platformGetSignOption;
  31542. }()
  31543. }, {
  31544. key: "platformEncryptData",
  31545. value: function () {
  31546. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  31547. var _yield$this$appUtils$3, t, n, s;
  31548. return _regenerator.default.wrap(function _callee48$(_context48) {
  31549. while (1) {
  31550. switch (_context48.prev = _context48.next) {
  31551. case 0:
  31552. _context48.next = 2;
  31553. return this.appUtils.encrypt({
  31554. provider: this.provider,
  31555. spaceId: this.spaceId,
  31556. data: JSON.stringify(e)
  31557. });
  31558. case 2:
  31559. _yield$this$appUtils$3 = _context48.sent;
  31560. t = _yield$this$appUtils$3.data;
  31561. n = _yield$this$appUtils$3.key;
  31562. s = {
  31563. secretType: this.secretType,
  31564. encryptKeyId: n
  31565. };
  31566. return _context48.abrupt("return", this.secretType === Rt ? {
  31567. content: e,
  31568. _uniCloudOptions: s
  31569. } : {
  31570. content: t,
  31571. _uniCloudOptions: s
  31572. });
  31573. case 7:
  31574. case "end":
  31575. return _context48.stop();
  31576. }
  31577. }
  31578. }, _callee48, this);
  31579. }));
  31580. function platformEncryptData(_x35) {
  31581. return _platformEncryptData2.apply(this, arguments);
  31582. }
  31583. return platformEncryptData;
  31584. }()
  31585. }, {
  31586. key: "platformDecryptResult",
  31587. value: function () {
  31588. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  31589. var t, _e$_uniCloudOptions, n, s, r;
  31590. return _regenerator.default.wrap(function _callee49$(_context49) {
  31591. while (1) {
  31592. switch (_context49.prev = _context49.next) {
  31593. case 0:
  31594. t = e.content;
  31595. _e$_uniCloudOptions = e._uniCloudOptions;
  31596. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  31597. s = n.encryptKeyId;
  31598. _context49.next = 6;
  31599. return this.appUtils.decrypt({
  31600. provider: this.provider,
  31601. spaceId: this.spaceId,
  31602. data: t,
  31603. key: s
  31604. });
  31605. case 6:
  31606. r = _context49.sent;
  31607. return _context49.abrupt("return", JSON.parse(r.data));
  31608. case 8:
  31609. case "end":
  31610. return _context49.stop();
  31611. }
  31612. }
  31613. }, _callee49, this);
  31614. }));
  31615. function platformDecryptResult(_x36) {
  31616. return _platformDecryptResult2.apply(this, arguments);
  31617. }
  31618. return platformDecryptResult;
  31619. }()
  31620. }, {
  31621. key: "isClientKeyNotFound",
  31622. value: function isClientKeyNotFound() {
  31623. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31624. var t = e.result || {};
  31625. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  31626. }
  31627. }]);
  31628. return Tn;
  31629. }(Lt);
  31630. function Pn() {
  31631. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31632. e = _ref29.secretType;
  31633. return e === xt || e === Rt || e === Ut;
  31634. }
  31635. function An() {
  31636. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31637. e = _ref30.name,
  31638. _ref30$data = _ref30.data,
  31639. t = _ref30$data === void 0 ? {} : _ref30$data;
  31640. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  31641. }
  31642. function En() {
  31643. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31644. e = _ref31.provider,
  31645. t = _ref31.spaceId,
  31646. n = _ref31.functionName;
  31647. var _ce = ce(),
  31648. s = _ce.appId,
  31649. r = _ce.uniPlatform,
  31650. i = _ce.osName;
  31651. var o = r;
  31652. "app" === r && (o = i);
  31653. var a = function () {
  31654. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31655. e = _ref32.provider,
  31656. t = _ref32.spaceId;
  31657. var n = T;
  31658. if (!n) return {};
  31659. e = function (e) {
  31660. return "tencent" === e ? "tcb" : e;
  31661. }(e);
  31662. var s = n.find(function (n) {
  31663. return n.provider === e && n.spaceId === t;
  31664. });
  31665. return s && s.config;
  31666. }({
  31667. provider: e,
  31668. spaceId: t
  31669. });
  31670. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  31671. var c = a.accessControl.function || {},
  31672. u = Object.keys(c);
  31673. if (0 === u.length) return !0;
  31674. var h = function (e, t) {
  31675. var n, s, r;
  31676. for (var _i2 = 0; _i2 < e.length; _i2++) {
  31677. var _o2 = e[_i2];
  31678. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  31679. return e.trim();
  31680. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  31681. }
  31682. return n || s || r;
  31683. }(u, n);
  31684. if (!h) return !1;
  31685. if ((c[h] || []).find(function () {
  31686. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  31687. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  31688. })) return !0;
  31689. 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);
  31690. }
  31691. function On(_ref33) {
  31692. var e = _ref33.functionName,
  31693. t = _ref33.result,
  31694. n = _ref33.logPvd;
  31695. if (b && this.__dev__.debugLog && t && t.requestId) {
  31696. var _s11 = JSON.stringify({
  31697. spaceId: this.config.spaceId,
  31698. functionName: e,
  31699. requestId: t.requestId
  31700. });
  31701. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  31702. }
  31703. }
  31704. function xn(e) {
  31705. var t = e.callFunction,
  31706. n = function n(_n7) {
  31707. var _this18 = this;
  31708. var s = _n7.name;
  31709. _n7.data = kt.call(e, {
  31710. data: _n7.data
  31711. });
  31712. var r = {
  31713. aliyun: "aliyun",
  31714. tencent: "tcb",
  31715. tcb: "tcb"
  31716. }[this.config.provider],
  31717. i = Pn(_n7),
  31718. o = An(_n7),
  31719. a = i || o;
  31720. return t.call(this, _n7).then(function (e) {
  31721. return e.errCode = 0, !a && On.call(_this18, {
  31722. functionName: s,
  31723. result: e,
  31724. logPvd: r
  31725. }), Promise.resolve(e);
  31726. }, function (e) {
  31727. return !a && On.call(_this18, {
  31728. functionName: s,
  31729. result: e,
  31730. logPvd: r
  31731. }), e && e.message && (e.message = function () {
  31732. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  31733. _ref34$message = _ref34.message,
  31734. e = _ref34$message === void 0 ? "" : _ref34$message,
  31735. _ref34$extraInfo = _ref34.extraInfo,
  31736. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  31737. _ref34$formatter = _ref34.formatter,
  31738. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  31739. for (var _s12 = 0; _s12 < n.length; _s12++) {
  31740. var _n$_s = n[_s12],
  31741. _r4 = _n$_s.rule,
  31742. _i3 = _n$_s.content,
  31743. _o3 = _n$_s.mode,
  31744. _a = e.match(_r4);
  31745. if (!_a) continue;
  31746. var _c = _i3;
  31747. for (var _e20 = 1; _e20 < _a.length; _e20++) {
  31748. _c = Et(_c, "{$".concat(_e20, "}"), _a[_e20]);
  31749. }
  31750. for (var _e21 in t) {
  31751. _c = Et(_c, "{".concat(_e21, "}"), t[_e21]);
  31752. }
  31753. return "replace" === _o3 ? _c : e + _c;
  31754. }
  31755. return e;
  31756. }({
  31757. message: "[".concat(_n7.name, "]: ").concat(e.message),
  31758. formatter: Tt,
  31759. extraInfo: {
  31760. functionName: s
  31761. }
  31762. })), Promise.reject(e);
  31763. });
  31764. };
  31765. e.callFunction = function (t) {
  31766. var _e$config = e.config,
  31767. s = _e$config.provider,
  31768. r = _e$config.spaceId,
  31769. i = t.name;
  31770. var o, a;
  31771. 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) {
  31772. var e = _ref35.name,
  31773. _ref35$data = _ref35.data,
  31774. t = _ref35$data === void 0 ? {} : _ref35$data;
  31775. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  31776. }(t)) a = o.call(e, t);else if (Pn(t)) {
  31777. a = new Sn({
  31778. secretType: t.secretType,
  31779. uniCloudIns: e
  31780. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  31781. } else if (En({
  31782. provider: s,
  31783. spaceId: r,
  31784. functionName: i
  31785. })) {
  31786. a = new Sn({
  31787. secretType: t.secretType,
  31788. uniCloudIns: e
  31789. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  31790. } else a = o(t);
  31791. return Object.defineProperty(a, "result", {
  31792. get: function get() {
  31793. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  31794. }
  31795. }), a;
  31796. };
  31797. }
  31798. Sn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  31799. function _class2() {
  31800. (0, _classCallCheck2.default)(this, _class2);
  31801. throw vn({
  31802. message: "Platform ".concat(P, " is not supported by secure network")
  31803. });
  31804. }
  31805. return (0, _createClass2.default)(_class2);
  31806. }() : C ? "mp-weixin" === P ? kn : Tn : /*#__PURE__*/function () {
  31807. function _class3() {
  31808. (0, _classCallCheck2.default)(this, _class3);
  31809. throw vn({
  31810. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  31811. });
  31812. }
  31813. return (0, _createClass2.default)(_class3);
  31814. }();
  31815. var Rn = Symbol("CLIENT_DB_INTERNAL");
  31816. function Un(e, t) {
  31817. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Rn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  31818. get: function get(e, n, s) {
  31819. if ("_uniClient" === n) return null;
  31820. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  31821. if (n in e || "string" != typeof n) {
  31822. var _t10 = e[n];
  31823. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  31824. }
  31825. return t.get(e, n, s);
  31826. }
  31827. });
  31828. }
  31829. function Ln(e) {
  31830. return {
  31831. on: function on(t, n) {
  31832. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  31833. },
  31834. off: function off(t, n) {
  31835. e[t] = e[t] || [];
  31836. var s = e[t].indexOf(n);
  31837. -1 !== s && e[t].splice(s, 1);
  31838. }
  31839. };
  31840. }
  31841. var Nn = ["db.Geo", "db.command", "command.aggregate"];
  31842. function Dn(e, t) {
  31843. return Nn.indexOf("".concat(e, ".").concat(t)) > -1;
  31844. }
  31845. function Fn(e) {
  31846. switch (g(e)) {
  31847. case "array":
  31848. return e.map(function (e) {
  31849. return Fn(e);
  31850. });
  31851. case "object":
  31852. return e._internalType === Rn || Object.keys(e).forEach(function (t) {
  31853. e[t] = Fn(e[t]);
  31854. }), e;
  31855. case "regexp":
  31856. return {
  31857. $regexp: {
  31858. source: e.source,
  31859. flags: e.flags
  31860. }
  31861. };
  31862. case "date":
  31863. return {
  31864. $date: e.toISOString()
  31865. };
  31866. default:
  31867. return e;
  31868. }
  31869. }
  31870. function qn(e) {
  31871. return e && e.content && e.content.$method;
  31872. }
  31873. var Mn = /*#__PURE__*/function () {
  31874. function Mn(e, t, n) {
  31875. (0, _classCallCheck2.default)(this, Mn);
  31876. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  31877. }
  31878. (0, _createClass2.default)(Mn, [{
  31879. key: "toJSON",
  31880. value: function toJSON() {
  31881. var e = this;
  31882. var t = [e.content];
  31883. for (; e.prevStage;) {
  31884. e = e.prevStage, t.push(e.content);
  31885. }
  31886. return {
  31887. $db: t.reverse().map(function (e) {
  31888. return {
  31889. $method: e.$method,
  31890. $param: Fn(e.$param)
  31891. };
  31892. })
  31893. };
  31894. }
  31895. }, {
  31896. key: "toString",
  31897. value: function toString() {
  31898. return JSON.stringify(this.toJSON());
  31899. }
  31900. }, {
  31901. key: "getAction",
  31902. value: function getAction() {
  31903. var e = this.toJSON().$db.find(function (e) {
  31904. return "action" === e.$method;
  31905. });
  31906. return e && e.$param && e.$param[0];
  31907. }
  31908. }, {
  31909. key: "getCommand",
  31910. value: function getCommand() {
  31911. return {
  31912. $db: this.toJSON().$db.filter(function (e) {
  31913. return "action" !== e.$method;
  31914. })
  31915. };
  31916. }
  31917. }, {
  31918. key: "isAggregate",
  31919. get: function get() {
  31920. var e = this;
  31921. for (; e;) {
  31922. var t = qn(e),
  31923. _n8 = qn(e.prevStage);
  31924. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  31925. e = e.prevStage;
  31926. }
  31927. return !1;
  31928. }
  31929. }, {
  31930. key: "isCommand",
  31931. get: function get() {
  31932. var e = this;
  31933. for (; e;) {
  31934. if ("command" === qn(e)) return !0;
  31935. e = e.prevStage;
  31936. }
  31937. return !1;
  31938. }
  31939. }, {
  31940. key: "isAggregateCommand",
  31941. get: function get() {
  31942. var e = this;
  31943. for (; e;) {
  31944. var t = qn(e),
  31945. _n9 = qn(e.prevStage);
  31946. if ("aggregate" === t && "command" === _n9) return !0;
  31947. e = e.prevStage;
  31948. }
  31949. return !1;
  31950. }
  31951. }, {
  31952. key: "getNextStageFn",
  31953. value: function getNextStageFn(e) {
  31954. var t = this;
  31955. return function () {
  31956. return Kn({
  31957. $method: e,
  31958. $param: Fn(Array.from(arguments))
  31959. }, t, t._database);
  31960. };
  31961. }
  31962. }, {
  31963. key: "count",
  31964. get: function get() {
  31965. return this.isAggregate ? this.getNextStageFn("count") : function () {
  31966. return this._send("count", Array.from(arguments));
  31967. };
  31968. }
  31969. }, {
  31970. key: "remove",
  31971. get: function get() {
  31972. return this.isCommand ? this.getNextStageFn("remove") : function () {
  31973. return this._send("remove", Array.from(arguments));
  31974. };
  31975. }
  31976. }, {
  31977. key: "get",
  31978. value: function get() {
  31979. return this._send("get", Array.from(arguments));
  31980. }
  31981. }, {
  31982. key: "add",
  31983. get: function get() {
  31984. return this.isCommand ? this.getNextStageFn("add") : function () {
  31985. return this._send("add", Array.from(arguments));
  31986. };
  31987. }
  31988. }, {
  31989. key: "update",
  31990. value: function update() {
  31991. return this._send("update", Array.from(arguments));
  31992. }
  31993. }, {
  31994. key: "end",
  31995. value: function end() {
  31996. return this._send("end", Array.from(arguments));
  31997. }
  31998. }, {
  31999. key: "set",
  32000. get: function get() {
  32001. return this.isCommand ? this.getNextStageFn("set") : function () {
  32002. throw new Error("JQL禁止使用set方法");
  32003. };
  32004. }
  32005. }, {
  32006. key: "_send",
  32007. value: function _send(e, t) {
  32008. var n = this.getAction(),
  32009. s = this.getCommand();
  32010. if (s.$db.push({
  32011. $method: e,
  32012. $param: Fn(t)
  32013. }), b) {
  32014. var _e22 = s.$db.find(function (e) {
  32015. return "collection" === e.$method;
  32016. }),
  32017. _t11 = _e22 && _e22.$param;
  32018. _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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  32019. }
  32020. return this._database._callCloudFunction({
  32021. action: n,
  32022. command: s
  32023. });
  32024. }
  32025. }]);
  32026. return Mn;
  32027. }();
  32028. function Kn(e, t, n) {
  32029. return Un(new Mn(e, t, n), {
  32030. get: function get(e, t) {
  32031. var s = "db";
  32032. return e && e.content && (s = e.content.$method), Dn(s, t) ? Kn({
  32033. $method: t
  32034. }, e, n) : function () {
  32035. return Kn({
  32036. $method: t,
  32037. $param: Fn(Array.from(arguments))
  32038. }, e, n);
  32039. };
  32040. }
  32041. });
  32042. }
  32043. function jn(_ref36) {
  32044. var e = _ref36.path,
  32045. t = _ref36.method;
  32046. return /*#__PURE__*/function () {
  32047. function _class4() {
  32048. (0, _classCallCheck2.default)(this, _class4);
  32049. this.param = Array.from(arguments);
  32050. }
  32051. (0, _createClass2.default)(_class4, [{
  32052. key: "toJSON",
  32053. value: function toJSON() {
  32054. return {
  32055. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  32056. return {
  32057. $method: e
  32058. };
  32059. })), [{
  32060. $method: t,
  32061. $param: this.param
  32062. }])
  32063. };
  32064. }
  32065. }, {
  32066. key: "toString",
  32067. value: function toString() {
  32068. return JSON.stringify(this.toJSON());
  32069. }
  32070. }]);
  32071. return _class4;
  32072. }();
  32073. }
  32074. function Bn(e) {
  32075. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32076. return Un(new e(t), {
  32077. get: function get(e, t) {
  32078. return Dn("db", t) ? Kn({
  32079. $method: t
  32080. }, null, e) : function () {
  32081. return Kn({
  32082. $method: t,
  32083. $param: Fn(Array.from(arguments))
  32084. }, null, e);
  32085. };
  32086. }
  32087. });
  32088. }
  32089. var $n = /*#__PURE__*/function (_ref37) {
  32090. (0, _inherits2.default)($n, _ref37);
  32091. var _super11 = _createSuper($n);
  32092. function $n() {
  32093. (0, _classCallCheck2.default)(this, $n);
  32094. return _super11.apply(this, arguments);
  32095. }
  32096. (0, _createClass2.default)($n, [{
  32097. key: "_parseResult",
  32098. value: function _parseResult(e) {
  32099. return this._isJQL ? e.result : e;
  32100. }
  32101. }, {
  32102. key: "_callCloudFunction",
  32103. value: function _callCloudFunction(_ref38) {
  32104. var _this19 = this;
  32105. var e = _ref38.action,
  32106. t = _ref38.command,
  32107. n = _ref38.multiCommand,
  32108. s = _ref38.queryList;
  32109. function r(e, t) {
  32110. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  32111. var _r5 = s[_n10];
  32112. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  32113. }
  32114. }
  32115. var i = this,
  32116. o = this._isJQL ? "databaseForJQL" : "database";
  32117. function a(e) {
  32118. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  32119. return q(M(o, "complete"), e);
  32120. }).then(function () {
  32121. return r(null, e), Q(B, {
  32122. type: z,
  32123. content: e
  32124. }), Promise.reject(e);
  32125. });
  32126. }
  32127. var c = q(M(o, "invoke")),
  32128. u = this._uniClient;
  32129. return c.then(function () {
  32130. return u.callFunction({
  32131. name: "DCloud-clientDB",
  32132. type: l,
  32133. data: {
  32134. action: e,
  32135. command: t,
  32136. multiCommand: n
  32137. }
  32138. });
  32139. }).then(function (e) {
  32140. var _e$result = e.result,
  32141. t = _e$result.code,
  32142. n = _e$result.message,
  32143. s = _e$result.token,
  32144. c = _e$result.tokenExpired,
  32145. _e$result$systemInfo = _e$result.systemInfo,
  32146. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  32147. if (u) for (var _e23 = 0; _e23 < u.length; _e23++) {
  32148. var _u$_e = u[_e23],
  32149. _t12 = _u$_e.level,
  32150. _n11 = _u$_e.message,
  32151. _s13 = _u$_e.detail,
  32152. _r6 = console["app" === P && "warn" === _t12 ? "error" : _t12] || console.log;
  32153. var _i4 = "[System Info]" + _n11;
  32154. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  32155. }
  32156. if (t) {
  32157. return a(new ne({
  32158. code: t,
  32159. message: n,
  32160. requestId: e.requestId
  32161. }));
  32162. }
  32163. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (ie({
  32164. token: s,
  32165. tokenExpired: c
  32166. }), _this19._callbackAuth("refreshToken", [{
  32167. token: s,
  32168. tokenExpired: c
  32169. }]), _this19._callback("refreshToken", [{
  32170. token: s,
  32171. tokenExpired: c
  32172. }]), Q(W, {
  32173. token: s,
  32174. tokenExpired: c
  32175. }));
  32176. var h = [{
  32177. prop: "affectedDocs",
  32178. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  32179. }, {
  32180. prop: "code",
  32181. tips: "code不再推荐使用,请使用errCode替代"
  32182. }, {
  32183. prop: "message",
  32184. tips: "message不再推荐使用,请使用errMsg替代"
  32185. }];
  32186. var _loop2 = function _loop2(_t13) {
  32187. var _h$_t = h[_t13],
  32188. n = _h$_t.prop,
  32189. s = _h$_t.tips;
  32190. if (n in e.result) {
  32191. var _t14 = e.result[n];
  32192. Object.defineProperty(e.result, n, {
  32193. get: function get() {
  32194. return console.warn(s), _t14;
  32195. }
  32196. });
  32197. }
  32198. };
  32199. for (var _t13 = 0; _t13 < h.length; _t13++) {
  32200. _loop2(_t13);
  32201. }
  32202. return function (e) {
  32203. return q(M(o, "success"), e).then(function () {
  32204. return q(M(o, "complete"), e);
  32205. }).then(function () {
  32206. r(e, null);
  32207. var t = i._parseResult(e);
  32208. return Q(B, {
  32209. type: z,
  32210. content: t
  32211. }), Promise.resolve(t);
  32212. });
  32213. }(e);
  32214. }, function (e) {
  32215. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  32216. return a(new ne({
  32217. code: e.code || "SYSTEM_ERROR",
  32218. message: e.message,
  32219. requestId: e.requestId
  32220. }));
  32221. });
  32222. }
  32223. }]);
  32224. return $n;
  32225. }( /*#__PURE__*/function () {
  32226. function _class5() {
  32227. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32228. _ref39$uniClient = _ref39.uniClient,
  32229. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  32230. _ref39$isJQL = _ref39.isJQL,
  32231. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  32232. (0, _classCallCheck2.default)(this, _class5);
  32233. 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({}, {
  32234. get: function get(e, t) {
  32235. return {
  32236. $env: t
  32237. };
  32238. }
  32239. }), this.Geo = Un({}, {
  32240. get: function get(e, t) {
  32241. return jn({
  32242. path: ["Geo"],
  32243. method: t
  32244. });
  32245. }
  32246. }), this.serverDate = jn({
  32247. path: [],
  32248. method: "serverDate"
  32249. }), this.RegExp = jn({
  32250. path: [],
  32251. method: "RegExp"
  32252. });
  32253. }
  32254. (0, _createClass2.default)(_class5, [{
  32255. key: "getCloudEnv",
  32256. value: function getCloudEnv(e) {
  32257. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  32258. return {
  32259. $env: e.replace("$cloudEnv_", "")
  32260. };
  32261. }
  32262. }, {
  32263. key: "_callback",
  32264. value: function _callback(e, t) {
  32265. var n = this._dbCallBacks;
  32266. n[e] && n[e].forEach(function (e) {
  32267. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32268. });
  32269. }
  32270. }, {
  32271. key: "_callbackAuth",
  32272. value: function _callbackAuth(e, t) {
  32273. var n = this._authCallBacks;
  32274. n[e] && n[e].forEach(function (e) {
  32275. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  32276. });
  32277. }
  32278. }, {
  32279. key: "multiSend",
  32280. value: function multiSend() {
  32281. var e = Array.from(arguments),
  32282. t = e.map(function (e) {
  32283. var t = e.getAction(),
  32284. n = e.getCommand();
  32285. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  32286. return {
  32287. action: t,
  32288. command: n
  32289. };
  32290. });
  32291. return this._callCloudFunction({
  32292. multiCommand: t,
  32293. queryList: e
  32294. });
  32295. }
  32296. }]);
  32297. return _class5;
  32298. }());
  32299. var Wn = "token无效,跳转登录页面",
  32300. zn = "token过期,跳转登录页面",
  32301. Jn = {
  32302. TOKEN_INVALID_TOKEN_EXPIRED: zn,
  32303. TOKEN_INVALID_INVALID_CLIENTID: Wn,
  32304. TOKEN_INVALID: Wn,
  32305. TOKEN_INVALID_WRONG_TOKEN: Wn,
  32306. TOKEN_INVALID_ANONYMOUS_USER: Wn
  32307. },
  32308. Hn = {
  32309. "uni-id-token-expired": zn,
  32310. "uni-id-check-token-failed": Wn,
  32311. "uni-id-token-not-exist": Wn,
  32312. "uni-id-check-device-feature-failed": Wn
  32313. };
  32314. function Gn(e, t) {
  32315. var n = "";
  32316. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  32317. }
  32318. function Vn() {
  32319. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32320. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  32321. var n = [],
  32322. s = [];
  32323. return e.forEach(function (e) {
  32324. !0 === e.needLogin ? n.push(Gn(t, e.path)) : !1 === e.needLogin && s.push(Gn(t, e.path));
  32325. }), {
  32326. needLoginPage: n,
  32327. notNeedLoginPage: s
  32328. };
  32329. }
  32330. function Yn(e) {
  32331. return e.split("?")[0].replace(/^\//, "");
  32332. }
  32333. function Qn() {
  32334. return function (e) {
  32335. var t = e && e.$page && e.$page.fullPath || "";
  32336. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  32337. }(function () {
  32338. var e = getCurrentPages();
  32339. return e[e.length - 1];
  32340. }());
  32341. }
  32342. function Xn() {
  32343. return Yn(Qn());
  32344. }
  32345. function Zn() {
  32346. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  32347. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32348. if (!e) return !1;
  32349. if (!(t && t.list && t.list.length)) return !1;
  32350. var n = t.list,
  32351. s = Yn(e);
  32352. return n.some(function (e) {
  32353. return e.pagePath === s;
  32354. });
  32355. }
  32356. var es = !!_pages.default.uniIdRouter;
  32357. var _ref40 = function () {
  32358. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  32359. _ref21$pages = _ref21.pages,
  32360. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  32361. _ref21$subPackages = _ref21.subPackages,
  32362. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  32363. _ref21$uniIdRouter = _ref21.uniIdRouter,
  32364. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  32365. _ref21$tabBar = _ref21.tabBar,
  32366. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  32367. var i = s.loginPage,
  32368. _s$needLogin = s.needLogin,
  32369. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  32370. _s$resToLogin = s.resToLogin,
  32371. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  32372. _Vn = Vn(e),
  32373. c = _Vn.needLoginPage,
  32374. u = _Vn.notNeedLoginPage,
  32375. _ref23 = function () {
  32376. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32377. var t = [],
  32378. n = [];
  32379. return e.forEach(function (e) {
  32380. var s = e.root,
  32381. _e$pages = e.pages,
  32382. r = _e$pages === void 0 ? [] : _e$pages,
  32383. _Vn2 = Vn(r, s),
  32384. i = _Vn2.needLoginPage,
  32385. o = _Vn2.notNeedLoginPage;
  32386. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  32387. }), {
  32388. needLoginPage: t,
  32389. notNeedLoginPage: n
  32390. };
  32391. }(n),
  32392. h = _ref23.needLoginPage,
  32393. l = _ref23.notNeedLoginPage;
  32394. return {
  32395. loginPage: i,
  32396. routerNeedLogin: o,
  32397. resToLogin: a,
  32398. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  32399. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  32400. loginPageInTabBar: Zn(i, r)
  32401. };
  32402. }(),
  32403. ts = _ref40.loginPage,
  32404. ns = _ref40.routerNeedLogin,
  32405. ss = _ref40.resToLogin,
  32406. rs = _ref40.needLoginPage,
  32407. is = _ref40.notNeedLoginPage,
  32408. os = _ref40.loginPageInTabBar;
  32409. if (rs.indexOf(ts) > -1) throw new Error("Login page [".concat(ts, "] should not be \"needLogin\", please check your pages.json"));
  32410. function as(e) {
  32411. var t = Xn();
  32412. if ("/" === e.charAt(0)) return e;
  32413. var _e$split = e.split("?"),
  32414. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  32415. n = _e$split2[0],
  32416. s = _e$split2[1],
  32417. r = n.replace(/^\//, "").split("/"),
  32418. i = t.split("/");
  32419. i.pop();
  32420. for (var _e24 = 0; _e24 < r.length; _e24++) {
  32421. var _t15 = r[_e24];
  32422. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  32423. }
  32424. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  32425. }
  32426. function cs(e) {
  32427. var t = Yn(as(e));
  32428. return !(is.indexOf(t) > -1) && (rs.indexOf(t) > -1 || ns.some(function (t) {
  32429. return function (e, t) {
  32430. return new RegExp(t).test(e);
  32431. }(e, t);
  32432. }));
  32433. }
  32434. function us(_ref41) {
  32435. var e = _ref41.redirect;
  32436. var t = Yn(e),
  32437. n = Yn(ts);
  32438. return Xn() !== n && t !== n;
  32439. }
  32440. function hs() {
  32441. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32442. e = _ref42.api,
  32443. t = _ref42.redirect;
  32444. if (!t || !us({
  32445. redirect: t
  32446. })) return;
  32447. var n = function (e, t) {
  32448. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  32449. }(ts, t);
  32450. os ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  32451. var s = {
  32452. navigateTo: uni.navigateTo,
  32453. redirectTo: uni.redirectTo,
  32454. switchTab: uni.switchTab,
  32455. reLaunch: uni.reLaunch
  32456. };
  32457. setTimeout(function () {
  32458. s[e]({
  32459. url: n
  32460. });
  32461. });
  32462. }
  32463. function ls() {
  32464. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32465. e = _ref43.url;
  32466. var t = {
  32467. abortLoginPageJump: !1,
  32468. autoToLoginPage: !1
  32469. },
  32470. n = function () {
  32471. var _re3 = re(),
  32472. e = _re3.token,
  32473. t = _re3.tokenExpired;
  32474. var n;
  32475. if (e) {
  32476. if (t < Date.now()) {
  32477. var _e25 = "uni-id-token-expired";
  32478. n = {
  32479. errCode: _e25,
  32480. errMsg: Hn[_e25]
  32481. };
  32482. }
  32483. } else {
  32484. var _e26 = "uni-id-check-token-failed";
  32485. n = {
  32486. errCode: _e26,
  32487. errMsg: Hn[_e26]
  32488. };
  32489. }
  32490. return n;
  32491. }();
  32492. if (cs(e) && n) {
  32493. n.uniIdRedirectUrl = e;
  32494. if (G($).length > 0) return setTimeout(function () {
  32495. Q($, n);
  32496. }, 0), t.abortLoginPageJump = !0, t;
  32497. t.autoToLoginPage = !0;
  32498. }
  32499. return t;
  32500. }
  32501. function ds() {
  32502. !function () {
  32503. var e = Qn(),
  32504. _ls = ls({
  32505. url: e
  32506. }),
  32507. t = _ls.abortLoginPageJump,
  32508. n = _ls.autoToLoginPage;
  32509. t || n && hs({
  32510. api: "redirectTo",
  32511. redirect: e
  32512. });
  32513. }();
  32514. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  32515. var _loop3 = function _loop3(_t16) {
  32516. var n = e[_t16];
  32517. uni.addInterceptor(n, {
  32518. invoke: function invoke(e) {
  32519. var _ls2 = ls({
  32520. url: e.url
  32521. }),
  32522. t = _ls2.abortLoginPageJump,
  32523. s = _ls2.autoToLoginPage;
  32524. return t ? e : s ? (hs({
  32525. api: n,
  32526. redirect: as(e.url)
  32527. }), !1) : e;
  32528. }
  32529. });
  32530. };
  32531. for (var _t16 = 0; _t16 < e.length; _t16++) {
  32532. _loop3(_t16);
  32533. }
  32534. }
  32535. function ps() {
  32536. this.onResponse(function (e) {
  32537. var t = e.type,
  32538. n = e.content;
  32539. var s = !1;
  32540. switch (t) {
  32541. case "cloudobject":
  32542. s = function (e) {
  32543. if ("object" != (0, _typeof2.default)(e)) return !1;
  32544. var _ref44 = e || {},
  32545. t = _ref44.errCode;
  32546. return t in Hn;
  32547. }(n);
  32548. break;
  32549. case "clientdb":
  32550. s = function (e) {
  32551. if ("object" != (0, _typeof2.default)(e)) return !1;
  32552. var _ref45 = e || {},
  32553. t = _ref45.errCode;
  32554. return t in Jn;
  32555. }(n);
  32556. }
  32557. s && function () {
  32558. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32559. var t = G($);
  32560. ee().then(function () {
  32561. var n = Qn();
  32562. if (n && us({
  32563. redirect: n
  32564. })) return t.length > 0 ? Q($, Object.assign({
  32565. uniIdRedirectUrl: n
  32566. }, e)) : void (ts && hs({
  32567. api: "navigateTo",
  32568. redirect: n
  32569. }));
  32570. });
  32571. }(n);
  32572. });
  32573. }
  32574. function fs(e) {
  32575. !function (e) {
  32576. e.onResponse = function (e) {
  32577. V(B, e);
  32578. }, e.offResponse = function (e) {
  32579. Y(B, e);
  32580. };
  32581. }(e), function (e) {
  32582. e.onNeedLogin = function (e) {
  32583. V($, e);
  32584. }, e.offNeedLogin = function (e) {
  32585. Y($, e);
  32586. }, es && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = !0, ee().then(function () {
  32587. ds.call(e);
  32588. }), ss && ps.call(e)));
  32589. }(e), function (e) {
  32590. e.onRefreshToken = function (e) {
  32591. V(W, e);
  32592. }, e.offRefreshToken = function (e) {
  32593. Y(W, e);
  32594. };
  32595. }(e);
  32596. }
  32597. var gs;
  32598. var ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  32599. ys = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  32600. function _s() {
  32601. var e = re().token || "",
  32602. t = e.split(".");
  32603. if (!e || 3 !== t.length) return {
  32604. uid: null,
  32605. role: [],
  32606. permission: [],
  32607. tokenExpired: 0
  32608. };
  32609. var n;
  32610. try {
  32611. n = JSON.parse((s = t[1], decodeURIComponent(gs(s).split("").map(function (e) {
  32612. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  32613. }).join(""))));
  32614. } catch (e) {
  32615. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  32616. }
  32617. var s;
  32618. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  32619. }
  32620. gs = "function" != typeof atob ? function (e) {
  32621. 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.");
  32622. var t;
  32623. e += "==".slice(2 - (3 & e.length));
  32624. for (var n, s, r = "", i = 0; i < e.length;) {
  32625. 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);
  32626. }
  32627. return r;
  32628. } : atob;
  32629. var ws = s(function (e, t) {
  32630. Object.defineProperty(t, "__esModule", {
  32631. value: !0
  32632. });
  32633. var n = "chooseAndUploadFile:ok",
  32634. s = "chooseAndUploadFile:fail";
  32635. function r(e, t) {
  32636. return e.tempFiles.forEach(function (e, n) {
  32637. 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("."));
  32638. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  32639. return e.path;
  32640. })), e;
  32641. }
  32642. function i(e, t, _ref46) {
  32643. var s = _ref46.onChooseFile,
  32644. r = _ref46.onUploadProgress;
  32645. return t.then(function (e) {
  32646. if (s) {
  32647. var _t17 = s(e);
  32648. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  32649. return void 0 === t ? e : t;
  32650. });
  32651. }
  32652. return e;
  32653. }).then(function (t) {
  32654. return !1 === t ? {
  32655. errMsg: n,
  32656. tempFilePaths: [],
  32657. tempFiles: []
  32658. } : function (e, t) {
  32659. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  32660. var r = arguments.length > 3 ? arguments[3] : undefined;
  32661. (t = Object.assign({}, t)).errMsg = n;
  32662. var i = t.tempFiles,
  32663. o = i.length;
  32664. var a = 0;
  32665. return new Promise(function (n) {
  32666. for (; a < s;) {
  32667. c();
  32668. }
  32669. function c() {
  32670. var s = a++;
  32671. if (s >= o) return void (!i.find(function (e) {
  32672. return !e.url && !e.errMsg;
  32673. }) && n(t));
  32674. var u = i[s];
  32675. e.uploadFile({
  32676. filePath: u.path,
  32677. cloudPath: u.cloudPath,
  32678. fileType: u.fileType,
  32679. onUploadProgress: function onUploadProgress(e) {
  32680. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  32681. }
  32682. }).then(function (e) {
  32683. u.url = e.fileID, s < o && c();
  32684. }).catch(function (e) {
  32685. u.errMsg = e.errMsg || e.message, s < o && c();
  32686. });
  32687. }
  32688. });
  32689. }(e, t, 5, r);
  32690. });
  32691. }
  32692. t.initChooseAndUploadFile = function (e) {
  32693. return function () {
  32694. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  32695. type: "all"
  32696. };
  32697. return "image" === t.type ? i(e, function (e) {
  32698. var t = e.count,
  32699. n = e.sizeType,
  32700. _e$sourceType = e.sourceType,
  32701. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  32702. o = e.extension;
  32703. return new Promise(function (e, a) {
  32704. uni.chooseImage({
  32705. count: t,
  32706. sizeType: n,
  32707. sourceType: i,
  32708. extension: o,
  32709. success: function success(t) {
  32710. e(r(t, "image"));
  32711. },
  32712. fail: function fail(e) {
  32713. a({
  32714. errMsg: e.errMsg.replace("chooseImage:fail", s)
  32715. });
  32716. }
  32717. });
  32718. });
  32719. }(t), t) : "video" === t.type ? i(e, function (e) {
  32720. var t = e.camera,
  32721. n = e.compressed,
  32722. i = e.maxDuration,
  32723. _e$sourceType2 = e.sourceType,
  32724. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  32725. a = e.extension;
  32726. return new Promise(function (e, c) {
  32727. uni.chooseVideo({
  32728. camera: t,
  32729. compressed: n,
  32730. maxDuration: i,
  32731. sourceType: o,
  32732. extension: a,
  32733. success: function success(t) {
  32734. var n = t.tempFilePath,
  32735. s = t.duration,
  32736. i = t.size,
  32737. o = t.height,
  32738. a = t.width;
  32739. e(r({
  32740. errMsg: "chooseVideo:ok",
  32741. tempFilePaths: [n],
  32742. tempFiles: [{
  32743. name: t.tempFile && t.tempFile.name || "",
  32744. path: n,
  32745. size: i,
  32746. type: t.tempFile && t.tempFile.type || "",
  32747. width: a,
  32748. height: o,
  32749. duration: s,
  32750. fileType: "video",
  32751. cloudPath: ""
  32752. }]
  32753. }, "video"));
  32754. },
  32755. fail: function fail(e) {
  32756. c({
  32757. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  32758. });
  32759. }
  32760. });
  32761. });
  32762. }(t), t) : i(e, function (e) {
  32763. var t = e.count,
  32764. n = e.extension;
  32765. return new Promise(function (e, i) {
  32766. var o = uni.chooseFile;
  32767. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  32768. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  32769. });
  32770. o({
  32771. type: "all",
  32772. count: t,
  32773. extension: n,
  32774. success: function success(t) {
  32775. e(r(t));
  32776. },
  32777. fail: function fail(e) {
  32778. i({
  32779. errMsg: e.errMsg.replace("chooseFile:fail", s)
  32780. });
  32781. }
  32782. });
  32783. });
  32784. }(t), t);
  32785. };
  32786. };
  32787. }),
  32788. vs = n(ws);
  32789. var Is = "manual";
  32790. function Ss(e) {
  32791. return {
  32792. props: {
  32793. localdata: {
  32794. type: Array,
  32795. default: function _default() {
  32796. return [];
  32797. }
  32798. },
  32799. options: {
  32800. type: [Object, Array],
  32801. default: function _default() {
  32802. return {};
  32803. }
  32804. },
  32805. spaceInfo: {
  32806. type: Object,
  32807. default: function _default() {
  32808. return {};
  32809. }
  32810. },
  32811. collection: {
  32812. type: [String, Array],
  32813. default: ""
  32814. },
  32815. action: {
  32816. type: String,
  32817. default: ""
  32818. },
  32819. field: {
  32820. type: String,
  32821. default: ""
  32822. },
  32823. orderby: {
  32824. type: String,
  32825. default: ""
  32826. },
  32827. where: {
  32828. type: [String, Object],
  32829. default: ""
  32830. },
  32831. pageData: {
  32832. type: String,
  32833. default: "add"
  32834. },
  32835. pageCurrent: {
  32836. type: Number,
  32837. default: 1
  32838. },
  32839. pageSize: {
  32840. type: Number,
  32841. default: 20
  32842. },
  32843. getcount: {
  32844. type: [Boolean, String],
  32845. default: !1
  32846. },
  32847. gettree: {
  32848. type: [Boolean, String],
  32849. default: !1
  32850. },
  32851. gettreepath: {
  32852. type: [Boolean, String],
  32853. default: !1
  32854. },
  32855. startwith: {
  32856. type: String,
  32857. default: ""
  32858. },
  32859. limitlevel: {
  32860. type: Number,
  32861. default: 10
  32862. },
  32863. groupby: {
  32864. type: String,
  32865. default: ""
  32866. },
  32867. groupField: {
  32868. type: String,
  32869. default: ""
  32870. },
  32871. distinct: {
  32872. type: [Boolean, String],
  32873. default: !1
  32874. },
  32875. foreignKey: {
  32876. type: String,
  32877. default: ""
  32878. },
  32879. loadtime: {
  32880. type: String,
  32881. default: "auto"
  32882. },
  32883. manual: {
  32884. type: Boolean,
  32885. default: !1
  32886. }
  32887. },
  32888. data: function data() {
  32889. return {
  32890. mixinDatacomLoading: !1,
  32891. mixinDatacomHasMore: !1,
  32892. mixinDatacomResData: [],
  32893. mixinDatacomErrorMessage: "",
  32894. mixinDatacomPage: {}
  32895. };
  32896. },
  32897. created: function created() {
  32898. var _this20 = this;
  32899. this.mixinDatacomPage = {
  32900. current: this.pageCurrent,
  32901. size: this.pageSize,
  32902. count: 0
  32903. }, this.$watch(function () {
  32904. var e = [];
  32905. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  32906. e.push(_this20[t]);
  32907. }), e;
  32908. }, function (e, t) {
  32909. if (_this20.loadtime === Is) return;
  32910. var n = !1;
  32911. var s = [];
  32912. for (var _r7 = 2; _r7 < e.length; _r7++) {
  32913. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  32914. }
  32915. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  32916. });
  32917. },
  32918. methods: {
  32919. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  32920. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  32921. var _this21 = this;
  32922. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  32923. _ref47$getone = _ref47.getone,
  32924. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  32925. t = _ref47.success,
  32926. n = _ref47.fail;
  32927. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  32928. _this21.mixinDatacomLoading = !1;
  32929. var _n$result = n.result,
  32930. s = _n$result.data,
  32931. r = _n$result.count;
  32932. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  32933. var i = e ? s.length ? s[0] : void 0 : s;
  32934. _this21.mixinDatacomResData = i, t && t(i);
  32935. }).catch(function (e) {
  32936. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  32937. }));
  32938. },
  32939. mixinDatacomGet: function mixinDatacomGet() {
  32940. var _n12;
  32941. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  32942. var n = e.database(this.spaceInfo);
  32943. var s = t.action || this.action;
  32944. s && (n = n.action(s));
  32945. var r = t.collection || this.collection;
  32946. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  32947. var i = t.where || this.where;
  32948. i && Object.keys(i).length && (n = n.where(i));
  32949. var o = t.field || this.field;
  32950. o && (n = n.field(o));
  32951. var a = t.foreignKey || this.foreignKey;
  32952. a && (n = n.foreignKey(a));
  32953. var c = t.groupby || this.groupby;
  32954. c && (n = n.groupBy(c));
  32955. var u = t.groupField || this.groupField;
  32956. u && (n = n.groupField(u));
  32957. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  32958. var h = t.orderby || this.orderby;
  32959. h && (n = n.orderBy(h));
  32960. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  32961. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  32962. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  32963. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  32964. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  32965. m = {
  32966. getCount: p
  32967. },
  32968. y = {
  32969. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  32970. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  32971. };
  32972. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  32973. }
  32974. }
  32975. };
  32976. }
  32977. function bs(e) {
  32978. return function (t) {
  32979. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32980. n = function (e) {
  32981. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  32982. 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;
  32983. }({
  32984. customUI: !1,
  32985. loadingOptions: {
  32986. title: "加载中...",
  32987. mask: !0
  32988. },
  32989. errorOptions: {
  32990. type: "modal",
  32991. retry: !1
  32992. }
  32993. }, n);
  32994. var _n13 = n,
  32995. s = _n13.customUI,
  32996. r = _n13.loadingOptions,
  32997. i = _n13.errorOptions,
  32998. o = _n13.parseSystemError,
  32999. a = !s;
  33000. return new Proxy({}, {
  33001. get: function get(s, c) {
  33002. return function () {
  33003. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33004. e = _ref48.fn,
  33005. t = _ref48.interceptorName,
  33006. n = _ref48.getCallbackArgs;
  33007. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  33008. var _len2,
  33009. s,
  33010. _key2,
  33011. r,
  33012. i,
  33013. o,
  33014. _args = arguments;
  33015. return _regenerator.default.wrap(function _callee50$(_context50) {
  33016. while (1) {
  33017. switch (_context50.prev = _context50.next) {
  33018. case 0:
  33019. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  33020. s[_key2] = _args[_key2];
  33021. }
  33022. r = n ? n({
  33023. params: s
  33024. }) : {};
  33025. _context50.prev = 2;
  33026. _context50.next = 5;
  33027. return q(M(t, "invoke"), _objectSpread({}, r));
  33028. case 5:
  33029. _context50.next = 7;
  33030. return e.apply(void 0, s);
  33031. case 7:
  33032. i = _context50.sent;
  33033. _context50.next = 10;
  33034. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  33035. result: i
  33036. }));
  33037. case 10:
  33038. return _context50.abrupt("return", i);
  33039. case 13:
  33040. _context50.prev = 13;
  33041. _context50.t0 = _context50["catch"](2);
  33042. o = _context50.t0;
  33043. _context50.next = 18;
  33044. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  33045. error: o
  33046. }));
  33047. case 18:
  33048. throw o;
  33049. case 19:
  33050. _context50.prev = 19;
  33051. _context50.next = 22;
  33052. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  33053. error: o
  33054. }) : _objectSpread(_objectSpread({}, r), {}, {
  33055. result: i
  33056. }));
  33057. case 22:
  33058. return _context50.finish(19);
  33059. case 23:
  33060. case "end":
  33061. return _context50.stop();
  33062. }
  33063. }
  33064. }, _callee50, null, [[2, 13, 19, 23]]);
  33065. }));
  33066. }({
  33067. fn: function () {
  33068. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  33069. var l,
  33070. _len3,
  33071. u,
  33072. _key3,
  33073. d,
  33074. p,
  33075. _ref50,
  33076. f,
  33077. g,
  33078. m,
  33079. y,
  33080. _e27,
  33081. _yield,
  33082. _t18,
  33083. _n14,
  33084. _args4 = arguments;
  33085. return _regenerator.default.wrap(function _callee52$(_context52) {
  33086. while (1) {
  33087. switch (_context52.prev = _context52.next) {
  33088. case 0:
  33089. a && uni.showLoading({
  33090. title: r.title,
  33091. mask: r.mask
  33092. });
  33093. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  33094. u[_key3] = _args4[_key3];
  33095. }
  33096. d = {
  33097. name: t,
  33098. type: h,
  33099. data: {
  33100. method: c,
  33101. params: u
  33102. }
  33103. };
  33104. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  33105. var n = t.data.method,
  33106. s = e.secretMethods || {},
  33107. r = s[n] || s["*"];
  33108. r && (t.secretType = r);
  33109. }(n, d);
  33110. p = !1;
  33111. _context52.prev = 5;
  33112. _context52.next = 8;
  33113. return e.callFunction(d);
  33114. case 8:
  33115. l = _context52.sent;
  33116. _context52.next = 14;
  33117. break;
  33118. case 11:
  33119. _context52.prev = 11;
  33120. _context52.t0 = _context52["catch"](5);
  33121. p = !0, l = {
  33122. result: new ne(_context52.t0)
  33123. };
  33124. case 14:
  33125. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  33126. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (ie(y), Q(W, _objectSpread({}, y))), g)) {
  33127. _context52.next = 39;
  33128. break;
  33129. }
  33130. _e27 = m;
  33131. if (!(p && o)) {
  33132. _context52.next = 24;
  33133. break;
  33134. }
  33135. _context52.next = 20;
  33136. return o({
  33137. objectName: t,
  33138. methodName: c,
  33139. params: u,
  33140. errSubject: f,
  33141. errCode: g,
  33142. errMsg: m
  33143. });
  33144. case 20:
  33145. _context52.t1 = _context52.sent.errMsg;
  33146. if (_context52.t1) {
  33147. _context52.next = 23;
  33148. break;
  33149. }
  33150. _context52.t1 = m;
  33151. case 23:
  33152. _e27 = _context52.t1;
  33153. case 24:
  33154. if (!a) {
  33155. _context52.next = 37;
  33156. break;
  33157. }
  33158. if (!("toast" === i.type)) {
  33159. _context52.next = 29;
  33160. break;
  33161. }
  33162. uni.showToast({
  33163. title: _e27,
  33164. icon: "none"
  33165. });
  33166. _context52.next = 37;
  33167. break;
  33168. case 29:
  33169. if (!("modal" !== i.type)) {
  33170. _context52.next = 31;
  33171. break;
  33172. }
  33173. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  33174. case 31:
  33175. _context52.next = 33;
  33176. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  33177. var _ref52,
  33178. e,
  33179. t,
  33180. n,
  33181. s,
  33182. r,
  33183. _args2 = arguments;
  33184. return _regenerator.default.wrap(function _callee51$(_context51) {
  33185. while (1) {
  33186. switch (_context51.prev = _context51.next) {
  33187. case 0:
  33188. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  33189. return _context51.abrupt("return", new Promise(function (i, o) {
  33190. uni.showModal({
  33191. title: e,
  33192. content: t,
  33193. showCancel: n,
  33194. cancelText: s,
  33195. confirmText: r,
  33196. success: function success(e) {
  33197. i(e);
  33198. },
  33199. fail: function fail() {
  33200. i({
  33201. confirm: !1,
  33202. cancel: !0
  33203. });
  33204. }
  33205. });
  33206. }));
  33207. case 2:
  33208. case "end":
  33209. return _context51.stop();
  33210. }
  33211. }
  33212. }, _callee51);
  33213. }))({
  33214. title: "提示",
  33215. content: _e27,
  33216. showCancel: i.retry,
  33217. cancelText: "取消",
  33218. confirmText: i.retry ? "重试" : "确定"
  33219. });
  33220. case 33:
  33221. _yield = _context52.sent;
  33222. _t18 = _yield.confirm;
  33223. if (!(i.retry && _t18)) {
  33224. _context52.next = 37;
  33225. break;
  33226. }
  33227. return _context52.abrupt("return", s.apply(void 0, u));
  33228. case 37:
  33229. _n14 = new ne({
  33230. subject: f,
  33231. code: g,
  33232. message: m,
  33233. requestId: l.requestId
  33234. });
  33235. throw _n14.detail = l.result, Q(B, {
  33236. type: H,
  33237. content: _n14
  33238. }), _n14;
  33239. case 39:
  33240. return _context52.abrupt("return", (Q(B, {
  33241. type: H,
  33242. content: l.result
  33243. }), l.result));
  33244. case 40:
  33245. case "end":
  33246. return _context52.stop();
  33247. }
  33248. }
  33249. }, _callee52, null, [[5, 11]]);
  33250. }));
  33251. function s() {
  33252. return _s14.apply(this, arguments);
  33253. }
  33254. return s;
  33255. }(),
  33256. interceptorName: "callObject",
  33257. getCallbackArgs: function getCallbackArgs() {
  33258. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33259. e = _ref53.params;
  33260. return {
  33261. objectName: t,
  33262. methodName: c,
  33263. params: e
  33264. };
  33265. }
  33266. });
  33267. }
  33268. });
  33269. };
  33270. }
  33271. function ks(e) {
  33272. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  33273. }
  33274. function Cs() {
  33275. return _Cs.apply(this, arguments);
  33276. }
  33277. function _Cs() {
  33278. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  33279. var _ref65,
  33280. e,
  33281. _ref65$callLoginByWei,
  33282. t,
  33283. n,
  33284. s,
  33285. r,
  33286. _args7 = arguments;
  33287. return _regenerator.default.wrap(function _callee55$(_context55) {
  33288. while (1) {
  33289. switch (_context55.prev = _context55.next) {
  33290. case 0:
  33291. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  33292. n = ks(this);
  33293. if (!("mp-weixin" !== P)) {
  33294. _context55.next = 4;
  33295. break;
  33296. }
  33297. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  33298. case 4:
  33299. if (!(e && t)) {
  33300. _context55.next = 6;
  33301. break;
  33302. }
  33303. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  33304. case 6:
  33305. if (!e) {
  33306. _context55.next = 8;
  33307. break;
  33308. }
  33309. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  33310. case 8:
  33311. _context55.next = 10;
  33312. return new Promise(function (e, t) {
  33313. uni.login({
  33314. success: function success(t) {
  33315. e(t.code);
  33316. },
  33317. fail: function fail(e) {
  33318. t(new Error(e.errMsg));
  33319. }
  33320. });
  33321. });
  33322. case 10:
  33323. s = _context55.sent;
  33324. r = this.importObject("uni-id-co", {
  33325. customUI: !0
  33326. });
  33327. _context55.next = 14;
  33328. return r.secureNetworkHandshakeByWeixin({
  33329. code: s,
  33330. callLoginByWeixin: t
  33331. });
  33332. case 14:
  33333. n.mpWeixinCode = s;
  33334. return _context55.abrupt("return", {
  33335. code: s
  33336. });
  33337. case 16:
  33338. case "end":
  33339. return _context55.stop();
  33340. }
  33341. }
  33342. }, _callee55, this);
  33343. }));
  33344. return _Cs.apply(this, arguments);
  33345. }
  33346. function Ts(_x37) {
  33347. return _Ts.apply(this, arguments);
  33348. }
  33349. function _Ts() {
  33350. _Ts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  33351. var t;
  33352. return _regenerator.default.wrap(function _callee56$(_context56) {
  33353. while (1) {
  33354. switch (_context56.prev = _context56.next) {
  33355. case 0:
  33356. t = ks(this);
  33357. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  33358. case 2:
  33359. case "end":
  33360. return _context56.stop();
  33361. }
  33362. }
  33363. }, _callee56, this);
  33364. }));
  33365. return _Ts.apply(this, arguments);
  33366. }
  33367. function Ps(e) {
  33368. return function () {
  33369. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33370. t = _ref54.openid,
  33371. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  33372. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  33373. return Ts.call(e, {
  33374. openid: t,
  33375. callLoginByWeixin: n
  33376. });
  33377. };
  33378. }
  33379. function As(e) {
  33380. var t = {
  33381. getSystemInfo: uni.getSystemInfo,
  33382. getPushClientId: uni.getPushClientId
  33383. };
  33384. return function (n) {
  33385. return new Promise(function (s, r) {
  33386. t[e](_objectSpread(_objectSpread({}, n), {}, {
  33387. success: function success(e) {
  33388. s(e);
  33389. },
  33390. fail: function fail(e) {
  33391. r(e);
  33392. }
  33393. }));
  33394. });
  33395. };
  33396. }
  33397. var Es = /*#__PURE__*/function (_ref55) {
  33398. (0, _inherits2.default)(Es, _ref55);
  33399. var _super12 = _createSuper(Es);
  33400. function Es() {
  33401. var _this22;
  33402. (0, _classCallCheck2.default)(this, Es);
  33403. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  33404. return _this22;
  33405. }
  33406. (0, _createClass2.default)(Es, [{
  33407. key: "init",
  33408. value: function init() {
  33409. var _this23 = this;
  33410. return Promise.all([As("getSystemInfo")(), As("getPushClientId")()]).then(function () {
  33411. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  33412. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  33413. _ref57$ = _ref57[0];
  33414. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  33415. var e = _ref57$.appId,
  33416. _ref57$2 = _ref57[1];
  33417. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  33418. var t = _ref57$2.cid;
  33419. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  33420. if (!t) throw new Error("Invalid push client id");
  33421. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  33422. }, function (e) {
  33423. throw _this23.emit("error", e), _this23.close(), e;
  33424. });
  33425. }
  33426. }, {
  33427. key: "open",
  33428. value: function () {
  33429. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  33430. return _regenerator.default.wrap(function _callee53$(_context53) {
  33431. while (1) {
  33432. switch (_context53.prev = _context53.next) {
  33433. case 0:
  33434. return _context53.abrupt("return", this.init());
  33435. case 1:
  33436. case "end":
  33437. return _context53.stop();
  33438. }
  33439. }
  33440. }, _callee53, this);
  33441. }));
  33442. function open() {
  33443. return _open.apply(this, arguments);
  33444. }
  33445. return open;
  33446. }()
  33447. }, {
  33448. key: "_isUniCloudSSE",
  33449. value: function _isUniCloudSSE(e) {
  33450. if ("receive" !== e.type) return !1;
  33451. var t = e && e.data && e.data.payload;
  33452. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  33453. }
  33454. }, {
  33455. key: "_receivePushMessage",
  33456. value: function _receivePushMessage(e) {
  33457. if (!this._isUniCloudSSE(e)) return;
  33458. var t = e && e.data && e.data.payload,
  33459. n = t.action,
  33460. s = t.messageId,
  33461. r = t.message;
  33462. this._payloadQueue.push({
  33463. action: n,
  33464. messageId: s,
  33465. message: r
  33466. }), this._consumMessage();
  33467. }
  33468. }, {
  33469. key: "_consumMessage",
  33470. value: function _consumMessage() {
  33471. var _this24 = this;
  33472. for (;;) {
  33473. var _e28 = this._payloadQueue.find(function (e) {
  33474. return e.messageId === _this24._currentMessageId + 1;
  33475. });
  33476. if (!_e28) break;
  33477. this._currentMessageId++, this._parseMessagePayload(_e28);
  33478. }
  33479. }
  33480. }, {
  33481. key: "_parseMessagePayload",
  33482. value: function _parseMessagePayload(e) {
  33483. var t = e.action,
  33484. n = e.messageId,
  33485. s = e.message;
  33486. "end" === t ? this._end({
  33487. messageId: n,
  33488. message: s
  33489. }) : "message" === t && this._appendMessage({
  33490. messageId: n,
  33491. message: s
  33492. });
  33493. }
  33494. }, {
  33495. key: "_appendMessage",
  33496. value: function _appendMessage() {
  33497. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33498. e = _ref58.messageId,
  33499. t = _ref58.message;
  33500. this.emit("message", t);
  33501. }
  33502. }, {
  33503. key: "_end",
  33504. value: function _end() {
  33505. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  33506. e = _ref59.messageId,
  33507. t = _ref59.message;
  33508. this.emit("end", t), this.close();
  33509. }
  33510. }, {
  33511. key: "_initMessageListener",
  33512. value: function _initMessageListener() {
  33513. uni.onPushMessage(this._uniPushMessageCallback);
  33514. }
  33515. }, {
  33516. key: "_destroy",
  33517. value: function _destroy() {
  33518. uni.offPushMessage(this._uniPushMessageCallback);
  33519. }
  33520. }, {
  33521. key: "toJSON",
  33522. value: function toJSON() {
  33523. return {
  33524. appId: this._appId,
  33525. pushClientId: this._pushClientId,
  33526. seqId: this._seqId
  33527. };
  33528. }
  33529. }, {
  33530. key: "close",
  33531. value: function close() {
  33532. this._destroy(), this.emit("close");
  33533. }
  33534. }]);
  33535. return Es;
  33536. }( /*#__PURE__*/function () {
  33537. function _class6() {
  33538. (0, _classCallCheck2.default)(this, _class6);
  33539. this._callback = {};
  33540. }
  33541. (0, _createClass2.default)(_class6, [{
  33542. key: "addListener",
  33543. value: function addListener(e, t) {
  33544. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  33545. }
  33546. }, {
  33547. key: "on",
  33548. value: function on(e, t) {
  33549. return this.addListener(e, t);
  33550. }
  33551. }, {
  33552. key: "removeListener",
  33553. value: function removeListener(e, t) {
  33554. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  33555. var n = this._callback[e];
  33556. if (!n) return;
  33557. var s = function (e, t) {
  33558. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  33559. if (e[_n15] === t) return _n15;
  33560. }
  33561. return -1;
  33562. }(n, t);
  33563. n.splice(s, 1);
  33564. }
  33565. }, {
  33566. key: "off",
  33567. value: function off(e, t) {
  33568. return this.removeListener(e, t);
  33569. }
  33570. }, {
  33571. key: "removeAllListener",
  33572. value: function removeAllListener(e) {
  33573. delete this._callback[e];
  33574. }
  33575. }, {
  33576. key: "emit",
  33577. value: function emit(e) {
  33578. var n = this._callback[e];
  33579. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  33580. t[_key4 - 1] = arguments[_key4];
  33581. }
  33582. if (n) for (var _e29 = 0; _e29 < n.length; _e29++) {
  33583. n[_e29].apply(n, t);
  33584. }
  33585. }
  33586. }]);
  33587. return _class6;
  33588. }());
  33589. function Os(_x38, _x39) {
  33590. return _Os.apply(this, arguments);
  33591. }
  33592. function _Os() {
  33593. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  33594. var n, _e33, s;
  33595. return _regenerator.default.wrap(function _callee57$(_context57) {
  33596. while (1) {
  33597. switch (_context57.prev = _context57.next) {
  33598. case 0:
  33599. n = "http://".concat(e, ":").concat(t, "/system/ping");
  33600. _context57.prev = 1;
  33601. _context57.next = 4;
  33602. return s = {
  33603. url: n,
  33604. timeout: 500
  33605. }, new Promise(function (e, t) {
  33606. se.request(_objectSpread(_objectSpread({}, s), {}, {
  33607. success: function success(t) {
  33608. e(t);
  33609. },
  33610. fail: function fail(e) {
  33611. t(e);
  33612. }
  33613. }));
  33614. });
  33615. case 4:
  33616. _e33 = _context57.sent;
  33617. return _context57.abrupt("return", !(!_e33.data || 0 !== _e33.data.code));
  33618. case 8:
  33619. _context57.prev = 8;
  33620. _context57.t0 = _context57["catch"](1);
  33621. return _context57.abrupt("return", !1);
  33622. case 11:
  33623. case "end":
  33624. return _context57.stop();
  33625. }
  33626. }
  33627. }, _callee57, null, [[1, 8]]);
  33628. }));
  33629. return _Os.apply(this, arguments);
  33630. }
  33631. function xs(_x40) {
  33632. return _xs.apply(this, arguments);
  33633. }
  33634. function _xs() {
  33635. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  33636. var _ce2, _e34, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  33637. return _regenerator.default.wrap(function _callee59$(_context59) {
  33638. while (1) {
  33639. switch (_context59.prev = _context59.next) {
  33640. case 0:
  33641. if (b) {
  33642. _context59.next = 2;
  33643. break;
  33644. }
  33645. return _context59.abrupt("return", Promise.resolve());
  33646. case 2:
  33647. if ("app" === P) {
  33648. _ce2 = ce(), _e34 = _ce2.osName, _t20 = _ce2.osVersion;
  33649. "ios" === _e34 && function (e) {
  33650. if (!e || "string" != typeof e) return 0;
  33651. var t = e.match(/^(\d+)./);
  33652. return t && t[1] ? parseInt(t[1]) : 0;
  33653. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  33654. }
  33655. t = e.__dev__;
  33656. if (t.debugInfo) {
  33657. _context59.next = 6;
  33658. break;
  33659. }
  33660. return _context59.abrupt("return");
  33661. case 6:
  33662. _t$debugInfo = t.debugInfo;
  33663. n = _t$debugInfo.address;
  33664. s = _t$debugInfo.servePort;
  33665. _context59.next = 11;
  33666. return function () {
  33667. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  33668. var n, _s15, _r8;
  33669. return _regenerator.default.wrap(function _callee58$(_context58) {
  33670. while (1) {
  33671. switch (_context58.prev = _context58.next) {
  33672. case 0:
  33673. _s15 = 0;
  33674. case 1:
  33675. if (!(_s15 < e.length)) {
  33676. _context58.next = 11;
  33677. break;
  33678. }
  33679. _r8 = e[_s15];
  33680. _context58.next = 5;
  33681. return Os(_r8, t);
  33682. case 5:
  33683. if (!_context58.sent) {
  33684. _context58.next = 8;
  33685. break;
  33686. }
  33687. n = _r8;
  33688. return _context58.abrupt("break", 11);
  33689. case 8:
  33690. _s15++;
  33691. _context58.next = 1;
  33692. break;
  33693. case 11:
  33694. return _context58.abrupt("return", {
  33695. address: n,
  33696. port: t
  33697. });
  33698. case 12:
  33699. case "end":
  33700. return _context58.stop();
  33701. }
  33702. }
  33703. }, _callee58);
  33704. }));
  33705. return function (_x41, _x42) {
  33706. return _ref66.apply(this, arguments);
  33707. };
  33708. }()(n, s);
  33709. case 11:
  33710. _yield2 = _context59.sent;
  33711. r = _yield2.address;
  33712. if (!r) {
  33713. _context59.next = 15;
  33714. break;
  33715. }
  33716. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  33717. case 15:
  33718. i = console["app" === P ? "error" : "warn"];
  33719. o = "";
  33720. 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)) {
  33721. _context59.next = 19;
  33722. break;
  33723. }
  33724. throw new Error(o);
  33725. case 19:
  33726. i(o);
  33727. case 20:
  33728. case "end":
  33729. return _context59.stop();
  33730. }
  33731. }
  33732. }, _callee59);
  33733. }));
  33734. return _xs.apply(this, arguments);
  33735. }
  33736. function Rs(e) {
  33737. e._initPromiseHub || (e._initPromiseHub = new I({
  33738. createPromise: function createPromise() {
  33739. var t = Promise.resolve();
  33740. var n;
  33741. n = 1, t = new Promise(function (e) {
  33742. setTimeout(function () {
  33743. e();
  33744. }, n);
  33745. });
  33746. var s = e.auth();
  33747. return t.then(function () {
  33748. return s.getLoginState();
  33749. }).then(function (e) {
  33750. return e ? Promise.resolve() : s.signInAnonymously();
  33751. });
  33752. }
  33753. }));
  33754. }
  33755. var Us = {
  33756. tcb: It,
  33757. tencent: It,
  33758. aliyun: ge,
  33759. private: bt
  33760. };
  33761. var Ls = new ( /*#__PURE__*/function () {
  33762. function _class7() {
  33763. (0, _classCallCheck2.default)(this, _class7);
  33764. }
  33765. (0, _createClass2.default)(_class7, [{
  33766. key: "init",
  33767. value: function init(e) {
  33768. var t = {};
  33769. var n = Us[e.provider];
  33770. if (!n) throw new Error("未提供正确的provider参数");
  33771. t = n.init(e), b && function (e) {
  33772. if (!b) return;
  33773. var t = {};
  33774. e.__dev__ = t, t.debugLog = b && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  33775. var n = A;
  33776. n && !n.code && (t.debugInfo = n);
  33777. var s = new I({
  33778. createPromise: function createPromise() {
  33779. return xs(e);
  33780. }
  33781. });
  33782. t.initLocalNetwork = function () {
  33783. return s.exec();
  33784. };
  33785. }(t), Rs(t), xn(t), function (e) {
  33786. var t = e.uploadFile;
  33787. e.uploadFile = function (e) {
  33788. return t.call(this, e);
  33789. };
  33790. }(t), function (e) {
  33791. e.database = function (t) {
  33792. if (t && Object.keys(t).length > 0) return e.init(t).database();
  33793. if (this._database) return this._database;
  33794. var n = Bn($n, {
  33795. uniClient: e
  33796. });
  33797. return this._database = n, n;
  33798. }, e.databaseForJQL = function (t) {
  33799. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  33800. if (this._databaseForJQL) return this._databaseForJQL;
  33801. var n = Bn($n, {
  33802. uniClient: e,
  33803. isJQL: !0
  33804. });
  33805. return this._databaseForJQL = n, n;
  33806. };
  33807. }(t), function (e) {
  33808. e.getCurrentUserInfo = _s, e.chooseAndUploadFile = vs.initChooseAndUploadFile(e), Object.assign(e, {
  33809. get mixinDatacom() {
  33810. return Ss(e);
  33811. }
  33812. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = Ps(e), e.importObject = bs(e);
  33813. }(t);
  33814. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  33815. if (!t[e]) return;
  33816. var n = t[e];
  33817. t[e] = function () {
  33818. return n.apply(t, Array.from(arguments));
  33819. }, t[e] = function (e, t) {
  33820. return function (n) {
  33821. var _this25 = this;
  33822. var s = !1;
  33823. if ("callFunction" === t) {
  33824. var _e30 = n && n.type || u;
  33825. s = _e30 !== u;
  33826. }
  33827. var r = "callFunction" === t && !s,
  33828. i = this._initPromiseHub.exec();
  33829. n = n || {};
  33830. var _te2 = te(n),
  33831. o = _te2.success,
  33832. a = _te2.fail,
  33833. c = _te2.complete,
  33834. h = i.then(function () {
  33835. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  33836. }).then(function () {
  33837. return e.call(_this25, n);
  33838. }).then(function (e) {
  33839. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  33840. return q(M(t, "complete"), e);
  33841. }).then(function () {
  33842. return r && Q(B, {
  33843. type: J,
  33844. content: e
  33845. }), Promise.resolve(e);
  33846. });
  33847. }, function (e) {
  33848. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  33849. return q(M(t, "complete"), e);
  33850. }).then(function () {
  33851. return Q(B, {
  33852. type: J,
  33853. content: e
  33854. }), Promise.reject(e);
  33855. });
  33856. });
  33857. if (!(o || a || c)) return h;
  33858. h.then(function (e) {
  33859. o && o(e), c && c(e), r && Q(B, {
  33860. type: J,
  33861. content: e
  33862. });
  33863. }, function (e) {
  33864. a && a(e), c && c(e), r && Q(B, {
  33865. type: J,
  33866. content: e
  33867. });
  33868. });
  33869. };
  33870. }(t[e], e).bind(t);
  33871. }), t.init = this.init, t;
  33872. }
  33873. }]);
  33874. return _class7;
  33875. }())();
  33876. (function () {
  33877. var e = E;
  33878. var t = {};
  33879. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  33880. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  33881. var _n16;
  33882. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : O ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  33883. Ls[e] = function () {
  33884. return console.error(_n16), Promise.reject(new ne({
  33885. code: "SYS_ERR",
  33886. message: _n16
  33887. }));
  33888. };
  33889. });
  33890. }
  33891. Object.assign(Ls, {
  33892. get mixinDatacom() {
  33893. return Ss(Ls);
  33894. }
  33895. }), fs(Ls), Ls.addInterceptor = D, Ls.removeInterceptor = F, Ls.interceptObject = K, b && "web" === P && (window.uniCloud = Ls);
  33896. })();
  33897. var Ns = Ls;
  33898. exports.default = Ns;
  33899. /* 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"]))
  33900. /***/ }),
  33901. /***/ 495:
  33902. /*!**********************************************************************!*\
  33903. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  33904. \**********************************************************************/
  33905. /*! no static exports found */
  33906. /***/ (function(module, exports) {
  33907. function _assertThisInitialized(self) {
  33908. if (self === void 0) {
  33909. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  33910. }
  33911. return self;
  33912. }
  33913. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33914. /***/ }),
  33915. /***/ 496:
  33916. /*!*********************************************************!*\
  33917. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  33918. \*********************************************************/
  33919. /*! no static exports found */
  33920. /***/ (function(module, exports, __webpack_require__) {
  33921. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33922. function _inherits(subClass, superClass) {
  33923. if (typeof superClass !== "function" && superClass !== null) {
  33924. throw new TypeError("Super expression must either be null or a function");
  33925. }
  33926. subClass.prototype = Object.create(superClass && superClass.prototype, {
  33927. constructor: {
  33928. value: subClass,
  33929. writable: true,
  33930. configurable: true
  33931. }
  33932. });
  33933. Object.defineProperty(subClass, "prototype", {
  33934. writable: false
  33935. });
  33936. if (superClass) setPrototypeOf(subClass, superClass);
  33937. }
  33938. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33939. /***/ }),
  33940. /***/ 497:
  33941. /*!**************************************************************************!*\
  33942. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  33943. \**************************************************************************/
  33944. /*! no static exports found */
  33945. /***/ (function(module, exports, __webpack_require__) {
  33946. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  33947. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 495);
  33948. function _possibleConstructorReturn(self, call) {
  33949. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  33950. return call;
  33951. } else if (call !== void 0) {
  33952. throw new TypeError("Derived constructors may only return object or undefined");
  33953. }
  33954. return assertThisInitialized(self);
  33955. }
  33956. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33957. /***/ }),
  33958. /***/ 498:
  33959. /*!***************************************************************!*\
  33960. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  33961. \***************************************************************/
  33962. /*! no static exports found */
  33963. /***/ (function(module, exports) {
  33964. function _getPrototypeOf(o) {
  33965. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  33966. return o.__proto__ || Object.getPrototypeOf(o);
  33967. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33968. return _getPrototypeOf(o);
  33969. }
  33970. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  33971. /***/ }),
  33972. /***/ 499:
  33973. /*!****************************************************************!*\
  33974. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  33975. \****************************************************************/
  33976. /*! no static exports found */
  33977. /***/ (function(module, exports, __webpack_require__) {
  33978. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 498);
  33979. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  33980. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 500);
  33981. var construct = __webpack_require__(/*! ./construct.js */ 15);
  33982. function _wrapNativeSuper(Class) {
  33983. var _cache = typeof Map === "function" ? new Map() : undefined;
  33984. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  33985. if (Class === null || !isNativeFunction(Class)) return Class;
  33986. if (typeof Class !== "function") {
  33987. throw new TypeError("Super expression must either be null or a function");
  33988. }
  33989. if (typeof _cache !== "undefined") {
  33990. if (_cache.has(Class)) return _cache.get(Class);
  33991. _cache.set(Class, Wrapper);
  33992. }
  33993. function Wrapper() {
  33994. return construct(Class, arguments, getPrototypeOf(this).constructor);
  33995. }
  33996. Wrapper.prototype = Object.create(Class.prototype, {
  33997. constructor: {
  33998. value: Wrapper,
  33999. enumerable: false,
  34000. writable: true,
  34001. configurable: true
  34002. }
  34003. });
  34004. return setPrototypeOf(Wrapper, Class);
  34005. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34006. return _wrapNativeSuper(Class);
  34007. }
  34008. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34009. /***/ }),
  34010. /***/ 5:
  34011. /*!**************************************************************!*\
  34012. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  34013. \**************************************************************/
  34014. /*! no static exports found */
  34015. /***/ (function(module, exports, __webpack_require__) {
  34016. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  34017. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  34018. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  34019. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  34020. function _slicedToArray(arr, i) {
  34021. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  34022. }
  34023. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34024. /***/ }),
  34025. /***/ 50:
  34026. /*!************************************************************************************************!*\
  34027. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  34028. \************************************************************************************************/
  34029. /*! no static exports found */
  34030. /***/ (function(module, exports, __webpack_require__) {
  34031. // TODO(Babel 8): Remove this file.
  34032. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 51)();
  34033. module.exports = runtime;
  34034. /***/ }),
  34035. /***/ 500:
  34036. /*!*****************************************************************!*\
  34037. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  34038. \*****************************************************************/
  34039. /*! no static exports found */
  34040. /***/ (function(module, exports) {
  34041. function _isNativeFunction(fn) {
  34042. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  34043. }
  34044. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  34045. /***/ }),
  34046. /***/ 501:
  34047. /*!*********************************************************************************!*\
  34048. !*** D:/IdeaProjects/zdsz_WeChatApplet/pages.json?{"type":"origin-pages-json"} ***!
  34049. \*********************************************************************************/
  34050. /*! no static exports found */
  34051. /***/ (function(module, exports, __webpack_require__) {
  34052. "use strict";
  34053. Object.defineProperty(exports, "__esModule", {
  34054. value: true
  34055. });
  34056. exports.default = void 0;
  34057. var _default = {
  34058. "easycom": {
  34059. "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
  34060. },
  34061. "pages": [{
  34062. "path": "pages/login/login",
  34063. "style": {
  34064. "navigationStyle": "custom"
  34065. }
  34066. }, {
  34067. "path": "pages/noLogin/PressureRegulatingBox/PressureRegulatingBox",
  34068. "style": {
  34069. "navigationStyle": "custom"
  34070. }
  34071. }, {
  34072. "path": "pages/index/index",
  34073. "style": {
  34074. "navigationStyle": "custom"
  34075. }
  34076. }, {
  34077. "path": "pages/noLogin/uploadProject",
  34078. "style": {
  34079. "navigationStyle": "custom"
  34080. }
  34081. }, {
  34082. "path": "pages/noLogin/typeList",
  34083. "style": {
  34084. "navigationStyle": "custom"
  34085. }
  34086. }, {
  34087. "path": "pages/noLogin/communitylist",
  34088. "style": {
  34089. "navigationStyle": "custom"
  34090. }
  34091. }, {
  34092. "path": "pages/noLogin/buildinglist",
  34093. "style": {
  34094. "navigationStyle": "custom"
  34095. }
  34096. }, {
  34097. "path": "pages/noLogin/unitlist",
  34098. "style": {
  34099. "navigationStyle": "custom"
  34100. }
  34101. }, {
  34102. "path": "pages/historyConstruction/historyDetail",
  34103. "style": {
  34104. "navigationStyle": "custom"
  34105. }
  34106. }, {
  34107. "path": "pages/noLogin/listProject",
  34108. "style": {
  34109. "navigationStyle": "custom"
  34110. }
  34111. }, {
  34112. "path": "pages/historyConstruction/updateInfo",
  34113. "style": {
  34114. "navigationBarTitleText": "修改"
  34115. }
  34116. }, {
  34117. "path": "pages/noLogin/cityProject",
  34118. "style": {
  34119. "navigationStyle": "custom"
  34120. }
  34121. }, {
  34122. "path": "pages/noLogin/data",
  34123. "style": {
  34124. "navigationStyle": "custom"
  34125. }
  34126. }, {
  34127. "path": "pages/noLogin/list",
  34128. "style": {
  34129. "navigationBarTitleText": "列表",
  34130. "enablePullDownRefresh": true
  34131. }
  34132. }, {
  34133. "path": "pages/notice/noticeDetail",
  34134. "style": {
  34135. "navigationStyle": "custom"
  34136. }
  34137. }, {
  34138. "path": "pages/notice/noticeList",
  34139. "style": {
  34140. "navigationStyle": "custom"
  34141. }
  34142. }, {
  34143. "path": "pages/cityConstrution/cityConstrution",
  34144. "style": {
  34145. "navigationStyle": "custom"
  34146. }
  34147. }, {
  34148. "path": "pages/historyConstruction/historyConstruction",
  34149. "style": {
  34150. "navigationStyle": "custom"
  34151. }
  34152. }, {
  34153. "path": "pages/service/service",
  34154. "style": {
  34155. "navigationStyle": "custom"
  34156. }
  34157. }, {
  34158. "path": "pages/aboutme/aboutme",
  34159. "style": {
  34160. "navigationStyle": "custom"
  34161. }
  34162. }, {
  34163. "path": "pages/chart/chart",
  34164. "style": {
  34165. "navigationStyle": "custom"
  34166. }
  34167. }, {
  34168. "path": "pages/chart/chartAll",
  34169. "style": {
  34170. "navigationStyle": "custom"
  34171. }
  34172. }, {
  34173. "path": "pages/chart/chartDetail",
  34174. "style": {
  34175. "navigationStyle": "custom"
  34176. }
  34177. }, {
  34178. "path": "pages/chart/newchartDetail",
  34179. "style": {
  34180. "navigationStyle": "custom"
  34181. }
  34182. }, {
  34183. "path": "pages/chart/chartList",
  34184. "style": {
  34185. "navigationBarTitleText": "工程管理"
  34186. }
  34187. }, {
  34188. "path": "pages/chart/details",
  34189. "style": {
  34190. "navigationBarTitleText": "详情"
  34191. }
  34192. }, {
  34193. "path": "pages/noLogin/repair",
  34194. "style": {
  34195. "navigationStyle": "custom"
  34196. }
  34197. }, {
  34198. "path": "pages/noLogin/My",
  34199. "style": {
  34200. "navigationStyle": "custom"
  34201. }
  34202. }, {
  34203. "path": "pages/noLogin/Myphoto",
  34204. "style": {
  34205. "navigationStyle": "custom"
  34206. }
  34207. }, {
  34208. "path": "pages/noLogin/home/home",
  34209. "style": {
  34210. "navigationBarTitleText": "",
  34211. "enablePullDownRefresh": false
  34212. }
  34213. }, {
  34214. "path": "pages/noLogin/emergencyRepairOrder/emergencyRepairOrder",
  34215. "style": {
  34216. "navigationBarTitleText": "",
  34217. "enablePullDownRefresh": false
  34218. }
  34219. }, {
  34220. "path": "pages/noLogin/WarningPileForm/WarningPileForm",
  34221. "style": {
  34222. "navigationBarTitleText": "",
  34223. "enablePullDownRefresh": false
  34224. }
  34225. }, {
  34226. "path": "pages/noLogin/WarningPileList",
  34227. "style": {
  34228. "navigationBarTitleText": "",
  34229. "enablePullDownRefresh": false
  34230. }
  34231. }, {
  34232. "path": "pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement",
  34233. "style": {
  34234. "navigationBarTitleText": "",
  34235. "enablePullDownRefresh": false
  34236. }
  34237. }],
  34238. "globalStyle": {
  34239. "navigationBarTextStyle": "black",
  34240. "navigationBarTitleText": "uni-app",
  34241. "navigationBarBackgroundColor": "#F8F8F8",
  34242. "backgroundColor": "#F8F8F8"
  34243. },
  34244. "tabBar": {
  34245. "list": [{
  34246. "pagePath": "pages/index/index",
  34247. "text": "首页",
  34248. "iconPath": "static/icon/logo.png",
  34249. "selectedIconPath": "static/icon/logo.png"
  34250. }, {
  34251. "pagePath": "pages/noLogin/typeList",
  34252. "text": "工作",
  34253. "iconPath": "static/icon/constructions.png",
  34254. "selectedIconPath": "static/icon/constructions.png"
  34255. }]
  34256. },
  34257. "condition": {
  34258. "current": 0,
  34259. "list": [{
  34260. "name": "",
  34261. "path": "",
  34262. "query": ""
  34263. }]
  34264. }
  34265. };
  34266. exports.default = _default;
  34267. /***/ }),
  34268. /***/ 502:
  34269. /*!********************************************************************!*\
  34270. !*** D:/IdeaProjects/zdsz_WeChatApplet/pages.json?{"type":"stat"} ***!
  34271. \********************************************************************/
  34272. /*! no static exports found */
  34273. /***/ (function(module, exports, __webpack_require__) {
  34274. "use strict";
  34275. Object.defineProperty(exports, "__esModule", {
  34276. value: true
  34277. });
  34278. exports.default = void 0;
  34279. var _default = {
  34280. "appid": "__UNI__5FB7046"
  34281. };
  34282. exports.default = _default;
  34283. /***/ }),
  34284. /***/ 503:
  34285. /*!**************************************************************************************************!*\
  34286. !*** D:/IdeaProjects/zdsz_WeChatApplet/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js ***!
  34287. \**************************************************************************************************/
  34288. /*! no static exports found */
  34289. /***/ (function(module, exports, __webpack_require__) {
  34290. "use strict";
  34291. /* WEBPACK VAR INJECTION */(function(module) {/*
  34292. * uCharts®
  34293. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  34294. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  34295. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  34296. * 复制使用请保留本段注释,感谢支持开源!
  34297. *
  34298. * uCharts®官方网站
  34299. * https://www.uCharts.cn
  34300. *
  34301. * 开源地址:
  34302. * https://gitee.com/uCharts/uCharts
  34303. *
  34304. * uni-app插件市场地址:
  34305. * http://ext.dcloud.net.cn/plugin?id=271
  34306. *
  34307. */
  34308. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  34309. Object.defineProperty(exports, "__esModule", {
  34310. value: true
  34311. });
  34312. exports.default = void 0;
  34313. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  34314. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  34315. var config = {
  34316. version: 'v2.3.6-20211201',
  34317. yAxisWidth: 15,
  34318. yAxisSplit: 5,
  34319. xAxisHeight: 22,
  34320. xAxisLineHeight: 22,
  34321. legendHeight: 15,
  34322. yAxisTitleWidth: 15,
  34323. padding: [10, 10, 10, 10],
  34324. pixelRatio: 1,
  34325. rotate: false,
  34326. columePadding: 3,
  34327. fontSize: 13,
  34328. fontColor: '#666666',
  34329. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  34330. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  34331. linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
  34332. pieChartLinePadding: 15,
  34333. pieChartTextPadding: 5,
  34334. xAxisTextPadding: 3,
  34335. titleColor: '#333333',
  34336. titleFontSize: 20,
  34337. subtitleColor: '#999999',
  34338. subtitleFontSize: 15,
  34339. toolTipPadding: 3,
  34340. toolTipBackground: '#000000',
  34341. toolTipOpacity: 0.7,
  34342. toolTipLineHeight: 20,
  34343. radarLabelTextMargin: 13,
  34344. gaugeLabelTextMargin: 13
  34345. };
  34346. var assign = function assign(target) {
  34347. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  34348. varArgs[_key2 - 1] = arguments[_key2];
  34349. }
  34350. if (target == null) {
  34351. throw new TypeError('[uCharts] Cannot convert undefined or null to object');
  34352. }
  34353. if (!varArgs || varArgs.length <= 0) {
  34354. return target;
  34355. }
  34356. // 深度合并对象
  34357. function deepAssign(obj1, obj2) {
  34358. for (var key in obj2) {
  34359. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  34360. }
  34361. return obj1;
  34362. }
  34363. varArgs.forEach(function (val) {
  34364. target = deepAssign(target, val);
  34365. });
  34366. return target;
  34367. };
  34368. var util = {
  34369. toFixed: function toFixed(num, limit) {
  34370. limit = limit || 2;
  34371. if (this.isFloat(num)) {
  34372. num = num.toFixed(limit);
  34373. }
  34374. return num;
  34375. },
  34376. isFloat: function isFloat(num) {
  34377. return num % 1 !== 0;
  34378. },
  34379. approximatelyEqual: function approximatelyEqual(num1, num2) {
  34380. return Math.abs(num1 - num2) < 1e-10;
  34381. },
  34382. isSameSign: function isSameSign(num1, num2) {
  34383. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  34384. },
  34385. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  34386. return this.isSameSign(p1.x, p2.x);
  34387. },
  34388. isCollision: function isCollision(obj1, obj2) {
  34389. obj1.end = {};
  34390. obj1.end.x = obj1.start.x + obj1.width;
  34391. obj1.end.y = obj1.start.y - obj1.height;
  34392. obj2.end = {};
  34393. obj2.end.x = obj2.start.x + obj2.width;
  34394. obj2.end.y = obj2.start.y - obj2.height;
  34395. 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;
  34396. return !flag;
  34397. }
  34398. };
  34399. //兼容H5点击事件
  34400. function getH5Offset(e) {
  34401. e.mp = {
  34402. changedTouches: []
  34403. };
  34404. e.mp.changedTouches.push({
  34405. x: e.offsetX,
  34406. y: e.offsetY
  34407. });
  34408. return e;
  34409. }
  34410. // 经纬度转墨卡托
  34411. function lonlat2mercator(longitude, latitude) {
  34412. var mercator = Array(2);
  34413. var x = longitude * 20037508.34 / 180;
  34414. var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
  34415. y = y * 20037508.34 / 180;
  34416. mercator[0] = x;
  34417. mercator[1] = y;
  34418. return mercator;
  34419. }
  34420. // 墨卡托转经纬度
  34421. function mercator2lonlat(longitude, latitude) {
  34422. var lonlat = Array(2);
  34423. var x = longitude / 20037508.34 * 180;
  34424. var y = latitude / 20037508.34 * 180;
  34425. y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
  34426. lonlat[0] = x;
  34427. lonlat[1] = y;
  34428. return lonlat;
  34429. }
  34430. // hex 转 rgba
  34431. function hexToRgb(hexValue, opc) {
  34432. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  34433. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  34434. return r + r + g + g + b + b;
  34435. });
  34436. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  34437. var r = parseInt(rgb[1], 16);
  34438. var g = parseInt(rgb[2], 16);
  34439. var b = parseInt(rgb[3], 16);
  34440. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  34441. }
  34442. function findRange(num, type, limit) {
  34443. if (isNaN(num)) {
  34444. throw new Error('[uCharts] series数据需为Number格式');
  34445. }
  34446. limit = limit || 10;
  34447. type = type ? type : 'upper';
  34448. var multiple = 1;
  34449. while (limit < 1) {
  34450. limit *= 10;
  34451. multiple *= 10;
  34452. }
  34453. if (type === 'upper') {
  34454. num = Math.ceil(num * multiple);
  34455. } else {
  34456. num = Math.floor(num * multiple);
  34457. }
  34458. while (num % limit !== 0) {
  34459. if (type === 'upper') {
  34460. num++;
  34461. } else {
  34462. num--;
  34463. }
  34464. }
  34465. return num / multiple;
  34466. }
  34467. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  34468. var seriesTemp = [];
  34469. for (var k = 0; k < dayArr.length; k++) {
  34470. var seriesItem = {
  34471. data: [],
  34472. name: nameArr[k],
  34473. color: colorArr[k]
  34474. };
  34475. for (var i = 0, len = kdata.length; i < len; i++) {
  34476. if (i < dayArr[k]) {
  34477. seriesItem.data.push(null);
  34478. continue;
  34479. }
  34480. var sum = 0;
  34481. for (var j = 0; j < dayArr[k]; j++) {
  34482. sum += kdata[i - j][1];
  34483. }
  34484. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  34485. }
  34486. seriesTemp.push(seriesItem);
  34487. }
  34488. return seriesTemp;
  34489. }
  34490. function calValidDistance(self, distance, chartData, config, opts) {
  34491. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  34492. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  34493. var validDistance = distance;
  34494. if (distance >= 0) {
  34495. validDistance = 0;
  34496. self.uevent.trigger('scrollLeft');
  34497. self.scrollOption.position = 'left';
  34498. opts.xAxis.scrollPosition = 'left';
  34499. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  34500. validDistance = dataChartAreaWidth - dataChartWidth;
  34501. self.uevent.trigger('scrollRight');
  34502. self.scrollOption.position = 'right';
  34503. opts.xAxis.scrollPosition = 'right';
  34504. } else {
  34505. self.scrollOption.position = distance;
  34506. opts.xAxis.scrollPosition = distance;
  34507. }
  34508. return validDistance;
  34509. }
  34510. function isInAngleRange(angle, startAngle, endAngle) {
  34511. function adjust(angle) {
  34512. while (angle < 0) {
  34513. angle += 2 * Math.PI;
  34514. }
  34515. while (angle > 2 * Math.PI) {
  34516. angle -= 2 * Math.PI;
  34517. }
  34518. return angle;
  34519. }
  34520. angle = adjust(angle);
  34521. startAngle = adjust(startAngle);
  34522. endAngle = adjust(endAngle);
  34523. if (startAngle > endAngle) {
  34524. endAngle += 2 * Math.PI;
  34525. if (angle < startAngle) {
  34526. angle += 2 * Math.PI;
  34527. }
  34528. }
  34529. return angle >= startAngle && angle <= endAngle;
  34530. }
  34531. function calRotateTranslate(x, y, h) {
  34532. var xv = x;
  34533. var yv = h - y;
  34534. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  34535. transX *= -1;
  34536. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  34537. return {
  34538. transX: transX,
  34539. transY: transY
  34540. };
  34541. }
  34542. function createCurveControlPoints(points, i) {
  34543. function isNotMiddlePoint(points, i) {
  34544. if (points[i - 1] && points[i + 1]) {
  34545. 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);
  34546. } else {
  34547. return false;
  34548. }
  34549. }
  34550. function isNotMiddlePointX(points, i) {
  34551. if (points[i - 1] && points[i + 1]) {
  34552. 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);
  34553. } else {
  34554. return false;
  34555. }
  34556. }
  34557. var a = 0.2;
  34558. var b = 0.2;
  34559. var pAx = null;
  34560. var pAy = null;
  34561. var pBx = null;
  34562. var pBy = null;
  34563. if (i < 1) {
  34564. pAx = points[0].x + (points[1].x - points[0].x) * a;
  34565. pAy = points[0].y + (points[1].y - points[0].y) * a;
  34566. } else {
  34567. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  34568. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  34569. }
  34570. if (i > points.length - 3) {
  34571. var last = points.length - 1;
  34572. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  34573. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  34574. } else {
  34575. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  34576. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  34577. }
  34578. if (isNotMiddlePoint(points, i + 1)) {
  34579. pBy = points[i + 1].y;
  34580. }
  34581. if (isNotMiddlePoint(points, i)) {
  34582. pAy = points[i].y;
  34583. }
  34584. if (isNotMiddlePointX(points, i + 1)) {
  34585. pBx = points[i + 1].x;
  34586. }
  34587. if (isNotMiddlePointX(points, i)) {
  34588. pAx = points[i].x;
  34589. }
  34590. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  34591. pAy = points[i].y;
  34592. }
  34593. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  34594. pBy = points[i + 1].y;
  34595. }
  34596. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  34597. pAx = points[i].x;
  34598. }
  34599. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  34600. pBx = points[i + 1].x;
  34601. }
  34602. return {
  34603. ctrA: {
  34604. x: pAx,
  34605. y: pAy
  34606. },
  34607. ctrB: {
  34608. x: pBx,
  34609. y: pBy
  34610. }
  34611. };
  34612. }
  34613. function convertCoordinateOrigin(x, y, center) {
  34614. return {
  34615. x: center.x + x,
  34616. y: center.y - y
  34617. };
  34618. }
  34619. function avoidCollision(obj, target) {
  34620. if (target) {
  34621. // is collision test
  34622. while (util.isCollision(obj, target)) {
  34623. if (obj.start.x > 0) {
  34624. obj.start.y--;
  34625. } else if (obj.start.x < 0) {
  34626. obj.start.y++;
  34627. } else {
  34628. if (obj.start.y > 0) {
  34629. obj.start.y++;
  34630. } else {
  34631. obj.start.y--;
  34632. }
  34633. }
  34634. }
  34635. }
  34636. return obj;
  34637. }
  34638. function fixPieSeries(series, opts, config) {
  34639. var pieSeriesArr = [];
  34640. if (series.length > 0 && series[0].data.constructor.toString().indexOf('Array') > -1) {
  34641. opts._pieSeries_ = series;
  34642. var oldseries = series[0].data;
  34643. for (var i = 0; i < oldseries.length; i++) {
  34644. oldseries[i].formatter = series[0].formatter;
  34645. oldseries[i].data = oldseries[i].value;
  34646. pieSeriesArr.push(oldseries[i]);
  34647. }
  34648. opts.series = pieSeriesArr;
  34649. } else {
  34650. pieSeriesArr = series;
  34651. }
  34652. return pieSeriesArr;
  34653. }
  34654. function fillSeries(series, opts, config) {
  34655. var index = 0;
  34656. for (var i = 0; i < series.length; i++) {
  34657. var item = series[i];
  34658. if (!item.color) {
  34659. item.color = config.color[index];
  34660. index = (index + 1) % config.color.length;
  34661. }
  34662. if (!item.linearIndex) {
  34663. item.linearIndex = i;
  34664. }
  34665. if (!item.index) {
  34666. item.index = 0;
  34667. }
  34668. if (!item.type) {
  34669. item.type = opts.type;
  34670. }
  34671. if (typeof item.show == "undefined") {
  34672. item.show = true;
  34673. }
  34674. if (!item.type) {
  34675. item.type = opts.type;
  34676. }
  34677. if (!item.pointShape) {
  34678. item.pointShape = "circle";
  34679. }
  34680. if (!item.legendShape) {
  34681. switch (item.type) {
  34682. case 'line':
  34683. item.legendShape = "line";
  34684. break;
  34685. case 'column':
  34686. item.legendShape = "rect";
  34687. break;
  34688. case 'area':
  34689. item.legendShape = "triangle";
  34690. break;
  34691. case 'bar':
  34692. item.legendShape = "rect";
  34693. break;
  34694. default:
  34695. item.legendShape = "circle";
  34696. }
  34697. }
  34698. }
  34699. return series;
  34700. }
  34701. function fillCustomColor(linearType, customColor, series, config) {
  34702. var newcolor = customColor || [];
  34703. if (linearType == 'custom' && newcolor.length == 0) {
  34704. newcolor = config.linearColor;
  34705. }
  34706. if (linearType == 'custom' && newcolor.length < series.length) {
  34707. var chazhi = series.length - newcolor.length;
  34708. for (var i = 0; i < chazhi; i++) {
  34709. newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
  34710. }
  34711. }
  34712. return newcolor;
  34713. }
  34714. function getDataRange(minData, maxData) {
  34715. var limit = 0;
  34716. var range = maxData - minData;
  34717. if (range >= 10000) {
  34718. limit = 1000;
  34719. } else if (range >= 1000) {
  34720. limit = 100;
  34721. } else if (range >= 100) {
  34722. limit = 10;
  34723. } else if (range >= 10) {
  34724. limit = 5;
  34725. } else if (range >= 1) {
  34726. limit = 1;
  34727. } else if (range >= 0.1) {
  34728. limit = 0.1;
  34729. } else if (range >= 0.01) {
  34730. limit = 0.01;
  34731. } else if (range >= 0.001) {
  34732. limit = 0.001;
  34733. } else if (range >= 0.0001) {
  34734. limit = 0.0001;
  34735. } else if (range >= 0.00001) {
  34736. limit = 0.00001;
  34737. } else {
  34738. limit = 0.000001;
  34739. }
  34740. return {
  34741. minRange: findRange(minData, 'lower', limit),
  34742. maxRange: findRange(maxData, 'upper', limit)
  34743. };
  34744. }
  34745. function measureText(text, fontSize, context) {
  34746. var width = 0;
  34747. text = String(text);
  34748. if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
  34749. context.setFontSize(fontSize);
  34750. return context.measureText(text).width;
  34751. } else {
  34752. var text = text.split('');
  34753. for (var i = 0; i < text.length; i++) {
  34754. var item = text[i];
  34755. if (/[a-zA-Z]/.test(item)) {
  34756. width += 7;
  34757. } else if (/[0-9]/.test(item)) {
  34758. width += 5.5;
  34759. } else if (/\./.test(item)) {
  34760. width += 2.7;
  34761. } else if (/-/.test(item)) {
  34762. width += 3.25;
  34763. } else if (/:/.test(item)) {
  34764. width += 2.5;
  34765. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  34766. width += 10;
  34767. } else if (/\(|\)/.test(item)) {
  34768. width += 3.73;
  34769. } else if (/\s/.test(item)) {
  34770. width += 2.5;
  34771. } else if (/%/.test(item)) {
  34772. width += 8;
  34773. } else {
  34774. width += 10;
  34775. }
  34776. }
  34777. return width * fontSize / 10;
  34778. }
  34779. }
  34780. function dataCombine(series) {
  34781. return series.reduce(function (a, b) {
  34782. return (a.data ? a.data : a).concat(b.data);
  34783. }, []);
  34784. }
  34785. function dataCombineStack(series, len) {
  34786. var sum = new Array(len);
  34787. for (var j = 0; j < sum.length; j++) {
  34788. sum[j] = 0;
  34789. }
  34790. for (var i = 0; i < series.length; i++) {
  34791. for (var j = 0; j < sum.length; j++) {
  34792. sum[j] += series[i].data[j];
  34793. }
  34794. }
  34795. return series.reduce(function (a, b) {
  34796. return (a.data ? a.data : a).concat(b.data).concat(sum);
  34797. }, []);
  34798. }
  34799. function getTouches(touches, opts, e) {
  34800. var x, y;
  34801. if (touches.clientX) {
  34802. if (opts.rotate) {
  34803. y = opts.height - touches.clientX * opts.pix;
  34804. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34805. } else {
  34806. x = touches.clientX * opts.pix;
  34807. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pix / 2 * (opts.pix - 1)) * opts.pix;
  34808. }
  34809. } else {
  34810. if (opts.rotate) {
  34811. y = opts.height - touches.x * opts.pix;
  34812. x = touches.y * opts.pix;
  34813. } else {
  34814. x = touches.x * opts.pix;
  34815. y = touches.y * opts.pix;
  34816. }
  34817. }
  34818. return {
  34819. x: x,
  34820. y: y
  34821. };
  34822. }
  34823. function getSeriesDataItem(series, index, group) {
  34824. var data = [];
  34825. var newSeries = [];
  34826. var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
  34827. if (indexIsArr) {
  34828. var tempSeries = filterSeries(series);
  34829. for (var i = 0; i < group.length; i++) {
  34830. newSeries.push(tempSeries[group[i]]);
  34831. }
  34832. } else {
  34833. newSeries = series;
  34834. }
  34835. ;
  34836. for (var _i = 0; _i < newSeries.length; _i++) {
  34837. var item = newSeries[_i];
  34838. var tmpindex = -1;
  34839. if (indexIsArr) {
  34840. tmpindex = index[_i];
  34841. } else {
  34842. tmpindex = index;
  34843. }
  34844. if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
  34845. var seriesItem = {};
  34846. seriesItem.color = item.color;
  34847. seriesItem.type = item.type;
  34848. seriesItem.style = item.style;
  34849. seriesItem.pointShape = item.pointShape;
  34850. seriesItem.disableLegend = item.disableLegend;
  34851. seriesItem.name = item.name;
  34852. seriesItem.show = item.show;
  34853. seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
  34854. data.push(seriesItem);
  34855. }
  34856. }
  34857. return data;
  34858. }
  34859. function getMaxTextListLength(list, fontSize, context) {
  34860. var lengthList = list.map(function (item) {
  34861. return measureText(item, fontSize, context);
  34862. });
  34863. return Math.max.apply(null, lengthList);
  34864. }
  34865. function getRadarCoordinateSeries(length) {
  34866. var eachAngle = 2 * Math.PI / length;
  34867. var CoordinateSeries = [];
  34868. for (var i = 0; i < length; i++) {
  34869. CoordinateSeries.push(eachAngle * i);
  34870. }
  34871. return CoordinateSeries.map(function (item) {
  34872. return -1 * item + Math.PI / 2;
  34873. });
  34874. }
  34875. function getToolTipData(seriesData, opts, index, group, categories) {
  34876. var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  34877. var calPoints = opts.chartData.calPoints ? opts.chartData.calPoints : [];
  34878. var points = {};
  34879. if (group.length > 0) {
  34880. var filterPoints = [];
  34881. for (var i = 0; i < group.length; i++) {
  34882. filterPoints.push(calPoints[group[i]]);
  34883. }
  34884. points = filterPoints[0][index[0]];
  34885. } else {
  34886. points = calPoints[0][index];
  34887. }
  34888. ;
  34889. var textList = seriesData.map(function (item) {
  34890. var titleText = null;
  34891. if (opts.categories && opts.categories.length > 0) {
  34892. titleText = categories[index];
  34893. }
  34894. ;
  34895. return {
  34896. text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
  34897. color: item.color
  34898. };
  34899. });
  34900. var offset = {
  34901. x: Math.round(points.x),
  34902. y: Math.round(points.y)
  34903. };
  34904. return {
  34905. textList: textList,
  34906. offset: offset
  34907. };
  34908. }
  34909. function getMixToolTipData(seriesData, opts, index, categories) {
  34910. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  34911. var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
  34912. var textList = seriesData.map(function (item) {
  34913. return {
  34914. text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
  34915. color: item.color,
  34916. disableLegend: item.disableLegend ? true : false
  34917. };
  34918. });
  34919. textList = textList.filter(function (item) {
  34920. if (item.disableLegend !== true) {
  34921. return item;
  34922. }
  34923. });
  34924. var offset = {
  34925. x: Math.round(points),
  34926. y: 0
  34927. };
  34928. return {
  34929. textList: textList,
  34930. offset: offset
  34931. };
  34932. }
  34933. function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
  34934. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  34935. var calPoints = opts.chartData.calPoints;
  34936. var upColor = extra.color.upFill;
  34937. var downColor = extra.color.downFill;
  34938. //颜色顺序为开盘,收盘,最低,最高
  34939. var color = [upColor, upColor, downColor, upColor];
  34940. var textList = [];
  34941. seriesData.map(function (item) {
  34942. if (index == 0) {
  34943. if (item.data[1] - item.data[0] < 0) {
  34944. color[1] = downColor;
  34945. } else {
  34946. color[1] = upColor;
  34947. }
  34948. } else {
  34949. if (item.data[0] < series[index - 1][1]) {
  34950. color[0] = downColor;
  34951. }
  34952. if (item.data[1] < item.data[0]) {
  34953. color[1] = downColor;
  34954. }
  34955. if (item.data[2] > series[index - 1][1]) {
  34956. color[2] = upColor;
  34957. }
  34958. if (item.data[3] < series[index - 1][1]) {
  34959. color[3] = downColor;
  34960. }
  34961. }
  34962. var text1 = {
  34963. text: '开盘:' + item.data[0],
  34964. color: color[0]
  34965. };
  34966. var text2 = {
  34967. text: '收盘:' + item.data[1],
  34968. color: color[1]
  34969. };
  34970. var text3 = {
  34971. text: '最低:' + item.data[2],
  34972. color: color[2]
  34973. };
  34974. var text4 = {
  34975. text: '最高:' + item.data[3],
  34976. color: color[3]
  34977. };
  34978. textList.push(text1, text2, text3, text4);
  34979. });
  34980. var validCalPoints = [];
  34981. var offset = {
  34982. x: 0,
  34983. y: 0
  34984. };
  34985. for (var i = 0; i < calPoints.length; i++) {
  34986. var points = calPoints[i];
  34987. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  34988. validCalPoints.push(points[index]);
  34989. }
  34990. }
  34991. offset.x = Math.round(validCalPoints[0][0].x);
  34992. return {
  34993. textList: textList,
  34994. offset: offset
  34995. };
  34996. }
  34997. function filterSeries(series) {
  34998. var tempSeries = [];
  34999. for (var i = 0; i < series.length; i++) {
  35000. if (series[i].show == true) {
  35001. tempSeries.push(series[i]);
  35002. }
  35003. }
  35004. return tempSeries;
  35005. }
  35006. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  35007. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35008. var current = {
  35009. index: -1,
  35010. group: []
  35011. };
  35012. var spacing = opts.chartData.eachSpacing / 2;
  35013. var xAxisPoints = [];
  35014. if (calPoints && calPoints.length > 0) {
  35015. if (!opts.categories) {
  35016. spacing = 0;
  35017. } else {
  35018. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  35019. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  35020. }
  35021. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  35022. xAxisPoints = opts.chartData.xAxisPoints;
  35023. }
  35024. }
  35025. if (isInExactChartArea(currentPoints, opts, config)) {
  35026. if (!opts.categories) {
  35027. var timePoints = Array(calPoints.length);
  35028. for (var _i2 = 0; _i2 < calPoints.length; _i2++) {
  35029. timePoints[_i2] = Array(calPoints[_i2].length);
  35030. for (var j = 0; j < calPoints[_i2].length; j++) {
  35031. timePoints[_i2][j] = Math.abs(calPoints[_i2][j].x - currentPoints.x);
  35032. }
  35033. }
  35034. ;
  35035. var pointValue = Array(timePoints.length);
  35036. var pointIndex = Array(timePoints.length);
  35037. for (var _i3 = 0; _i3 < timePoints.length; _i3++) {
  35038. pointValue[_i3] = Math.min.apply(null, timePoints[_i3]);
  35039. pointIndex[_i3] = timePoints[_i3].indexOf(pointValue[_i3]);
  35040. }
  35041. var minValue = Math.min.apply(null, pointValue);
  35042. current.index = [];
  35043. for (var _i4 = 0; _i4 < pointValue.length; _i4++) {
  35044. if (pointValue[_i4] == minValue) {
  35045. current.group.push(_i4);
  35046. current.index.push(pointIndex[_i4]);
  35047. }
  35048. }
  35049. ;
  35050. } else {
  35051. xAxisPoints.forEach(function (item, index) {
  35052. if (currentPoints.x + offset + spacing > item) {
  35053. current.index = index;
  35054. }
  35055. });
  35056. }
  35057. }
  35058. }
  35059. return current;
  35060. }
  35061. function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
  35062. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  35063. var current = {
  35064. index: -1,
  35065. group: []
  35066. };
  35067. var spacing = opts.chartData.eachSpacing / 2;
  35068. var yAxisPoints = opts.chartData.yAxisPoints;
  35069. if (calPoints && calPoints.length > 0) {
  35070. if (isInExactChartArea(currentPoints, opts, config)) {
  35071. yAxisPoints.forEach(function (item, index) {
  35072. if (currentPoints.y + offset + spacing > item) {
  35073. current.index = index;
  35074. }
  35075. });
  35076. }
  35077. }
  35078. return current;
  35079. }
  35080. function findLegendIndex(currentPoints, legendData, opts) {
  35081. var currentIndex = -1;
  35082. var gap = 0;
  35083. if (isInExactLegendArea(currentPoints, legendData.area)) {
  35084. var points = legendData.points;
  35085. var index = -1;
  35086. for (var i = 0, len = points.length; i < len; i++) {
  35087. var item = points[i];
  35088. for (var j = 0; j < item.length; j++) {
  35089. index += 1;
  35090. var area = item[j]['area'];
  35091. if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
  35092. currentIndex = index;
  35093. break;
  35094. }
  35095. }
  35096. }
  35097. return currentIndex;
  35098. }
  35099. return currentIndex;
  35100. }
  35101. function isInExactLegendArea(currentPoints, area) {
  35102. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  35103. }
  35104. function isInExactChartArea(currentPoints, opts, config) {
  35105. 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];
  35106. }
  35107. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  35108. var eachAngleArea = 2 * Math.PI / count;
  35109. var currentIndex = -1;
  35110. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  35111. var fixAngle = function fixAngle(angle) {
  35112. if (angle < 0) {
  35113. angle += 2 * Math.PI;
  35114. }
  35115. if (angle > 2 * Math.PI) {
  35116. angle -= 2 * Math.PI;
  35117. }
  35118. return angle;
  35119. };
  35120. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  35121. angle = -1 * angle;
  35122. if (angle < 0) {
  35123. angle += 2 * Math.PI;
  35124. }
  35125. var angleList = radarData.angleList.map(function (item) {
  35126. item = fixAngle(-1 * item);
  35127. return item;
  35128. });
  35129. angleList.forEach(function (item, index) {
  35130. var rangeStart = fixAngle(item - eachAngleArea / 2);
  35131. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  35132. if (rangeEnd < rangeStart) {
  35133. rangeEnd += 2 * Math.PI;
  35134. }
  35135. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  35136. currentIndex = index;
  35137. }
  35138. });
  35139. }
  35140. return currentIndex;
  35141. }
  35142. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  35143. var currentIndex = -1;
  35144. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  35145. var item = funnelData.series[i];
  35146. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  35147. currentIndex = i;
  35148. break;
  35149. }
  35150. }
  35151. return currentIndex;
  35152. }
  35153. function findWordChartCurrentIndex(currentPoints, wordData) {
  35154. var currentIndex = -1;
  35155. for (var i = 0, len = wordData.length; i < len; i++) {
  35156. var item = wordData[i];
  35157. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  35158. currentIndex = i;
  35159. break;
  35160. }
  35161. }
  35162. return currentIndex;
  35163. }
  35164. function findMapChartCurrentIndex(currentPoints, opts) {
  35165. var currentIndex = -1;
  35166. var cData = opts.chartData.mapData;
  35167. var data = opts.series;
  35168. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  35169. var poi = [tmp.x, tmp.y];
  35170. for (var i = 0, len = data.length; i < len; i++) {
  35171. var item = data[i].geometry.coordinates;
  35172. if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
  35173. currentIndex = i;
  35174. break;
  35175. }
  35176. }
  35177. return currentIndex;
  35178. }
  35179. function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
  35180. var currentIndex = -1;
  35181. var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
  35182. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35183. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35184. angle = -angle;
  35185. if (opts.extra.rose && opts.extra.rose.offsetAngle) {
  35186. angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
  35187. }
  35188. for (var i = 0, len = series.length; i < len; i++) {
  35189. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
  35190. currentIndex = i;
  35191. break;
  35192. }
  35193. }
  35194. }
  35195. return currentIndex;
  35196. }
  35197. function findPieChartCurrentIndex(currentPoints, pieData, opts) {
  35198. var currentIndex = -1;
  35199. var series = getPieDataPoints(pieData.series);
  35200. if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  35201. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  35202. angle = -angle;
  35203. if (opts.extra.pie && opts.extra.pie.offsetAngle) {
  35204. angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
  35205. }
  35206. if (opts.extra.ring && opts.extra.ring.offsetAngle) {
  35207. angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
  35208. }
  35209. for (var i = 0, len = series.length; i < len; i++) {
  35210. if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
  35211. currentIndex = i;
  35212. break;
  35213. }
  35214. }
  35215. }
  35216. return currentIndex;
  35217. }
  35218. function isInExactPieChartArea(currentPoints, center, radius) {
  35219. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  35220. }
  35221. function splitPoints(points, eachSeries) {
  35222. var newPoints = [];
  35223. var items = [];
  35224. points.forEach(function (item, index) {
  35225. if (eachSeries.connectNulls) {
  35226. if (item !== null) {
  35227. items.push(item);
  35228. }
  35229. } else {
  35230. if (item !== null) {
  35231. items.push(item);
  35232. } else {
  35233. if (items.length) {
  35234. newPoints.push(items);
  35235. }
  35236. items = [];
  35237. }
  35238. }
  35239. });
  35240. if (items.length) {
  35241. newPoints.push(items);
  35242. }
  35243. return newPoints;
  35244. }
  35245. function calLegendData(series, opts, config, chartData, context) {
  35246. var legendData = {
  35247. area: {
  35248. start: {
  35249. x: 0,
  35250. y: 0
  35251. },
  35252. end: {
  35253. x: 0,
  35254. y: 0
  35255. },
  35256. width: 0,
  35257. height: 0,
  35258. wholeWidth: 0,
  35259. wholeHeight: 0
  35260. },
  35261. points: [],
  35262. widthArr: [],
  35263. heightArr: []
  35264. };
  35265. if (opts.legend.show === false) {
  35266. chartData.legendData = legendData;
  35267. return legendData;
  35268. }
  35269. var padding = opts.legend.padding * opts.pix;
  35270. var margin = opts.legend.margin * opts.pix;
  35271. var fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
  35272. var shapeWidth = 15 * opts.pix;
  35273. var shapeRight = 5 * opts.pix;
  35274. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  35275. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  35276. var legendList = [];
  35277. var widthCount = 0;
  35278. var widthCountArr = [];
  35279. var currentRow = [];
  35280. for (var i = 0; i < series.length; i++) {
  35281. var item = series[i];
  35282. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35283. if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
  35284. legendList.push(currentRow);
  35285. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35286. widthCount = itemWidth;
  35287. currentRow = [item];
  35288. } else {
  35289. widthCount += itemWidth;
  35290. currentRow.push(item);
  35291. }
  35292. }
  35293. if (currentRow.length) {
  35294. legendList.push(currentRow);
  35295. widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
  35296. legendData.widthArr = widthCountArr;
  35297. var legendWidth = Math.max.apply(null, widthCountArr);
  35298. switch (opts.legend.float) {
  35299. case 'left':
  35300. legendData.area.start.x = opts.area[3];
  35301. legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
  35302. break;
  35303. case 'right':
  35304. legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
  35305. legendData.area.end.x = opts.width - opts.area[1];
  35306. break;
  35307. default:
  35308. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  35309. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  35310. }
  35311. legendData.area.width = legendWidth + 2 * padding;
  35312. legendData.area.wholeWidth = legendWidth + 2 * padding;
  35313. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  35314. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  35315. legendData.points = legendList;
  35316. }
  35317. } else {
  35318. var len = series.length;
  35319. var maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
  35320. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  35321. legendData.area.height = maxLength * lineHeight + padding * 2;
  35322. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  35323. switch (opts.legend.float) {
  35324. case 'top':
  35325. legendData.area.start.y = opts.area[0] + margin;
  35326. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35327. break;
  35328. case 'bottom':
  35329. legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
  35330. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35331. break;
  35332. default:
  35333. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  35334. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  35335. }
  35336. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  35337. var _currentRow = [];
  35338. for (var _i5 = 0; _i5 < lineNum; _i5++) {
  35339. var temp = series.slice(_i5 * maxLength, _i5 * maxLength + maxLength);
  35340. _currentRow.push(temp);
  35341. }
  35342. legendData.points = _currentRow;
  35343. if (_currentRow.length) {
  35344. for (var _i6 = 0; _i6 < _currentRow.length; _i6++) {
  35345. var _item = _currentRow[_i6];
  35346. var maxWidth = 0;
  35347. for (var j = 0; j < _item.length; j++) {
  35348. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
  35349. if (_itemWidth > maxWidth) {
  35350. maxWidth = _itemWidth;
  35351. }
  35352. }
  35353. legendData.widthArr.push(maxWidth);
  35354. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  35355. }
  35356. var _legendWidth = 0;
  35357. for (var _i7 = 0; _i7 < legendData.widthArr.length; _i7++) {
  35358. _legendWidth += legendData.widthArr[_i7];
  35359. }
  35360. legendData.area.width = _legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
  35361. legendData.area.wholeWidth = legendData.area.width + padding;
  35362. }
  35363. }
  35364. switch (opts.legend.position) {
  35365. case 'top':
  35366. legendData.area.start.y = opts.area[0] + margin;
  35367. legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
  35368. break;
  35369. case 'bottom':
  35370. legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
  35371. legendData.area.end.y = opts.height - opts.area[2] - margin;
  35372. break;
  35373. case 'left':
  35374. legendData.area.start.x = opts.area[3];
  35375. legendData.area.end.x = opts.area[3] + legendData.area.width;
  35376. break;
  35377. case 'right':
  35378. legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
  35379. legendData.area.end.x = opts.width - opts.area[1];
  35380. break;
  35381. }
  35382. chartData.legendData = legendData;
  35383. return legendData;
  35384. }
  35385. function calCategoriesData(categories, opts, config, eachSpacing, context) {
  35386. var result = {
  35387. angle: 0,
  35388. xAxisHeight: config.xAxisHeight
  35389. };
  35390. var categoriesTextLenth = categories.map(function (item) {
  35391. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35392. });
  35393. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  35394. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35395. result.angle = 45 * Math.PI / 180;
  35396. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35397. }
  35398. return result;
  35399. }
  35400. function getXAxisTextList(series, opts, config, stack) {
  35401. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  35402. var data;
  35403. if (stack == 'stack') {
  35404. data = dataCombineStack(series, opts.categories.length);
  35405. } else {
  35406. data = dataCombine(series);
  35407. }
  35408. var sorted = [];
  35409. // remove null from data
  35410. data = data.filter(function (item) {
  35411. //return item !== null;
  35412. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35413. if (item.constructor.toString().indexOf('Array') > -1) {
  35414. return item !== null;
  35415. } else {
  35416. return item.value !== null;
  35417. }
  35418. } else {
  35419. return item !== null;
  35420. }
  35421. });
  35422. data.map(function (item) {
  35423. if ((0, _typeof2.default)(item) === 'object') {
  35424. if (item.constructor.toString().indexOf('Array') > -1) {
  35425. if (opts.type == 'candle') {
  35426. item.map(function (subitem) {
  35427. sorted.push(subitem);
  35428. });
  35429. } else {
  35430. sorted.push(item[0]);
  35431. }
  35432. } else {
  35433. sorted.push(item.value);
  35434. }
  35435. } else {
  35436. sorted.push(item);
  35437. }
  35438. });
  35439. var minData = 0;
  35440. var maxData = 0;
  35441. if (sorted.length > 0) {
  35442. minData = Math.min.apply(this, sorted);
  35443. maxData = Math.max.apply(this, sorted);
  35444. }
  35445. //为了兼容v1.9.0之前的项目
  35446. if (index > -1) {
  35447. if (typeof opts.xAxis.data[index].min === 'number') {
  35448. minData = Math.min(opts.xAxis.data[index].min, minData);
  35449. }
  35450. if (typeof opts.xAxis.data[index].max === 'number') {
  35451. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  35452. }
  35453. } else {
  35454. if (typeof opts.xAxis.min === 'number') {
  35455. minData = Math.min(opts.xAxis.min, minData);
  35456. }
  35457. if (typeof opts.xAxis.max === 'number') {
  35458. maxData = Math.max(opts.xAxis.max, maxData);
  35459. }
  35460. }
  35461. if (minData === maxData) {
  35462. var rangeSpan = maxData || 10;
  35463. maxData += rangeSpan;
  35464. }
  35465. //var dataRange = getDataRange(minData, maxData);
  35466. var minRange = minData;
  35467. var maxRange = maxData;
  35468. var range = [];
  35469. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  35470. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  35471. range.push(minRange + eachRange * i);
  35472. }
  35473. return range;
  35474. }
  35475. function calXAxisData(series, opts, config, context) {
  35476. //堆叠图重算Y轴
  35477. var columnstyle = assign({}, {
  35478. type: ""
  35479. }, opts.extra.bar);
  35480. var result = {
  35481. angle: 0,
  35482. xAxisHeight: config.xAxisHeight
  35483. };
  35484. result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
  35485. result.rangesFormat = result.ranges.map(function (item) {
  35486. //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
  35487. item = util.toFixed(item, 2);
  35488. return item;
  35489. });
  35490. var xAxisScaleValues = result.ranges.map(function (item) {
  35491. // 如果刻度值是浮点数,则保留两位小数
  35492. item = util.toFixed(item, 2);
  35493. // 若有自定义格式则调用自定义的格式化函数
  35494. //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
  35495. return item;
  35496. });
  35497. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  35498. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  35499. var eachSpacing = result.eachSpacing;
  35500. var textLength = xAxisScaleValues.map(function (item) {
  35501. return measureText(item, opts.xAxis.fontSize * opts.pix || config.fontSize, context);
  35502. });
  35503. // get max length of categories text
  35504. var maxTextLength = Math.max.apply(this, textLength);
  35505. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  35506. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  35507. result.angle = 45 * Math.PI / 180;
  35508. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  35509. }
  35510. if (opts.xAxis.disabled === true) {
  35511. result.xAxisHeight = 0;
  35512. }
  35513. return result;
  35514. }
  35515. function getRadarDataPoints(angleList, center, radius, series, opts) {
  35516. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  35517. var radarOption = opts.extra.radar || {};
  35518. radarOption.max = radarOption.max || 0;
  35519. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  35520. var data = [];
  35521. var _loop2 = function _loop2(i) {
  35522. var each = series[i];
  35523. var listItem = {};
  35524. listItem.color = each.color;
  35525. listItem.legendShape = each.legendShape;
  35526. listItem.pointShape = each.pointShape;
  35527. listItem.data = [];
  35528. each.data.forEach(function (item, index) {
  35529. var tmp = {};
  35530. tmp.angle = angleList[index];
  35531. tmp.proportion = item / maxData;
  35532. tmp.value = item;
  35533. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  35534. listItem.data.push(tmp);
  35535. });
  35536. data.push(listItem);
  35537. };
  35538. for (var i = 0; i < series.length; i++) {
  35539. _loop2(i);
  35540. }
  35541. return data;
  35542. }
  35543. function getPieDataPoints(series, radius) {
  35544. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35545. var count = 0;
  35546. var _start_ = 0;
  35547. for (var i = 0; i < series.length; i++) {
  35548. var item = series[i];
  35549. item.data = item.data === null ? 0 : item.data;
  35550. count += item.data;
  35551. }
  35552. for (var _i8 = 0; _i8 < series.length; _i8++) {
  35553. var _item2 = series[_i8];
  35554. _item2.data = _item2.data === null ? 0 : _item2.data;
  35555. if (count === 0) {
  35556. _item2._proportion_ = 1 / series.length * process;
  35557. } else {
  35558. _item2._proportion_ = _item2.data / count * process;
  35559. }
  35560. _item2._radius_ = radius;
  35561. }
  35562. for (var _i9 = 0; _i9 < series.length; _i9++) {
  35563. var _item3 = series[_i9];
  35564. _item3._start_ = _start_;
  35565. _start_ += 2 * _item3._proportion_ * Math.PI;
  35566. }
  35567. return series;
  35568. }
  35569. function getFunnelDataPoints(series, radius, type, eachSpacing) {
  35570. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35571. series = series.sort(function (a, b) {
  35572. return parseInt(b.data) - parseInt(a.data);
  35573. });
  35574. for (var i = 0; i < series.length; i++) {
  35575. if (type == 'funnel') {
  35576. series[i].radius = series[i].data / series[0].data * radius * process;
  35577. } else {
  35578. series[i].radius = eachSpacing * (series.length - i) / (eachSpacing * series.length) * radius * process;
  35579. }
  35580. series[i]._proportion_ = series[i].data / series[0].data;
  35581. }
  35582. if (type !== 'pyramid') {
  35583. series.reverse();
  35584. }
  35585. return series;
  35586. }
  35587. function getRoseDataPoints(series, type, minRadius, radius) {
  35588. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  35589. var count = 0;
  35590. var _start_ = 0;
  35591. var dataArr = [];
  35592. for (var i = 0; i < series.length; i++) {
  35593. var item = series[i];
  35594. item.data = item.data === null ? 0 : item.data;
  35595. count += item.data;
  35596. dataArr.push(item.data);
  35597. }
  35598. var minData = Math.min.apply(null, dataArr);
  35599. var maxData = Math.max.apply(null, dataArr);
  35600. var radiusLength = radius - minRadius;
  35601. for (var _i10 = 0; _i10 < series.length; _i10++) {
  35602. var _item4 = series[_i10];
  35603. _item4.data = _item4.data === null ? 0 : _item4.data;
  35604. if (count === 0) {
  35605. _item4._proportion_ = 1 / series.length * process;
  35606. _item4._rose_proportion_ = 1 / series.length * process;
  35607. } else {
  35608. _item4._proportion_ = _item4.data / count * process;
  35609. if (type == 'area') {
  35610. _item4._rose_proportion_ = 1 / series.length * process;
  35611. } else {
  35612. _item4._rose_proportion_ = _item4.data / count * process;
  35613. }
  35614. }
  35615. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData)) || radius;
  35616. }
  35617. for (var _i11 = 0; _i11 < series.length; _i11++) {
  35618. var _item5 = series[_i11];
  35619. _item5._start_ = _start_;
  35620. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  35621. }
  35622. return series;
  35623. }
  35624. function getArcbarDataPoints(series, arcbarOption) {
  35625. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35626. if (process == 1) {
  35627. process = 0.999999;
  35628. }
  35629. for (var i = 0; i < series.length; i++) {
  35630. var item = series[i];
  35631. item.data = item.data === null ? 0 : item.data;
  35632. var totalAngle = void 0;
  35633. if (arcbarOption.type == 'circle') {
  35634. totalAngle = 2;
  35635. } else {
  35636. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  35637. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  35638. } else {
  35639. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  35640. }
  35641. }
  35642. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  35643. if (item._proportion_ >= 2) {
  35644. item._proportion_ = item._proportion_ % 2;
  35645. }
  35646. }
  35647. return series;
  35648. }
  35649. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  35650. var totalAngle = startAngle - endAngle + 1;
  35651. var tempStartAngle = startAngle;
  35652. for (var i = 0; i < categories.length; i++) {
  35653. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  35654. categories[i]._startAngle_ = tempStartAngle;
  35655. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  35656. if (categories[i]._endAngle_ >= 2) {
  35657. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  35658. }
  35659. tempStartAngle = categories[i]._endAngle_;
  35660. }
  35661. return categories;
  35662. }
  35663. function getGaugeDataPoints(series, categories, gaugeOption) {
  35664. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  35665. for (var i = 0; i < series.length; i++) {
  35666. var item = series[i];
  35667. item.data = item.data === null ? 0 : item.data;
  35668. if (gaugeOption.pointer.color == 'auto') {
  35669. for (var _i12 = 0; _i12 < categories.length; _i12++) {
  35670. if (item.data <= categories[_i12].value) {
  35671. item.color = categories[_i12].color;
  35672. break;
  35673. }
  35674. }
  35675. } else {
  35676. item.color = gaugeOption.pointer.color;
  35677. }
  35678. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  35679. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  35680. item._oldAngle_ = gaugeOption.oldAngle;
  35681. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  35682. item._oldAngle_ += 2;
  35683. }
  35684. if (item.data >= gaugeOption.oldData) {
  35685. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  35686. } else {
  35687. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  35688. }
  35689. if (item._proportion_ >= 2) {
  35690. item._proportion_ = item._proportion_ % 2;
  35691. }
  35692. }
  35693. return series;
  35694. }
  35695. function getPieTextMaxLength(series, config, context, opts) {
  35696. series = getPieDataPoints(series);
  35697. var maxLength = 0;
  35698. for (var i = 0; i < series.length; i++) {
  35699. var item = series[i];
  35700. var text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  35701. maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
  35702. }
  35703. return maxLength;
  35704. }
  35705. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  35706. return points.map(function (item) {
  35707. if (item === null) {
  35708. return null;
  35709. }
  35710. var seriesGap = 0;
  35711. var categoryGap = 0;
  35712. if (opts.type == 'mix') {
  35713. seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
  35714. categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
  35715. } else {
  35716. seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
  35717. categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35718. }
  35719. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35720. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35721. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35722. if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
  35723. item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
  35724. }
  35725. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35726. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35727. }
  35728. if (item.width <= 0) {
  35729. item.width = 1;
  35730. }
  35731. item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35732. return item;
  35733. });
  35734. }
  35735. function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
  35736. return points.map(function (item) {
  35737. if (item === null) {
  35738. return null;
  35739. }
  35740. var seriesGap = 0;
  35741. var categoryGap = 0;
  35742. seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
  35743. categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35744. seriesGap = Math.min(seriesGap, eachSpacing / columnLen);
  35745. categoryGap = Math.min(categoryGap, eachSpacing / columnLen);
  35746. item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
  35747. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35748. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35749. }
  35750. if (item.width <= 0) {
  35751. item.width = 1;
  35752. }
  35753. item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
  35754. return item;
  35755. });
  35756. }
  35757. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  35758. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35759. return points.map(function (item) {
  35760. if (item === null) {
  35761. return null;
  35762. }
  35763. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35764. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35765. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35766. }
  35767. if (index > 0) {
  35768. item.width -= 2 * border;
  35769. }
  35770. return item;
  35771. });
  35772. }
  35773. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35774. var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
  35775. return points.map(function (item, indexn) {
  35776. if (item === null) {
  35777. return null;
  35778. }
  35779. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35780. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  35781. item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
  35782. }
  35783. if (item.width <= 0) {
  35784. item.width = 1;
  35785. }
  35786. return item;
  35787. });
  35788. }
  35789. function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  35790. var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
  35791. return points.map(function (item, indexn) {
  35792. if (item === null) {
  35793. return null;
  35794. }
  35795. item.width = Math.ceil(eachSpacing - 2 * categoryGap);
  35796. if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
  35797. item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
  35798. }
  35799. if (item.width <= 0) {
  35800. item.width = 1;
  35801. }
  35802. return item;
  35803. });
  35804. }
  35805. function getXAxisPoints(categories, opts, config) {
  35806. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  35807. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  35808. if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  35809. dataCount -= 1;
  35810. }
  35811. var eachSpacing = spacingValid / dataCount;
  35812. var xAxisPoints = [];
  35813. var startX = opts.area[3];
  35814. var endX = opts.width - opts.area[1];
  35815. categories.forEach(function (item, index) {
  35816. xAxisPoints.push(startX + index * eachSpacing);
  35817. });
  35818. if (opts.xAxis.boundaryGap !== 'justify') {
  35819. if (opts.enableScroll === true) {
  35820. xAxisPoints.push(startX + categories.length * eachSpacing);
  35821. } else {
  35822. xAxisPoints.push(endX);
  35823. }
  35824. }
  35825. return {
  35826. xAxisPoints: xAxisPoints,
  35827. startX: startX,
  35828. endX: endX,
  35829. eachSpacing: eachSpacing
  35830. };
  35831. }
  35832. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35833. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35834. var points = [];
  35835. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35836. data.forEach(function (item, index) {
  35837. if (item === null) {
  35838. points.push(null);
  35839. } else {
  35840. var cPoints = [];
  35841. item.forEach(function (items, indexs) {
  35842. var point = {};
  35843. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35844. var value = items.value || items;
  35845. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35846. height *= process;
  35847. point.y = opts.height - Math.round(height) - opts.area[2];
  35848. cPoints.push(point);
  35849. });
  35850. points.push(cPoints);
  35851. }
  35852. });
  35853. return points;
  35854. }
  35855. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  35856. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35857. var boundaryGap = 'center';
  35858. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  35859. boundaryGap = opts.xAxis.boundaryGap;
  35860. }
  35861. var points = [];
  35862. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35863. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35864. data.forEach(function (item, index) {
  35865. if (item === null) {
  35866. points.push(null);
  35867. } else {
  35868. var point = {};
  35869. point.color = item.color;
  35870. point.x = xAxisPoints[index];
  35871. var value = item;
  35872. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35873. if (item.constructor.toString().indexOf('Array') > -1) {
  35874. var xranges, xminRange, xmaxRange;
  35875. xranges = [].concat(opts.chartData.xAxisData.ranges);
  35876. xminRange = xranges.shift();
  35877. xmaxRange = xranges.pop();
  35878. value = item[1];
  35879. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  35880. if (opts.type == 'bubble') {
  35881. point.r = item[2];
  35882. point.t = item[3];
  35883. }
  35884. } else {
  35885. value = item.value;
  35886. }
  35887. }
  35888. if (boundaryGap == 'center') {
  35889. point.x += eachSpacing / 2;
  35890. }
  35891. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35892. height *= process;
  35893. point.y = opts.height - height - opts.area[2];
  35894. points.push(point);
  35895. }
  35896. });
  35897. return points;
  35898. }
  35899. function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
  35900. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  35901. var points = [];
  35902. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35903. var validWidth = opts.width - opts.area[1] - opts.area[3];
  35904. data.forEach(function (item, index) {
  35905. if (item === null) {
  35906. points.push(null);
  35907. } else {
  35908. var point = {};
  35909. point.color = item.color;
  35910. point.y = yAxisPoints[index];
  35911. var value = item;
  35912. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  35913. value = item.value;
  35914. }
  35915. var height = validWidth * (value - minRange) / (maxRange - minRange);
  35916. height *= process;
  35917. point.height = height;
  35918. point.value = value;
  35919. point.x = height + opts.area[3];
  35920. points.push(point);
  35921. }
  35922. });
  35923. return points;
  35924. }
  35925. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35926. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35927. var points = [];
  35928. var validHeight = opts.height - opts.area[0] - opts.area[2];
  35929. data.forEach(function (item, index) {
  35930. if (item === null) {
  35931. points.push(null);
  35932. } else {
  35933. var point = {};
  35934. point.color = item.color;
  35935. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  35936. if (seriesIndex > 0) {
  35937. var value = 0;
  35938. for (var i = 0; i <= seriesIndex; i++) {
  35939. value += stackSeries[i].data[index];
  35940. }
  35941. var value0 = value - item;
  35942. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35943. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35944. } else {
  35945. var value = item;
  35946. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35947. var height0 = 0;
  35948. }
  35949. var heightc = height0;
  35950. height *= process;
  35951. heightc *= process;
  35952. point.y = opts.height - Math.round(height) - opts.area[2];
  35953. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  35954. points.push(point);
  35955. }
  35956. });
  35957. return points;
  35958. }
  35959. function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  35960. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  35961. var points = [];
  35962. var validHeight = opts.width - opts.area[1] - opts.area[3];
  35963. data.forEach(function (item, index) {
  35964. if (item === null) {
  35965. points.push(null);
  35966. } else {
  35967. var point = {};
  35968. point.color = item.color;
  35969. point.y = yAxisPoints[index];
  35970. if (seriesIndex > 0) {
  35971. var value = 0;
  35972. for (var i = 0; i <= seriesIndex; i++) {
  35973. value += stackSeries[i].data[index];
  35974. }
  35975. var value0 = value - item;
  35976. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35977. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  35978. } else {
  35979. var value = item;
  35980. var height = validHeight * (value - minRange) / (maxRange - minRange);
  35981. var height0 = 0;
  35982. }
  35983. var heightc = height0;
  35984. height *= process;
  35985. heightc *= process;
  35986. point.height = height - heightc;
  35987. point.x = opts.area[3] + height;
  35988. point.x0 = opts.area[3] + heightc;
  35989. points.push(point);
  35990. }
  35991. });
  35992. return points;
  35993. }
  35994. function getYAxisTextList(series, opts, config, stack, yData) {
  35995. var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
  35996. var data;
  35997. if (stack == 'stack') {
  35998. data = dataCombineStack(series, opts.categories.length);
  35999. } else {
  36000. data = dataCombine(series);
  36001. }
  36002. var sorted = [];
  36003. // remove null from data
  36004. data = data.filter(function (item) {
  36005. //return item !== null;
  36006. if ((0, _typeof2.default)(item) === 'object' && item !== null) {
  36007. if (item.constructor.toString().indexOf('Array') > -1) {
  36008. return item !== null;
  36009. } else {
  36010. return item.value !== null;
  36011. }
  36012. } else {
  36013. return item !== null;
  36014. }
  36015. });
  36016. data.map(function (item) {
  36017. if ((0, _typeof2.default)(item) === 'object') {
  36018. if (item.constructor.toString().indexOf('Array') > -1) {
  36019. if (opts.type == 'candle') {
  36020. item.map(function (subitem) {
  36021. sorted.push(subitem);
  36022. });
  36023. } else {
  36024. sorted.push(item[1]);
  36025. }
  36026. } else {
  36027. sorted.push(item.value);
  36028. }
  36029. } else {
  36030. sorted.push(item);
  36031. }
  36032. });
  36033. var minData = yData.min || 0;
  36034. var maxData = yData.max || 0;
  36035. if (sorted.length > 0) {
  36036. minData = Math.min.apply(this, sorted);
  36037. maxData = Math.max.apply(this, sorted);
  36038. }
  36039. //为了兼容v1.9.0之前的项目
  36040. // if (index > -1) {
  36041. // if (typeof opts.yAxis.data[index].min === 'number') {
  36042. // minData = Math.min(opts.yAxis.data[index].min, minData);
  36043. // }
  36044. // if (typeof opts.yAxis.data[index].max === 'number') {
  36045. // maxData = Math.max(opts.yAxis.data[index].max, maxData);
  36046. // }
  36047. // } else {
  36048. // if (typeof opts.yAxis.min === 'number') {
  36049. // minData = Math.min(opts.yAxis.min, minData);
  36050. // }
  36051. // if (typeof opts.yAxis.max === 'number') {
  36052. // maxData = Math.max(opts.yAxis.max, maxData);
  36053. // }
  36054. // }
  36055. if (minData === maxData) {
  36056. var rangeSpan = maxData || 10;
  36057. maxData += rangeSpan;
  36058. }
  36059. var dataRange = getDataRange(minData, maxData);
  36060. var minRange = yData.min === undefined || yData.min === null ? dataRange.minRange : yData.min;
  36061. var maxRange = yData.max === undefined || yData.min === null ? dataRange.maxRange : yData.max;
  36062. var range = [];
  36063. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  36064. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  36065. range.push(minRange + eachRange * i);
  36066. }
  36067. return range.reverse();
  36068. }
  36069. function calYAxisData(series, opts, config, context) {
  36070. //堆叠图重算Y轴
  36071. var columnstyle = assign({}, {
  36072. type: ""
  36073. }, opts.extra.column);
  36074. //如果是多Y轴,重新计算
  36075. var YLength = opts.yAxis.data.length;
  36076. var newSeries = new Array(YLength);
  36077. if (YLength > 0) {
  36078. for (var i = 0; i < YLength; i++) {
  36079. newSeries[i] = [];
  36080. for (var j = 0; j < series.length; j++) {
  36081. if (series[j].index == i) {
  36082. newSeries[i].push(series[j]);
  36083. }
  36084. }
  36085. }
  36086. var rangesArr = new Array(YLength);
  36087. var rangesFormatArr = new Array(YLength);
  36088. var yAxisWidthArr = new Array(YLength);
  36089. var _loop3 = function _loop3(_i13) {
  36090. var yData = opts.yAxis.data[_i13];
  36091. //如果总开关不显示,强制每个Y轴为不显示
  36092. if (opts.yAxis.disabled == true) {
  36093. yData.disabled = true;
  36094. }
  36095. if (yData.type === 'categories') {
  36096. if (!yData.formatter) {
  36097. yData.formatter = function (val) {
  36098. return val + (yData.unit || '');
  36099. };
  36100. }
  36101. yData.categories = yData.categories || opts.categories;
  36102. rangesArr[_i13] = yData.categories;
  36103. } else {
  36104. if (!yData.formatter) {
  36105. yData.formatter = function (val) {
  36106. return val.toFixed(yData.tofix) + (yData.unit || '');
  36107. };
  36108. }
  36109. rangesArr[_i13] = getYAxisTextList(newSeries[_i13], opts, config, columnstyle.type, yData, _i13);
  36110. }
  36111. var yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
  36112. yAxisWidthArr[_i13] = {
  36113. position: yData.position ? yData.position : 'left',
  36114. width: 0
  36115. };
  36116. rangesFormatArr[_i13] = rangesArr[_i13].map(function (items) {
  36117. items = yData.formatter(items);
  36118. yAxisWidthArr[_i13].width = Math.max(yAxisWidthArr[_i13].width, measureText(items, yAxisFontSizes, context) + 5);
  36119. return items;
  36120. });
  36121. var calibration = yData.calibration ? 4 * opts.pix : 0;
  36122. yAxisWidthArr[_i13].width += calibration + 3 * opts.pix;
  36123. if (yData.disabled === true) {
  36124. yAxisWidthArr[_i13].width = 0;
  36125. }
  36126. };
  36127. for (var _i13 = 0; _i13 < YLength; _i13++) {
  36128. _loop3(_i13);
  36129. }
  36130. } else {
  36131. var rangesArr = new Array(1);
  36132. var rangesFormatArr = new Array(1);
  36133. var yAxisWidthArr = new Array(1);
  36134. if (opts.type === 'bar') {
  36135. rangesArr[0] = opts.categories;
  36136. if (!opts.yAxis.formatter) {
  36137. opts.yAxis.formatter = function (val) {
  36138. return val + (opts.yAxis.unit || '');
  36139. };
  36140. }
  36141. } else {
  36142. if (!opts.yAxis.formatter) {
  36143. opts.yAxis.formatter = function (val) {
  36144. return val.toFixed(opts.yAxis.tofix) + (opts.yAxis.unit || '');
  36145. };
  36146. }
  36147. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
  36148. }
  36149. yAxisWidthArr[0] = {
  36150. position: 'left',
  36151. width: 0
  36152. };
  36153. var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
  36154. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  36155. item = opts.yAxis.formatter(item);
  36156. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
  36157. return item;
  36158. });
  36159. yAxisWidthArr[0].width += 3 * opts.pix;
  36160. if (opts.yAxis.disabled === true) {
  36161. yAxisWidthArr[0] = {
  36162. position: 'left',
  36163. width: 0
  36164. };
  36165. opts.yAxis.data[0] = {
  36166. disabled: true
  36167. };
  36168. } else {
  36169. opts.yAxis.data[0] = {
  36170. disabled: false,
  36171. position: 'left',
  36172. max: opts.yAxis.max,
  36173. min: opts.yAxis.min,
  36174. formatter: opts.yAxis.formatter
  36175. };
  36176. if (opts.type === 'bar') {
  36177. opts.yAxis.data[0].categories = opts.categories;
  36178. opts.yAxis.data[0].type = 'categories';
  36179. }
  36180. }
  36181. }
  36182. return {
  36183. rangesFormat: rangesFormatArr,
  36184. ranges: rangesArr,
  36185. yAxisWidth: yAxisWidthArr
  36186. };
  36187. }
  36188. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  36189. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  36190. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36191. var minAxis = opts.area[0];
  36192. var items = [];
  36193. for (var i = 0; i < ranges.length; i++) {
  36194. var maxVal = ranges[i].shift();
  36195. var minVal = ranges[i].pop();
  36196. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  36197. item = opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item) : item.toFixed(0);
  36198. items.push(String(item));
  36199. }
  36200. return items;
  36201. }
  36202. function calMarkLineData(points, opts) {
  36203. var minRange, maxRange;
  36204. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  36205. for (var i = 0; i < points.length; i++) {
  36206. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  36207. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  36208. minRange = range.pop();
  36209. maxRange = range.shift();
  36210. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  36211. points[i].y = opts.height - Math.round(height) - opts.area[2];
  36212. }
  36213. return points;
  36214. }
  36215. function contextRotate(context, opts) {
  36216. if (opts.rotateLock !== true) {
  36217. context.translate(opts.height, 0);
  36218. context.rotate(90 * Math.PI / 180);
  36219. } else if (opts._rotate_ !== true) {
  36220. context.translate(opts.height, 0);
  36221. context.rotate(90 * Math.PI / 180);
  36222. opts._rotate_ = true;
  36223. }
  36224. }
  36225. function drawPointShape(points, color, shape, context, opts) {
  36226. context.beginPath();
  36227. if (opts.dataPointShapeType == 'hollow') {
  36228. context.setStrokeStyle(color);
  36229. context.setFillStyle(opts.background);
  36230. context.setLineWidth(2 * opts.pix);
  36231. } else {
  36232. context.setStrokeStyle("#ffffff");
  36233. context.setFillStyle(color);
  36234. context.setLineWidth(1 * opts.pix);
  36235. }
  36236. if (shape === 'diamond') {
  36237. points.forEach(function (item, index) {
  36238. if (item !== null) {
  36239. context.moveTo(item.x, item.y - 4.5);
  36240. context.lineTo(item.x - 4.5, item.y);
  36241. context.lineTo(item.x, item.y + 4.5);
  36242. context.lineTo(item.x + 4.5, item.y);
  36243. context.lineTo(item.x, item.y - 4.5);
  36244. }
  36245. });
  36246. } else if (shape === 'circle') {
  36247. points.forEach(function (item, index) {
  36248. if (item !== null) {
  36249. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  36250. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  36251. }
  36252. });
  36253. } else if (shape === 'square') {
  36254. points.forEach(function (item, index) {
  36255. if (item !== null) {
  36256. context.moveTo(item.x - 3.5, item.y - 3.5);
  36257. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  36258. }
  36259. });
  36260. } else if (shape === 'triangle') {
  36261. points.forEach(function (item, index) {
  36262. if (item !== null) {
  36263. context.moveTo(item.x, item.y - 4.5);
  36264. context.lineTo(item.x - 4.5, item.y + 4.5);
  36265. context.lineTo(item.x + 4.5, item.y + 4.5);
  36266. context.lineTo(item.x, item.y - 4.5);
  36267. }
  36268. });
  36269. } else if (shape === 'triangle') {
  36270. return;
  36271. }
  36272. context.closePath();
  36273. context.fill();
  36274. context.stroke();
  36275. }
  36276. function drawRingTitle(opts, config, context, center) {
  36277. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  36278. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  36279. var title = opts.title.name || '';
  36280. var subtitle = opts.subtitle.name || '';
  36281. var titleFontColor = opts.title.color || opts.fontColor;
  36282. var subtitleFontColor = opts.subtitle.color || opts.fontColor;
  36283. var titleHeight = title ? titlefontSize : 0;
  36284. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  36285. var margin = 5;
  36286. if (subtitle) {
  36287. var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
  36288. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
  36289. var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
  36290. if (title) {
  36291. startY += (titleHeight * opts.pix + margin) / 2;
  36292. }
  36293. context.beginPath();
  36294. context.setFontSize(subtitlefontSize * opts.pix);
  36295. context.setFillStyle(subtitleFontColor);
  36296. context.fillText(subtitle, startX, startY);
  36297. context.closePath();
  36298. context.stroke();
  36299. }
  36300. if (title) {
  36301. var _textWidth = measureText(title, titlefontSize * opts.pix, context);
  36302. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  36303. var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
  36304. if (subtitle) {
  36305. _startY -= (subtitleHeight * opts.pix + margin) / 2;
  36306. }
  36307. context.beginPath();
  36308. context.setFontSize(titlefontSize * opts.pix);
  36309. context.setFillStyle(titleFontColor);
  36310. context.fillText(title, _startX, _startY);
  36311. context.closePath();
  36312. context.stroke();
  36313. }
  36314. }
  36315. function drawPointText(points, series, config, context, opts) {
  36316. // 绘制数据文案
  36317. var data = series.data;
  36318. var textOffset = series.textOffset ? series.textOffset : 0;
  36319. points.forEach(function (item, index) {
  36320. if (item !== null) {
  36321. context.beginPath();
  36322. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36323. context.setFontSize(fontSize);
  36324. context.setFillStyle(series.textColor || opts.fontColor);
  36325. var value = data[index];
  36326. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36327. if (data[index].constructor.toString().indexOf('Array') > -1) {
  36328. value = data[index][1];
  36329. } else {
  36330. value = data[index].value;
  36331. }
  36332. }
  36333. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36334. context.setTextAlign('center');
  36335. context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
  36336. context.closePath();
  36337. context.stroke();
  36338. context.setTextAlign('left');
  36339. }
  36340. });
  36341. }
  36342. function drawBarPointText(points, series, config, context, opts) {
  36343. // 绘制数据文案
  36344. var data = series.data;
  36345. var textOffset = series.textOffset ? series.textOffset : 0;
  36346. points.forEach(function (item, index) {
  36347. if (item !== null) {
  36348. context.beginPath();
  36349. var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
  36350. context.setFontSize(fontSize);
  36351. context.setFillStyle(series.textColor || opts.fontColor);
  36352. var value = data[index];
  36353. if ((0, _typeof2.default)(data[index]) === 'object' && data[index] !== null) {
  36354. value = data[index].value;
  36355. }
  36356. var formatVal = series.formatter ? series.formatter(value, index) : value;
  36357. context.setTextAlign('left');
  36358. context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
  36359. context.closePath();
  36360. context.stroke();
  36361. }
  36362. });
  36363. }
  36364. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  36365. radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
  36366. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  36367. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  36368. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  36369. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  36370. var nowAngle = gaugeOption.startAngle;
  36371. var nowNumber = gaugeOption.startNumber;
  36372. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  36373. var pos = {
  36374. x: radius * Math.cos(nowAngle * Math.PI),
  36375. y: radius * Math.sin(nowAngle * Math.PI)
  36376. };
  36377. var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber) : nowNumber;
  36378. pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
  36379. pos.y += centerPosition.y;
  36380. var startX = pos.x;
  36381. var startY = pos.y;
  36382. context.beginPath();
  36383. context.setFontSize(config.fontSize);
  36384. context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
  36385. context.fillText(labelText, startX, startY + config.fontSize / 2);
  36386. context.closePath();
  36387. context.stroke();
  36388. nowAngle += splitAngle;
  36389. if (nowAngle >= 2) {
  36390. nowAngle = nowAngle % 2;
  36391. }
  36392. nowNumber += splitNumber;
  36393. }
  36394. }
  36395. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  36396. var radarOption = opts.extra.radar || {};
  36397. radius += config.radarLabelTextMargin * opts.pix;
  36398. angleList.forEach(function (angle, index) {
  36399. var pos = {
  36400. x: radius * Math.cos(angle),
  36401. y: radius * Math.sin(angle)
  36402. };
  36403. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  36404. var startX = posRelativeCanvas.x;
  36405. var startY = posRelativeCanvas.y;
  36406. if (util.approximatelyEqual(pos.x, 0)) {
  36407. startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
  36408. } else if (pos.x < 0) {
  36409. startX -= measureText(opts.categories[index] || '', config.fontSize, context);
  36410. }
  36411. context.beginPath();
  36412. context.setFontSize(config.fontSize);
  36413. context.setFillStyle(radarOption.labelColor || opts.fontColor);
  36414. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  36415. context.closePath();
  36416. context.stroke();
  36417. });
  36418. }
  36419. function drawPieText(series, opts, config, context, radius, center) {
  36420. var lineRadius = config.pieChartLinePadding;
  36421. var textObjectCollection = [];
  36422. var lastTextObject = null;
  36423. var seriesConvert = series.map(function (item, index, series) {
  36424. var text = item.formatter ? item.formatter(item, index, series) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  36425. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  36426. if (item._rose_proportion_) {
  36427. arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
  36428. }
  36429. var color = item.color;
  36430. var radius = item._radius_;
  36431. return {
  36432. arc: arc,
  36433. text: text,
  36434. color: color,
  36435. radius: radius,
  36436. textColor: item.textColor,
  36437. textSize: item.textSize
  36438. };
  36439. });
  36440. for (var i = 0; i < seriesConvert.length; i++) {
  36441. var item = seriesConvert[i];
  36442. // line end
  36443. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  36444. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  36445. // line start
  36446. var orginX2 = Math.cos(item.arc) * item.radius;
  36447. var orginY2 = Math.sin(item.arc) * item.radius;
  36448. // text start
  36449. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  36450. var orginY3 = orginY1;
  36451. var textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
  36452. var startY = orginY3;
  36453. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  36454. x: orginX3
  36455. })) {
  36456. if (orginX3 > 0) {
  36457. startY = Math.min(orginY3, lastTextObject.start.y);
  36458. } else if (orginX1 < 0) {
  36459. startY = Math.max(orginY3, lastTextObject.start.y);
  36460. } else {
  36461. if (orginY3 > 0) {
  36462. startY = Math.max(orginY3, lastTextObject.start.y);
  36463. } else {
  36464. startY = Math.min(orginY3, lastTextObject.start.y);
  36465. }
  36466. }
  36467. }
  36468. if (orginX3 < 0) {
  36469. orginX3 -= textWidth;
  36470. }
  36471. var textObject = {
  36472. lineStart: {
  36473. x: orginX2,
  36474. y: orginY2
  36475. },
  36476. lineEnd: {
  36477. x: orginX1,
  36478. y: orginY1
  36479. },
  36480. start: {
  36481. x: orginX3,
  36482. y: startY
  36483. },
  36484. width: textWidth,
  36485. height: config.fontSize,
  36486. text: item.text,
  36487. color: item.color,
  36488. textColor: item.textColor,
  36489. textSize: item.textSize
  36490. };
  36491. lastTextObject = avoidCollision(textObject, lastTextObject);
  36492. textObjectCollection.push(lastTextObject);
  36493. }
  36494. for (var _i14 = 0; _i14 < textObjectCollection.length; _i14++) {
  36495. var _item6 = textObjectCollection[_i14];
  36496. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  36497. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  36498. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  36499. context.setLineWidth(1 * opts.pix);
  36500. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36501. context.beginPath();
  36502. context.setStrokeStyle(_item6.color);
  36503. context.setFillStyle(_item6.color);
  36504. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36505. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  36506. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  36507. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  36508. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  36509. context.stroke();
  36510. context.closePath();
  36511. context.beginPath();
  36512. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  36513. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  36514. context.closePath();
  36515. context.fill();
  36516. context.beginPath();
  36517. context.setFontSize(_item6.textSize * opts.pix || config.fontSize);
  36518. context.setFillStyle(_item6.textColor || opts.fontColor);
  36519. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  36520. context.closePath();
  36521. context.stroke();
  36522. context.closePath();
  36523. }
  36524. }
  36525. function drawToolTipSplitLine(offsetX, opts, config, context) {
  36526. var toolTipOption = opts.extra.tooltip || {};
  36527. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  36528. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  36529. var startY = opts.area[0];
  36530. var endY = opts.height - opts.area[2];
  36531. if (toolTipOption.gridType == 'dash') {
  36532. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36533. }
  36534. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36535. context.setLineWidth(1 * opts.pix);
  36536. context.beginPath();
  36537. context.moveTo(offsetX, startY);
  36538. context.lineTo(offsetX, endY);
  36539. context.stroke();
  36540. context.setLineDash([]);
  36541. if (toolTipOption.xAxisLabel) {
  36542. var labelText = opts.categories[opts.tooltip.index];
  36543. context.setFontSize(config.fontSize);
  36544. var textWidth = measureText(labelText, config.fontSize, context);
  36545. var textX = offsetX - 0.5 * textWidth;
  36546. var textY = endY;
  36547. context.beginPath();
  36548. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36549. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36550. context.setLineWidth(1 * opts.pix);
  36551. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  36552. context.closePath();
  36553. context.stroke();
  36554. context.fill();
  36555. context.beginPath();
  36556. context.setFontSize(config.fontSize);
  36557. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36558. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  36559. context.closePath();
  36560. context.stroke();
  36561. }
  36562. }
  36563. function drawMarkLine(opts, config, context) {
  36564. var markLineOption = assign({}, {
  36565. type: 'solid',
  36566. dashLength: 4,
  36567. data: []
  36568. }, opts.extra.markLine);
  36569. var startX = opts.area[3];
  36570. var endX = opts.width - opts.area[1];
  36571. var points = calMarkLineData(markLineOption.data, opts);
  36572. for (var i = 0; i < points.length; i++) {
  36573. var item = assign({}, {
  36574. lineColor: '#DE4A42',
  36575. showLabel: false,
  36576. labelFontColor: '#666666',
  36577. labelBgColor: '#DFE8FF',
  36578. labelBgOpacity: 0.8,
  36579. yAxisIndex: 0
  36580. }, points[i]);
  36581. if (markLineOption.type == 'dash') {
  36582. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  36583. }
  36584. context.setStrokeStyle(item.lineColor);
  36585. context.setLineWidth(1 * opts.pix);
  36586. context.beginPath();
  36587. context.moveTo(startX, item.y);
  36588. context.lineTo(endX, item.y);
  36589. context.stroke();
  36590. context.setLineDash([]);
  36591. if (item.showLabel) {
  36592. var labelText = opts.yAxis.formatter ? opts.yAxis.formatter(item.value) : item.value;
  36593. context.setFontSize(config.fontSize);
  36594. var textWidth = measureText(labelText, config.fontSize, context);
  36595. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[0].width;
  36596. var bgStartX = opts.area[3] - textWidth - config.toolTipPadding * 2;
  36597. var bgEndX = opts.area[3];
  36598. var bgWidth = bgEndX - bgStartX;
  36599. var textX = bgEndX - config.toolTipPadding;
  36600. var textY = item.y;
  36601. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  36602. context.setStrokeStyle(item.labelBgColor);
  36603. context.setLineWidth(1 * opts.pix);
  36604. context.beginPath();
  36605. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36606. context.closePath();
  36607. context.stroke();
  36608. context.fill();
  36609. context.setFontSize(config.fontSize);
  36610. context.setTextAlign('right');
  36611. context.setFillStyle(item.labelFontColor);
  36612. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  36613. context.stroke();
  36614. context.setTextAlign('left');
  36615. }
  36616. }
  36617. }
  36618. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  36619. var toolTipOption = assign({}, {
  36620. gridType: 'solid',
  36621. dashLength: 4
  36622. }, opts.extra.tooltip);
  36623. var startX = opts.area[3];
  36624. var endX = opts.width - opts.area[1];
  36625. if (toolTipOption.gridType == 'dash') {
  36626. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  36627. }
  36628. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  36629. context.setLineWidth(1 * opts.pix);
  36630. context.beginPath();
  36631. context.moveTo(startX, opts.tooltip.offset.y);
  36632. context.lineTo(endX, opts.tooltip.offset.y);
  36633. context.stroke();
  36634. context.setLineDash([]);
  36635. if (toolTipOption.yAxisLabel) {
  36636. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  36637. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  36638. var tStartLeft = opts.area[3];
  36639. var tStartRight = opts.width - opts.area[1];
  36640. for (var i = 0; i < labelText.length; i++) {
  36641. context.setFontSize(config.fontSize);
  36642. var textWidth = measureText(labelText[i], config.fontSize, context);
  36643. var bgStartX = void 0,
  36644. bgEndX = void 0,
  36645. bgWidth = void 0;
  36646. if (widthArr[i].position == 'left') {
  36647. bgStartX = tStartLeft - widthArr[i].width;
  36648. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  36649. } else {
  36650. bgStartX = tStartRight;
  36651. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  36652. }
  36653. bgWidth = bgEndX - bgStartX;
  36654. var textX = bgStartX + (bgWidth - textWidth) / 2;
  36655. var textY = opts.tooltip.offset.y;
  36656. context.beginPath();
  36657. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  36658. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  36659. context.setLineWidth(1 * opts.pix);
  36660. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  36661. context.closePath();
  36662. context.stroke();
  36663. context.fill();
  36664. context.beginPath();
  36665. context.setFontSize(config.fontSize);
  36666. context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
  36667. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  36668. context.closePath();
  36669. context.stroke();
  36670. if (widthArr[i].position == 'left') {
  36671. tStartLeft -= widthArr[i].width + opts.yAxis.padding * opts.pix;
  36672. } else {
  36673. tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
  36674. }
  36675. }
  36676. }
  36677. }
  36678. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36679. var toolTipOption = assign({}, {
  36680. activeBgColor: '#000000',
  36681. activeBgOpacity: 0.08
  36682. }, opts.extra.column);
  36683. var startY = opts.area[0];
  36684. var endY = opts.height - opts.area[2];
  36685. context.beginPath();
  36686. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36687. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  36688. context.closePath();
  36689. context.fill();
  36690. context.setFillStyle("#FFFFFF");
  36691. }
  36692. function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  36693. var toolTipOption = assign({}, {
  36694. activeBgColor: '#000000',
  36695. activeBgOpacity: 0.08
  36696. }, opts.extra.bar);
  36697. var startX = opts.area[3];
  36698. var endX = opts.width - opts.area[1];
  36699. context.beginPath();
  36700. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  36701. context.rect(startX, offsetX - eachSpacing / 2, endX - startX, eachSpacing);
  36702. context.closePath();
  36703. context.fill();
  36704. context.setFillStyle("#FFFFFF");
  36705. }
  36706. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  36707. var toolTipOption = assign({}, {
  36708. showBox: true,
  36709. showArrow: true,
  36710. showCategory: false,
  36711. bgColor: '#000000',
  36712. bgOpacity: 0.7,
  36713. borderColor: '#000000',
  36714. borderWidth: 0,
  36715. borderRadius: 0,
  36716. borderOpacity: 0.7,
  36717. fontColor: '#FFFFFF',
  36718. splitLine: true
  36719. }, opts.extra.tooltip);
  36720. if (toolTipOption.showCategory == true && opts.categories) {
  36721. textList.unshift({
  36722. text: opts.categories[opts.tooltip.index],
  36723. color: null
  36724. });
  36725. }
  36726. var legendWidth = 4 * opts.pix;
  36727. var legendMarginRight = 5 * opts.pix;
  36728. var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
  36729. var isOverRightBorder = false;
  36730. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  36731. if (toolTipOption.splitLine == true) {
  36732. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  36733. }
  36734. }
  36735. offset = assign({
  36736. x: 0,
  36737. y: 0
  36738. }, offset);
  36739. offset.y -= 8 * opts.pix;
  36740. var textWidth = textList.map(function (item) {
  36741. return measureText(item.text, config.fontSize, context);
  36742. });
  36743. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  36744. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  36745. if (toolTipOption.showBox == false) {
  36746. return;
  36747. }
  36748. // if beyond the right border
  36749. if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
  36750. isOverRightBorder = true;
  36751. }
  36752. if (toolTipHeight + offset.y > opts.height) {
  36753. offset.y = opts.height - toolTipHeight;
  36754. }
  36755. // draw background rect
  36756. context.beginPath();
  36757. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  36758. context.setLineWidth(toolTipOption.borderWidth * opts.pix);
  36759. context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
  36760. var radius = toolTipOption.borderRadius;
  36761. if (isOverRightBorder) {
  36762. if (toolTipOption.showArrow) {
  36763. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36764. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36765. }
  36766. context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36767. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36768. context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36769. context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36770. if (toolTipOption.showArrow) {
  36771. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36772. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36773. }
  36774. } else {
  36775. if (toolTipOption.showArrow) {
  36776. context.moveTo(offset.x, offset.y + 10 * opts.pix);
  36777. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
  36778. }
  36779. context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
  36780. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
  36781. context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
  36782. context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
  36783. if (toolTipOption.showArrow) {
  36784. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
  36785. context.lineTo(offset.x, offset.y + 10 * opts.pix);
  36786. }
  36787. }
  36788. context.closePath();
  36789. context.fill();
  36790. if (toolTipOption.borderWidth > 0) {
  36791. context.stroke();
  36792. }
  36793. // draw legend
  36794. textList.forEach(function (item, index) {
  36795. if (item.color !== null) {
  36796. context.beginPath();
  36797. context.setFillStyle(item.color);
  36798. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  36799. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  36800. if (isOverRightBorder) {
  36801. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  36802. }
  36803. context.fillRect(startX, startY, legendWidth, config.fontSize);
  36804. context.closePath();
  36805. }
  36806. });
  36807. // draw text list
  36808. textList.forEach(function (item, index) {
  36809. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  36810. if (isOverRightBorder) {
  36811. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  36812. }
  36813. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  36814. context.beginPath();
  36815. context.setFontSize(config.fontSize);
  36816. context.setFillStyle(toolTipOption.fontColor);
  36817. context.fillText(item.text, startX, startY + config.fontSize);
  36818. context.closePath();
  36819. context.stroke();
  36820. });
  36821. }
  36822. function drawColumnDataPoints(series, opts, config, context) {
  36823. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  36824. var xAxisData = opts.chartData.xAxisData,
  36825. xAxisPoints = xAxisData.xAxisPoints,
  36826. eachSpacing = xAxisData.eachSpacing;
  36827. var columnOption = assign({}, {
  36828. type: 'group',
  36829. width: eachSpacing / 2,
  36830. meterBorder: 4,
  36831. meterFillColor: '#FFFFFF',
  36832. barBorderCircle: false,
  36833. barBorderRadius: [],
  36834. seriesGap: 2,
  36835. linearType: 'none',
  36836. linearOpacity: 1,
  36837. customColor: [],
  36838. colorStop: 0
  36839. }, opts.extra.column);
  36840. var calPoints = [];
  36841. context.save();
  36842. var leftNum = -2;
  36843. var rightNum = xAxisPoints.length + 2;
  36844. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  36845. context.translate(opts._scrollDistance_, 0);
  36846. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  36847. rightNum = leftNum + opts.xAxis.itemCount + 4;
  36848. }
  36849. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  36850. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  36851. }
  36852. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  36853. series.forEach(function (eachSeries, seriesIndex) {
  36854. var ranges, minRange, maxRange;
  36855. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  36856. minRange = ranges.pop();
  36857. maxRange = ranges.shift();
  36858. var data = eachSeries.data;
  36859. switch (columnOption.type) {
  36860. case 'group':
  36861. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36862. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36863. calPoints.push(tooltipPoints);
  36864. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  36865. for (var i = 0; i < points.length; i++) {
  36866. var item = points[i];
  36867. //fix issues/I27B1N yyoinge & Joeshu
  36868. if (item !== null && i > leftNum && i < rightNum) {
  36869. var startX = item.x - item.width / 2;
  36870. var height = opts.height - item.y - opts.area[2];
  36871. context.beginPath();
  36872. var fillColor = item.color || eachSeries.color;
  36873. var strokeColor = item.color || eachSeries.color;
  36874. if (columnOption.linearType !== 'none') {
  36875. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  36876. //透明渐变
  36877. if (columnOption.linearType == 'opacity') {
  36878. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  36879. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36880. } else {
  36881. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36882. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  36883. grd.addColorStop(1, hexToRgb(fillColor, 1));
  36884. }
  36885. fillColor = grd;
  36886. }
  36887. // 圆角边框
  36888. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  36889. var left = startX;
  36890. var top = item.y;
  36891. var width = item.width;
  36892. var _height = opts.height - opts.area[2] - item.y;
  36893. if (columnOption.barBorderCircle) {
  36894. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  36895. }
  36896. var _columnOption$barBord = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  36897. r0 = _columnOption$barBord[0],
  36898. r1 = _columnOption$barBord[1],
  36899. r2 = _columnOption$barBord[2],
  36900. r3 = _columnOption$barBord[3];
  36901. var minRadius = Math.min(width / 2, _height / 2);
  36902. r0 = r0 > minRadius ? minRadius : r0;
  36903. r1 = r1 > minRadius ? minRadius : r1;
  36904. r2 = r2 > minRadius ? minRadius : r2;
  36905. r3 = r3 > minRadius ? minRadius : r3;
  36906. r0 = r0 < 0 ? 0 : r0;
  36907. r1 = r1 < 0 ? 0 : r1;
  36908. r2 = r2 < 0 ? 0 : r2;
  36909. r3 = r3 < 0 ? 0 : r3;
  36910. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  36911. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  36912. context.arc(left + width - r2, top + _height - r2, r2, 0, Math.PI / 2);
  36913. context.arc(left + r3, top + _height - r3, r3, Math.PI / 2, Math.PI);
  36914. } else {
  36915. context.moveTo(startX, item.y);
  36916. context.lineTo(startX + item.width - 2, item.y);
  36917. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  36918. context.lineTo(startX, opts.height - opts.area[2]);
  36919. context.lineTo(startX, item.y);
  36920. context.setLineWidth(1);
  36921. context.setStrokeStyle(strokeColor);
  36922. }
  36923. context.setFillStyle(fillColor);
  36924. context.closePath();
  36925. //context.stroke();
  36926. context.fill();
  36927. }
  36928. }
  36929. ;
  36930. break;
  36931. case 'stack':
  36932. // 绘制堆叠数据图
  36933. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  36934. calPoints.push(points);
  36935. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  36936. for (var _i15 = 0; _i15 < points.length; _i15++) {
  36937. var _item7 = points[_i15];
  36938. if (_item7 !== null && _i15 > leftNum && _i15 < rightNum) {
  36939. context.beginPath();
  36940. var fillColor = _item7.color || eachSeries.color;
  36941. var startX = _item7.x - _item7.width / 2 + 1;
  36942. var height = opts.height - _item7.y - opts.area[2];
  36943. var height0 = opts.height - _item7.y0 - opts.area[2];
  36944. if (seriesIndex > 0) {
  36945. height -= height0;
  36946. }
  36947. context.setFillStyle(fillColor);
  36948. context.moveTo(startX, _item7.y);
  36949. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  36950. context.closePath();
  36951. context.fill();
  36952. }
  36953. }
  36954. ;
  36955. break;
  36956. case 'meter':
  36957. // 绘制温度计数据图
  36958. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  36959. calPoints.push(points);
  36960. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
  36961. if (seriesIndex == 0) {
  36962. for (var _i16 = 0; _i16 < points.length; _i16++) {
  36963. var _item8 = points[_i16];
  36964. if (_item8 !== null && _i16 > leftNum && _i16 < rightNum) {
  36965. //画背景颜色
  36966. context.beginPath();
  36967. context.setFillStyle(columnOption.meterFillColor);
  36968. var startX = _item8.x - _item8.width / 2;
  36969. var height = opts.height - _item8.y - opts.area[2];
  36970. if (columnOption.barBorderCircle) {
  36971. var barBorderRadius = (_item8.width - columnOption.meterBorder * 2) / 2;
  36972. if (barBorderRadius > height) {
  36973. barBorderRadius = height;
  36974. }
  36975. context.moveTo(startX + columnOption.meterBorder, opts.height - opts.area[2]);
  36976. context.lineTo(startX + columnOption.meterBorder, _item8.y + barBorderRadius);
  36977. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius, barBorderRadius, -Math.PI, 0);
  36978. context.lineTo(startX + _item8.width - columnOption.meterBorder, opts.height - opts.area[2]);
  36979. context.lineTo(startX, opts.height - opts.area[2]);
  36980. context.fill();
  36981. } else {
  36982. context.moveTo(startX, _item8.y);
  36983. context.fillRect(startX, _item8.y, _item8.width, height);
  36984. context.closePath();
  36985. context.fill();
  36986. }
  36987. //画边框线
  36988. if (columnOption.meterBorder > 0) {
  36989. context.beginPath();
  36990. context.setStrokeStyle(eachSeries.color);
  36991. context.setLineWidth(columnOption.meterBorder * opts.pix);
  36992. if (columnOption.barBorderCircle) {
  36993. var barBorderRadius = (_item8.width - columnOption.meterBorder) / 2;
  36994. if (barBorderRadius > height) {
  36995. barBorderRadius = height;
  36996. }
  36997. context.moveTo(startX + columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  36998. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + barBorderRadius);
  36999. context.arc(startX + _item8.width / 2, _item8.y + barBorderRadius - columnOption.meterBorder * 0.5, barBorderRadius, -Math.PI, 0);
  37000. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, opts.height - opts.area[2]);
  37001. } else {
  37002. context.moveTo(startX + columnOption.meterBorder * 0.5, _item8.y + height);
  37003. context.lineTo(startX + columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37004. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + columnOption.meterBorder * 0.5);
  37005. context.lineTo(startX + _item8.width - columnOption.meterBorder * 0.5, _item8.y + height);
  37006. }
  37007. context.stroke();
  37008. }
  37009. }
  37010. }
  37011. ;
  37012. } else {
  37013. for (var _i17 = 0; _i17 < points.length; _i17++) {
  37014. var _item9 = points[_i17];
  37015. if (_item9 !== null && _i17 > leftNum && _i17 < rightNum) {
  37016. context.beginPath();
  37017. context.setFillStyle(_item9.color || eachSeries.color);
  37018. var startX = _item9.x - _item9.width / 2;
  37019. var height = opts.height - _item9.y - opts.area[2];
  37020. if (columnOption.barBorderCircle) {
  37021. var barBorderRadius = _item9.width / 2;
  37022. if (barBorderRadius > height) {
  37023. barBorderRadius = height;
  37024. }
  37025. context.moveTo(startX, opts.height - opts.area[2]);
  37026. context.arc(startX + barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI, -Math.PI / 2);
  37027. context.arc(startX + _item9.width - barBorderRadius, _item9.y + barBorderRadius, barBorderRadius, -Math.PI / 2, 0);
  37028. context.lineTo(startX + _item9.width, opts.height - opts.area[2]);
  37029. context.lineTo(startX, opts.height - opts.area[2]);
  37030. context.fill();
  37031. } else {
  37032. context.moveTo(startX, _item9.y);
  37033. context.fillRect(startX, _item9.y, _item9.width, height);
  37034. context.closePath();
  37035. context.fill();
  37036. }
  37037. }
  37038. }
  37039. ;
  37040. }
  37041. break;
  37042. }
  37043. });
  37044. if (opts.dataLabel !== false && process === 1) {
  37045. series.forEach(function (eachSeries, seriesIndex) {
  37046. var ranges, minRange, maxRange;
  37047. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37048. minRange = ranges.pop();
  37049. maxRange = ranges.shift();
  37050. var data = eachSeries.data;
  37051. switch (columnOption.type) {
  37052. case 'group':
  37053. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37054. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37055. drawPointText(points, eachSeries, config, context, opts);
  37056. break;
  37057. case 'stack':
  37058. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37059. drawPointText(points, eachSeries, config, context, opts);
  37060. break;
  37061. case 'meter':
  37062. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37063. drawPointText(points, eachSeries, config, context, opts);
  37064. break;
  37065. }
  37066. });
  37067. }
  37068. context.restore();
  37069. return {
  37070. xAxisPoints: xAxisPoints,
  37071. calPoints: calPoints,
  37072. eachSpacing: eachSpacing
  37073. };
  37074. }
  37075. function drawBarDataPoints(series, opts, config, context) {
  37076. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37077. var yAxisPoints = [];
  37078. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / opts.categories.length;
  37079. for (var i = 0; i < opts.categories.length; i++) {
  37080. yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
  37081. }
  37082. var columnOption = assign({}, {
  37083. type: 'group',
  37084. width: eachSpacing / 2,
  37085. meterBorder: 4,
  37086. meterFillColor: '#FFFFFF',
  37087. barBorderCircle: false,
  37088. barBorderRadius: [],
  37089. seriesGap: 2,
  37090. linearType: 'none',
  37091. linearOpacity: 1,
  37092. customColor: [],
  37093. colorStop: 0
  37094. }, opts.extra.bar);
  37095. var calPoints = [];
  37096. context.save();
  37097. var leftNum = -2;
  37098. var rightNum = yAxisPoints.length + 2;
  37099. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  37100. drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
  37101. }
  37102. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37103. series.forEach(function (eachSeries, seriesIndex) {
  37104. var ranges, minRange, maxRange;
  37105. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37106. maxRange = ranges.pop();
  37107. minRange = ranges.shift();
  37108. var data = eachSeries.data;
  37109. switch (columnOption.type) {
  37110. case 'group':
  37111. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37112. var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37113. calPoints.push(tooltipPoints);
  37114. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37115. for (var _i18 = 0; _i18 < points.length; _i18++) {
  37116. var item = points[_i18];
  37117. //fix issues/I27B1N yyoinge & Joeshu
  37118. if (item !== null && _i18 > leftNum && _i18 < rightNum) {
  37119. //var startX = item.x - item.width / 2;
  37120. var startX = opts.area[3];
  37121. var startY = item.y - item.width / 2;
  37122. var height = item.height;
  37123. context.beginPath();
  37124. var fillColor = item.color || eachSeries.color;
  37125. var strokeColor = item.color || eachSeries.color;
  37126. if (columnOption.linearType !== 'none') {
  37127. var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
  37128. //透明渐变
  37129. if (columnOption.linearType == 'opacity') {
  37130. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37131. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37132. } else {
  37133. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37134. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37135. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37136. }
  37137. fillColor = grd;
  37138. }
  37139. // 圆角边框
  37140. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle === true) {
  37141. var left = startX;
  37142. var width = item.width;
  37143. var top = item.y - item.width / 2;
  37144. var _height2 = item.heigh;
  37145. if (columnOption.barBorderCircle) {
  37146. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37147. }
  37148. var _columnOption$barBord2 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37149. r0 = _columnOption$barBord2[0],
  37150. r1 = _columnOption$barBord2[1],
  37151. r2 = _columnOption$barBord2[2],
  37152. r3 = _columnOption$barBord2[3];
  37153. var minRadius = Math.min(width / 2, _height2 / 2);
  37154. r0 = r0 > minRadius ? minRadius : r0;
  37155. r1 = r1 > minRadius ? minRadius : r1;
  37156. r2 = r2 > minRadius ? minRadius : r2;
  37157. r3 = r3 > minRadius ? minRadius : r3;
  37158. r0 = r0 < 0 ? 0 : r0;
  37159. r1 = r1 < 0 ? 0 : r1;
  37160. r2 = r2 < 0 ? 0 : r2;
  37161. r3 = r3 < 0 ? 0 : r3;
  37162. context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
  37163. context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
  37164. context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
  37165. context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
  37166. } else {
  37167. context.moveTo(startX, startY);
  37168. context.lineTo(item.x, startY);
  37169. context.lineTo(item.x, startY + item.width - 2);
  37170. context.lineTo(startX, startY + item.width - 2);
  37171. context.lineTo(startX, startY);
  37172. context.setLineWidth(1);
  37173. context.setStrokeStyle(strokeColor);
  37174. }
  37175. context.setFillStyle(fillColor);
  37176. context.closePath();
  37177. //context.stroke();
  37178. context.fill();
  37179. }
  37180. }
  37181. ;
  37182. break;
  37183. case 'stack':
  37184. // 绘制堆叠数据图
  37185. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37186. calPoints.push(points);
  37187. points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  37188. for (var _i19 = 0; _i19 < points.length; _i19++) {
  37189. var _item10 = points[_i19];
  37190. if (_item10 !== null && _i19 > leftNum && _i19 < rightNum) {
  37191. context.beginPath();
  37192. var fillColor = _item10.color || eachSeries.color;
  37193. var startX = _item10.x0;
  37194. context.setFillStyle(fillColor);
  37195. context.moveTo(startX, _item10.y - _item10.width / 2);
  37196. context.fillRect(startX, _item10.y - _item10.width / 2, _item10.height, _item10.width - 2);
  37197. context.closePath();
  37198. context.fill();
  37199. }
  37200. }
  37201. ;
  37202. break;
  37203. }
  37204. });
  37205. if (opts.dataLabel !== false && process === 1) {
  37206. series.forEach(function (eachSeries, seriesIndex) {
  37207. var ranges, minRange, maxRange;
  37208. ranges = [].concat(opts.chartData.xAxisData.ranges);
  37209. maxRange = ranges.pop();
  37210. minRange = ranges.shift();
  37211. var data = eachSeries.data;
  37212. switch (columnOption.type) {
  37213. case 'group':
  37214. var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
  37215. points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
  37216. drawBarPointText(points, eachSeries, config, context, opts);
  37217. break;
  37218. case 'stack':
  37219. var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  37220. drawBarPointText(points, eachSeries, config, context, opts);
  37221. break;
  37222. }
  37223. });
  37224. }
  37225. return {
  37226. yAxisPoints: yAxisPoints,
  37227. calPoints: calPoints,
  37228. eachSpacing: eachSpacing
  37229. };
  37230. }
  37231. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  37232. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  37233. var candleOption = assign({}, {
  37234. color: {},
  37235. average: {}
  37236. }, opts.extra.candle);
  37237. candleOption.color = assign({}, {
  37238. upLine: '#f04864',
  37239. upFill: '#f04864',
  37240. downLine: '#2fc25b',
  37241. downFill: '#2fc25b'
  37242. }, candleOption.color);
  37243. candleOption.average = assign({}, {
  37244. show: false,
  37245. name: [],
  37246. day: [],
  37247. color: config.color
  37248. }, candleOption.average);
  37249. opts.extra.candle = candleOption;
  37250. var xAxisData = opts.chartData.xAxisData,
  37251. xAxisPoints = xAxisData.xAxisPoints,
  37252. eachSpacing = xAxisData.eachSpacing;
  37253. var calPoints = [];
  37254. context.save();
  37255. var leftNum = -2;
  37256. var rightNum = xAxisPoints.length + 2;
  37257. var leftSpace = 0;
  37258. var rightSpace = opts.width + eachSpacing;
  37259. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37260. context.translate(opts._scrollDistance_, 0);
  37261. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37262. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37263. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37264. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37265. }
  37266. //画均线
  37267. if (candleOption.average.show || seriesMA) {
  37268. //Merge pull request !12 from 邱贵翔
  37269. seriesMA.forEach(function (eachSeries, seriesIndex) {
  37270. var ranges, minRange, maxRange;
  37271. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37272. minRange = ranges.pop();
  37273. maxRange = ranges.shift();
  37274. var data = eachSeries.data;
  37275. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37276. var splitPointList = splitPoints(points, eachSeries);
  37277. for (var i = 0; i < splitPointList.length; i++) {
  37278. var _points = splitPointList[i];
  37279. context.beginPath();
  37280. context.setStrokeStyle(eachSeries.color);
  37281. context.setLineWidth(1);
  37282. if (_points.length === 1) {
  37283. context.moveTo(_points[0].x, _points[0].y);
  37284. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  37285. } else {
  37286. context.moveTo(_points[0].x, _points[0].y);
  37287. var startPoint = 0;
  37288. for (var j = 0; j < _points.length; j++) {
  37289. var item = _points[j];
  37290. if (startPoint == 0 && item.x > leftSpace) {
  37291. context.moveTo(item.x, item.y);
  37292. startPoint = 1;
  37293. }
  37294. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37295. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  37296. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37297. }
  37298. }
  37299. context.moveTo(_points[0].x, _points[0].y);
  37300. }
  37301. context.closePath();
  37302. context.stroke();
  37303. }
  37304. });
  37305. }
  37306. //画K线
  37307. series.forEach(function (eachSeries, seriesIndex) {
  37308. var ranges, minRange, maxRange;
  37309. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37310. minRange = ranges.pop();
  37311. maxRange = ranges.shift();
  37312. var data = eachSeries.data;
  37313. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37314. calPoints.push(points);
  37315. var splitPointList = splitPoints(points, eachSeries);
  37316. for (var i = 0; i < splitPointList[0].length; i++) {
  37317. if (i > leftNum && i < rightNum) {
  37318. var item = splitPointList[0][i];
  37319. context.beginPath();
  37320. //如果上涨
  37321. if (data[i][1] - data[i][0] > 0) {
  37322. context.setStrokeStyle(candleOption.color.upLine);
  37323. context.setFillStyle(candleOption.color.upFill);
  37324. context.setLineWidth(1 * opts.pix);
  37325. context.moveTo(item[3].x, item[3].y); //顶点
  37326. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37327. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37328. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37329. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37330. context.lineTo(item[2].x, item[2].y); //底点
  37331. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37332. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37333. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37334. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37335. context.moveTo(item[3].x, item[3].y); //顶点
  37336. } else {
  37337. context.setStrokeStyle(candleOption.color.downLine);
  37338. context.setFillStyle(candleOption.color.downFill);
  37339. context.setLineWidth(1 * opts.pix);
  37340. context.moveTo(item[3].x, item[3].y); //顶点
  37341. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37342. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  37343. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  37344. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37345. context.lineTo(item[2].x, item[2].y); //底点
  37346. context.lineTo(item[1].x, item[1].y); //收盘中间点
  37347. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  37348. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  37349. context.lineTo(item[0].x, item[0].y); //开盘中间点
  37350. context.moveTo(item[3].x, item[3].y); //顶点
  37351. }
  37352. context.closePath();
  37353. context.fill();
  37354. context.stroke();
  37355. }
  37356. }
  37357. });
  37358. context.restore();
  37359. return {
  37360. xAxisPoints: xAxisPoints,
  37361. calPoints: calPoints,
  37362. eachSpacing: eachSpacing
  37363. };
  37364. }
  37365. function drawAreaDataPoints(series, opts, config, context) {
  37366. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37367. var areaOption = assign({}, {
  37368. type: 'straight',
  37369. opacity: 0.2,
  37370. addLine: false,
  37371. width: 2,
  37372. gradient: false
  37373. }, opts.extra.area);
  37374. var xAxisData = opts.chartData.xAxisData,
  37375. xAxisPoints = xAxisData.xAxisPoints,
  37376. eachSpacing = xAxisData.eachSpacing;
  37377. var endY = opts.height - opts.area[2];
  37378. var calPoints = [];
  37379. context.save();
  37380. var leftSpace = 0;
  37381. var rightSpace = opts.width + eachSpacing;
  37382. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37383. context.translate(opts._scrollDistance_, 0);
  37384. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37385. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37386. }
  37387. series.forEach(function (eachSeries, seriesIndex) {
  37388. var ranges, minRange, maxRange;
  37389. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37390. minRange = ranges.pop();
  37391. maxRange = ranges.shift();
  37392. var data = eachSeries.data;
  37393. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37394. calPoints.push(points);
  37395. var splitPointList = splitPoints(points, eachSeries);
  37396. for (var i = 0; i < splitPointList.length; i++) {
  37397. var _points2 = splitPointList[i];
  37398. // 绘制区域数
  37399. context.beginPath();
  37400. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37401. if (areaOption.gradient) {
  37402. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  37403. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  37404. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  37405. context.setFillStyle(gradient);
  37406. } else {
  37407. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  37408. }
  37409. context.setLineWidth(areaOption.width * opts.pix);
  37410. if (_points2.length > 1) {
  37411. var firstPoint = _points2[0];
  37412. var lastPoint = _points2[_points2.length - 1];
  37413. context.moveTo(firstPoint.x, firstPoint.y);
  37414. var startPoint = 0;
  37415. if (areaOption.type === 'curve') {
  37416. for (var j = 0; j < _points2.length; j++) {
  37417. var item = _points2[j];
  37418. if (startPoint == 0 && item.x > leftSpace) {
  37419. context.moveTo(item.x, item.y);
  37420. startPoint = 1;
  37421. }
  37422. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37423. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  37424. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37425. }
  37426. }
  37427. ;
  37428. }
  37429. if (areaOption.type === 'straight') {
  37430. for (var _j = 0; _j < _points2.length; _j++) {
  37431. var _item11 = _points2[_j];
  37432. if (startPoint == 0 && _item11.x > leftSpace) {
  37433. context.moveTo(_item11.x, _item11.y);
  37434. startPoint = 1;
  37435. }
  37436. if (_j > 0 && _item11.x > leftSpace && _item11.x < rightSpace) {
  37437. context.lineTo(_item11.x, _item11.y);
  37438. }
  37439. }
  37440. ;
  37441. }
  37442. if (areaOption.type === 'step') {
  37443. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  37444. var _item12 = _points2[_j2];
  37445. if (startPoint == 0 && _item12.x > leftSpace) {
  37446. context.moveTo(_item12.x, _item12.y);
  37447. startPoint = 1;
  37448. }
  37449. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  37450. context.lineTo(_item12.x, _points2[_j2 - 1].y);
  37451. context.lineTo(_item12.x, _item12.y);
  37452. }
  37453. }
  37454. ;
  37455. }
  37456. context.lineTo(lastPoint.x, endY);
  37457. context.lineTo(firstPoint.x, endY);
  37458. context.lineTo(firstPoint.x, firstPoint.y);
  37459. } else {
  37460. var _item13 = _points2[0];
  37461. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37462. context.lineTo(_item13.x + eachSpacing / 2, _item13.y);
  37463. context.lineTo(_item13.x + eachSpacing / 2, endY);
  37464. context.lineTo(_item13.x - eachSpacing / 2, endY);
  37465. context.moveTo(_item13.x - eachSpacing / 2, _item13.y);
  37466. }
  37467. context.closePath();
  37468. context.fill();
  37469. //画连线
  37470. if (areaOption.addLine) {
  37471. if (eachSeries.lineType == 'dash') {
  37472. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37473. dashLength *= opts.pix;
  37474. context.setLineDash([dashLength, dashLength]);
  37475. }
  37476. context.beginPath();
  37477. context.setStrokeStyle(eachSeries.color);
  37478. context.setLineWidth(areaOption.width * opts.pix);
  37479. if (_points2.length === 1) {
  37480. context.moveTo(_points2[0].x, _points2[0].y);
  37481. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  37482. } else {
  37483. context.moveTo(_points2[0].x, _points2[0].y);
  37484. var _startPoint = 0;
  37485. if (areaOption.type === 'curve') {
  37486. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  37487. var _item14 = _points2[_j3];
  37488. if (_startPoint == 0 && _item14.x > leftSpace) {
  37489. context.moveTo(_item14.x, _item14.y);
  37490. _startPoint = 1;
  37491. }
  37492. if (_j3 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  37493. var _ctrlPoint = createCurveControlPoints(_points2, _j3 - 1);
  37494. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item14.x, _item14.y);
  37495. }
  37496. }
  37497. ;
  37498. }
  37499. if (areaOption.type === 'straight') {
  37500. for (var _j4 = 0; _j4 < _points2.length; _j4++) {
  37501. var _item15 = _points2[_j4];
  37502. if (_startPoint == 0 && _item15.x > leftSpace) {
  37503. context.moveTo(_item15.x, _item15.y);
  37504. _startPoint = 1;
  37505. }
  37506. if (_j4 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  37507. context.lineTo(_item15.x, _item15.y);
  37508. }
  37509. }
  37510. ;
  37511. }
  37512. if (areaOption.type === 'step') {
  37513. for (var _j5 = 0; _j5 < _points2.length; _j5++) {
  37514. var _item16 = _points2[_j5];
  37515. if (_startPoint == 0 && _item16.x > leftSpace) {
  37516. context.moveTo(_item16.x, _item16.y);
  37517. _startPoint = 1;
  37518. }
  37519. if (_j5 > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  37520. context.lineTo(_item16.x, _points2[_j5 - 1].y);
  37521. context.lineTo(_item16.x, _item16.y);
  37522. }
  37523. }
  37524. ;
  37525. }
  37526. context.moveTo(_points2[0].x, _points2[0].y);
  37527. }
  37528. context.stroke();
  37529. context.setLineDash([]);
  37530. }
  37531. }
  37532. //画点
  37533. if (opts.dataPointShape !== false) {
  37534. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37535. }
  37536. });
  37537. if (opts.dataLabel !== false && process === 1) {
  37538. series.forEach(function (eachSeries, seriesIndex) {
  37539. var ranges, minRange, maxRange;
  37540. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37541. minRange = ranges.pop();
  37542. maxRange = ranges.shift();
  37543. var data = eachSeries.data;
  37544. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37545. drawPointText(points, eachSeries, config, context, opts);
  37546. });
  37547. }
  37548. context.restore();
  37549. return {
  37550. xAxisPoints: xAxisPoints,
  37551. calPoints: calPoints,
  37552. eachSpacing: eachSpacing
  37553. };
  37554. }
  37555. function drawScatterDataPoints(series, opts, config, context) {
  37556. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37557. var scatterOption = assign({}, {
  37558. type: 'circle'
  37559. }, opts.extra.scatter);
  37560. var xAxisData = opts.chartData.xAxisData,
  37561. xAxisPoints = xAxisData.xAxisPoints,
  37562. eachSpacing = xAxisData.eachSpacing;
  37563. var calPoints = [];
  37564. context.save();
  37565. var leftSpace = 0;
  37566. var rightSpace = opts.width + eachSpacing;
  37567. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37568. context.translate(opts._scrollDistance_, 0);
  37569. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37570. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37571. }
  37572. series.forEach(function (eachSeries, seriesIndex) {
  37573. var ranges, minRange, maxRange;
  37574. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37575. minRange = ranges.pop();
  37576. maxRange = ranges.shift();
  37577. var data = eachSeries.data;
  37578. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37579. context.beginPath();
  37580. context.setStrokeStyle(eachSeries.color);
  37581. context.setFillStyle(eachSeries.color);
  37582. context.setLineWidth(1 * opts.pix);
  37583. var shape = eachSeries.pointShape;
  37584. if (shape === 'diamond') {
  37585. points.forEach(function (item, index) {
  37586. if (item !== null) {
  37587. context.moveTo(item.x, item.y - 4.5);
  37588. context.lineTo(item.x - 4.5, item.y);
  37589. context.lineTo(item.x, item.y + 4.5);
  37590. context.lineTo(item.x + 4.5, item.y);
  37591. context.lineTo(item.x, item.y - 4.5);
  37592. }
  37593. });
  37594. } else if (shape === 'circle') {
  37595. points.forEach(function (item, index) {
  37596. if (item !== null) {
  37597. context.moveTo(item.x + 2.5 * opts.pix, item.y);
  37598. context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
  37599. }
  37600. });
  37601. } else if (shape === 'square') {
  37602. points.forEach(function (item, index) {
  37603. if (item !== null) {
  37604. context.moveTo(item.x - 3.5, item.y - 3.5);
  37605. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  37606. }
  37607. });
  37608. } else if (shape === 'triangle') {
  37609. points.forEach(function (item, index) {
  37610. if (item !== null) {
  37611. context.moveTo(item.x, item.y - 4.5);
  37612. context.lineTo(item.x - 4.5, item.y + 4.5);
  37613. context.lineTo(item.x + 4.5, item.y + 4.5);
  37614. context.lineTo(item.x, item.y - 4.5);
  37615. }
  37616. });
  37617. } else if (shape === 'triangle') {
  37618. return;
  37619. }
  37620. context.closePath();
  37621. context.fill();
  37622. context.stroke();
  37623. });
  37624. if (opts.dataLabel !== false && process === 1) {
  37625. series.forEach(function (eachSeries, seriesIndex) {
  37626. var ranges, minRange, maxRange;
  37627. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37628. minRange = ranges.pop();
  37629. maxRange = ranges.shift();
  37630. var data = eachSeries.data;
  37631. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37632. drawPointText(points, eachSeries, config, context, opts);
  37633. });
  37634. }
  37635. context.restore();
  37636. return {
  37637. xAxisPoints: xAxisPoints,
  37638. calPoints: calPoints,
  37639. eachSpacing: eachSpacing
  37640. };
  37641. }
  37642. function drawBubbleDataPoints(series, opts, config, context) {
  37643. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37644. var bubbleOption = assign({}, {
  37645. opacity: 1,
  37646. border: 2
  37647. }, opts.extra.bubble);
  37648. var xAxisData = opts.chartData.xAxisData,
  37649. xAxisPoints = xAxisData.xAxisPoints,
  37650. eachSpacing = xAxisData.eachSpacing;
  37651. var calPoints = [];
  37652. context.save();
  37653. var leftSpace = 0;
  37654. var rightSpace = opts.width + eachSpacing;
  37655. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37656. context.translate(opts._scrollDistance_, 0);
  37657. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37658. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37659. }
  37660. series.forEach(function (eachSeries, seriesIndex) {
  37661. var ranges, minRange, maxRange;
  37662. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37663. minRange = ranges.pop();
  37664. maxRange = ranges.shift();
  37665. var data = eachSeries.data;
  37666. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37667. context.beginPath();
  37668. context.setStrokeStyle(eachSeries.color);
  37669. context.setLineWidth(bubbleOption.border * opts.pix);
  37670. context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
  37671. points.forEach(function (item, index) {
  37672. context.moveTo(item.x + item.r, item.y);
  37673. context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
  37674. });
  37675. context.closePath();
  37676. context.fill();
  37677. context.stroke();
  37678. if (opts.dataLabel !== false && process === 1) {
  37679. points.forEach(function (item, index) {
  37680. context.beginPath();
  37681. var fontSize = series.textSize * opts.pix || config.fontSize;
  37682. context.setFontSize(fontSize);
  37683. context.setFillStyle(series.textColor || "#FFFFFF");
  37684. context.setTextAlign('center');
  37685. context.fillText(String(item.t), item.x, item.y + fontSize / 2);
  37686. context.closePath();
  37687. context.stroke();
  37688. context.setTextAlign('left');
  37689. });
  37690. }
  37691. });
  37692. context.restore();
  37693. return {
  37694. xAxisPoints: xAxisPoints,
  37695. calPoints: calPoints,
  37696. eachSpacing: eachSpacing
  37697. };
  37698. }
  37699. function drawLineDataPoints(series, opts, config, context) {
  37700. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37701. var lineOption = assign({}, {
  37702. type: 'straight',
  37703. width: 2
  37704. }, opts.extra.line);
  37705. lineOption.width *= opts.pix;
  37706. var xAxisData = opts.chartData.xAxisData,
  37707. xAxisPoints = xAxisData.xAxisPoints,
  37708. eachSpacing = xAxisData.eachSpacing;
  37709. var calPoints = [];
  37710. context.save();
  37711. var leftSpace = 0;
  37712. var rightSpace = opts.width + eachSpacing;
  37713. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37714. context.translate(opts._scrollDistance_, 0);
  37715. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37716. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37717. }
  37718. series.forEach(function (eachSeries, seriesIndex) {
  37719. var ranges, minRange, maxRange;
  37720. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37721. minRange = ranges.pop();
  37722. maxRange = ranges.shift();
  37723. var data = eachSeries.data;
  37724. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37725. calPoints.push(points);
  37726. var splitPointList = splitPoints(points, eachSeries);
  37727. if (eachSeries.lineType == 'dash') {
  37728. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37729. dashLength *= opts.pix;
  37730. context.setLineDash([dashLength, dashLength]);
  37731. }
  37732. context.beginPath();
  37733. context.setStrokeStyle(eachSeries.color);
  37734. context.setLineWidth(lineOption.width);
  37735. splitPointList.forEach(function (points, index) {
  37736. if (points.length === 1) {
  37737. context.moveTo(points[0].x, points[0].y);
  37738. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37739. } else {
  37740. context.moveTo(points[0].x, points[0].y);
  37741. var startPoint = 0;
  37742. if (lineOption.type === 'curve') {
  37743. for (var j = 0; j < points.length; j++) {
  37744. var item = points[j];
  37745. if (startPoint == 0 && item.x > leftSpace) {
  37746. context.moveTo(item.x, item.y);
  37747. startPoint = 1;
  37748. }
  37749. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  37750. var ctrlPoint = createCurveControlPoints(points, j - 1);
  37751. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  37752. }
  37753. }
  37754. ;
  37755. }
  37756. if (lineOption.type === 'straight') {
  37757. for (var _j6 = 0; _j6 < points.length; _j6++) {
  37758. var _item17 = points[_j6];
  37759. if (startPoint == 0 && _item17.x > leftSpace) {
  37760. context.moveTo(_item17.x, _item17.y);
  37761. startPoint = 1;
  37762. }
  37763. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  37764. context.lineTo(_item17.x, _item17.y);
  37765. }
  37766. }
  37767. ;
  37768. }
  37769. if (lineOption.type === 'step') {
  37770. for (var _j7 = 0; _j7 < points.length; _j7++) {
  37771. var _item18 = points[_j7];
  37772. if (startPoint == 0 && _item18.x > leftSpace) {
  37773. context.moveTo(_item18.x, _item18.y);
  37774. startPoint = 1;
  37775. }
  37776. if (_j7 > 0 && _item18.x > leftSpace && _item18.x < rightSpace) {
  37777. context.lineTo(_item18.x, points[_j7 - 1].y);
  37778. context.lineTo(_item18.x, _item18.y);
  37779. }
  37780. }
  37781. ;
  37782. }
  37783. context.moveTo(points[0].x, points[0].y);
  37784. }
  37785. });
  37786. context.stroke();
  37787. context.setLineDash([]);
  37788. if (opts.dataPointShape !== false) {
  37789. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  37790. }
  37791. });
  37792. if (opts.dataLabel !== false && process === 1) {
  37793. series.forEach(function (eachSeries, seriesIndex) {
  37794. var ranges, minRange, maxRange;
  37795. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37796. minRange = ranges.pop();
  37797. maxRange = ranges.shift();
  37798. var data = eachSeries.data;
  37799. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37800. drawPointText(points, eachSeries, config, context, opts);
  37801. });
  37802. }
  37803. context.restore();
  37804. return {
  37805. xAxisPoints: xAxisPoints,
  37806. calPoints: calPoints,
  37807. eachSpacing: eachSpacing
  37808. };
  37809. }
  37810. function drawMixDataPoints(series, opts, config, context) {
  37811. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  37812. var columnOption = assign({}, {
  37813. width: eachSpacing / 2,
  37814. barBorderCircle: false,
  37815. barBorderRadius: [],
  37816. seriesGap: 2,
  37817. linearType: 'none',
  37818. linearOpacity: 1,
  37819. customColor: [],
  37820. colorStop: 0
  37821. }, opts.extra.mix.column);
  37822. var xAxisData = opts.chartData.xAxisData,
  37823. xAxisPoints = xAxisData.xAxisPoints,
  37824. eachSpacing = xAxisData.eachSpacing;
  37825. var endY = opts.height - opts.area[2];
  37826. var calPoints = [];
  37827. var columnIndex = 0;
  37828. var columnLength = 0;
  37829. series.forEach(function (eachSeries, seriesIndex) {
  37830. if (eachSeries.type == 'column') {
  37831. columnLength += 1;
  37832. }
  37833. });
  37834. context.save();
  37835. var leftNum = -2;
  37836. var rightNum = xAxisPoints.length + 2;
  37837. var leftSpace = 0;
  37838. var rightSpace = opts.width + eachSpacing;
  37839. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  37840. context.translate(opts._scrollDistance_, 0);
  37841. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  37842. rightNum = leftNum + opts.xAxis.itemCount + 4;
  37843. leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
  37844. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  37845. }
  37846. columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
  37847. series.forEach(function (eachSeries, seriesIndex) {
  37848. var ranges, minRange, maxRange;
  37849. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  37850. minRange = ranges.pop();
  37851. maxRange = ranges.shift();
  37852. var data = eachSeries.data;
  37853. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  37854. calPoints.push(points);
  37855. // 绘制柱状数据图
  37856. if (eachSeries.type == 'column') {
  37857. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  37858. for (var i = 0; i < points.length; i++) {
  37859. var item = points[i];
  37860. if (item !== null && i > leftNum && i < rightNum) {
  37861. var startX = item.x - item.width / 2;
  37862. var height = opts.height - item.y - opts.area[2];
  37863. context.beginPath();
  37864. var fillColor = item.color || eachSeries.color;
  37865. var strokeColor = item.color || eachSeries.color;
  37866. if (columnOption.linearType !== 'none') {
  37867. var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
  37868. //透明渐变
  37869. if (columnOption.linearType == 'opacity') {
  37870. grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
  37871. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37872. } else {
  37873. grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37874. grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
  37875. grd.addColorStop(1, hexToRgb(fillColor, 1));
  37876. }
  37877. fillColor = grd;
  37878. }
  37879. // 圆角边框
  37880. if (columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4 || columnOption.barBorderCircle) {
  37881. var left = startX;
  37882. var top = item.y;
  37883. var width = item.width;
  37884. var _height3 = opts.height - opts.area[2] - item.y;
  37885. if (columnOption.barBorderCircle) {
  37886. columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
  37887. }
  37888. var _columnOption$barBord3 = (0, _slicedToArray2.default)(columnOption.barBorderRadius, 4),
  37889. r0 = _columnOption$barBord3[0],
  37890. r1 = _columnOption$barBord3[1],
  37891. r2 = _columnOption$barBord3[2],
  37892. r3 = _columnOption$barBord3[3];
  37893. var minRadius = Math.min(width / 2, _height3 / 2);
  37894. r0 = r0 > minRadius ? minRadius : r0;
  37895. r1 = r1 > minRadius ? minRadius : r1;
  37896. r2 = r2 > minRadius ? minRadius : r2;
  37897. r3 = r3 > minRadius ? minRadius : r3;
  37898. r0 = r0 < 0 ? 0 : r0;
  37899. r1 = r1 < 0 ? 0 : r1;
  37900. r2 = r2 < 0 ? 0 : r2;
  37901. r3 = r3 < 0 ? 0 : r3;
  37902. context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
  37903. context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
  37904. context.arc(left + width - r2, top + _height3 - r2, r2, 0, Math.PI / 2);
  37905. context.arc(left + r3, top + _height3 - r3, r3, Math.PI / 2, Math.PI);
  37906. } else {
  37907. context.moveTo(startX, item.y);
  37908. context.lineTo(startX + item.width - 2, item.y);
  37909. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  37910. context.lineTo(startX, opts.height - opts.area[2]);
  37911. context.lineTo(startX, item.y);
  37912. context.setLineWidth(1);
  37913. context.setStrokeStyle(strokeColor);
  37914. }
  37915. context.setFillStyle(fillColor);
  37916. context.closePath();
  37917. context.fill();
  37918. }
  37919. }
  37920. columnIndex += 1;
  37921. }
  37922. //绘制区域图数据
  37923. if (eachSeries.type == 'area') {
  37924. var _splitPointList = splitPoints(points, eachSeries);
  37925. for (var _i20 = 0; _i20 < _splitPointList.length; _i20++) {
  37926. var _points3 = _splitPointList[_i20];
  37927. // 绘制区域数据
  37928. context.beginPath();
  37929. context.setStrokeStyle(eachSeries.color);
  37930. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  37931. context.setLineWidth(2 * opts.pix);
  37932. if (_points3.length > 1) {
  37933. var firstPoint = _points3[0];
  37934. var lastPoint = _points3[_points3.length - 1];
  37935. context.moveTo(firstPoint.x, firstPoint.y);
  37936. var startPoint = 0;
  37937. if (eachSeries.style === 'curve') {
  37938. for (var j = 0; j < _points3.length; j++) {
  37939. var _item19 = _points3[j];
  37940. if (startPoint == 0 && _item19.x > leftSpace) {
  37941. context.moveTo(_item19.x, _item19.y);
  37942. startPoint = 1;
  37943. }
  37944. if (j > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  37945. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  37946. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  37947. }
  37948. }
  37949. ;
  37950. } else {
  37951. for (var _j8 = 0; _j8 < _points3.length; _j8++) {
  37952. var _item20 = _points3[_j8];
  37953. if (startPoint == 0 && _item20.x > leftSpace) {
  37954. context.moveTo(_item20.x, _item20.y);
  37955. startPoint = 1;
  37956. }
  37957. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  37958. context.lineTo(_item20.x, _item20.y);
  37959. }
  37960. }
  37961. ;
  37962. }
  37963. context.lineTo(lastPoint.x, endY);
  37964. context.lineTo(firstPoint.x, endY);
  37965. context.lineTo(firstPoint.x, firstPoint.y);
  37966. } else {
  37967. var _item21 = _points3[0];
  37968. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37969. context.lineTo(_item21.x + eachSpacing / 2, _item21.y);
  37970. context.lineTo(_item21.x + eachSpacing / 2, endY);
  37971. context.lineTo(_item21.x - eachSpacing / 2, endY);
  37972. context.moveTo(_item21.x - eachSpacing / 2, _item21.y);
  37973. }
  37974. context.closePath();
  37975. context.fill();
  37976. }
  37977. }
  37978. // 绘制折线数据图
  37979. if (eachSeries.type == 'line') {
  37980. var splitPointList = splitPoints(points, eachSeries);
  37981. splitPointList.forEach(function (points, index) {
  37982. if (eachSeries.lineType == 'dash') {
  37983. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  37984. dashLength *= opts.pix;
  37985. context.setLineDash([dashLength, dashLength]);
  37986. }
  37987. context.beginPath();
  37988. context.setStrokeStyle(eachSeries.color);
  37989. context.setLineWidth(2 * opts.pix);
  37990. if (points.length === 1) {
  37991. context.moveTo(points[0].x, points[0].y);
  37992. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  37993. } else {
  37994. context.moveTo(points[0].x, points[0].y);
  37995. var _startPoint2 = 0;
  37996. if (eachSeries.style == 'curve') {
  37997. for (var _j9 = 0; _j9 < points.length; _j9++) {
  37998. var _item22 = points[_j9];
  37999. if (_startPoint2 == 0 && _item22.x > leftSpace) {
  38000. context.moveTo(_item22.x, _item22.y);
  38001. _startPoint2 = 1;
  38002. }
  38003. if (_j9 > 0 && _item22.x > leftSpace && _item22.x < rightSpace) {
  38004. var ctrlPoint = createCurveControlPoints(points, _j9 - 1);
  38005. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item22.x, _item22.y);
  38006. }
  38007. }
  38008. } else {
  38009. for (var _j10 = 0; _j10 < points.length; _j10++) {
  38010. var _item23 = points[_j10];
  38011. if (_startPoint2 == 0 && _item23.x > leftSpace) {
  38012. context.moveTo(_item23.x, _item23.y);
  38013. _startPoint2 = 1;
  38014. }
  38015. if (_j10 > 0 && _item23.x > leftSpace && _item23.x < rightSpace) {
  38016. context.lineTo(_item23.x, _item23.y);
  38017. }
  38018. }
  38019. }
  38020. context.moveTo(points[0].x, points[0].y);
  38021. }
  38022. context.stroke();
  38023. context.setLineDash([]);
  38024. });
  38025. }
  38026. // 绘制点数据图
  38027. if (eachSeries.type == 'point') {
  38028. eachSeries.addPoint = true;
  38029. }
  38030. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  38031. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  38032. }
  38033. });
  38034. if (opts.dataLabel !== false && process === 1) {
  38035. var columnIndex = 0;
  38036. series.forEach(function (eachSeries, seriesIndex) {
  38037. var ranges, minRange, maxRange;
  38038. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  38039. minRange = ranges.pop();
  38040. maxRange = ranges.shift();
  38041. var data = eachSeries.data;
  38042. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  38043. if (eachSeries.type !== 'column') {
  38044. drawPointText(points, eachSeries, config, context, opts);
  38045. } else {
  38046. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  38047. drawPointText(points, eachSeries, config, context, opts);
  38048. columnIndex += 1;
  38049. }
  38050. });
  38051. }
  38052. context.restore();
  38053. return {
  38054. xAxisPoints: xAxisPoints,
  38055. calPoints: calPoints,
  38056. eachSpacing: eachSpacing
  38057. };
  38058. }
  38059. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  38060. var toolTipOption = opts.extra.tooltip || {};
  38061. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  38062. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  38063. }
  38064. context.save();
  38065. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  38066. context.translate(opts._scrollDistance_, 0);
  38067. }
  38068. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  38069. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  38070. }
  38071. context.restore();
  38072. }
  38073. function drawXAxis(categories, opts, config, context) {
  38074. var xAxisData = opts.chartData.xAxisData,
  38075. xAxisPoints = xAxisData.xAxisPoints,
  38076. startX = xAxisData.startX,
  38077. endX = xAxisData.endX,
  38078. eachSpacing = xAxisData.eachSpacing;
  38079. var boundaryGap = 'center';
  38080. if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble') {
  38081. boundaryGap = opts.xAxis.boundaryGap;
  38082. }
  38083. var startY = opts.height - opts.area[2];
  38084. var endY = opts.area[0];
  38085. //绘制滚动条
  38086. if (opts.enableScroll && opts.xAxis.scrollShow) {
  38087. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  38088. var scrollScreenWidth = endX - startX;
  38089. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  38090. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  38091. var scrollLeft = 0;
  38092. if (opts._scrollDistance_) {
  38093. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  38094. }
  38095. context.beginPath();
  38096. context.setLineCap('round');
  38097. context.setLineWidth(6 * opts.pix);
  38098. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  38099. context.moveTo(startX, scrollY);
  38100. context.lineTo(endX, scrollY);
  38101. context.stroke();
  38102. context.closePath();
  38103. context.beginPath();
  38104. context.setLineCap('round');
  38105. context.setLineWidth(6 * opts.pix);
  38106. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  38107. context.moveTo(startX + scrollLeft, scrollY);
  38108. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  38109. context.stroke();
  38110. context.closePath();
  38111. context.setLineCap('butt');
  38112. }
  38113. context.save();
  38114. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38115. context.translate(opts._scrollDistance_, 0);
  38116. }
  38117. //绘制X轴刻度线
  38118. if (opts.xAxis.calibration === true) {
  38119. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38120. context.setLineCap('butt');
  38121. context.setLineWidth(1 * opts.pix);
  38122. xAxisPoints.forEach(function (item, index) {
  38123. if (index > 0) {
  38124. context.beginPath();
  38125. context.moveTo(item - eachSpacing / 2, startY);
  38126. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
  38127. context.closePath();
  38128. context.stroke();
  38129. }
  38130. });
  38131. }
  38132. //绘制X轴网格
  38133. if (opts.xAxis.disableGrid !== true) {
  38134. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  38135. context.setLineCap('butt');
  38136. context.setLineWidth(1 * opts.pix);
  38137. if (opts.xAxis.gridType == 'dash') {
  38138. context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
  38139. }
  38140. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  38141. xAxisPoints.forEach(function (item, index) {
  38142. if (index % opts.xAxis.gridEval == 0) {
  38143. context.beginPath();
  38144. context.moveTo(item, startY);
  38145. context.lineTo(item, endY);
  38146. context.stroke();
  38147. }
  38148. });
  38149. context.setLineDash([]);
  38150. }
  38151. //绘制X轴文案
  38152. if (opts.xAxis.disabled !== true) {
  38153. // 对X轴列表做抽稀处理
  38154. //默认全部显示X轴标签
  38155. var maxXAxisListLength = categories.length;
  38156. //如果设置了X轴单屏数量
  38157. if (opts.xAxis.labelCount) {
  38158. //如果设置X轴密度
  38159. if (opts.xAxis.itemCount) {
  38160. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  38161. } else {
  38162. maxXAxisListLength = opts.xAxis.labelCount;
  38163. }
  38164. maxXAxisListLength -= 1;
  38165. }
  38166. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  38167. var newCategories = [];
  38168. var cgLength = categories.length;
  38169. for (var i = 0; i < cgLength; i++) {
  38170. if (i % ratio !== 0) {
  38171. newCategories.push("");
  38172. } else {
  38173. newCategories.push(categories[i]);
  38174. }
  38175. }
  38176. newCategories[cgLength - 1] = categories[cgLength - 1];
  38177. var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
  38178. if (config._xAxisTextAngle_ === 0) {
  38179. newCategories.forEach(function (item, index) {
  38180. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38181. var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
  38182. if (boundaryGap == 'center') {
  38183. offset += eachSpacing / 2;
  38184. }
  38185. var scrollHeight = 0;
  38186. if (opts.xAxis.scrollShow) {
  38187. scrollHeight = 6 * opts.pix;
  38188. }
  38189. context.beginPath();
  38190. context.setFontSize(xAxisFontSize);
  38191. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38192. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  38193. context.closePath();
  38194. context.stroke();
  38195. });
  38196. } else {
  38197. newCategories.forEach(function (item, index) {
  38198. var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
  38199. context.save();
  38200. context.beginPath();
  38201. context.setFontSize(xAxisFontSize);
  38202. context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
  38203. var textWidth = measureText(String(xitem), xAxisFontSize, context);
  38204. var offset = -textWidth;
  38205. if (boundaryGap == 'center') {
  38206. offset += eachSpacing / 2;
  38207. }
  38208. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  38209. transX = _calRotateTranslate.transX,
  38210. transY = _calRotateTranslate.transY;
  38211. context.rotate(-1 * config._xAxisTextAngle_);
  38212. context.translate(transX, transY);
  38213. context.fillText(String(xitem), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  38214. context.closePath();
  38215. context.stroke();
  38216. context.restore();
  38217. });
  38218. }
  38219. }
  38220. context.restore();
  38221. //绘制X轴轴线
  38222. if (opts.xAxis.axisLine) {
  38223. context.beginPath();
  38224. context.setStrokeStyle(opts.xAxis.axisLineColor);
  38225. context.setLineWidth(1 * opts.pix);
  38226. context.moveTo(startX, opts.height - opts.area[2]);
  38227. context.lineTo(endX, opts.height - opts.area[2]);
  38228. context.stroke();
  38229. }
  38230. }
  38231. function drawYAxisGrid(categories, opts, config, context) {
  38232. if (opts.yAxis.disableGrid === true) {
  38233. return;
  38234. }
  38235. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38236. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38237. var startX = opts.area[3];
  38238. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  38239. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  38240. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  38241. var endX = startX + TotalWidth;
  38242. var points = [];
  38243. var startY = 1;
  38244. if (opts.xAxis.axisLine === false) {
  38245. startY = 0;
  38246. }
  38247. for (var i = startY; i < opts.yAxis.splitNumber + 1; i++) {
  38248. points.push(opts.height - opts.area[2] - eachSpacing * i);
  38249. }
  38250. context.save();
  38251. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  38252. context.translate(opts._scrollDistance_, 0);
  38253. }
  38254. if (opts.yAxis.gridType == 'dash') {
  38255. context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
  38256. }
  38257. context.setStrokeStyle(opts.yAxis.gridColor);
  38258. context.setLineWidth(1 * opts.pix);
  38259. points.forEach(function (item, index) {
  38260. context.beginPath();
  38261. context.moveTo(startX, item);
  38262. context.lineTo(endX, item);
  38263. context.stroke();
  38264. });
  38265. context.setLineDash([]);
  38266. context.restore();
  38267. }
  38268. function drawYAxis(series, opts, config, context) {
  38269. if (opts.yAxis.disabled === true) {
  38270. return;
  38271. }
  38272. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  38273. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  38274. var startX = opts.area[3];
  38275. var endX = opts.width - opts.area[1];
  38276. var endY = opts.height - opts.area[2];
  38277. var fillEndY = endY + config.xAxisHeight;
  38278. if (opts.xAxis.scrollShow) {
  38279. fillEndY -= 3 * opts.pix;
  38280. }
  38281. if (opts.xAxis.rotateLabel) {
  38282. fillEndY = opts.height - opts.area[2] + opts.fontSize * opts.pix / 2;
  38283. }
  38284. // set YAxis background
  38285. context.beginPath();
  38286. context.setFillStyle(opts.background);
  38287. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
  38288. context.fillRect(0, 0, startX, fillEndY);
  38289. }
  38290. if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
  38291. context.fillRect(endX, 0, opts.width, fillEndY);
  38292. }
  38293. context.closePath();
  38294. context.stroke();
  38295. var tStartLeft = opts.area[3];
  38296. var tStartRight = opts.width - opts.area[1];
  38297. var tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
  38298. if (opts.yAxis.data) {
  38299. var _loop4 = function _loop4(i) {
  38300. var yData = opts.yAxis.data[i];
  38301. points = [];
  38302. if (yData.type === 'categories') {
  38303. for (var _i21 = 0; _i21 <= yData.categories.length; _i21++) {
  38304. points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * _i21);
  38305. }
  38306. } else {
  38307. for (var _i22 = 0; _i22 <= opts.yAxis.splitNumber; _i22++) {
  38308. points.push(opts.area[0] + eachSpacing * _i22);
  38309. }
  38310. }
  38311. if (yData.disabled !== true) {
  38312. var rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
  38313. var yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
  38314. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
  38315. var textAlign = yData.textAlign || "right";
  38316. //画Y轴刻度及文案
  38317. rangesFormat.forEach(function (item, index) {
  38318. var pos = points[index] ? points[index] : endY;
  38319. context.beginPath();
  38320. context.setFontSize(yAxisFontSize);
  38321. context.setLineWidth(1 * opts.pix);
  38322. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38323. context.setFillStyle(yData.fontColor || opts.fontColor);
  38324. var tmpstrat = 0;
  38325. var gapwidth = 4 * opts.pix;
  38326. if (yAxisWidth.position == 'left') {
  38327. //画刻度线
  38328. if (yData.calibration == true) {
  38329. context.moveTo(tStartLeft, pos);
  38330. context.lineTo(tStartLeft - 3 * opts.pix, pos);
  38331. gapwidth += 3 * opts.pix;
  38332. }
  38333. //画文字
  38334. switch (textAlign) {
  38335. case "left":
  38336. context.setTextAlign('left');
  38337. tmpstrat = tStartLeft - yAxisWidth.width;
  38338. break;
  38339. case "right":
  38340. context.setTextAlign('right');
  38341. tmpstrat = tStartLeft - gapwidth;
  38342. break;
  38343. default:
  38344. context.setTextAlign('center');
  38345. tmpstrat = tStartLeft - yAxisWidth.width / 2;
  38346. }
  38347. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38348. } else if (yAxisWidth.position == 'right') {
  38349. //画刻度线
  38350. if (yData.calibration == true) {
  38351. context.moveTo(tStartRight, pos);
  38352. context.lineTo(tStartRight + 3 * opts.pix, pos);
  38353. gapwidth += 3 * opts.pix;
  38354. }
  38355. switch (textAlign) {
  38356. case "left":
  38357. context.setTextAlign('left');
  38358. tmpstrat = tStartRight + gapwidth;
  38359. break;
  38360. case "right":
  38361. context.setTextAlign('right');
  38362. tmpstrat = tStartRight + yAxisWidth.width;
  38363. break;
  38364. default:
  38365. context.setTextAlign('center');
  38366. tmpstrat = tStartRight + yAxisWidth.width / 2;
  38367. }
  38368. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38369. } else if (yAxisWidth.position == 'center') {
  38370. //画刻度线
  38371. if (yData.calibration == true) {
  38372. context.moveTo(tStartCenter, pos);
  38373. context.lineTo(tStartCenter - 3 * opts.pix, pos);
  38374. gapwidth += 3 * opts.pix;
  38375. }
  38376. //画文字
  38377. switch (textAlign) {
  38378. case "left":
  38379. context.setTextAlign('left');
  38380. tmpstrat = tStartCenter - yAxisWidth.width;
  38381. break;
  38382. case "right":
  38383. context.setTextAlign('right');
  38384. tmpstrat = tStartCenter - gapwidth;
  38385. break;
  38386. default:
  38387. context.setTextAlign('center');
  38388. tmpstrat = tStartCenter - yAxisWidth.width / 2;
  38389. }
  38390. context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
  38391. }
  38392. context.closePath();
  38393. context.stroke();
  38394. context.setTextAlign('left');
  38395. });
  38396. //画Y轴轴线
  38397. if (yData.axisLine !== false) {
  38398. context.beginPath();
  38399. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  38400. context.setLineWidth(1 * opts.pix);
  38401. if (yAxisWidth.position == 'left') {
  38402. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  38403. context.lineTo(tStartLeft, opts.area[0]);
  38404. } else if (yAxisWidth.position == 'right') {
  38405. context.moveTo(tStartRight, opts.height - opts.area[2]);
  38406. context.lineTo(tStartRight, opts.area[0]);
  38407. } else if (yAxisWidth.position == 'center') {
  38408. context.moveTo(tStartCenter, opts.height - opts.area[2]);
  38409. context.lineTo(tStartCenter, opts.area[0]);
  38410. }
  38411. context.stroke();
  38412. }
  38413. //画Y轴标题
  38414. if (opts.yAxis.showTitle) {
  38415. var titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
  38416. var title = yData.title;
  38417. context.beginPath();
  38418. context.setFontSize(titleFontSize);
  38419. context.setFillStyle(yData.titleFontColor || opts.fontColor);
  38420. if (yAxisWidth.position == 'left') {
  38421. context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38422. } else if (yAxisWidth.position == 'right') {
  38423. context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38424. } else if (yAxisWidth.position == 'center') {
  38425. context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
  38426. }
  38427. context.closePath();
  38428. context.stroke();
  38429. }
  38430. if (yAxisWidth.position == 'left') {
  38431. tStartLeft -= yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38432. } else {
  38433. tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
  38434. }
  38435. }
  38436. };
  38437. for (var i = 0; i < opts.yAxis.data.length; i++) {
  38438. var points;
  38439. _loop4(i);
  38440. }
  38441. }
  38442. }
  38443. function drawLegend(series, opts, config, context, chartData) {
  38444. if (opts.legend.show === false) {
  38445. return;
  38446. }
  38447. var legendData = chartData.legendData;
  38448. var legendList = legendData.points;
  38449. var legendArea = legendData.area;
  38450. var padding = opts.legend.padding * opts.pix;
  38451. var fontSize = opts.legend.fontSize * opts.pix;
  38452. var shapeWidth = 15 * opts.pix;
  38453. var shapeRight = 5 * opts.pix;
  38454. var itemGap = opts.legend.itemGap * opts.pix;
  38455. var lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
  38456. //画背景及边框
  38457. context.beginPath();
  38458. context.setLineWidth(opts.legend.borderWidth * opts.pix);
  38459. context.setStrokeStyle(opts.legend.borderColor);
  38460. context.setFillStyle(opts.legend.backgroundColor);
  38461. context.moveTo(legendArea.start.x, legendArea.start.y);
  38462. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  38463. context.closePath();
  38464. context.fill();
  38465. context.stroke();
  38466. legendList.forEach(function (itemList, listIndex) {
  38467. var width = 0;
  38468. var height = 0;
  38469. width = legendData.widthArr[listIndex];
  38470. height = legendData.heightArr[listIndex];
  38471. var startX = 0;
  38472. var startY = 0;
  38473. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38474. switch (opts.legend.float) {
  38475. case 'left':
  38476. startX = legendArea.start.x + padding;
  38477. break;
  38478. case 'right':
  38479. startX = legendArea.start.x + legendArea.width - width;
  38480. break;
  38481. default:
  38482. startX = legendArea.start.x + (legendArea.width - width) / 2;
  38483. }
  38484. startY = legendArea.start.y + padding + listIndex * lineHeight;
  38485. } else {
  38486. if (listIndex == 0) {
  38487. width = 0;
  38488. } else {
  38489. width = legendData.widthArr[listIndex - 1];
  38490. }
  38491. startX = legendArea.start.x + padding + width;
  38492. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  38493. }
  38494. context.setFontSize(config.fontSize);
  38495. for (var i = 0; i < itemList.length; i++) {
  38496. var item = itemList[i];
  38497. item.area = [0, 0, 0, 0];
  38498. item.area[0] = startX;
  38499. item.area[1] = startY;
  38500. item.area[3] = startY + lineHeight;
  38501. context.beginPath();
  38502. context.setLineWidth(1 * opts.pix);
  38503. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  38504. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  38505. switch (item.legendShape) {
  38506. case 'line':
  38507. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
  38508. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
  38509. break;
  38510. case 'triangle':
  38511. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38512. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38513. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38514. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38515. break;
  38516. case 'diamond':
  38517. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38518. context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
  38519. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
  38520. context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
  38521. context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38522. break;
  38523. case 'circle':
  38524. context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
  38525. context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
  38526. break;
  38527. case 'rect':
  38528. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38529. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38530. break;
  38531. case 'square':
  38532. context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
  38533. context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
  38534. break;
  38535. case 'none':
  38536. break;
  38537. default:
  38538. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
  38539. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
  38540. }
  38541. context.closePath();
  38542. context.fill();
  38543. context.stroke();
  38544. startX += shapeWidth + shapeRight;
  38545. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  38546. context.beginPath();
  38547. context.setFontSize(fontSize);
  38548. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  38549. context.fillText(item.name, startX, startY + fontTrans);
  38550. context.closePath();
  38551. context.stroke();
  38552. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  38553. startX += measureText(item.name, fontSize, context) + itemGap;
  38554. item.area[2] = startX;
  38555. } else {
  38556. item.area[2] = startX + measureText(item.name, fontSize, context) + itemGap;
  38557. ;
  38558. startX -= shapeWidth + shapeRight;
  38559. startY += lineHeight;
  38560. }
  38561. }
  38562. });
  38563. }
  38564. function drawPieDataPoints(series, opts, config, context) {
  38565. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38566. var pieOption = assign({}, {
  38567. activeOpacity: 0.5,
  38568. activeRadius: 10,
  38569. offsetAngle: 0,
  38570. labelWidth: 15,
  38571. ringWidth: 30,
  38572. customRadius: 0,
  38573. border: false,
  38574. borderWidth: 2,
  38575. borderColor: '#FFFFFF',
  38576. centerColor: '#FFFFFF',
  38577. linearType: 'none',
  38578. customColor: []
  38579. }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
  38580. var centerPosition = {
  38581. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38582. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38583. };
  38584. if (config.pieChartLinePadding == 0) {
  38585. config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
  38586. }
  38587. 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);
  38588. if (pieOption.customRadius > 0) {
  38589. radius = pieOption.customRadius * opts.pix;
  38590. }
  38591. series = getPieDataPoints(series, radius, process);
  38592. var activeRadius = pieOption.activeRadius * opts.pix;
  38593. pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
  38594. series = series.map(function (eachSeries) {
  38595. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  38596. return eachSeries;
  38597. });
  38598. series.forEach(function (eachSeries, seriesIndex) {
  38599. if (opts.tooltip) {
  38600. if (opts.tooltip.index == seriesIndex) {
  38601. context.beginPath();
  38602. context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
  38603. context.moveTo(centerPosition.x, centerPosition.y);
  38604. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38605. context.closePath();
  38606. context.fill();
  38607. }
  38608. }
  38609. context.beginPath();
  38610. context.setLineWidth(pieOption.borderWidth * opts.pix);
  38611. context.lineJoin = "round";
  38612. context.setStrokeStyle(pieOption.borderColor);
  38613. var fillcolor = eachSeries.color;
  38614. if (pieOption.linearType == 'custom') {
  38615. var grd;
  38616. if (context.createCircularGradient) {
  38617. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38618. } else {
  38619. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38620. }
  38621. grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1));
  38622. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38623. fillcolor = grd;
  38624. }
  38625. context.setFillStyle(fillcolor);
  38626. context.moveTo(centerPosition.x, centerPosition.y);
  38627. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  38628. context.closePath();
  38629. context.fill();
  38630. if (pieOption.border == true) {
  38631. context.stroke();
  38632. }
  38633. });
  38634. if (opts.type === 'ring') {
  38635. var innerPieWidth = radius * 0.6;
  38636. if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
  38637. innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
  38638. }
  38639. context.beginPath();
  38640. context.setFillStyle(pieOption.centerColor);
  38641. context.moveTo(centerPosition.x, centerPosition.y);
  38642. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  38643. context.closePath();
  38644. context.fill();
  38645. }
  38646. if (opts.dataLabel !== false && process === 1) {
  38647. var valid = false;
  38648. for (var i = 0, len = series.length; i < len; i++) {
  38649. if (series[i].data > 0) {
  38650. valid = true;
  38651. break;
  38652. }
  38653. }
  38654. if (valid) {
  38655. drawPieText(series, opts, config, context, radius, centerPosition);
  38656. }
  38657. }
  38658. if (process === 1 && opts.type === 'ring') {
  38659. drawRingTitle(opts, config, context, centerPosition);
  38660. }
  38661. return {
  38662. center: centerPosition,
  38663. radius: radius,
  38664. series: series
  38665. };
  38666. }
  38667. function drawRoseDataPoints(series, opts, config, context) {
  38668. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38669. var roseOption = assign({}, {
  38670. type: 'area',
  38671. activeOpacity: 0.5,
  38672. activeRadius: 10,
  38673. offsetAngle: 0,
  38674. labelWidth: 15,
  38675. border: false,
  38676. borderWidth: 2,
  38677. borderColor: '#FFFFFF',
  38678. linearType: 'none',
  38679. customColor: []
  38680. }, opts.extra.rose);
  38681. if (config.pieChartLinePadding == 0) {
  38682. config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
  38683. }
  38684. var centerPosition = {
  38685. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  38686. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  38687. };
  38688. 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);
  38689. var minRadius = roseOption.minRadius || radius * 0.5;
  38690. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  38691. var activeRadius = roseOption.activeRadius * opts.pix;
  38692. roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
  38693. series = series.map(function (eachSeries) {
  38694. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  38695. return eachSeries;
  38696. });
  38697. series.forEach(function (eachSeries, seriesIndex) {
  38698. if (opts.tooltip) {
  38699. if (opts.tooltip.index == seriesIndex) {
  38700. context.beginPath();
  38701. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  38702. context.moveTo(centerPosition.x, centerPosition.y);
  38703. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38704. context.closePath();
  38705. context.fill();
  38706. }
  38707. }
  38708. context.beginPath();
  38709. context.setLineWidth(roseOption.borderWidth * opts.pix);
  38710. context.lineJoin = "round";
  38711. context.setStrokeStyle(roseOption.borderColor);
  38712. var fillcolor = eachSeries.color;
  38713. if (roseOption.linearType == 'custom') {
  38714. var grd;
  38715. if (context.createCircularGradient) {
  38716. grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_);
  38717. } else {
  38718. grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0, centerPosition.x, centerPosition.y, eachSeries._radius_);
  38719. }
  38720. grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1));
  38721. grd.addColorStop(1, hexToRgb(eachSeries.color, 1));
  38722. fillcolor = grd;
  38723. }
  38724. context.setFillStyle(fillcolor);
  38725. context.moveTo(centerPosition.x, centerPosition.y);
  38726. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  38727. context.closePath();
  38728. context.fill();
  38729. if (roseOption.border == true) {
  38730. context.stroke();
  38731. }
  38732. });
  38733. if (opts.dataLabel !== false && process === 1) {
  38734. var valid = false;
  38735. for (var i = 0, len = series.length; i < len; i++) {
  38736. if (series[i].data > 0) {
  38737. valid = true;
  38738. break;
  38739. }
  38740. }
  38741. if (valid) {
  38742. drawPieText(series, opts, config, context, radius, centerPosition);
  38743. }
  38744. }
  38745. return {
  38746. center: centerPosition,
  38747. radius: radius,
  38748. series: series
  38749. };
  38750. }
  38751. function drawArcbarDataPoints(series, opts, config, context) {
  38752. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  38753. var arcbarOption = assign({}, {
  38754. startAngle: 0.75,
  38755. endAngle: 0.25,
  38756. type: 'default',
  38757. width: 12,
  38758. gap: 2,
  38759. linearType: 'none',
  38760. customColor: []
  38761. }, opts.extra.arcbar);
  38762. series = getArcbarDataPoints(series, arcbarOption, process);
  38763. var centerPosition;
  38764. if (arcbarOption.centerX || arcbarOption.centerY) {
  38765. centerPosition = {
  38766. x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
  38767. y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
  38768. };
  38769. } else {
  38770. centerPosition = {
  38771. x: opts.width / 2,
  38772. y: opts.height / 2
  38773. };
  38774. }
  38775. var radius;
  38776. if (arcbarOption.radius) {
  38777. radius = arcbarOption.radius;
  38778. } else {
  38779. radius = Math.min(centerPosition.x, centerPosition.y);
  38780. radius -= 5 * opts.pix;
  38781. radius -= arcbarOption.width / 2;
  38782. }
  38783. arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
  38784. for (var i = 0; i < series.length; i++) {
  38785. var eachSeries = series[i];
  38786. //背景颜色
  38787. context.setLineWidth(arcbarOption.width * opts.pix);
  38788. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  38789. context.setLineCap('round');
  38790. context.beginPath();
  38791. if (arcbarOption.type == 'default') {
  38792. 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);
  38793. } else {
  38794. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, false);
  38795. }
  38796. context.stroke();
  38797. //进度条
  38798. var fillColor = eachSeries.color;
  38799. if (arcbarOption.linearType == 'custom') {
  38800. var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
  38801. grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1));
  38802. grd.addColorStop(0, hexToRgb(eachSeries.color, 1));
  38803. fillColor = grd;
  38804. }
  38805. context.setLineWidth(arcbarOption.width * opts.pix);
  38806. context.setStrokeStyle(fillColor);
  38807. context.setLineCap('round');
  38808. context.beginPath();
  38809. 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);
  38810. context.stroke();
  38811. }
  38812. drawRingTitle(opts, config, context, centerPosition);
  38813. return {
  38814. center: centerPosition,
  38815. radius: radius,
  38816. series: series
  38817. };
  38818. }
  38819. function drawGaugeDataPoints(categories, series, opts, config, context) {
  38820. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  38821. var gaugeOption = assign({}, {
  38822. type: 'default',
  38823. startAngle: 0.75,
  38824. endAngle: 0.25,
  38825. width: 15,
  38826. labelOffset: 13,
  38827. splitLine: {
  38828. fixRadius: 0,
  38829. splitNumber: 10,
  38830. width: 15,
  38831. color: '#FFFFFF',
  38832. childNumber: 5,
  38833. childWidth: 5
  38834. },
  38835. pointer: {
  38836. width: 15,
  38837. color: 'auto'
  38838. }
  38839. }, opts.extra.gauge);
  38840. if (gaugeOption.oldAngle == undefined) {
  38841. gaugeOption.oldAngle = gaugeOption.startAngle;
  38842. }
  38843. if (gaugeOption.oldData == undefined) {
  38844. gaugeOption.oldData = 0;
  38845. }
  38846. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  38847. var centerPosition = {
  38848. x: opts.width / 2,
  38849. y: opts.height / 2
  38850. };
  38851. var radius = Math.min(centerPosition.x, centerPosition.y);
  38852. radius -= 5 * opts.pix;
  38853. radius -= gaugeOption.width / 2;
  38854. var innerRadius = radius - gaugeOption.width;
  38855. var totalAngle = 0;
  38856. //判断仪表盘的样式:default百度样式,progress新样式
  38857. if (gaugeOption.type == 'progress') {
  38858. //## 第一步画中心圆形背景和进度条背景
  38859. //中心圆形背景
  38860. var pieRadius = radius - gaugeOption.width * 3;
  38861. context.beginPath();
  38862. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  38863. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  38864. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  38865. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  38866. context.setFillStyle(gradient);
  38867. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  38868. context.fill();
  38869. //画进度条背景
  38870. context.setLineWidth(gaugeOption.width);
  38871. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38872. context.setLineCap('round');
  38873. context.beginPath();
  38874. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  38875. context.stroke();
  38876. //## 第二步画刻度线
  38877. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38878. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38879. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38880. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38881. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38882. context.save();
  38883. context.translate(centerPosition.x, centerPosition.y);
  38884. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38885. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  38886. var proc = series[0].data * process;
  38887. for (var i = 0; i < len; i++) {
  38888. context.beginPath();
  38889. //刻度线随进度变色
  38890. if (proc > i / len) {
  38891. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  38892. } else {
  38893. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  38894. }
  38895. context.setLineWidth(3 * opts.pix);
  38896. context.moveTo(startX, 0);
  38897. context.lineTo(endX, 0);
  38898. context.stroke();
  38899. context.rotate(childAngle * Math.PI);
  38900. }
  38901. context.restore();
  38902. //## 第三步画进度条
  38903. series = getArcbarDataPoints(series, gaugeOption, process);
  38904. context.setLineWidth(gaugeOption.width);
  38905. context.setStrokeStyle(series[0].color);
  38906. context.setLineCap('round');
  38907. context.beginPath();
  38908. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  38909. context.stroke();
  38910. //## 第四步画指针
  38911. var pointerRadius = radius - gaugeOption.width * 2.5;
  38912. context.save();
  38913. context.translate(centerPosition.x, centerPosition.y);
  38914. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  38915. context.beginPath();
  38916. context.setLineWidth(gaugeOption.width / 3);
  38917. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  38918. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  38919. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  38920. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  38921. context.setStrokeStyle(gradient3);
  38922. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  38923. context.stroke();
  38924. context.beginPath();
  38925. context.setLineWidth(1);
  38926. context.setStrokeStyle(series[0].color);
  38927. context.setFillStyle(series[0].color);
  38928. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38929. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  38930. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  38931. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  38932. context.stroke();
  38933. context.fill();
  38934. context.restore();
  38935. //default百度样式
  38936. } else {
  38937. //画背景
  38938. context.setLineWidth(gaugeOption.width);
  38939. context.setLineCap('butt');
  38940. for (var _i23 = 0; _i23 < categories.length; _i23++) {
  38941. var eachCategories = categories[_i23];
  38942. context.beginPath();
  38943. context.setStrokeStyle(eachCategories.color);
  38944. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  38945. context.stroke();
  38946. }
  38947. context.save();
  38948. //画刻度线
  38949. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  38950. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  38951. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  38952. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  38953. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  38954. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  38955. context.translate(centerPosition.x, centerPosition.y);
  38956. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38957. for (var _i24 = 0; _i24 < gaugeOption.splitLine.splitNumber + 1; _i24++) {
  38958. context.beginPath();
  38959. context.setStrokeStyle(gaugeOption.splitLine.color);
  38960. context.setLineWidth(2 * opts.pix);
  38961. context.moveTo(_startX2, 0);
  38962. context.lineTo(_endX, 0);
  38963. context.stroke();
  38964. context.rotate(_splitAngle * Math.PI);
  38965. }
  38966. context.restore();
  38967. context.save();
  38968. context.translate(centerPosition.x, centerPosition.y);
  38969. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  38970. for (var _i25 = 0; _i25 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i25++) {
  38971. context.beginPath();
  38972. context.setStrokeStyle(gaugeOption.splitLine.color);
  38973. context.setLineWidth(1 * opts.pix);
  38974. context.moveTo(_startX2, 0);
  38975. context.lineTo(childendX, 0);
  38976. context.stroke();
  38977. context.rotate(_childAngle * Math.PI);
  38978. }
  38979. context.restore();
  38980. //画指针
  38981. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  38982. for (var _i26 = 0; _i26 < series.length; _i26++) {
  38983. var eachSeries = series[_i26];
  38984. context.save();
  38985. context.translate(centerPosition.x, centerPosition.y);
  38986. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  38987. context.beginPath();
  38988. context.setFillStyle(eachSeries.color);
  38989. context.moveTo(gaugeOption.pointer.width, 0);
  38990. context.lineTo(0, -gaugeOption.pointer.width / 2);
  38991. context.lineTo(-innerRadius, 0);
  38992. context.lineTo(0, gaugeOption.pointer.width / 2);
  38993. context.lineTo(gaugeOption.pointer.width, 0);
  38994. context.closePath();
  38995. context.fill();
  38996. context.beginPath();
  38997. context.setFillStyle('#FFFFFF');
  38998. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  38999. context.fill();
  39000. context.restore();
  39001. }
  39002. if (opts.dataLabel !== false) {
  39003. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  39004. }
  39005. }
  39006. //画仪表盘标题,副标题
  39007. drawRingTitle(opts, config, context, centerPosition);
  39008. if (process === 1 && opts.type === 'gauge') {
  39009. opts.extra.gauge.oldAngle = series[0]._proportion_;
  39010. opts.extra.gauge.oldData = series[0].data;
  39011. }
  39012. return {
  39013. center: centerPosition,
  39014. radius: radius,
  39015. innerRadius: innerRadius,
  39016. categories: categories,
  39017. totalAngle: totalAngle
  39018. };
  39019. }
  39020. function drawRadarDataPoints(series, opts, config, context) {
  39021. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39022. var radarOption = assign({}, {
  39023. gridColor: '#cccccc',
  39024. gridType: 'radar',
  39025. opacity: 0.2,
  39026. gridCount: 3,
  39027. border: false,
  39028. borderWidth: 2
  39029. }, opts.extra.radar);
  39030. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  39031. var centerPosition = {
  39032. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39033. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  39034. };
  39035. var xr = (opts.width - opts.area[1] - opts.area[3]) / 2;
  39036. var yr = (opts.height - opts.area[0] - opts.area[2]) / 2;
  39037. var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
  39038. radius -= config.radarLabelTextMargin * opts.pix;
  39039. // 画分割线
  39040. context.beginPath();
  39041. context.setLineWidth(1 * opts.pix);
  39042. context.setStrokeStyle(radarOption.gridColor);
  39043. coordinateAngle.forEach(function (angle) {
  39044. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  39045. context.moveTo(centerPosition.x, centerPosition.y);
  39046. context.lineTo(pos.x, pos.y);
  39047. });
  39048. context.stroke();
  39049. context.closePath();
  39050. // 画背景网格
  39051. var _loop = function _loop(i) {
  39052. var startPos = {};
  39053. context.beginPath();
  39054. context.setLineWidth(1 * opts.pix);
  39055. context.setStrokeStyle(radarOption.gridColor);
  39056. if (radarOption.gridType == 'radar') {
  39057. coordinateAngle.forEach(function (angle, index) {
  39058. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  39059. if (index === 0) {
  39060. startPos = pos;
  39061. context.moveTo(pos.x, pos.y);
  39062. } else {
  39063. context.lineTo(pos.x, pos.y);
  39064. }
  39065. });
  39066. context.lineTo(startPos.x, startPos.y);
  39067. } else {
  39068. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  39069. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  39070. }
  39071. context.stroke();
  39072. context.closePath();
  39073. };
  39074. for (var i = 1; i <= radarOption.gridCount; i++) {
  39075. _loop(i);
  39076. }
  39077. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  39078. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39079. // 绘制区域数据
  39080. context.beginPath();
  39081. context.setLineWidth(radarOption.borderWidth * opts.pix);
  39082. context.setStrokeStyle(eachSeries.color);
  39083. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  39084. eachSeries.data.forEach(function (item, index) {
  39085. if (index === 0) {
  39086. context.moveTo(item.position.x, item.position.y);
  39087. } else {
  39088. context.lineTo(item.position.x, item.position.y);
  39089. }
  39090. });
  39091. context.closePath();
  39092. context.fill();
  39093. if (radarOption.border === true) {
  39094. context.stroke();
  39095. }
  39096. context.closePath();
  39097. if (opts.dataPointShape !== false) {
  39098. var points = eachSeries.data.map(function (item) {
  39099. return item.position;
  39100. });
  39101. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  39102. }
  39103. });
  39104. // draw label text
  39105. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  39106. // draw dataLabel
  39107. if (opts.dataLabel !== false && process === 1) {
  39108. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  39109. context.beginPath();
  39110. var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
  39111. context.setFontSize(fontSize);
  39112. context.setFillStyle(eachSeries.textColor || opts.fontColor);
  39113. eachSeries.data.forEach(function (item, index) {
  39114. //如果是中心点垂直的上下点位
  39115. if (Math.abs(item.position.x - centerPosition.x) < 2) {
  39116. //如果在上面
  39117. if (item.position.y < centerPosition.y) {
  39118. context.setTextAlign('center');
  39119. context.fillText(item.value, item.position.x, item.position.y - 4);
  39120. } else {
  39121. context.setTextAlign('center');
  39122. context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
  39123. }
  39124. } else {
  39125. //如果在左侧
  39126. if (item.position.x < centerPosition.x) {
  39127. context.setTextAlign('right');
  39128. context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
  39129. } else {
  39130. context.setTextAlign('left');
  39131. context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
  39132. }
  39133. }
  39134. });
  39135. context.closePath();
  39136. context.stroke();
  39137. });
  39138. context.setTextAlign('left');
  39139. }
  39140. return {
  39141. center: centerPosition,
  39142. radius: radius,
  39143. angleList: coordinateAngle
  39144. };
  39145. }
  39146. function normalInt(min, max, iter) {
  39147. iter = iter == 0 ? 1 : iter;
  39148. var arr = [];
  39149. for (var i = 0; i < iter; i++) {
  39150. arr[i] = Math.random();
  39151. }
  39152. ;
  39153. return Math.floor(arr.reduce(function (i, j) {
  39154. return i + j;
  39155. }) / iter * (max - min)) + min;
  39156. }
  39157. ;
  39158. function collisionNew(area, points, width, height) {
  39159. var isIn = false;
  39160. for (var i = 0; i < points.length; i++) {
  39161. if (points[i].area) {
  39162. 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]) {
  39163. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  39164. isIn = true;
  39165. break;
  39166. } else {
  39167. isIn = false;
  39168. }
  39169. } else {
  39170. isIn = true;
  39171. break;
  39172. }
  39173. }
  39174. }
  39175. return isIn;
  39176. }
  39177. ;
  39178. function getBoundingBox(data) {
  39179. var bounds = {},
  39180. coords;
  39181. bounds.xMin = 180;
  39182. bounds.xMax = 0;
  39183. bounds.yMin = 90;
  39184. bounds.yMax = 0;
  39185. for (var i = 0; i < data.length; i++) {
  39186. var coorda = data[i].geometry.coordinates;
  39187. for (var k = 0; k < coorda.length; k++) {
  39188. coords = coorda[k];
  39189. if (coords.length == 1) {
  39190. coords = coords[0];
  39191. }
  39192. for (var j = 0; j < coords.length; j++) {
  39193. var longitude = coords[j][0];
  39194. var latitude = coords[j][1];
  39195. var point = {
  39196. x: longitude,
  39197. y: latitude
  39198. };
  39199. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  39200. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  39201. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  39202. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  39203. }
  39204. }
  39205. }
  39206. return bounds;
  39207. }
  39208. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  39209. return {
  39210. x: (longitude - bounds.xMin) * scale + xoffset,
  39211. y: (bounds.yMax - latitude) * scale + yoffset
  39212. };
  39213. }
  39214. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  39215. return {
  39216. x: (pointX - xoffset) / scale + bounds.xMin,
  39217. y: bounds.yMax - (pointY - yoffset) / scale
  39218. };
  39219. }
  39220. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  39221. if (s_poi[1] == e_poi[1]) {
  39222. return false;
  39223. }
  39224. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  39225. return false;
  39226. }
  39227. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  39228. return false;
  39229. }
  39230. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  39231. return false;
  39232. }
  39233. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  39234. return false;
  39235. }
  39236. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  39237. return false;
  39238. }
  39239. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  39240. if (xseg < poi[0]) {
  39241. return false;
  39242. } else {
  39243. return true;
  39244. }
  39245. }
  39246. function isPoiWithinPoly(poi, poly, mercator) {
  39247. var sinsc = 0;
  39248. for (var i = 0; i < poly.length; i++) {
  39249. var epoly = poly[i][0];
  39250. if (poly.length == 1) {
  39251. epoly = poly[i][0];
  39252. }
  39253. for (var j = 0; j < epoly.length - 1; j++) {
  39254. var s_poi = epoly[j];
  39255. var e_poi = epoly[j + 1];
  39256. if (mercator) {
  39257. s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
  39258. e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
  39259. }
  39260. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  39261. sinsc += 1;
  39262. }
  39263. }
  39264. }
  39265. if (sinsc % 2 == 1) {
  39266. return true;
  39267. } else {
  39268. return false;
  39269. }
  39270. }
  39271. function drawMapDataPoints(series, opts, config, context) {
  39272. var mapOption = assign({}, {
  39273. border: true,
  39274. mercator: false,
  39275. borderWidth: 1,
  39276. borderColor: '#666666',
  39277. fillOpacity: 0.6,
  39278. activeBorderColor: '#f04864',
  39279. activeFillColor: '#facc14',
  39280. activeFillOpacity: 1
  39281. }, opts.extra.map);
  39282. var coords, point;
  39283. var data = series;
  39284. var bounds = getBoundingBox(data);
  39285. if (mapOption.mercator) {
  39286. var max = lonlat2mercator(bounds.xMax, bounds.yMax);
  39287. var min = lonlat2mercator(bounds.xMin, bounds.yMin);
  39288. bounds.xMax = max[0];
  39289. bounds.yMax = max[1];
  39290. bounds.xMin = min[0];
  39291. bounds.yMin = min[1];
  39292. }
  39293. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  39294. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  39295. var scale = xScale < yScale ? xScale : yScale;
  39296. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  39297. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  39298. for (var i = 0; i < data.length; i++) {
  39299. context.beginPath();
  39300. context.setLineWidth(mapOption.borderWidth * opts.pix);
  39301. context.setStrokeStyle(mapOption.borderColor);
  39302. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  39303. if (opts.tooltip) {
  39304. if (opts.tooltip.index == i) {
  39305. context.setStrokeStyle(mapOption.activeBorderColor);
  39306. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  39307. }
  39308. }
  39309. var coorda = data[i].geometry.coordinates;
  39310. for (var k = 0; k < coorda.length; k++) {
  39311. coords = coorda[k];
  39312. if (coords.length == 1) {
  39313. coords = coords[0];
  39314. }
  39315. for (var j = 0; j < coords.length; j++) {
  39316. var gaosi = Array(2);
  39317. if (mapOption.mercator) {
  39318. gaosi = lonlat2mercator(coords[j][0], coords[j][1]);
  39319. } else {
  39320. gaosi = coords[j];
  39321. }
  39322. point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset);
  39323. if (j === 0) {
  39324. context.beginPath();
  39325. context.moveTo(point.x, point.y);
  39326. } else {
  39327. context.lineTo(point.x, point.y);
  39328. }
  39329. }
  39330. context.fill();
  39331. if (mapOption.border == true) {
  39332. context.stroke();
  39333. }
  39334. }
  39335. if (opts.dataLabel == true) {
  39336. var centerPoint = data[i].properties.centroid;
  39337. if (centerPoint) {
  39338. if (mapOption.mercator) {
  39339. centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1]);
  39340. }
  39341. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  39342. var fontSize = data[i].textSize * opts.pix || config.fontSize;
  39343. var text = data[i].properties.name;
  39344. context.beginPath();
  39345. context.setFontSize(fontSize);
  39346. context.setFillStyle(data[i].textColor || opts.fontColor);
  39347. context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
  39348. context.closePath();
  39349. context.stroke();
  39350. }
  39351. }
  39352. }
  39353. opts.chartData.mapData = {
  39354. bounds: bounds,
  39355. scale: scale,
  39356. xoffset: xoffset,
  39357. yoffset: yoffset,
  39358. mercator: mapOption.mercator
  39359. };
  39360. drawToolTipBridge(opts, config, context, 1);
  39361. context.draw();
  39362. }
  39363. function getWordCloudPoint(opts, type, context) {
  39364. var points = opts.series;
  39365. switch (type) {
  39366. case 'normal':
  39367. for (var i = 0; i < points.length; i++) {
  39368. var text = points[i].name;
  39369. var tHeight = points[i].textSize * opts.pix;
  39370. var tWidth = measureText(text, tHeight, context);
  39371. var x = void 0,
  39372. y = void 0;
  39373. var area = void 0;
  39374. var breaknum = 0;
  39375. while (true) {
  39376. breaknum++;
  39377. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  39378. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  39379. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  39380. var isCollision = collisionNew(area, points, opts.width, opts.height);
  39381. if (!isCollision) break;
  39382. if (breaknum == 1000) {
  39383. area = [-100, -100, -100, -100];
  39384. break;
  39385. }
  39386. }
  39387. ;
  39388. points[i].area = area;
  39389. }
  39390. break;
  39391. case 'vertical':
  39392. var Spin = function Spin() {
  39393. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  39394. if (Math.random() > 0.7) {
  39395. return true;
  39396. } else {
  39397. return false;
  39398. }
  39399. ;
  39400. };
  39401. ;
  39402. for (var _i27 = 0; _i27 < points.length; _i27++) {
  39403. var _text = points[_i27].name;
  39404. var _tHeight = points[_i27].textSize * opts.pix;
  39405. var _tWidth = measureText(_text, _tHeight, context);
  39406. var isSpin = Spin();
  39407. var _x = void 0,
  39408. _y = void 0,
  39409. _area = void 0,
  39410. areav = void 0;
  39411. var _breaknum = 0;
  39412. while (true) {
  39413. _breaknum++;
  39414. var _isCollision = void 0;
  39415. if (isSpin) {
  39416. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39417. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39418. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  39419. 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];
  39420. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  39421. } else {
  39422. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  39423. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  39424. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  39425. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  39426. }
  39427. if (!_isCollision) break;
  39428. if (_breaknum == 1000) {
  39429. _area = [-1000, -1000, -1000, -1000];
  39430. break;
  39431. }
  39432. }
  39433. ;
  39434. if (isSpin) {
  39435. points[_i27].area = areav;
  39436. points[_i27].areav = _area;
  39437. } else {
  39438. points[_i27].area = _area;
  39439. }
  39440. points[_i27].rotate = isSpin;
  39441. }
  39442. ;
  39443. break;
  39444. }
  39445. return points;
  39446. }
  39447. function drawWordCloudDataPoints(series, opts, config, context) {
  39448. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39449. var wordOption = assign({}, {
  39450. type: 'normal',
  39451. autoColors: true
  39452. }, opts.extra.word);
  39453. if (!opts.chartData.wordCloudData) {
  39454. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
  39455. }
  39456. context.beginPath();
  39457. context.setFillStyle(opts.background);
  39458. context.rect(0, 0, opts.width, opts.height);
  39459. context.fill();
  39460. context.save();
  39461. var points = opts.chartData.wordCloudData;
  39462. context.translate(opts.width / 2, opts.height / 2);
  39463. for (var i = 0; i < points.length; i++) {
  39464. context.save();
  39465. if (points[i].rotate) {
  39466. context.rotate(90 * Math.PI / 180);
  39467. }
  39468. var text = points[i].name;
  39469. var tHeight = points[i].textSize * opts.pix;
  39470. var tWidth = measureText(text, tHeight, context);
  39471. context.beginPath();
  39472. context.setStrokeStyle(points[i].color);
  39473. context.setFillStyle(points[i].color);
  39474. context.setFontSize(tHeight);
  39475. if (points[i].rotate) {
  39476. if (points[i].areav[0] > 0) {
  39477. if (opts.tooltip) {
  39478. if (opts.tooltip.index == i) {
  39479. 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);
  39480. } else {
  39481. 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);
  39482. }
  39483. } else {
  39484. 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);
  39485. }
  39486. }
  39487. } else {
  39488. if (points[i].area[0] > 0) {
  39489. if (opts.tooltip) {
  39490. if (opts.tooltip.index == i) {
  39491. 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);
  39492. } else {
  39493. 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);
  39494. }
  39495. } else {
  39496. 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);
  39497. }
  39498. }
  39499. }
  39500. context.stroke();
  39501. context.restore();
  39502. }
  39503. context.restore();
  39504. }
  39505. function drawFunnelDataPoints(series, opts, config, context) {
  39506. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39507. var funnelOption = assign({}, {
  39508. type: 'funnel',
  39509. activeWidth: 10,
  39510. activeOpacity: 0.3,
  39511. border: false,
  39512. borderWidth: 2,
  39513. borderColor: '#FFFFFF',
  39514. fillOpacity: 1,
  39515. labelAlign: 'right',
  39516. linearType: 'none',
  39517. customColor: []
  39518. }, opts.extra.funnel);
  39519. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  39520. var centerPosition = {
  39521. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  39522. y: opts.height - opts.area[2]
  39523. };
  39524. var activeWidth = funnelOption.activeWidth * opts.pix;
  39525. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  39526. series = getFunnelDataPoints(series, radius, funnelOption.type, eachSpacing, process);
  39527. context.save();
  39528. context.translate(centerPosition.x, centerPosition.y);
  39529. funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
  39530. if (funnelOption.type == 'pyramid') {
  39531. for (var i = 0; i < series.length; i++) {
  39532. if (i == series.length - 1) {
  39533. if (opts.tooltip) {
  39534. if (opts.tooltip.index == i) {
  39535. context.beginPath();
  39536. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39537. context.moveTo(-activeWidth, -eachSpacing);
  39538. context.lineTo(-series[i].radius - activeWidth, 0);
  39539. context.lineTo(series[i].radius + activeWidth, 0);
  39540. context.lineTo(activeWidth, -eachSpacing);
  39541. context.lineTo(-activeWidth, -eachSpacing);
  39542. context.closePath();
  39543. context.fill();
  39544. }
  39545. }
  39546. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39547. context.beginPath();
  39548. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39549. context.setStrokeStyle(funnelOption.borderColor);
  39550. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39551. if (funnelOption.linearType == 'custom') {
  39552. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39553. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39554. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39555. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39556. fillColor = grd;
  39557. }
  39558. context.setFillStyle(fillColor);
  39559. context.moveTo(0, -eachSpacing);
  39560. context.lineTo(-series[i].radius, 0);
  39561. context.lineTo(series[i].radius, 0);
  39562. context.lineTo(0, -eachSpacing);
  39563. context.closePath();
  39564. context.fill();
  39565. if (funnelOption.border == true) {
  39566. context.stroke();
  39567. }
  39568. } else {
  39569. if (opts.tooltip) {
  39570. if (opts.tooltip.index == i) {
  39571. context.beginPath();
  39572. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  39573. context.moveTo(0, 0);
  39574. context.lineTo(-series[i].radius - activeWidth, 0);
  39575. context.lineTo(-series[i + 1].radius - activeWidth, -eachSpacing);
  39576. context.lineTo(series[i + 1].radius + activeWidth, -eachSpacing);
  39577. context.lineTo(series[i].radius + activeWidth, 0);
  39578. context.lineTo(0, 0);
  39579. context.closePath();
  39580. context.fill();
  39581. }
  39582. }
  39583. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  39584. context.beginPath();
  39585. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39586. context.setStrokeStyle(funnelOption.borderColor);
  39587. var fillColor = hexToRgb(series[i].color, funnelOption.fillOpacity);
  39588. if (funnelOption.linearType == 'custom') {
  39589. var grd = context.createLinearGradient(series[i].radius, -eachSpacing, -series[i].radius, -eachSpacing);
  39590. grd.addColorStop(0, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39591. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[i].linearIndex], funnelOption.fillOpacity));
  39592. grd.addColorStop(1, hexToRgb(series[i].color, funnelOption.fillOpacity));
  39593. fillColor = grd;
  39594. }
  39595. context.setFillStyle(fillColor);
  39596. context.moveTo(0, 0);
  39597. context.lineTo(-series[i].radius, 0);
  39598. context.lineTo(-series[i + 1].radius, -eachSpacing);
  39599. context.lineTo(series[i + 1].radius, -eachSpacing);
  39600. context.lineTo(series[i].radius, 0);
  39601. context.lineTo(0, 0);
  39602. context.closePath();
  39603. context.fill();
  39604. if (funnelOption.border == true) {
  39605. context.stroke();
  39606. }
  39607. }
  39608. context.translate(0, -eachSpacing);
  39609. }
  39610. } else {
  39611. for (var _i28 = 0; _i28 < series.length; _i28++) {
  39612. if (_i28 == 0) {
  39613. if (opts.tooltip) {
  39614. if (opts.tooltip.index == _i28) {
  39615. context.beginPath();
  39616. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39617. context.moveTo(-activeWidth, 0);
  39618. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39619. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39620. context.lineTo(activeWidth, 0);
  39621. context.lineTo(-activeWidth, 0);
  39622. context.closePath();
  39623. context.fill();
  39624. }
  39625. }
  39626. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing, centerPosition.x + series[_i28].radius, centerPosition.y];
  39627. context.beginPath();
  39628. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39629. context.setStrokeStyle(funnelOption.borderColor);
  39630. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39631. if (funnelOption.linearType == 'custom') {
  39632. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39633. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39634. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39635. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39636. fillColor = grd;
  39637. }
  39638. context.setFillStyle(fillColor);
  39639. context.moveTo(0, 0);
  39640. context.lineTo(-series[_i28].radius, -eachSpacing);
  39641. context.lineTo(series[_i28].radius, -eachSpacing);
  39642. context.lineTo(0, 0);
  39643. context.closePath();
  39644. context.fill();
  39645. if (funnelOption.border == true) {
  39646. context.stroke();
  39647. }
  39648. } else {
  39649. if (opts.tooltip) {
  39650. if (opts.tooltip.index == _i28) {
  39651. context.beginPath();
  39652. context.setFillStyle(hexToRgb(series[_i28].color, funnelOption.activeOpacity));
  39653. context.moveTo(0, 0);
  39654. context.lineTo(-series[_i28 - 1].radius - activeWidth, 0);
  39655. context.lineTo(-series[_i28].radius - activeWidth, -eachSpacing);
  39656. context.lineTo(series[_i28].radius + activeWidth, -eachSpacing);
  39657. context.lineTo(series[_i28 - 1].radius + activeWidth, 0);
  39658. context.lineTo(0, 0);
  39659. context.closePath();
  39660. context.fill();
  39661. }
  39662. }
  39663. series[_i28].funnelArea = [centerPosition.x - series[_i28].radius, centerPosition.y - eachSpacing * (_i28 + 1), centerPosition.x + series[_i28].radius, centerPosition.y - eachSpacing * _i28];
  39664. context.beginPath();
  39665. context.setLineWidth(funnelOption.borderWidth * opts.pix);
  39666. context.setStrokeStyle(funnelOption.borderColor);
  39667. var fillColor = hexToRgb(series[_i28].color, funnelOption.fillOpacity);
  39668. if (funnelOption.linearType == 'custom') {
  39669. var grd = context.createLinearGradient(series[_i28].radius, -eachSpacing, -series[_i28].radius, -eachSpacing);
  39670. grd.addColorStop(0, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39671. grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[series[_i28].linearIndex], funnelOption.fillOpacity));
  39672. grd.addColorStop(1, hexToRgb(series[_i28].color, funnelOption.fillOpacity));
  39673. fillColor = grd;
  39674. }
  39675. context.setFillStyle(fillColor);
  39676. context.moveTo(0, 0);
  39677. context.lineTo(-series[_i28 - 1].radius, 0);
  39678. context.lineTo(-series[_i28].radius, -eachSpacing);
  39679. context.lineTo(series[_i28].radius, -eachSpacing);
  39680. context.lineTo(series[_i28 - 1].radius, 0);
  39681. context.lineTo(0, 0);
  39682. context.closePath();
  39683. context.fill();
  39684. if (funnelOption.border == true) {
  39685. context.stroke();
  39686. }
  39687. }
  39688. context.translate(0, -eachSpacing);
  39689. }
  39690. }
  39691. context.restore();
  39692. if (opts.dataLabel !== false && process === 1) {
  39693. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  39694. }
  39695. return {
  39696. center: centerPosition,
  39697. radius: radius,
  39698. series: series
  39699. };
  39700. }
  39701. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  39702. for (var i = 0; i < series.length; i++) {
  39703. var item = series[i];
  39704. var startX = void 0,
  39705. endX = void 0,
  39706. startY = void 0,
  39707. fontSize = void 0;
  39708. var text = item.formatter ? item.formatter(item, i, series) : util.toFixed(item._proportion_ * 100) + '%';
  39709. if (labelAlign == 'right') {
  39710. if (opts.extra.funnel.type === 'pyramid') {
  39711. if (i == series.length - 1) {
  39712. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39713. } else {
  39714. startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
  39715. }
  39716. } else {
  39717. if (i == 0) {
  39718. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  39719. } else {
  39720. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  39721. }
  39722. }
  39723. endX = startX + activeWidth * 2;
  39724. startY = item.funnelArea[1] + eachSpacing / 2;
  39725. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39726. context.setLineWidth(1 * opts.pix);
  39727. context.setStrokeStyle(item.color);
  39728. context.setFillStyle(item.color);
  39729. context.beginPath();
  39730. context.moveTo(startX, startY);
  39731. context.lineTo(endX, startY);
  39732. context.stroke();
  39733. context.closePath();
  39734. context.beginPath();
  39735. context.moveTo(endX, startY);
  39736. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39737. context.closePath();
  39738. context.fill();
  39739. context.beginPath();
  39740. context.setFontSize(fontSize);
  39741. context.setFillStyle(item.textColor || opts.fontColor);
  39742. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  39743. context.closePath();
  39744. context.stroke();
  39745. context.closePath();
  39746. } else {
  39747. if (opts.extra.funnel.type === 'pyramid') {
  39748. if (i == series.length - 1) {
  39749. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39750. } else {
  39751. startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
  39752. }
  39753. } else {
  39754. if (i == 0) {
  39755. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  39756. } else {
  39757. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  39758. }
  39759. }
  39760. endX = startX - activeWidth * 2;
  39761. startY = item.funnelArea[1] + eachSpacing / 2;
  39762. fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
  39763. context.setLineWidth(1 * opts.pix);
  39764. context.setStrokeStyle(item.color);
  39765. context.setFillStyle(item.color);
  39766. context.beginPath();
  39767. context.moveTo(startX, startY);
  39768. context.lineTo(endX, startY);
  39769. context.stroke();
  39770. context.closePath();
  39771. context.beginPath();
  39772. context.moveTo(endX, startY);
  39773. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  39774. context.closePath();
  39775. context.fill();
  39776. context.beginPath();
  39777. context.setFontSize(fontSize);
  39778. context.setFillStyle(item.textColor || opts.fontColor);
  39779. context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
  39780. context.closePath();
  39781. context.stroke();
  39782. context.closePath();
  39783. }
  39784. }
  39785. }
  39786. function drawCanvas(opts, context) {
  39787. context.draw();
  39788. }
  39789. var Timing = {
  39790. easeIn: function easeIn(pos) {
  39791. return Math.pow(pos, 3);
  39792. },
  39793. easeOut: function easeOut(pos) {
  39794. return Math.pow(pos - 1, 3) + 1;
  39795. },
  39796. easeInOut: function easeInOut(pos) {
  39797. if ((pos /= 0.5) < 1) {
  39798. return 0.5 * Math.pow(pos, 3);
  39799. } else {
  39800. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  39801. }
  39802. },
  39803. linear: function linear(pos) {
  39804. return pos;
  39805. }
  39806. };
  39807. function Animation(opts) {
  39808. this.isStop = false;
  39809. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  39810. opts.timing = opts.timing || 'easeInOut';
  39811. var delay = 17;
  39812. function createAnimationFrame() {
  39813. if (typeof setTimeout !== 'undefined') {
  39814. return function (step, delay) {
  39815. setTimeout(function () {
  39816. var timeStamp = +new Date();
  39817. step(timeStamp);
  39818. }, delay);
  39819. };
  39820. } else if (typeof requestAnimationFrame !== 'undefined') {
  39821. return requestAnimationFrame;
  39822. } else {
  39823. return function (step) {
  39824. step(null);
  39825. };
  39826. }
  39827. }
  39828. ;
  39829. var animationFrame = createAnimationFrame();
  39830. var startTimeStamp = null;
  39831. var _step = function step(timestamp) {
  39832. if (timestamp === null || this.isStop === true) {
  39833. opts.onProcess && opts.onProcess(1);
  39834. opts.onAnimationFinish && opts.onAnimationFinish();
  39835. return;
  39836. }
  39837. if (startTimeStamp === null) {
  39838. startTimeStamp = timestamp;
  39839. }
  39840. if (timestamp - startTimeStamp < opts.duration) {
  39841. var process = (timestamp - startTimeStamp) / opts.duration;
  39842. var timingFunction = Timing[opts.timing];
  39843. process = timingFunction(process);
  39844. opts.onProcess && opts.onProcess(process);
  39845. animationFrame(_step, delay);
  39846. } else {
  39847. opts.onProcess && opts.onProcess(1);
  39848. opts.onAnimationFinish && opts.onAnimationFinish();
  39849. }
  39850. };
  39851. _step = _step.bind(this);
  39852. animationFrame(_step, delay);
  39853. }
  39854. Animation.prototype.stop = function () {
  39855. this.isStop = true;
  39856. };
  39857. function drawCharts(type, opts, config, context) {
  39858. var _this = this;
  39859. var series = opts.series;
  39860. //兼容ECharts饼图类数据格式
  39861. if (type === 'pie' || type === 'ring' || type === 'rose' || type === 'funnel') {
  39862. series = fixPieSeries(series, opts, config);
  39863. }
  39864. var categories = opts.categories;
  39865. series = fillSeries(series, opts, config);
  39866. var duration = opts.animation ? opts.duration : 0;
  39867. _this.animationInstance && _this.animationInstance.stop();
  39868. var seriesMA = null;
  39869. if (type == 'candle') {
  39870. var average = assign({}, opts.extra.candle.average);
  39871. if (average.show) {
  39872. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  39873. seriesMA = fillSeries(seriesMA, opts, config);
  39874. opts.seriesMA = seriesMA;
  39875. } else if (opts.seriesMA) {
  39876. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  39877. } else {
  39878. seriesMA = series;
  39879. }
  39880. } else {
  39881. seriesMA = series;
  39882. }
  39883. /* 过滤掉show=false的series */
  39884. opts._series_ = series = filterSeries(series);
  39885. //重新计算图表区域
  39886. opts.area = new Array(4);
  39887. //复位绘图区域
  39888. for (var j = 0; j < 4; j++) {
  39889. opts.area[j] = opts.padding[j] * opts.pix;
  39890. }
  39891. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  39892. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
  39893. legendHeight = _calLegendData.area.wholeHeight,
  39894. legendWidth = _calLegendData.area.wholeWidth;
  39895. switch (opts.legend.position) {
  39896. case 'top':
  39897. opts.area[0] += legendHeight;
  39898. break;
  39899. case 'bottom':
  39900. opts.area[2] += legendHeight;
  39901. break;
  39902. case 'left':
  39903. opts.area[3] += legendWidth;
  39904. break;
  39905. case 'right':
  39906. opts.area[1] += legendWidth;
  39907. break;
  39908. }
  39909. var _calYAxisData = {},
  39910. yAxisWidth = 0;
  39911. 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') {
  39912. _calYAxisData = calYAxisData(series, opts, config, context);
  39913. yAxisWidth = _calYAxisData.yAxisWidth;
  39914. //如果显示Y轴标题
  39915. if (opts.yAxis.showTitle) {
  39916. var maxTitleHeight = 0;
  39917. for (var i = 0; i < opts.yAxis.data.length; i++) {
  39918. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize);
  39919. }
  39920. opts.area[0] += maxTitleHeight;
  39921. }
  39922. var rightIndex = 0,
  39923. leftIndex = 0;
  39924. //计算主绘图区域左右位置
  39925. for (var _i29 = 0; _i29 < yAxisWidth.length; _i29++) {
  39926. if (yAxisWidth[_i29].position == 'left') {
  39927. if (leftIndex > 0) {
  39928. opts.area[3] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39929. } else {
  39930. opts.area[3] += yAxisWidth[_i29].width;
  39931. }
  39932. leftIndex += 1;
  39933. } else if (yAxisWidth[_i29].position == 'right') {
  39934. if (rightIndex > 0) {
  39935. opts.area[1] += yAxisWidth[_i29].width + opts.yAxis.padding * opts.pix;
  39936. } else {
  39937. opts.area[1] += yAxisWidth[_i29].width;
  39938. }
  39939. rightIndex += 1;
  39940. }
  39941. }
  39942. } else {
  39943. config.yAxisWidth = yAxisWidth;
  39944. }
  39945. opts.chartData.yAxisData = _calYAxisData;
  39946. if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
  39947. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  39948. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39949. xAxisHeight = _calCategoriesData.xAxisHeight,
  39950. angle = _calCategoriesData.angle;
  39951. config.xAxisHeight = xAxisHeight;
  39952. config._xAxisTextAngle_ = angle;
  39953. opts.area[2] += xAxisHeight;
  39954. opts.chartData.categoriesData = _calCategoriesData;
  39955. } else {
  39956. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
  39957. opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
  39958. categories = opts.chartData.xAxisData.rangesFormat;
  39959. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
  39960. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  39961. _angle = _calCategoriesData2.angle;
  39962. config.xAxisHeight = _xAxisHeight;
  39963. config._xAxisTextAngle_ = _angle;
  39964. opts.area[2] += _xAxisHeight;
  39965. opts.chartData.categoriesData = _calCategoriesData2;
  39966. } else {
  39967. opts.chartData.xAxisData = {
  39968. xAxisPoints: []
  39969. };
  39970. }
  39971. }
  39972. //计算右对齐偏移距离
  39973. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  39974. var offsetLeft = 0,
  39975. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  39976. startX = opts.chartData.xAxisData.startX,
  39977. endX = opts.chartData.xAxisData.endX,
  39978. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  39979. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  39980. var screenWidth = endX - startX;
  39981. offsetLeft = screenWidth - totalWidth;
  39982. _this.scrollOption = {
  39983. currentOffset: offsetLeft,
  39984. startTouchX: offsetLeft,
  39985. distance: 0,
  39986. lastMoveTime: 0
  39987. };
  39988. opts._scrollDistance_ = offsetLeft;
  39989. }
  39990. if (type === 'pie' || type === 'ring' || type === 'rose') {
  39991. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
  39992. }
  39993. switch (type) {
  39994. case 'word':
  39995. this.animationInstance = new Animation({
  39996. timing: opts.timing,
  39997. duration: duration,
  39998. onProcess: function onProcess(process) {
  39999. context.clearRect(0, 0, opts.width, opts.height);
  40000. if (opts.rotate) {
  40001. contextRotate(context, opts);
  40002. }
  40003. drawWordCloudDataPoints(series, opts, config, context, process);
  40004. drawCanvas(opts, context);
  40005. },
  40006. onAnimationFinish: function onAnimationFinish() {
  40007. _this.uevent.trigger('renderComplete');
  40008. }
  40009. });
  40010. break;
  40011. case 'map':
  40012. context.clearRect(0, 0, opts.width, opts.height);
  40013. drawMapDataPoints(series, opts, config, context);
  40014. break;
  40015. case 'funnel':
  40016. this.animationInstance = new Animation({
  40017. timing: opts.timing,
  40018. duration: duration,
  40019. onProcess: function onProcess(process) {
  40020. context.clearRect(0, 0, opts.width, opts.height);
  40021. if (opts.rotate) {
  40022. contextRotate(context, opts);
  40023. }
  40024. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  40025. drawLegend(opts.series, opts, config, context, opts.chartData);
  40026. drawToolTipBridge(opts, config, context, process);
  40027. drawCanvas(opts, context);
  40028. },
  40029. onAnimationFinish: function onAnimationFinish() {
  40030. _this.uevent.trigger('renderComplete');
  40031. }
  40032. });
  40033. break;
  40034. case 'line':
  40035. this.animationInstance = new Animation({
  40036. timing: opts.timing,
  40037. duration: duration,
  40038. onProcess: function onProcess(process) {
  40039. context.clearRect(0, 0, opts.width, opts.height);
  40040. if (opts.rotate) {
  40041. contextRotate(context, opts);
  40042. }
  40043. drawYAxisGrid(categories, opts, config, context);
  40044. drawXAxis(categories, opts, config, context);
  40045. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  40046. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  40047. calPoints = _drawLineDataPoints.calPoints,
  40048. eachSpacing = _drawLineDataPoints.eachSpacing;
  40049. opts.chartData.xAxisPoints = xAxisPoints;
  40050. opts.chartData.calPoints = calPoints;
  40051. opts.chartData.eachSpacing = eachSpacing;
  40052. drawYAxis(series, opts, config, context);
  40053. if (opts.enableMarkLine !== false && process === 1) {
  40054. drawMarkLine(opts, config, context);
  40055. }
  40056. drawLegend(opts.series, opts, config, context, opts.chartData);
  40057. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40058. drawCanvas(opts, context);
  40059. },
  40060. onAnimationFinish: function onAnimationFinish() {
  40061. _this.uevent.trigger('renderComplete');
  40062. }
  40063. });
  40064. break;
  40065. case 'scatter':
  40066. this.animationInstance = new Animation({
  40067. timing: opts.timing,
  40068. duration: duration,
  40069. onProcess: function onProcess(process) {
  40070. context.clearRect(0, 0, opts.width, opts.height);
  40071. if (opts.rotate) {
  40072. contextRotate(context, opts);
  40073. }
  40074. drawYAxisGrid(categories, opts, config, context);
  40075. drawXAxis(categories, opts, config, context);
  40076. var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
  40077. xAxisPoints = _drawScatterDataPoints.xAxisPoints,
  40078. calPoints = _drawScatterDataPoints.calPoints,
  40079. eachSpacing = _drawScatterDataPoints.eachSpacing;
  40080. opts.chartData.xAxisPoints = xAxisPoints;
  40081. opts.chartData.calPoints = calPoints;
  40082. opts.chartData.eachSpacing = eachSpacing;
  40083. drawYAxis(series, opts, config, context);
  40084. if (opts.enableMarkLine !== false && process === 1) {
  40085. drawMarkLine(opts, config, context);
  40086. }
  40087. drawLegend(opts.series, opts, config, context, opts.chartData);
  40088. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40089. drawCanvas(opts, context);
  40090. },
  40091. onAnimationFinish: function onAnimationFinish() {
  40092. _this.uevent.trigger('renderComplete');
  40093. }
  40094. });
  40095. break;
  40096. case 'bubble':
  40097. this.animationInstance = new Animation({
  40098. timing: opts.timing,
  40099. duration: duration,
  40100. onProcess: function onProcess(process) {
  40101. context.clearRect(0, 0, opts.width, opts.height);
  40102. if (opts.rotate) {
  40103. contextRotate(context, opts);
  40104. }
  40105. drawYAxisGrid(categories, opts, config, context);
  40106. drawXAxis(categories, opts, config, context);
  40107. var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
  40108. xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
  40109. calPoints = _drawBubbleDataPoints.calPoints,
  40110. eachSpacing = _drawBubbleDataPoints.eachSpacing;
  40111. opts.chartData.xAxisPoints = xAxisPoints;
  40112. opts.chartData.calPoints = calPoints;
  40113. opts.chartData.eachSpacing = eachSpacing;
  40114. drawYAxis(series, opts, config, context);
  40115. if (opts.enableMarkLine !== false && process === 1) {
  40116. drawMarkLine(opts, config, context);
  40117. }
  40118. drawLegend(opts.series, opts, config, context, opts.chartData);
  40119. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40120. drawCanvas(opts, context);
  40121. },
  40122. onAnimationFinish: function onAnimationFinish() {
  40123. _this.uevent.trigger('renderComplete');
  40124. }
  40125. });
  40126. break;
  40127. case 'mix':
  40128. this.animationInstance = new Animation({
  40129. timing: opts.timing,
  40130. duration: duration,
  40131. onProcess: function onProcess(process) {
  40132. context.clearRect(0, 0, opts.width, opts.height);
  40133. if (opts.rotate) {
  40134. contextRotate(context, opts);
  40135. }
  40136. drawYAxisGrid(categories, opts, config, context);
  40137. drawXAxis(categories, opts, config, context);
  40138. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  40139. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  40140. calPoints = _drawMixDataPoints.calPoints,
  40141. eachSpacing = _drawMixDataPoints.eachSpacing;
  40142. opts.chartData.xAxisPoints = xAxisPoints;
  40143. opts.chartData.calPoints = calPoints;
  40144. opts.chartData.eachSpacing = eachSpacing;
  40145. drawYAxis(series, opts, config, context);
  40146. if (opts.enableMarkLine !== false && process === 1) {
  40147. drawMarkLine(opts, config, context);
  40148. }
  40149. drawLegend(opts.series, opts, config, context, opts.chartData);
  40150. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40151. drawCanvas(opts, context);
  40152. },
  40153. onAnimationFinish: function onAnimationFinish() {
  40154. _this.uevent.trigger('renderComplete');
  40155. }
  40156. });
  40157. break;
  40158. case 'column':
  40159. this.animationInstance = new Animation({
  40160. timing: opts.timing,
  40161. duration: duration,
  40162. onProcess: function onProcess(process) {
  40163. context.clearRect(0, 0, opts.width, opts.height);
  40164. if (opts.rotate) {
  40165. contextRotate(context, opts);
  40166. }
  40167. drawYAxisGrid(categories, opts, config, context);
  40168. drawXAxis(categories, opts, config, context);
  40169. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  40170. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  40171. calPoints = _drawColumnDataPoints.calPoints,
  40172. eachSpacing = _drawColumnDataPoints.eachSpacing;
  40173. opts.chartData.xAxisPoints = xAxisPoints;
  40174. opts.chartData.calPoints = calPoints;
  40175. opts.chartData.eachSpacing = eachSpacing;
  40176. drawYAxis(series, opts, config, context);
  40177. if (opts.enableMarkLine !== false && process === 1) {
  40178. drawMarkLine(opts, config, context);
  40179. }
  40180. drawLegend(opts.series, opts, config, context, opts.chartData);
  40181. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40182. drawCanvas(opts, context);
  40183. },
  40184. onAnimationFinish: function onAnimationFinish() {
  40185. _this.uevent.trigger('renderComplete');
  40186. }
  40187. });
  40188. break;
  40189. case 'bar':
  40190. this.animationInstance = new Animation({
  40191. timing: opts.timing,
  40192. duration: duration,
  40193. onProcess: function onProcess(process) {
  40194. context.clearRect(0, 0, opts.width, opts.height);
  40195. if (opts.rotate) {
  40196. contextRotate(context, opts);
  40197. }
  40198. drawXAxis(categories, opts, config, context);
  40199. var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
  40200. yAxisPoints = _drawBarDataPoints.yAxisPoints,
  40201. calPoints = _drawBarDataPoints.calPoints,
  40202. eachSpacing = _drawBarDataPoints.eachSpacing;
  40203. opts.chartData.yAxisPoints = yAxisPoints;
  40204. opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
  40205. opts.chartData.calPoints = calPoints;
  40206. opts.chartData.eachSpacing = eachSpacing;
  40207. drawYAxis(series, opts, config, context);
  40208. if (opts.enableMarkLine !== false && process === 1) {
  40209. drawMarkLine(opts, config, context);
  40210. }
  40211. drawLegend(opts.series, opts, config, context, opts.chartData);
  40212. drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
  40213. drawCanvas(opts, context);
  40214. },
  40215. onAnimationFinish: function onAnimationFinish() {
  40216. _this.uevent.trigger('renderComplete');
  40217. }
  40218. });
  40219. break;
  40220. case 'area':
  40221. this.animationInstance = new Animation({
  40222. timing: opts.timing,
  40223. duration: duration,
  40224. onProcess: function onProcess(process) {
  40225. context.clearRect(0, 0, opts.width, opts.height);
  40226. if (opts.rotate) {
  40227. contextRotate(context, opts);
  40228. }
  40229. drawYAxisGrid(categories, opts, config, context);
  40230. drawXAxis(categories, opts, config, context);
  40231. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  40232. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  40233. calPoints = _drawAreaDataPoints.calPoints,
  40234. eachSpacing = _drawAreaDataPoints.eachSpacing;
  40235. opts.chartData.xAxisPoints = xAxisPoints;
  40236. opts.chartData.calPoints = calPoints;
  40237. opts.chartData.eachSpacing = eachSpacing;
  40238. drawYAxis(series, opts, config, context);
  40239. if (opts.enableMarkLine !== false && process === 1) {
  40240. drawMarkLine(opts, config, context);
  40241. }
  40242. drawLegend(opts.series, opts, config, context, opts.chartData);
  40243. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40244. drawCanvas(opts, context);
  40245. },
  40246. onAnimationFinish: function onAnimationFinish() {
  40247. _this.uevent.trigger('renderComplete');
  40248. }
  40249. });
  40250. break;
  40251. case 'ring':
  40252. case 'pie':
  40253. this.animationInstance = new Animation({
  40254. timing: opts.timing,
  40255. duration: duration,
  40256. onProcess: function onProcess(process) {
  40257. context.clearRect(0, 0, opts.width, opts.height);
  40258. if (opts.rotate) {
  40259. contextRotate(context, opts);
  40260. }
  40261. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  40262. drawLegend(opts.series, opts, config, context, opts.chartData);
  40263. drawToolTipBridge(opts, config, context, process);
  40264. drawCanvas(opts, context);
  40265. },
  40266. onAnimationFinish: function onAnimationFinish() {
  40267. _this.uevent.trigger('renderComplete');
  40268. }
  40269. });
  40270. break;
  40271. case 'rose':
  40272. this.animationInstance = new Animation({
  40273. timing: opts.timing,
  40274. duration: duration,
  40275. onProcess: function onProcess(process) {
  40276. context.clearRect(0, 0, opts.width, opts.height);
  40277. if (opts.rotate) {
  40278. contextRotate(context, opts);
  40279. }
  40280. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  40281. drawLegend(opts.series, opts, config, context, opts.chartData);
  40282. drawToolTipBridge(opts, config, context, process);
  40283. drawCanvas(opts, context);
  40284. },
  40285. onAnimationFinish: function onAnimationFinish() {
  40286. _this.uevent.trigger('renderComplete');
  40287. }
  40288. });
  40289. break;
  40290. case 'radar':
  40291. this.animationInstance = new Animation({
  40292. timing: opts.timing,
  40293. duration: duration,
  40294. onProcess: function onProcess(process) {
  40295. context.clearRect(0, 0, opts.width, opts.height);
  40296. if (opts.rotate) {
  40297. contextRotate(context, opts);
  40298. }
  40299. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  40300. drawLegend(opts.series, opts, config, context, opts.chartData);
  40301. drawToolTipBridge(opts, config, context, process);
  40302. drawCanvas(opts, context);
  40303. },
  40304. onAnimationFinish: function onAnimationFinish() {
  40305. _this.uevent.trigger('renderComplete');
  40306. }
  40307. });
  40308. break;
  40309. case 'arcbar':
  40310. this.animationInstance = new Animation({
  40311. timing: opts.timing,
  40312. duration: duration,
  40313. onProcess: function onProcess(process) {
  40314. context.clearRect(0, 0, opts.width, opts.height);
  40315. if (opts.rotate) {
  40316. contextRotate(context, opts);
  40317. }
  40318. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  40319. drawCanvas(opts, context);
  40320. },
  40321. onAnimationFinish: function onAnimationFinish() {
  40322. _this.uevent.trigger('renderComplete');
  40323. }
  40324. });
  40325. break;
  40326. case 'gauge':
  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.gaugeData = drawGaugeDataPoints(categories, 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 'candle':
  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. drawYAxisGrid(categories, opts, config, context);
  40353. drawXAxis(categories, opts, config, context);
  40354. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  40355. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  40356. calPoints = _drawCandleDataPoints.calPoints,
  40357. eachSpacing = _drawCandleDataPoints.eachSpacing;
  40358. opts.chartData.xAxisPoints = xAxisPoints;
  40359. opts.chartData.calPoints = calPoints;
  40360. opts.chartData.eachSpacing = eachSpacing;
  40361. drawYAxis(series, opts, config, context);
  40362. if (opts.enableMarkLine !== false && process === 1) {
  40363. drawMarkLine(opts, config, context);
  40364. }
  40365. if (seriesMA) {
  40366. drawLegend(seriesMA, opts, config, context, opts.chartData);
  40367. } else {
  40368. drawLegend(opts.series, opts, config, context, opts.chartData);
  40369. }
  40370. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  40371. drawCanvas(opts, context);
  40372. },
  40373. onAnimationFinish: function onAnimationFinish() {
  40374. _this.uevent.trigger('renderComplete');
  40375. }
  40376. });
  40377. break;
  40378. }
  40379. }
  40380. function uChartsEvent() {
  40381. this.events = {};
  40382. }
  40383. uChartsEvent.prototype.addEventListener = function (type, listener) {
  40384. this.events[type] = this.events[type] || [];
  40385. this.events[type].push(listener);
  40386. };
  40387. uChartsEvent.prototype.delEventListener = function (type) {
  40388. this.events[type] = [];
  40389. };
  40390. uChartsEvent.prototype.trigger = function () {
  40391. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  40392. args[_key] = arguments[_key];
  40393. }
  40394. var type = args[0];
  40395. var params = args.slice(1);
  40396. if (!!this.events[type]) {
  40397. this.events[type].forEach(function (listener) {
  40398. try {
  40399. listener.apply(null, params);
  40400. } catch (e) {
  40401. //console.log('[uCharts] '+e);
  40402. }
  40403. });
  40404. }
  40405. };
  40406. var uCharts = function uCharts(opts) {
  40407. opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
  40408. opts.fontSize = opts.fontSize ? opts.fontSize : 13;
  40409. opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
  40410. if (opts.background == "" || opts.background == "none") {
  40411. opts.background = "#FFFFFF";
  40412. }
  40413. opts.title = assign({}, opts.title);
  40414. opts.subtitle = assign({}, opts.subtitle);
  40415. opts.duration = opts.duration ? opts.duration : 1000;
  40416. opts.yAxis = assign({}, {
  40417. data: [],
  40418. showTitle: false,
  40419. disabled: false,
  40420. disableGrid: false,
  40421. splitNumber: 5,
  40422. gridType: 'solid',
  40423. dashLength: 4 * opts.pix,
  40424. gridColor: '#cccccc',
  40425. padding: 10,
  40426. fontColor: '#666666'
  40427. }, opts.yAxis);
  40428. opts.xAxis = assign({}, {
  40429. rotateLabel: false,
  40430. disabled: false,
  40431. disableGrid: false,
  40432. splitNumber: 5,
  40433. calibration: false,
  40434. gridType: 'solid',
  40435. dashLength: 4,
  40436. scrollAlign: 'left',
  40437. boundaryGap: 'center',
  40438. axisLine: true,
  40439. axisLineColor: '#cccccc'
  40440. }, opts.xAxis);
  40441. opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
  40442. opts.legend = assign({}, {
  40443. show: true,
  40444. position: 'bottom',
  40445. float: 'center',
  40446. backgroundColor: 'rgba(0,0,0,0)',
  40447. borderColor: 'rgba(0,0,0,0)',
  40448. borderWidth: 0,
  40449. padding: 5,
  40450. margin: 5,
  40451. itemGap: 10,
  40452. fontSize: opts.fontSize,
  40453. lineHeight: opts.fontSize,
  40454. fontColor: opts.fontColor,
  40455. formatter: {},
  40456. hiddenColor: '#CECECE'
  40457. }, opts.legend);
  40458. opts.extra = assign({}, opts.extra);
  40459. opts.rotate = opts.rotate ? true : false;
  40460. opts.animation = opts.animation ? true : false;
  40461. opts.rotate = opts.rotate ? true : false;
  40462. opts.canvas2d = opts.canvas2d ? true : false;
  40463. var config$$1 = JSON.parse(JSON.stringify(config));
  40464. config$$1.color = opts.color ? opts.color : config$$1.color;
  40465. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  40466. if (opts.type == 'pie') {
  40467. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40468. }
  40469. if (opts.type == 'ring') {
  40470. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40471. }
  40472. if (opts.type == 'rose') {
  40473. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
  40474. }
  40475. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
  40476. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  40477. //屏幕旋转
  40478. config$$1.rotate = opts.rotate;
  40479. if (opts.rotate) {
  40480. var tempWidth = opts.width;
  40481. var tempHeight = opts.height;
  40482. opts.width = tempHeight;
  40483. opts.height = tempWidth;
  40484. }
  40485. //适配高分屏
  40486. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  40487. config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
  40488. config$$1.xAxisHeight = config.xAxisHeight * opts.pix;
  40489. if (opts.enableScroll && opts.xAxis.scrollShow) {
  40490. config$$1.xAxisHeight += 6 * opts.pix;
  40491. }
  40492. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pix;
  40493. config$$1.fontSize = opts.fontSize * opts.pix;
  40494. config$$1.titleFontSize = config.titleFontSize * opts.pix;
  40495. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
  40496. config$$1.toolTipPadding = config.toolTipPadding * opts.pix;
  40497. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pix;
  40498. config$$1.columePadding = config.columePadding * opts.pix;
  40499. //this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  40500. //v2.0版本后需要自行获取context并传入opts进行初始化,这么做是为了确保uCharts可以跨更多端使用,并保证了自定义组件this实例不被循环嵌套。如果您觉得不便请取消上面注释,采用v1.0版本的方式使用,对此给您带来的不便敬请谅解!
  40501. if (!opts.context) {
  40502. throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
  40503. }
  40504. this.context = opts.context;
  40505. if (!this.context.setTextAlign) {
  40506. this.context.setStrokeStyle = function (e) {
  40507. return this.strokeStyle = e;
  40508. };
  40509. this.context.setLineWidth = function (e) {
  40510. return this.lineWidth = e;
  40511. };
  40512. this.context.setLineCap = function (e) {
  40513. return this.lineCap = e;
  40514. };
  40515. this.context.setFontSize = function (e) {
  40516. return this.font = e + "px sans-serif";
  40517. };
  40518. this.context.setFillStyle = function (e) {
  40519. return this.fillStyle = e;
  40520. };
  40521. this.context.setTextAlign = function (e) {
  40522. return this.textAlign = e;
  40523. };
  40524. this.context.draw = function () {};
  40525. }
  40526. //兼容NVUEsetLineDash
  40527. if (!this.context.setLineDash) {
  40528. this.context.setLineDash = function (e) {};
  40529. }
  40530. opts.chartData = {};
  40531. this.uevent = new uChartsEvent();
  40532. this.scrollOption = {
  40533. currentOffset: 0,
  40534. startTouchX: 0,
  40535. distance: 0,
  40536. lastMoveTime: 0
  40537. };
  40538. this.opts = opts;
  40539. this.config = config$$1;
  40540. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  40541. };
  40542. uCharts.prototype.updateData = function () {
  40543. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  40544. this.opts = assign({}, this.opts, data);
  40545. this.opts.updateData = true;
  40546. var scrollPosition = data.scrollPosition || 'current';
  40547. switch (scrollPosition) {
  40548. case 'current':
  40549. //this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40550. break;
  40551. case 'left':
  40552. this.opts._scrollDistance_ = 0;
  40553. this.scrollOption = {
  40554. currentOffset: 0,
  40555. startTouchX: 0,
  40556. distance: 0,
  40557. lastMoveTime: 0
  40558. };
  40559. break;
  40560. case 'right':
  40561. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40562. yAxisWidth = _calYAxisData.yAxisWidth;
  40563. this.config.yAxisWidth = yAxisWidth;
  40564. var offsetLeft = 0;
  40565. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40566. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40567. startX = _getXAxisPoints0.startX,
  40568. endX = _getXAxisPoints0.endX,
  40569. eachSpacing = _getXAxisPoints0.eachSpacing;
  40570. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  40571. var screenWidth = endX - startX;
  40572. offsetLeft = screenWidth - totalWidth;
  40573. this.scrollOption = {
  40574. currentOffset: offsetLeft,
  40575. startTouchX: offsetLeft,
  40576. distance: 0,
  40577. lastMoveTime: 0
  40578. };
  40579. this.opts._scrollDistance_ = offsetLeft;
  40580. break;
  40581. }
  40582. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40583. };
  40584. uCharts.prototype.zoom = function () {
  40585. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  40586. if (this.opts.enableScroll !== true) {
  40587. console.log('[uCharts] 请启用滚动条后使用');
  40588. return;
  40589. }
  40590. //当前屏幕中间点
  40591. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  40592. this.opts.animation = false;
  40593. this.opts.xAxis.itemCount = val.itemCount;
  40594. //重新计算x轴偏移距离
  40595. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
  40596. yAxisWidth = _calYAxisData.yAxisWidth;
  40597. this.config.yAxisWidth = yAxisWidth;
  40598. var offsetLeft = 0;
  40599. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  40600. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  40601. startX = _getXAxisPoints0.startX,
  40602. endX = _getXAxisPoints0.endX,
  40603. eachSpacing = _getXAxisPoints0.eachSpacing;
  40604. var centerLeft = eachSpacing * centerPoint;
  40605. var screenWidth = endX - startX;
  40606. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  40607. offsetLeft = screenWidth / 2 - centerLeft;
  40608. if (offsetLeft > 0) {
  40609. offsetLeft = 0;
  40610. }
  40611. if (offsetLeft < MaxLeft) {
  40612. offsetLeft = MaxLeft;
  40613. }
  40614. this.scrollOption = {
  40615. currentOffset: offsetLeft,
  40616. startTouchX: offsetLeft,
  40617. distance: 0,
  40618. lastMoveTime: 0
  40619. };
  40620. this.opts._scrollDistance_ = offsetLeft;
  40621. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40622. };
  40623. uCharts.prototype.stopAnimation = function () {
  40624. this.animationInstance && this.animationInstance.stop();
  40625. };
  40626. uCharts.prototype.addEventListener = function (type, listener) {
  40627. this.uevent.addEventListener(type, listener);
  40628. };
  40629. uCharts.prototype.delEventListener = function (type) {
  40630. this.uevent.delEventListener(type);
  40631. };
  40632. uCharts.prototype.getCurrentDataIndex = function (e) {
  40633. var touches = null;
  40634. if (e.changedTouches) {
  40635. touches = e.changedTouches[0];
  40636. } else {
  40637. touches = e.mp.changedTouches[0];
  40638. }
  40639. if (touches) {
  40640. var _touches$ = getTouches(touches, this.opts, e);
  40641. if (this.opts.type === 'pie' || this.opts.type === 'ring') {
  40642. return findPieChartCurrentIndex({
  40643. x: _touches$.x,
  40644. y: _touches$.y
  40645. }, this.opts.chartData.pieData, this.opts);
  40646. } else if (this.opts.type === 'rose') {
  40647. return findRoseChartCurrentIndex({
  40648. x: _touches$.x,
  40649. y: _touches$.y
  40650. }, this.opts.chartData.pieData, this.opts);
  40651. } else if (this.opts.type === 'radar') {
  40652. return findRadarChartCurrentIndex({
  40653. x: _touches$.x,
  40654. y: _touches$.y
  40655. }, this.opts.chartData.radarData, this.opts.categories.length);
  40656. } else if (this.opts.type === 'funnel') {
  40657. return findFunnelChartCurrentIndex({
  40658. x: _touches$.x,
  40659. y: _touches$.y
  40660. }, this.opts.chartData.funnelData);
  40661. } else if (this.opts.type === 'map') {
  40662. return findMapChartCurrentIndex({
  40663. x: _touches$.x,
  40664. y: _touches$.y
  40665. }, this.opts);
  40666. } else if (this.opts.type === 'word') {
  40667. return findWordChartCurrentIndex({
  40668. x: _touches$.x,
  40669. y: _touches$.y
  40670. }, this.opts.chartData.wordCloudData);
  40671. } else if (this.opts.type === 'bar') {
  40672. return findBarChartCurrentIndex({
  40673. x: _touches$.x,
  40674. y: _touches$.y
  40675. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40676. } else {
  40677. return findCurrentIndex({
  40678. x: _touches$.x,
  40679. y: _touches$.y
  40680. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  40681. }
  40682. }
  40683. return -1;
  40684. };
  40685. uCharts.prototype.getLegendDataIndex = function (e) {
  40686. var touches = null;
  40687. if (e.changedTouches) {
  40688. touches = e.changedTouches[0];
  40689. } else {
  40690. touches = e.mp.changedTouches[0];
  40691. }
  40692. if (touches) {
  40693. var _touches$ = getTouches(touches, this.opts, e);
  40694. return findLegendIndex({
  40695. x: _touches$.x,
  40696. y: _touches$.y
  40697. }, this.opts.chartData.legendData);
  40698. }
  40699. return -1;
  40700. };
  40701. uCharts.prototype.touchLegend = function (e) {
  40702. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  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. var index = this.getLegendDataIndex(e);
  40712. if (index >= 0) {
  40713. if (this.opts.type == 'candle') {
  40714. this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
  40715. } else {
  40716. this.opts.series[index].show = !this.opts.series[index].show;
  40717. }
  40718. this.opts.animation = option.animation ? true : false;
  40719. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  40720. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  40721. }
  40722. }
  40723. };
  40724. uCharts.prototype.showToolTip = function (e) {
  40725. var _this2 = this;
  40726. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  40727. var touches = null;
  40728. if (e.changedTouches) {
  40729. touches = e.changedTouches[0];
  40730. } else {
  40731. touches = e.mp.changedTouches[0];
  40732. }
  40733. if (!touches) {
  40734. console.log("[uCharts] 未获取到event坐标信息");
  40735. }
  40736. var _touches$ = getTouches(touches, this.opts, e);
  40737. var currentOffset = this.scrollOption.currentOffset;
  40738. var opts = assign({}, this.opts, {
  40739. _scrollDistance_: currentOffset,
  40740. animation: false
  40741. });
  40742. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
  40743. var current = this.getCurrentDataIndex(e);
  40744. var index = option.index == undefined ? current.index : option.index;
  40745. if (index > -1 || index.length > 0) {
  40746. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40747. if (seriesData.length !== 0) {
  40748. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40749. textList = _getToolTipData.textList,
  40750. offset = _getToolTipData.offset;
  40751. offset.y = _touches$.y;
  40752. opts.tooltip = {
  40753. textList: option.textList !== undefined ? option.textList : textList,
  40754. offset: option.offset !== undefined ? option.offset : offset,
  40755. option: option,
  40756. index: index
  40757. };
  40758. }
  40759. }
  40760. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40761. }
  40762. if (this.opts.type === 'bar') {
  40763. var current = this.getCurrentDataIndex(e);
  40764. var index = option.index == undefined ? current.index : option.index;
  40765. if (index > -1 || index.length > 0) {
  40766. var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
  40767. if (seriesData.length !== 0) {
  40768. var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
  40769. textList = _getToolTipData.textList,
  40770. offset = _getToolTipData.offset;
  40771. offset.x = _touches$.x;
  40772. opts.tooltip = {
  40773. textList: option.textList !== undefined ? option.textList : textList,
  40774. offset: option.offset !== undefined ? option.offset : offset,
  40775. option: option,
  40776. index: index
  40777. };
  40778. }
  40779. }
  40780. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40781. }
  40782. if (this.opts.type === 'mix') {
  40783. var current = this.getCurrentDataIndex(e);
  40784. var index = option.index == undefined ? current.index : option.index;
  40785. if (index > -1) {
  40786. var currentOffset = this.scrollOption.currentOffset;
  40787. var opts = assign({}, this.opts, {
  40788. _scrollDistance_: currentOffset,
  40789. animation: false
  40790. });
  40791. var seriesData = getSeriesDataItem(this.opts.series, index);
  40792. if (seriesData.length !== 0) {
  40793. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
  40794. textList = _getMixToolTipData.textList,
  40795. offset = _getMixToolTipData.offset;
  40796. offset.y = _touches$.y;
  40797. opts.tooltip = {
  40798. textList: option.textList ? option.textList : textList,
  40799. offset: option.offset !== undefined ? option.offset : offset,
  40800. option: option,
  40801. index: index
  40802. };
  40803. }
  40804. }
  40805. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40806. }
  40807. if (this.opts.type === 'candle') {
  40808. var current = this.getCurrentDataIndex(e);
  40809. var index = option.index == undefined ? current.index : option.index;
  40810. if (index > -1) {
  40811. var currentOffset = this.scrollOption.currentOffset;
  40812. var opts = assign({}, this.opts, {
  40813. _scrollDistance_: currentOffset,
  40814. animation: false
  40815. });
  40816. var seriesData = getSeriesDataItem(this.opts.series, index);
  40817. if (seriesData.length !== 0) {
  40818. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
  40819. textList = _getToolTipData.textList,
  40820. offset = _getToolTipData.offset;
  40821. offset.y = _touches$.y;
  40822. opts.tooltip = {
  40823. textList: option.textList ? option.textList : textList,
  40824. offset: option.offset !== undefined ? option.offset : offset,
  40825. option: option,
  40826. index: index
  40827. };
  40828. }
  40829. }
  40830. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40831. }
  40832. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  40833. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40834. if (index > -1) {
  40835. var opts = assign({}, this.opts, {
  40836. animation: false
  40837. });
  40838. var seriesData = assign({}, opts._series_[index]);
  40839. var textList = [{
  40840. text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
  40841. color: seriesData.color
  40842. }];
  40843. var offset = {
  40844. x: _touches$.x,
  40845. y: _touches$.y
  40846. };
  40847. opts.tooltip = {
  40848. textList: option.textList ? option.textList : textList,
  40849. offset: option.offset !== undefined ? option.offset : offset,
  40850. option: option,
  40851. index: index
  40852. };
  40853. }
  40854. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40855. }
  40856. if (this.opts.type === 'map') {
  40857. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40858. if (index > -1) {
  40859. var opts = assign({}, this.opts, {
  40860. animation: false
  40861. });
  40862. var seriesData = assign({}, this.opts.series[index]);
  40863. seriesData.name = seriesData.properties.name;
  40864. var textList = [{
  40865. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40866. color: seriesData.color
  40867. }];
  40868. var offset = {
  40869. x: _touches$.x,
  40870. y: _touches$.y
  40871. };
  40872. opts.tooltip = {
  40873. textList: option.textList ? option.textList : textList,
  40874. offset: option.offset !== undefined ? option.offset : offset,
  40875. option: option,
  40876. index: index
  40877. };
  40878. }
  40879. opts.updateData = false;
  40880. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40881. }
  40882. if (this.opts.type === 'word') {
  40883. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40884. if (index > -1) {
  40885. var opts = assign({}, this.opts, {
  40886. animation: false
  40887. });
  40888. var seriesData = assign({}, this.opts.series[index]);
  40889. var textList = [{
  40890. text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
  40891. color: seriesData.color
  40892. }];
  40893. var offset = {
  40894. x: _touches$.x,
  40895. y: _touches$.y
  40896. };
  40897. opts.tooltip = {
  40898. textList: option.textList ? option.textList : textList,
  40899. offset: option.offset !== undefined ? option.offset : offset,
  40900. option: option,
  40901. index: index
  40902. };
  40903. }
  40904. opts.updateData = false;
  40905. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40906. }
  40907. if (this.opts.type === 'radar') {
  40908. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  40909. if (index > -1) {
  40910. var opts = assign({}, this.opts, {
  40911. animation: false
  40912. });
  40913. var seriesData = getSeriesDataItem(this.opts.series, index);
  40914. if (seriesData.length !== 0) {
  40915. var textList = seriesData.map(function (item) {
  40916. return {
  40917. text: option.formatter ? option.formatter(item, _this2.opts.categories[index], index, _this2.opts) : item.name + ': ' + item.data,
  40918. color: item.color
  40919. };
  40920. });
  40921. var offset = {
  40922. x: _touches$.x,
  40923. y: _touches$.y
  40924. };
  40925. opts.tooltip = {
  40926. textList: option.textList ? option.textList : textList,
  40927. offset: option.offset !== undefined ? option.offset : offset,
  40928. option: option,
  40929. index: index
  40930. };
  40931. }
  40932. }
  40933. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40934. }
  40935. };
  40936. uCharts.prototype.translate = function (distance) {
  40937. this.scrollOption = {
  40938. currentOffset: distance,
  40939. startTouchX: distance,
  40940. distance: 0,
  40941. lastMoveTime: 0
  40942. };
  40943. var opts = assign({}, this.opts, {
  40944. _scrollDistance_: distance,
  40945. animation: false
  40946. });
  40947. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  40948. };
  40949. uCharts.prototype.scrollStart = function (e) {
  40950. var touches = null;
  40951. if (e.changedTouches) {
  40952. touches = e.changedTouches[0];
  40953. } else {
  40954. touches = e.mp.changedTouches[0];
  40955. }
  40956. var _touches$ = getTouches(touches, this.opts, e);
  40957. if (touches && this.opts.enableScroll === true) {
  40958. this.scrollOption.startTouchX = _touches$.x;
  40959. }
  40960. };
  40961. uCharts.prototype.scroll = function (e) {
  40962. if (this.scrollOption.lastMoveTime === 0) {
  40963. this.scrollOption.lastMoveTime = Date.now();
  40964. }
  40965. var Limit = this.opts.touchMoveLimit || 60;
  40966. var currMoveTime = Date.now();
  40967. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  40968. if (duration < Math.floor(1000 / Limit)) return;
  40969. this.scrollOption.lastMoveTime = currMoveTime;
  40970. var touches = null;
  40971. if (e.changedTouches) {
  40972. touches = e.changedTouches[0];
  40973. } else {
  40974. touches = e.mp.changedTouches[0];
  40975. }
  40976. if (touches && this.opts.enableScroll === true) {
  40977. var _touches$ = getTouches(touches, this.opts, e);
  40978. var _distance;
  40979. _distance = _touches$.x - this.scrollOption.startTouchX;
  40980. var currentOffset = this.scrollOption.currentOffset;
  40981. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  40982. this.scrollOption.distance = _distance = validDistance - currentOffset;
  40983. var opts = assign({}, this.opts, {
  40984. _scrollDistance_: currentOffset + _distance,
  40985. animation: false
  40986. });
  40987. this.opts = opts;
  40988. drawCharts.call(this, opts.type, opts, this.config, this.context);
  40989. return currentOffset + _distance;
  40990. }
  40991. };
  40992. uCharts.prototype.scrollEnd = function (e) {
  40993. if (this.opts.enableScroll === true) {
  40994. var _scrollOption = this.scrollOption,
  40995. currentOffset = _scrollOption.currentOffset,
  40996. distance = _scrollOption.distance;
  40997. this.scrollOption.currentOffset = currentOffset + distance;
  40998. this.scrollOption.distance = 0;
  40999. }
  41000. };
  41001. if (( false ? undefined : (0, _typeof2.default)(module)) === "object" && (0, _typeof2.default)(module.exports) === "object") {
  41002. module.exports = uCharts;
  41003. }
  41004. var _default = uCharts;
  41005. exports.default = _default;
  41006. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/module.js */ 40)(module)))
  41007. /***/ }),
  41008. /***/ 504:
  41009. /*!********************************************************************************************************!*\
  41010. !*** D:/IdeaProjects/zdsz_WeChatApplet/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js ***!
  41011. \********************************************************************************************************/
  41012. /*! no static exports found */
  41013. /***/ (function(module, exports, __webpack_require__) {
  41014. "use strict";
  41015. Object.defineProperty(exports, "__esModule", {
  41016. value: true
  41017. });
  41018. exports.default = void 0;
  41019. /*
  41020. * uCharts®
  41021. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  41022. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  41023. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  41024. * 复制使用请保留本段注释,感谢支持开源!
  41025. *
  41026. * uCharts®官方网站
  41027. * https://www.uCharts.cn
  41028. *
  41029. * 开源地址:
  41030. * https://gitee.com/uCharts/uCharts
  41031. *
  41032. * uni-app插件市场地址:
  41033. * http://ext.dcloud.net.cn/plugin?id=271
  41034. *
  41035. */
  41036. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  41037. var color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  41038. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  41039. var formatDateTime = function formatDateTime(timeStamp, returnType) {
  41040. var date = new Date();
  41041. date.setTime(timeStamp * 1000);
  41042. var y = date.getFullYear();
  41043. var m = date.getMonth() + 1;
  41044. m = m < 10 ? '0' + m : m;
  41045. var d = date.getDate();
  41046. d = d < 10 ? '0' + d : d;
  41047. var h = date.getHours();
  41048. h = h < 10 ? '0' + h : h;
  41049. var minute = date.getMinutes();
  41050. var second = date.getSeconds();
  41051. minute = minute < 10 ? '0' + minute : minute;
  41052. second = second < 10 ? '0' + second : second;
  41053. if (returnType == 'full') {
  41054. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  41055. }
  41056. if (returnType == 'y-m-d') {
  41057. return y + '-' + m + '-' + d;
  41058. }
  41059. if (returnType == 'h:m') {
  41060. return h + ':' + minute;
  41061. }
  41062. if (returnType == 'h:m:s') {
  41063. return h + ':' + minute + ':' + second;
  41064. }
  41065. return [y, m, d, h, minute, second];
  41066. };
  41067. var cfu = {
  41068. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  41069. "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"],
  41070. "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"],
  41071. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  41072. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  41073. "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
  41074. //instance为实例变量承载属性,不要删除
  41075. "instance": {},
  41076. //option为opts及eopts承载属性,不要删除
  41077. "option": {},
  41078. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  41079. "formatter": {
  41080. "yAxisDemo1": function yAxisDemo1(val) {
  41081. return val + '元';
  41082. },
  41083. "yAxisDemo2": function yAxisDemo2(val) {
  41084. return val.toFixed(2);
  41085. },
  41086. "xAxisDemo1": function xAxisDemo1(val) {
  41087. return val + '年';
  41088. },
  41089. "xAxisDemo2": function xAxisDemo2(val) {
  41090. return formatDateTime(val, 'h:m');
  41091. },
  41092. "seriesDemo1": function seriesDemo1(val) {
  41093. return val + '元';
  41094. },
  41095. "tooltipDemo1": function tooltipDemo1(item, category, index, opts) {
  41096. if (index == 0) {
  41097. return '随便用' + item.data + '年';
  41098. } else {
  41099. return '其他我没改' + item.data + '天';
  41100. }
  41101. },
  41102. "pieDemo": function pieDemo(val, index, series) {
  41103. if (index !== undefined) {
  41104. return series[index].name + ':' + series[index].data + '元';
  41105. }
  41106. }
  41107. },
  41108. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  41109. "demotype": {
  41110. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  41111. "type": "line",
  41112. "color": color,
  41113. "padding": [15, 10, 0, 15],
  41114. "xAxis": {
  41115. "disableGrid": true
  41116. },
  41117. "yAxis": {
  41118. "gridType": "dash",
  41119. "dashLength": 2
  41120. },
  41121. "legend": {},
  41122. "extra": {
  41123. "line": {
  41124. "type": "curve",
  41125. "width": 2
  41126. }
  41127. }
  41128. },
  41129. //下面是自定义配置,请添加项目所需的通用配置
  41130. "pie": {
  41131. "type": "pie",
  41132. "color": color,
  41133. "padding": [5, 5, 5, 5],
  41134. "extra": {
  41135. "pie": {
  41136. "activeOpacity": 0.5,
  41137. "activeRadius": 10,
  41138. "offsetAngle": 0,
  41139. "labelWidth": 15,
  41140. "border": true,
  41141. "borderWidth": 3,
  41142. "borderColor": "#FFFFFF"
  41143. }
  41144. }
  41145. },
  41146. "ring": {
  41147. "type": "ring",
  41148. "color": color,
  41149. "padding": [5, 5, 5, 5],
  41150. "rotate": false,
  41151. "dataLabel": true,
  41152. "legend": {
  41153. "show": true,
  41154. "position": "right",
  41155. "lineHeight": 25
  41156. },
  41157. "title": {
  41158. "name": "收益率",
  41159. "fontSize": 15,
  41160. "color": "#666666"
  41161. },
  41162. "subtitle": {
  41163. "name": "70%",
  41164. "fontSize": 25,
  41165. "color": "#7cb5ec"
  41166. },
  41167. "extra": {
  41168. "ring": {
  41169. "ringWidth": 30,
  41170. "activeOpacity": 0.5,
  41171. "activeRadius": 10,
  41172. "offsetAngle": 0,
  41173. "labelWidth": 15,
  41174. "border": true,
  41175. "borderWidth": 3,
  41176. "borderColor": "#FFFFFF"
  41177. }
  41178. }
  41179. },
  41180. "rose": {
  41181. "type": "rose",
  41182. "color": color,
  41183. "padding": [5, 5, 5, 5],
  41184. "legend": {
  41185. "show": true,
  41186. "position": "left",
  41187. "lineHeight": 25
  41188. },
  41189. "extra": {
  41190. "rose": {
  41191. "type": "area",
  41192. "minRadius": 50,
  41193. "activeOpacity": 0.5,
  41194. "activeRadius": 10,
  41195. "offsetAngle": 0,
  41196. "labelWidth": 15,
  41197. "border": false,
  41198. "borderWidth": 2,
  41199. "borderColor": "#FFFFFF"
  41200. }
  41201. }
  41202. },
  41203. "word": {
  41204. "type": "word",
  41205. "color": color,
  41206. "extra": {
  41207. "word": {
  41208. "type": "normal",
  41209. "autoColors": false
  41210. }
  41211. }
  41212. },
  41213. "funnel": {
  41214. "type": "funnel",
  41215. "color": color,
  41216. "padding": [15, 15, 0, 15],
  41217. "extra": {
  41218. "funnel": {
  41219. "activeOpacity": 0.3,
  41220. "activeWidth": 10,
  41221. "border": true,
  41222. "borderWidth": 2,
  41223. "borderColor": "#FFFFFF",
  41224. "fillOpacity": 1,
  41225. "labelAlign": "right"
  41226. }
  41227. }
  41228. },
  41229. "map": {
  41230. "type": "map",
  41231. "color": color,
  41232. "padding": [0, 0, 0, 0],
  41233. "dataLabel": true,
  41234. "extra": {
  41235. "map": {
  41236. "border": true,
  41237. "borderWidth": 1,
  41238. "borderColor": "#666666",
  41239. "fillOpacity": 0.6,
  41240. "activeBorderColor": "#F04864",
  41241. "activeFillColor": "#FACC14",
  41242. "activeFillOpacity": 1
  41243. }
  41244. }
  41245. },
  41246. "arcbar": {
  41247. "type": "arcbar",
  41248. "color": color,
  41249. "title": {
  41250. "name": "百分比",
  41251. "fontSize": 25,
  41252. "color": "#00FF00"
  41253. },
  41254. "subtitle": {
  41255. "name": "默认标题",
  41256. "fontSize": 15,
  41257. "color": "#666666"
  41258. },
  41259. "extra": {
  41260. "arcbar": {
  41261. "type": "default",
  41262. "width": 12,
  41263. "backgroundColor": "#E9E9E9",
  41264. "startAngle": 0.75,
  41265. "endAngle": 0.25,
  41266. "gap": 2
  41267. }
  41268. }
  41269. },
  41270. "line": {
  41271. "type": "line",
  41272. "color": color,
  41273. "padding": [15, 10, 0, 15],
  41274. "xAxis": {
  41275. "disableGrid": true
  41276. },
  41277. "yAxis": {
  41278. "gridType": "dash",
  41279. "dashLength": 2
  41280. },
  41281. "legend": {},
  41282. "extra": {
  41283. "line": {
  41284. "type": "straight",
  41285. "width": 2
  41286. }
  41287. }
  41288. },
  41289. "tline": {
  41290. "type": "line",
  41291. "color": color,
  41292. "padding": [15, 10, 0, 15],
  41293. "xAxis": {
  41294. "disableGrid": false,
  41295. "boundaryGap": "justify"
  41296. },
  41297. "yAxis": {
  41298. "gridType": "dash",
  41299. "dashLength": 2,
  41300. "data": [{
  41301. "min": 0,
  41302. "max": 80
  41303. }]
  41304. },
  41305. "legend": {},
  41306. "extra": {
  41307. "line": {
  41308. "type": "curve",
  41309. "width": 2
  41310. }
  41311. }
  41312. },
  41313. "tarea": {
  41314. "type": "area",
  41315. "color": color,
  41316. "padding": [15, 10, 0, 15],
  41317. "xAxis": {
  41318. "disableGrid": true,
  41319. "boundaryGap": "justify"
  41320. },
  41321. "yAxis": {
  41322. "gridType": "dash",
  41323. "dashLength": 2,
  41324. "data": [{
  41325. "min": 0,
  41326. "max": 80
  41327. }]
  41328. },
  41329. "legend": {},
  41330. "extra": {
  41331. "area": {
  41332. "type": "curve",
  41333. "opacity": 0.2,
  41334. "addLine": true,
  41335. "width": 2,
  41336. "gradient": true
  41337. }
  41338. }
  41339. },
  41340. "column": {
  41341. "type": "column",
  41342. "color": color,
  41343. "padding": [15, 15, 0, 5],
  41344. "xAxis": {
  41345. "disableGrid": true
  41346. },
  41347. "yAxis": {
  41348. "data": [{
  41349. "min": 0
  41350. }]
  41351. },
  41352. "legend": {},
  41353. "extra": {
  41354. "column": {
  41355. "type": "group",
  41356. "width": 30,
  41357. "meterBorde": 1,
  41358. "meterFillColor": "#FFFFFF",
  41359. "activeBgColor": "#000000",
  41360. "activeBgOpacity": 0.08
  41361. }
  41362. }
  41363. },
  41364. "bar": {
  41365. "type": "bar",
  41366. "color": color,
  41367. "padding": [15, 30, 0, 5],
  41368. "xAxis": {
  41369. "boundaryGap": "justify",
  41370. "disableGrid": false,
  41371. "min": 0,
  41372. "axisLine": false
  41373. },
  41374. "yAxis": {},
  41375. "legend": {},
  41376. "extra": {
  41377. "bar": {
  41378. "type": "group",
  41379. "width": 30,
  41380. "meterBorde": 1,
  41381. "meterFillColor": "#FFFFFF",
  41382. "activeBgColor": "#000000",
  41383. "activeBgOpacity": 0.08
  41384. }
  41385. }
  41386. },
  41387. "area": {
  41388. "type": "area",
  41389. "color": color,
  41390. "padding": [15, 15, 0, 15],
  41391. "xAxis": {
  41392. "disableGrid": true
  41393. },
  41394. "yAxis": {
  41395. "gridType": "dash",
  41396. "dashLength": 2
  41397. },
  41398. "legend": {},
  41399. "extra": {
  41400. "area": {
  41401. "type": "straight",
  41402. "opacity": 0.2,
  41403. "addLine": true,
  41404. "width": 2,
  41405. "gradient": false
  41406. }
  41407. }
  41408. },
  41409. "radar": {
  41410. "type": "radar",
  41411. "color": color,
  41412. "padding": [5, 5, 5, 5],
  41413. "dataLabel": false,
  41414. "legend": {
  41415. "show": true,
  41416. "position": "right",
  41417. "lineHeight": 25
  41418. },
  41419. "extra": {
  41420. "radar": {
  41421. "gridType": "radar",
  41422. "gridColor": "#CCCCCC",
  41423. "gridCount": 3,
  41424. "opacity": 0.2,
  41425. "max": 200
  41426. }
  41427. }
  41428. },
  41429. "gauge": {
  41430. "type": "gauge",
  41431. "color": color,
  41432. "title": {
  41433. "name": "66Km/H",
  41434. "fontSize": 25,
  41435. "color": "#2fc25b",
  41436. "offsetY": 50
  41437. },
  41438. "subtitle": {
  41439. "name": "实时速度",
  41440. "fontSize": 15,
  41441. "color": "#1890ff",
  41442. "offsetY": -50
  41443. },
  41444. "extra": {
  41445. "gauge": {
  41446. "type": "default",
  41447. "width": 30,
  41448. "labelColor": "#666666",
  41449. "startAngle": 0.75,
  41450. "endAngle": 0.25,
  41451. "startNumber": 0,
  41452. "endNumber": 100,
  41453. "labelFormat": "",
  41454. "splitLine": {
  41455. "fixRadius": 0,
  41456. "splitNumber": 10,
  41457. "width": 30,
  41458. "color": "#FFFFFF",
  41459. "childNumber": 5,
  41460. "childWidth": 12
  41461. },
  41462. "pointer": {
  41463. "width": 24,
  41464. "color": "auto"
  41465. }
  41466. }
  41467. }
  41468. },
  41469. "candle": {
  41470. "type": "candle",
  41471. "color": color,
  41472. "padding": [15, 15, 0, 15],
  41473. "enableScroll": true,
  41474. "enableMarkLine": true,
  41475. "dataLabel": false,
  41476. "xAxis": {
  41477. "labelCount": 4,
  41478. "itemCount": 40,
  41479. "disableGrid": true,
  41480. "gridColor": "#CCCCCC",
  41481. "gridType": "solid",
  41482. "dashLength": 4,
  41483. "scrollShow": true,
  41484. "scrollAlign": "left",
  41485. "scrollColor": "#A6A6A6",
  41486. "scrollBackgroundColor": "#EFEBEF"
  41487. },
  41488. "yAxis": {},
  41489. "legend": {},
  41490. "extra": {
  41491. "candle": {
  41492. "color": {
  41493. "upLine": "#f04864",
  41494. "upFill": "#f04864",
  41495. "downLine": "#2fc25b",
  41496. "downFill": "#2fc25b"
  41497. },
  41498. "average": {
  41499. "show": true,
  41500. "name": ["MA5", "MA10", "MA30"],
  41501. "day": [5, 10, 20],
  41502. "color": ["#1890ff", "#2fc25b", "#facc14"]
  41503. }
  41504. },
  41505. "markLine": {
  41506. "type": "dash",
  41507. "dashLength": 5,
  41508. "data": [{
  41509. "value": 2150,
  41510. "lineColor": "#f04864",
  41511. "showLabel": true
  41512. }, {
  41513. "value": 2350,
  41514. "lineColor": "#f04864",
  41515. "showLabel": true
  41516. }]
  41517. }
  41518. }
  41519. },
  41520. "mix": {
  41521. "type": "mix",
  41522. "color": color,
  41523. "padding": [15, 15, 0, 15],
  41524. "xAxis": {
  41525. "disableGrid": true
  41526. },
  41527. "yAxis": {
  41528. "disabled": false,
  41529. "disableGrid": false,
  41530. "splitNumber": 5,
  41531. "gridType": "dash",
  41532. "dashLength": 4,
  41533. "gridColor": "#CCCCCC",
  41534. "padding": 10,
  41535. "showTitle": true,
  41536. "data": []
  41537. },
  41538. "legend": {},
  41539. "extra": {
  41540. "mix": {
  41541. "column": {
  41542. "width": 20
  41543. }
  41544. }
  41545. }
  41546. },
  41547. "scatter": {
  41548. "type": "scatter",
  41549. "color": color,
  41550. "padding": [15, 15, 0, 15],
  41551. "dataLabel": false,
  41552. "xAxis": {
  41553. "disableGrid": false,
  41554. "gridType": "dash",
  41555. "splitNumber": 5,
  41556. "boundaryGap": "justify",
  41557. "min": 0
  41558. },
  41559. "yAxis": {
  41560. "disableGrid": false,
  41561. "gridType": "dash"
  41562. },
  41563. "legend": {},
  41564. "extra": {
  41565. "scatter": {}
  41566. }
  41567. },
  41568. "bubble": {
  41569. "type": "bubble",
  41570. "color": color,
  41571. "padding": [15, 15, 0, 15],
  41572. "xAxis": {
  41573. "disableGrid": false,
  41574. "gridType": "dash",
  41575. "splitNumber": 5,
  41576. "boundaryGap": "justify",
  41577. "min": 0,
  41578. "max": 250
  41579. },
  41580. "yAxis": {
  41581. "disableGrid": false,
  41582. "gridType": "dash",
  41583. "data": [{
  41584. "min": 0,
  41585. "max": 150
  41586. }]
  41587. },
  41588. "legend": {},
  41589. "extra": {
  41590. "bubble": {
  41591. "border": 2,
  41592. "opacity": 0.5
  41593. }
  41594. }
  41595. }
  41596. };
  41597. var _default = cfu;
  41598. exports.default = _default;
  41599. /***/ }),
  41600. /***/ 51:
  41601. /*!*******************************************************************!*\
  41602. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  41603. \*******************************************************************/
  41604. /*! no static exports found */
  41605. /***/ (function(module, exports, __webpack_require__) {
  41606. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  41607. function _regeneratorRuntime() {
  41608. "use strict";
  41609. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  41610. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  41611. return exports;
  41612. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41613. var exports = {},
  41614. Op = Object.prototype,
  41615. hasOwn = Op.hasOwnProperty,
  41616. defineProperty = Object.defineProperty || function (obj, key, desc) {
  41617. obj[key] = desc.value;
  41618. },
  41619. $Symbol = "function" == typeof Symbol ? Symbol : {},
  41620. iteratorSymbol = $Symbol.iterator || "@@iterator",
  41621. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  41622. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  41623. function define(obj, key, value) {
  41624. return Object.defineProperty(obj, key, {
  41625. value: value,
  41626. enumerable: !0,
  41627. configurable: !0,
  41628. writable: !0
  41629. }), obj[key];
  41630. }
  41631. try {
  41632. define({}, "");
  41633. } catch (err) {
  41634. define = function define(obj, key, value) {
  41635. return obj[key] = value;
  41636. };
  41637. }
  41638. function wrap(innerFn, outerFn, self, tryLocsList) {
  41639. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  41640. generator = Object.create(protoGenerator.prototype),
  41641. context = new Context(tryLocsList || []);
  41642. return defineProperty(generator, "_invoke", {
  41643. value: makeInvokeMethod(innerFn, self, context)
  41644. }), generator;
  41645. }
  41646. function tryCatch(fn, obj, arg) {
  41647. try {
  41648. return {
  41649. type: "normal",
  41650. arg: fn.call(obj, arg)
  41651. };
  41652. } catch (err) {
  41653. return {
  41654. type: "throw",
  41655. arg: err
  41656. };
  41657. }
  41658. }
  41659. exports.wrap = wrap;
  41660. var ContinueSentinel = {};
  41661. function Generator() {}
  41662. function GeneratorFunction() {}
  41663. function GeneratorFunctionPrototype() {}
  41664. var IteratorPrototype = {};
  41665. define(IteratorPrototype, iteratorSymbol, function () {
  41666. return this;
  41667. });
  41668. var getProto = Object.getPrototypeOf,
  41669. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  41670. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  41671. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  41672. function defineIteratorMethods(prototype) {
  41673. ["next", "throw", "return"].forEach(function (method) {
  41674. define(prototype, method, function (arg) {
  41675. return this._invoke(method, arg);
  41676. });
  41677. });
  41678. }
  41679. function AsyncIterator(generator, PromiseImpl) {
  41680. function invoke(method, arg, resolve, reject) {
  41681. var record = tryCatch(generator[method], generator, arg);
  41682. if ("throw" !== record.type) {
  41683. var result = record.arg,
  41684. value = result.value;
  41685. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  41686. invoke("next", value, resolve, reject);
  41687. }, function (err) {
  41688. invoke("throw", err, resolve, reject);
  41689. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  41690. result.value = unwrapped, resolve(result);
  41691. }, function (error) {
  41692. return invoke("throw", error, resolve, reject);
  41693. });
  41694. }
  41695. reject(record.arg);
  41696. }
  41697. var previousPromise;
  41698. defineProperty(this, "_invoke", {
  41699. value: function value(method, arg) {
  41700. function callInvokeWithMethodAndArg() {
  41701. return new PromiseImpl(function (resolve, reject) {
  41702. invoke(method, arg, resolve, reject);
  41703. });
  41704. }
  41705. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  41706. }
  41707. });
  41708. }
  41709. function makeInvokeMethod(innerFn, self, context) {
  41710. var state = "suspendedStart";
  41711. return function (method, arg) {
  41712. if ("executing" === state) throw new Error("Generator is already running");
  41713. if ("completed" === state) {
  41714. if ("throw" === method) throw arg;
  41715. return doneResult();
  41716. }
  41717. for (context.method = method, context.arg = arg;;) {
  41718. var delegate = context.delegate;
  41719. if (delegate) {
  41720. var delegateResult = maybeInvokeDelegate(delegate, context);
  41721. if (delegateResult) {
  41722. if (delegateResult === ContinueSentinel) continue;
  41723. return delegateResult;
  41724. }
  41725. }
  41726. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  41727. if ("suspendedStart" === state) throw state = "completed", context.arg;
  41728. context.dispatchException(context.arg);
  41729. } else "return" === context.method && context.abrupt("return", context.arg);
  41730. state = "executing";
  41731. var record = tryCatch(innerFn, self, context);
  41732. if ("normal" === record.type) {
  41733. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  41734. return {
  41735. value: record.arg,
  41736. done: context.done
  41737. };
  41738. }
  41739. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  41740. }
  41741. };
  41742. }
  41743. function maybeInvokeDelegate(delegate, context) {
  41744. var methodName = context.method,
  41745. method = delegate.iterator[methodName];
  41746. 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;
  41747. var record = tryCatch(method, delegate.iterator, context.arg);
  41748. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  41749. var info = record.arg;
  41750. 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);
  41751. }
  41752. function pushTryEntry(locs) {
  41753. var entry = {
  41754. tryLoc: locs[0]
  41755. };
  41756. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  41757. }
  41758. function resetTryEntry(entry) {
  41759. var record = entry.completion || {};
  41760. record.type = "normal", delete record.arg, entry.completion = record;
  41761. }
  41762. function Context(tryLocsList) {
  41763. this.tryEntries = [{
  41764. tryLoc: "root"
  41765. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  41766. }
  41767. function values(iterable) {
  41768. if (iterable) {
  41769. var iteratorMethod = iterable[iteratorSymbol];
  41770. if (iteratorMethod) return iteratorMethod.call(iterable);
  41771. if ("function" == typeof iterable.next) return iterable;
  41772. if (!isNaN(iterable.length)) {
  41773. var i = -1,
  41774. next = function next() {
  41775. for (; ++i < iterable.length;) {
  41776. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  41777. }
  41778. return next.value = undefined, next.done = !0, next;
  41779. };
  41780. return next.next = next;
  41781. }
  41782. }
  41783. return {
  41784. next: doneResult
  41785. };
  41786. }
  41787. function doneResult() {
  41788. return {
  41789. value: undefined,
  41790. done: !0
  41791. };
  41792. }
  41793. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  41794. value: GeneratorFunctionPrototype,
  41795. configurable: !0
  41796. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  41797. value: GeneratorFunction,
  41798. configurable: !0
  41799. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  41800. var ctor = "function" == typeof genFun && genFun.constructor;
  41801. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  41802. }, exports.mark = function (genFun) {
  41803. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  41804. }, exports.awrap = function (arg) {
  41805. return {
  41806. __await: arg
  41807. };
  41808. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  41809. return this;
  41810. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  41811. void 0 === PromiseImpl && (PromiseImpl = Promise);
  41812. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  41813. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  41814. return result.done ? result.value : iter.next();
  41815. });
  41816. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  41817. return this;
  41818. }), define(Gp, "toString", function () {
  41819. return "[object Generator]";
  41820. }), exports.keys = function (val) {
  41821. var object = Object(val),
  41822. keys = [];
  41823. for (var key in object) {
  41824. keys.push(key);
  41825. }
  41826. return keys.reverse(), function next() {
  41827. for (; keys.length;) {
  41828. var key = keys.pop();
  41829. if (key in object) return next.value = key, next.done = !1, next;
  41830. }
  41831. return next.done = !0, next;
  41832. };
  41833. }, exports.values = values, Context.prototype = {
  41834. constructor: Context,
  41835. reset: function reset(skipTempReset) {
  41836. 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) {
  41837. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  41838. }
  41839. },
  41840. stop: function stop() {
  41841. this.done = !0;
  41842. var rootRecord = this.tryEntries[0].completion;
  41843. if ("throw" === rootRecord.type) throw rootRecord.arg;
  41844. return this.rval;
  41845. },
  41846. dispatchException: function dispatchException(exception) {
  41847. if (this.done) throw exception;
  41848. var context = this;
  41849. function handle(loc, caught) {
  41850. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  41851. }
  41852. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41853. var entry = this.tryEntries[i],
  41854. record = entry.completion;
  41855. if ("root" === entry.tryLoc) return handle("end");
  41856. if (entry.tryLoc <= this.prev) {
  41857. var hasCatch = hasOwn.call(entry, "catchLoc"),
  41858. hasFinally = hasOwn.call(entry, "finallyLoc");
  41859. if (hasCatch && hasFinally) {
  41860. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41861. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41862. } else if (hasCatch) {
  41863. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  41864. } else {
  41865. if (!hasFinally) throw new Error("try statement without catch or finally");
  41866. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  41867. }
  41868. }
  41869. }
  41870. },
  41871. abrupt: function abrupt(type, arg) {
  41872. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41873. var entry = this.tryEntries[i];
  41874. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  41875. var finallyEntry = entry;
  41876. break;
  41877. }
  41878. }
  41879. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  41880. var record = finallyEntry ? finallyEntry.completion : {};
  41881. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  41882. },
  41883. complete: function complete(record, afterLoc) {
  41884. if ("throw" === record.type) throw record.arg;
  41885. 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;
  41886. },
  41887. finish: function finish(finallyLoc) {
  41888. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41889. var entry = this.tryEntries[i];
  41890. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  41891. }
  41892. },
  41893. "catch": function _catch(tryLoc) {
  41894. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41895. var entry = this.tryEntries[i];
  41896. if (entry.tryLoc === tryLoc) {
  41897. var record = entry.completion;
  41898. if ("throw" === record.type) {
  41899. var thrown = record.arg;
  41900. resetTryEntry(entry);
  41901. }
  41902. return thrown;
  41903. }
  41904. }
  41905. throw new Error("illegal catch attempt");
  41906. },
  41907. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  41908. return this.delegate = {
  41909. iterator: values(iterable),
  41910. resultName: resultName,
  41911. nextLoc: nextLoc
  41912. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  41913. }
  41914. }, exports;
  41915. }
  41916. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41917. /***/ }),
  41918. /***/ 52:
  41919. /*!*****************************************************************!*\
  41920. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  41921. \*****************************************************************/
  41922. /*! no static exports found */
  41923. /***/ (function(module, exports) {
  41924. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  41925. try {
  41926. var info = gen[key](arg);
  41927. var value = info.value;
  41928. } catch (error) {
  41929. reject(error);
  41930. return;
  41931. }
  41932. if (info.done) {
  41933. resolve(value);
  41934. } else {
  41935. Promise.resolve(value).then(_next, _throw);
  41936. }
  41937. }
  41938. function _asyncToGenerator(fn) {
  41939. return function () {
  41940. var self = this,
  41941. args = arguments;
  41942. return new Promise(function (resolve, reject) {
  41943. var gen = fn.apply(self, args);
  41944. function _next(value) {
  41945. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  41946. }
  41947. function _throw(err) {
  41948. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  41949. }
  41950. _next(undefined);
  41951. });
  41952. };
  41953. }
  41954. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  41955. /***/ }),
  41956. /***/ 53:
  41957. /*!******************************************************************************!*\
  41958. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/timeFormat.js ***!
  41959. \******************************************************************************/
  41960. /*! no static exports found */
  41961. /***/ (function(module, exports, __webpack_require__) {
  41962. "use strict";
  41963. Object.defineProperty(exports, "__esModule", {
  41964. value: true
  41965. });
  41966. exports.default = void 0;
  41967. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  41968. // 所以这里做一个兼容polyfill的兼容处理
  41969. if (!String.prototype.padStart) {
  41970. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  41971. String.prototype.padStart = function (maxLength) {
  41972. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  41973. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  41974. var str = this;
  41975. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  41976. if (str.length >= maxLength) return String(str);
  41977. var fillLength = maxLength - str.length,
  41978. times = Math.ceil(fillLength / fillString.length);
  41979. while (times >>= 1) {
  41980. fillString += fillString;
  41981. if (times === 1) {
  41982. fillString += fillString;
  41983. }
  41984. }
  41985. return fillString.slice(0, fillLength) + str;
  41986. };
  41987. }
  41988. // 其他更多是格式化有如下:
  41989. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  41990. function timeFormat() {
  41991. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  41992. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  41993. // 如果为null,则格式化当前时间
  41994. if (!dateTime) dateTime = Number(new Date());
  41995. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  41996. if (dateTime.toString().length == 10) dateTime *= 1000;
  41997. var date = new Date(dateTime);
  41998. var ret;
  41999. var opt = {
  42000. "y+": date.getFullYear().toString(),
  42001. // 年
  42002. "m+": (date.getMonth() + 1).toString(),
  42003. // 月
  42004. "d+": date.getDate().toString(),
  42005. // 日
  42006. "h+": date.getHours().toString(),
  42007. // 时
  42008. "M+": date.getMinutes().toString(),
  42009. // 分
  42010. "s+": date.getSeconds().toString() // 秒
  42011. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  42012. };
  42013. for (var k in opt) {
  42014. ret = new RegExp("(" + k + ")").exec(fmt);
  42015. if (ret) {
  42016. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  42017. }
  42018. ;
  42019. }
  42020. ;
  42021. return fmt;
  42022. }
  42023. var _default = timeFormat;
  42024. exports.default = _default;
  42025. /***/ }),
  42026. /***/ 54:
  42027. /*!****************************************************************************!*\
  42028. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/timeFrom.js ***!
  42029. \****************************************************************************/
  42030. /*! no static exports found */
  42031. /***/ (function(module, exports, __webpack_require__) {
  42032. "use strict";
  42033. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42034. Object.defineProperty(exports, "__esModule", {
  42035. value: true
  42036. });
  42037. exports.default = void 0;
  42038. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 53));
  42039. /**
  42040. * 时间戳转为多久之前
  42041. * @param String timestamp 时间戳
  42042. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  42043. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  42044. */
  42045. function timeFrom() {
  42046. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  42047. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  42048. // 如果为null,则格式化当前时间
  42049. if (!dateTime) dateTime = Number(new Date());
  42050. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  42051. if (dateTime.toString().length == 10) dateTime *= 1000;
  42052. var timestamp = +new Date(Number(dateTime));
  42053. var timer = (Number(new Date()) - timestamp) / 1000;
  42054. // 如果小于5分钟,则返回"刚刚",其他以此类推
  42055. var tips = '';
  42056. switch (true) {
  42057. case timer < 300:
  42058. tips = '刚刚';
  42059. break;
  42060. case timer >= 300 && timer < 3600:
  42061. tips = parseInt(timer / 60) + '分钟前';
  42062. break;
  42063. case timer >= 3600 && timer < 86400:
  42064. tips = parseInt(timer / 3600) + '小时前';
  42065. break;
  42066. case timer >= 86400 && timer < 2592000:
  42067. tips = parseInt(timer / 86400) + '天前';
  42068. break;
  42069. default:
  42070. // 如果format为false,则无论什么时间戳,都显示xx之前
  42071. if (format === false) {
  42072. if (timer >= 2592000 && timer < 365 * 86400) {
  42073. tips = parseInt(timer / (86400 * 30)) + '个月前';
  42074. } else {
  42075. tips = parseInt(timer / (86400 * 365)) + '年前';
  42076. }
  42077. } else {
  42078. tips = (0, _timeFormat.default)(timestamp, format);
  42079. }
  42080. }
  42081. return tips;
  42082. }
  42083. var _default = timeFrom;
  42084. exports.default = _default;
  42085. /***/ }),
  42086. /***/ 55:
  42087. /*!*********************************************************************************!*\
  42088. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/colorGradient.js ***!
  42089. \*********************************************************************************/
  42090. /*! no static exports found */
  42091. /***/ (function(module, exports, __webpack_require__) {
  42092. "use strict";
  42093. Object.defineProperty(exports, "__esModule", {
  42094. value: true
  42095. });
  42096. exports.default = void 0;
  42097. /**
  42098. * 求两个颜色之间的渐变值
  42099. * @param {string} startColor 开始的颜色
  42100. * @param {string} endColor 结束的颜色
  42101. * @param {number} step 颜色等分的份额
  42102. * */
  42103. function colorGradient() {
  42104. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  42105. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  42106. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  42107. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  42108. var startR = startRGB[0];
  42109. var startG = startRGB[1];
  42110. var startB = startRGB[2];
  42111. var endRGB = hexToRgb(endColor, false);
  42112. var endR = endRGB[0];
  42113. var endG = endRGB[1];
  42114. var endB = endRGB[2];
  42115. var sR = (endR - startR) / step; //总差值
  42116. var sG = (endG - startG) / step;
  42117. var sB = (endB - startB) / step;
  42118. var colorArr = [];
  42119. for (var i = 0; i < step; i++) {
  42120. //计算每一步的hex值
  42121. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  42122. colorArr.push(hex);
  42123. }
  42124. return colorArr;
  42125. }
  42126. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  42127. function hexToRgb(sColor) {
  42128. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42129. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42130. sColor = sColor.toLowerCase();
  42131. if (sColor && reg.test(sColor)) {
  42132. if (sColor.length === 4) {
  42133. var sColorNew = "#";
  42134. for (var i = 1; i < 4; i += 1) {
  42135. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42136. }
  42137. sColor = sColorNew;
  42138. }
  42139. //处理六位的颜色值
  42140. var sColorChange = [];
  42141. for (var _i = 1; _i < 7; _i += 2) {
  42142. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  42143. }
  42144. if (!str) {
  42145. return sColorChange;
  42146. } else {
  42147. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  42148. }
  42149. } else if (/^(rgb|RGB)/.test(sColor)) {
  42150. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42151. return arr.map(function (val) {
  42152. return Number(val);
  42153. });
  42154. } else {
  42155. return sColor;
  42156. }
  42157. }
  42158. ;
  42159. // 将rgb表示方式转换为hex表示方式
  42160. function rgbToHex(rgb) {
  42161. var _this = rgb;
  42162. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42163. if (/^(rgb|RGB)/.test(_this)) {
  42164. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  42165. var strHex = "#";
  42166. for (var i = 0; i < aColor.length; i++) {
  42167. var hex = Number(aColor[i]).toString(16);
  42168. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  42169. if (hex === "0") {
  42170. hex += hex;
  42171. }
  42172. strHex += hex;
  42173. }
  42174. if (strHex.length !== 7) {
  42175. strHex = _this;
  42176. }
  42177. return strHex;
  42178. } else if (reg.test(_this)) {
  42179. var aNum = _this.replace(/#/, "").split("");
  42180. if (aNum.length === 6) {
  42181. return _this;
  42182. } else if (aNum.length === 3) {
  42183. var numHex = "#";
  42184. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  42185. numHex += aNum[_i2] + aNum[_i2];
  42186. }
  42187. return numHex;
  42188. }
  42189. } else {
  42190. return _this;
  42191. }
  42192. }
  42193. /**
  42194. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  42195. * sHex为传入的十六进制的色值
  42196. * alpha为rgba的透明度
  42197. */
  42198. function colorToRgba(color) {
  42199. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  42200. color = rgbToHex(color);
  42201. // 十六进制颜色值的正则表达式
  42202. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  42203. /* 16进制颜色转为RGB格式 */
  42204. var sColor = color.toLowerCase();
  42205. if (sColor && reg.test(sColor)) {
  42206. if (sColor.length === 4) {
  42207. var sColorNew = '#';
  42208. for (var i = 1; i < 4; i += 1) {
  42209. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  42210. }
  42211. sColor = sColorNew;
  42212. }
  42213. // 处理六位的颜色值
  42214. var sColorChange = [];
  42215. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  42216. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  42217. }
  42218. // return sColorChange.join(',')
  42219. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  42220. } else {
  42221. return sColor;
  42222. }
  42223. }
  42224. var _default = {
  42225. colorGradient: colorGradient,
  42226. hexToRgb: hexToRgb,
  42227. rgbToHex: rgbToHex,
  42228. colorToRgba: colorToRgba
  42229. };
  42230. exports.default = _default;
  42231. /***/ }),
  42232. /***/ 56:
  42233. /*!************************************************************************!*\
  42234. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/guid.js ***!
  42235. \************************************************************************/
  42236. /*! no static exports found */
  42237. /***/ (function(module, exports, __webpack_require__) {
  42238. "use strict";
  42239. Object.defineProperty(exports, "__esModule", {
  42240. value: true
  42241. });
  42242. exports.default = void 0;
  42243. /**
  42244. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  42245. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  42246. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  42247. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  42248. * v-for的时候,推荐使用后端返回的id而不是循环的index
  42249. * @param {Number} len uuid的长度
  42250. * @param {Boolean} firstU 将返回的首字母置为"u"
  42251. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  42252. */
  42253. function guid() {
  42254. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  42255. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42256. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  42257. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  42258. var uuid = [];
  42259. radix = radix || chars.length;
  42260. if (len) {
  42261. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  42262. for (var i = 0; i < len; i++) {
  42263. uuid[i] = chars[0 | Math.random() * radix];
  42264. }
  42265. } else {
  42266. var r;
  42267. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  42268. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  42269. uuid[14] = '4';
  42270. for (var _i = 0; _i < 36; _i++) {
  42271. if (!uuid[_i]) {
  42272. r = 0 | Math.random() * 16;
  42273. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  42274. }
  42275. }
  42276. }
  42277. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  42278. if (firstU) {
  42279. uuid.shift();
  42280. return 'u' + uuid.join('');
  42281. } else {
  42282. return uuid.join('');
  42283. }
  42284. }
  42285. var _default = guid;
  42286. exports.default = _default;
  42287. /***/ }),
  42288. /***/ 57:
  42289. /*!*************************************************************************!*\
  42290. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/color.js ***!
  42291. \*************************************************************************/
  42292. /*! no static exports found */
  42293. /***/ (function(module, exports, __webpack_require__) {
  42294. "use strict";
  42295. Object.defineProperty(exports, "__esModule", {
  42296. value: true
  42297. });
  42298. exports.default = void 0;
  42299. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  42300. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  42301. var color = {
  42302. primary: "#2979ff",
  42303. primaryDark: "#2b85e4",
  42304. primaryDisabled: "#a0cfff",
  42305. primaryLight: "#ecf5ff",
  42306. bgColor: "#f3f4f6",
  42307. info: "#909399",
  42308. infoDark: "#82848a",
  42309. infoDisabled: "#c8c9cc",
  42310. infoLight: "#f4f4f5",
  42311. warning: "#ff9900",
  42312. warningDark: "#f29100",
  42313. warningDisabled: "#fcbd71",
  42314. warningLight: "#fdf6ec",
  42315. error: "#fa3534",
  42316. errorDark: "#dd6161",
  42317. errorDisabled: "#fab6b6",
  42318. errorLight: "#fef0f0",
  42319. success: "#19be6b",
  42320. successDark: "#18b566",
  42321. successDisabled: "#71d5a1",
  42322. successLight: "#dbf1e1",
  42323. mainColor: "#303133",
  42324. contentColor: "#606266",
  42325. tipsColor: "#909399",
  42326. lightColor: "#c0c4cc",
  42327. borderColor: "#e4e7ed"
  42328. };
  42329. var _default = color;
  42330. exports.default = _default;
  42331. /***/ }),
  42332. /***/ 58:
  42333. /*!*****************************************************************************!*\
  42334. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/type2icon.js ***!
  42335. \*****************************************************************************/
  42336. /*! no static exports found */
  42337. /***/ (function(module, exports, __webpack_require__) {
  42338. "use strict";
  42339. Object.defineProperty(exports, "__esModule", {
  42340. value: true
  42341. });
  42342. exports.default = void 0;
  42343. /**
  42344. * 根据主题type值,获取对应的图标
  42345. * @param String type 主题名称,primary|info|error|warning|success
  42346. * @param String fill 是否使用fill填充实体的图标
  42347. */
  42348. function type2icon() {
  42349. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  42350. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  42351. // 如果非预置值,默认为success
  42352. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  42353. var iconName = '';
  42354. // 目前(2019-12-12),info和primary使用同一个图标
  42355. switch (type) {
  42356. case 'primary':
  42357. iconName = 'info-circle';
  42358. break;
  42359. case 'info':
  42360. iconName = 'info-circle';
  42361. break;
  42362. case 'error':
  42363. iconName = 'close-circle';
  42364. break;
  42365. case 'warning':
  42366. iconName = 'error-circle';
  42367. break;
  42368. case 'success':
  42369. iconName = 'checkmark-circle';
  42370. break;
  42371. default:
  42372. iconName = 'checkmark-circle';
  42373. }
  42374. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  42375. if (fill) iconName += '-fill';
  42376. return iconName;
  42377. }
  42378. var _default = type2icon;
  42379. exports.default = _default;
  42380. /***/ }),
  42381. /***/ 59:
  42382. /*!*******************************************************************************!*\
  42383. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/randomArray.js ***!
  42384. \*******************************************************************************/
  42385. /*! no static exports found */
  42386. /***/ (function(module, exports, __webpack_require__) {
  42387. "use strict";
  42388. Object.defineProperty(exports, "__esModule", {
  42389. value: true
  42390. });
  42391. exports.default = void 0;
  42392. // 打乱数组
  42393. function randomArray() {
  42394. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  42395. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  42396. return array.sort(function () {
  42397. return Math.random() - 0.5;
  42398. });
  42399. }
  42400. var _default = randomArray;
  42401. exports.default = _default;
  42402. /***/ }),
  42403. /***/ 6:
  42404. /*!***************************************************************!*\
  42405. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  42406. \***************************************************************/
  42407. /*! no static exports found */
  42408. /***/ (function(module, exports) {
  42409. function _arrayWithHoles(arr) {
  42410. if (Array.isArray(arr)) return arr;
  42411. }
  42412. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42413. /***/ }),
  42414. /***/ 60:
  42415. /*!***************************************************************************!*\
  42416. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/addUnit.js ***!
  42417. \***************************************************************************/
  42418. /*! no static exports found */
  42419. /***/ (function(module, exports, __webpack_require__) {
  42420. "use strict";
  42421. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42422. Object.defineProperty(exports, "__esModule", {
  42423. value: true
  42424. });
  42425. exports.default = addUnit;
  42426. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 47));
  42427. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  42428. function addUnit() {
  42429. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  42430. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  42431. value = String(value);
  42432. // 用uView内置验证规则中的number判断是否为数值
  42433. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  42434. }
  42435. /***/ }),
  42436. /***/ 61:
  42437. /*!**************************************************************************!*\
  42438. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/random.js ***!
  42439. \**************************************************************************/
  42440. /*! no static exports found */
  42441. /***/ (function(module, exports, __webpack_require__) {
  42442. "use strict";
  42443. Object.defineProperty(exports, "__esModule", {
  42444. value: true
  42445. });
  42446. exports.default = void 0;
  42447. function random(min, max) {
  42448. if (min >= 0 && max > 0 && max >= min) {
  42449. var gab = max - min + 1;
  42450. return Math.floor(Math.random() * gab + min);
  42451. } else {
  42452. return 0;
  42453. }
  42454. }
  42455. var _default = random;
  42456. exports.default = _default;
  42457. /***/ }),
  42458. /***/ 62:
  42459. /*!************************************************************************!*\
  42460. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/trim.js ***!
  42461. \************************************************************************/
  42462. /*! no static exports found */
  42463. /***/ (function(module, exports, __webpack_require__) {
  42464. "use strict";
  42465. Object.defineProperty(exports, "__esModule", {
  42466. value: true
  42467. });
  42468. exports.default = void 0;
  42469. function trim(str) {
  42470. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  42471. if (pos == 'both') {
  42472. return str.replace(/^\s+|\s+$/g, "");
  42473. } else if (pos == "left") {
  42474. return str.replace(/^\s*/, '');
  42475. } else if (pos == 'right') {
  42476. return str.replace(/(\s*$)/g, "");
  42477. } else if (pos == 'all') {
  42478. return str.replace(/\s+/g, "");
  42479. } else {
  42480. return str;
  42481. }
  42482. }
  42483. var _default = trim;
  42484. exports.default = _default;
  42485. /***/ }),
  42486. /***/ 63:
  42487. /*!*************************************************************************!*\
  42488. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/toast.js ***!
  42489. \*************************************************************************/
  42490. /*! no static exports found */
  42491. /***/ (function(module, exports, __webpack_require__) {
  42492. "use strict";
  42493. /* WEBPACK VAR INJECTION */(function(uni) {
  42494. Object.defineProperty(exports, "__esModule", {
  42495. value: true
  42496. });
  42497. exports.default = void 0;
  42498. function toast(title) {
  42499. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  42500. uni.showToast({
  42501. title: title,
  42502. icon: 'none',
  42503. duration: duration
  42504. });
  42505. }
  42506. var _default = toast;
  42507. exports.default = _default;
  42508. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42509. /***/ }),
  42510. /***/ 64:
  42511. /*!*****************************************************************************!*\
  42512. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/getParent.js ***!
  42513. \*****************************************************************************/
  42514. /*! no static exports found */
  42515. /***/ (function(module, exports, __webpack_require__) {
  42516. "use strict";
  42517. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  42518. Object.defineProperty(exports, "__esModule", {
  42519. value: true
  42520. });
  42521. exports.default = getParent;
  42522. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  42523. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42524. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42525. function getParent(name, keys) {
  42526. var parent = this.$parent;
  42527. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42528. while (parent) {
  42529. // 父组件
  42530. if (parent.$options.name !== name) {
  42531. // 如果组件的name不相等,继续上一级寻找
  42532. parent = parent.$parent;
  42533. } else {
  42534. var _ret = function () {
  42535. var data = {};
  42536. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  42537. if (Array.isArray(keys)) {
  42538. keys.map(function (val) {
  42539. data[val] = parent[val] ? parent[val] : '';
  42540. });
  42541. } else {
  42542. // 历遍传过来的对象参数
  42543. for (var i in keys) {
  42544. // 如果子组件有此值则用,无此值则用父组件的值
  42545. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  42546. if (Array.isArray(keys[i])) {
  42547. if (keys[i].length) {
  42548. data[i] = keys[i];
  42549. } else {
  42550. data[i] = parent[i];
  42551. }
  42552. } else if (keys[i].constructor === Object) {
  42553. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  42554. if (Object.keys(keys[i]).length) {
  42555. data[i] = keys[i];
  42556. } else {
  42557. data[i] = parent[i];
  42558. }
  42559. } else {
  42560. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  42561. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  42562. }
  42563. }
  42564. }
  42565. return {
  42566. v: data
  42567. };
  42568. }();
  42569. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  42570. }
  42571. }
  42572. return {};
  42573. }
  42574. /***/ }),
  42575. /***/ 65:
  42576. /*!***************************************************************************!*\
  42577. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/$parent.js ***!
  42578. \***************************************************************************/
  42579. /*! no static exports found */
  42580. /***/ (function(module, exports, __webpack_require__) {
  42581. "use strict";
  42582. Object.defineProperty(exports, "__esModule", {
  42583. value: true
  42584. });
  42585. exports.default = $parent;
  42586. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  42587. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  42588. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  42589. // 值(默认为undefined),就是查找最顶层的$parent
  42590. function $parent() {
  42591. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  42592. var parent = this.$parent;
  42593. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  42594. while (parent) {
  42595. // 父组件
  42596. if (parent.$options && parent.$options.name !== name) {
  42597. // 如果组件的name不相等,继续上一级寻找
  42598. parent = parent.$parent;
  42599. } else {
  42600. return parent;
  42601. }
  42602. }
  42603. return false;
  42604. }
  42605. /***/ }),
  42606. /***/ 66:
  42607. /*!***********************************************************************!*\
  42608. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/sys.js ***!
  42609. \***********************************************************************/
  42610. /*! no static exports found */
  42611. /***/ (function(module, exports, __webpack_require__) {
  42612. "use strict";
  42613. /* WEBPACK VAR INJECTION */(function(uni) {
  42614. Object.defineProperty(exports, "__esModule", {
  42615. value: true
  42616. });
  42617. exports.os = os;
  42618. exports.sys = sys;
  42619. function os() {
  42620. return uni.getSystemInfoSync().platform;
  42621. }
  42622. ;
  42623. function sys() {
  42624. return uni.getSystemInfoSync();
  42625. }
  42626. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  42627. /***/ }),
  42628. /***/ 67:
  42629. /*!****************************************************************************!*\
  42630. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/debounce.js ***!
  42631. \****************************************************************************/
  42632. /*! no static exports found */
  42633. /***/ (function(module, exports, __webpack_require__) {
  42634. "use strict";
  42635. Object.defineProperty(exports, "__esModule", {
  42636. value: true
  42637. });
  42638. exports.default = void 0;
  42639. var timeout = null;
  42640. /**
  42641. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  42642. *
  42643. * @param {Function} func 要执行的回调函数
  42644. * @param {Number} wait 延时的时间
  42645. * @param {Boolean} immediate 是否立即执行
  42646. * @return null
  42647. */
  42648. function debounce(func) {
  42649. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42650. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  42651. // 清除定时器
  42652. if (timeout !== null) clearTimeout(timeout);
  42653. // 立即执行,此类情况一般用不到
  42654. if (immediate) {
  42655. var callNow = !timeout;
  42656. timeout = setTimeout(function () {
  42657. timeout = null;
  42658. }, wait);
  42659. if (callNow) typeof func === 'function' && func();
  42660. } else {
  42661. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  42662. timeout = setTimeout(function () {
  42663. typeof func === 'function' && func();
  42664. }, wait);
  42665. }
  42666. }
  42667. var _default = debounce;
  42668. exports.default = _default;
  42669. /***/ }),
  42670. /***/ 68:
  42671. /*!****************************************************************************!*\
  42672. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/function/throttle.js ***!
  42673. \****************************************************************************/
  42674. /*! no static exports found */
  42675. /***/ (function(module, exports, __webpack_require__) {
  42676. "use strict";
  42677. Object.defineProperty(exports, "__esModule", {
  42678. value: true
  42679. });
  42680. exports.default = void 0;
  42681. var timer, flag;
  42682. /**
  42683. * 节流原理:在一定时间内,只能触发一次
  42684. *
  42685. * @param {Function} func 要执行的回调函数
  42686. * @param {Number} wait 延时的时间
  42687. * @param {Boolean} immediate 是否立即执行
  42688. * @return null
  42689. */
  42690. function throttle(func) {
  42691. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  42692. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  42693. if (immediate) {
  42694. if (!flag) {
  42695. flag = true;
  42696. // 如果是立即执行,则在wait毫秒内开始时执行
  42697. typeof func === 'function' && func();
  42698. timer = setTimeout(function () {
  42699. flag = false;
  42700. }, wait);
  42701. }
  42702. } else {
  42703. if (!flag) {
  42704. flag = true;
  42705. // 如果是非立即执行,则在wait毫秒内的结束处执行
  42706. timer = setTimeout(function () {
  42707. flag = false;
  42708. typeof func === 'function' && func();
  42709. }, wait);
  42710. }
  42711. }
  42712. }
  42713. ;
  42714. var _default = throttle;
  42715. exports.default = _default;
  42716. /***/ }),
  42717. /***/ 69:
  42718. /*!************************************************************************!*\
  42719. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/config/config.js ***!
  42720. \************************************************************************/
  42721. /*! no static exports found */
  42722. /***/ (function(module, exports, __webpack_require__) {
  42723. "use strict";
  42724. Object.defineProperty(exports, "__esModule", {
  42725. value: true
  42726. });
  42727. exports.default = void 0;
  42728. // 此版本发布于2022-04-19
  42729. var version = '1.8.6';
  42730. var _default = {
  42731. v: version,
  42732. version: version,
  42733. // 主题名称
  42734. type: ['primary', 'success', 'info', 'error', 'warning']
  42735. };
  42736. exports.default = _default;
  42737. /***/ }),
  42738. /***/ 7:
  42739. /*!*********************************************************************!*\
  42740. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  42741. \*********************************************************************/
  42742. /*! no static exports found */
  42743. /***/ (function(module, exports) {
  42744. function _iterableToArrayLimit(arr, i) {
  42745. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  42746. if (null != _i) {
  42747. var _s,
  42748. _e,
  42749. _x,
  42750. _r,
  42751. _arr = [],
  42752. _n = !0,
  42753. _d = !1;
  42754. try {
  42755. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  42756. if (Object(_i) !== _i) return;
  42757. _n = !1;
  42758. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  42759. ;
  42760. }
  42761. } catch (err) {
  42762. _d = !0, _e = err;
  42763. } finally {
  42764. try {
  42765. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  42766. } finally {
  42767. if (_d) throw _e;
  42768. }
  42769. }
  42770. return _arr;
  42771. }
  42772. }
  42773. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42774. /***/ }),
  42775. /***/ 70:
  42776. /*!************************************************************************!*\
  42777. !*** D:/IdeaProjects/zdsz_WeChatApplet/uview-ui/libs/config/zIndex.js ***!
  42778. \************************************************************************/
  42779. /*! no static exports found */
  42780. /***/ (function(module, exports, __webpack_require__) {
  42781. "use strict";
  42782. Object.defineProperty(exports, "__esModule", {
  42783. value: true
  42784. });
  42785. exports.default = void 0;
  42786. // uniapp在H5中各API的z-index值如下:
  42787. /**
  42788. * actionsheet: 999
  42789. * modal: 999
  42790. * navigate: 998
  42791. * tabbar: 998
  42792. * toast: 999
  42793. */
  42794. var _default = {
  42795. toast: 10090,
  42796. noNetwork: 10080,
  42797. // popup包含popup,actionsheet,keyboard,picker的值
  42798. popup: 10075,
  42799. mask: 10070,
  42800. navbar: 980,
  42801. topTips: 975,
  42802. sticky: 970,
  42803. indexListSticky: 965
  42804. };
  42805. exports.default = _default;
  42806. /***/ }),
  42807. /***/ 8:
  42808. /*!***************************************************************************!*\
  42809. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  42810. \***************************************************************************/
  42811. /*! no static exports found */
  42812. /***/ (function(module, exports, __webpack_require__) {
  42813. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  42814. function _unsupportedIterableToArray(o, minLen) {
  42815. if (!o) return;
  42816. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  42817. var n = Object.prototype.toString.call(o).slice(8, -1);
  42818. if (n === "Object" && o.constructor) n = o.constructor.name;
  42819. if (n === "Map" || n === "Set") return Array.from(o);
  42820. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  42821. }
  42822. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42823. /***/ }),
  42824. /***/ 9:
  42825. /*!*****************************************************************!*\
  42826. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  42827. \*****************************************************************/
  42828. /*! no static exports found */
  42829. /***/ (function(module, exports) {
  42830. function _arrayLikeToArray(arr, len) {
  42831. if (len == null || len > arr.length) len = arr.length;
  42832. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  42833. arr2[i] = arr[i];
  42834. }
  42835. return arr2;
  42836. }
  42837. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  42838. /***/ })
  42839. }]);
  42840. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map